From 5e711bc019862c7f2d604da02c1eb3462c5cc30d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 21:32:21 +0900 Subject: [PATCH 001/687] Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) Altered the comparison into a strong assertion (previous check is simply a weak assumption). Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/CommonHolidays.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index a5481722e..b2b0e2c68 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -455,7 +455,7 @@ public function summerTime($year, $timezone, $locale, $type = null): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, true); - if ($date) { + if ($date instanceof \DateTimeImmutable) { return new Holiday( 'summerTime', [], @@ -485,11 +485,11 @@ public function summerTime($year, $timezone, $locale, $type = null): ?Holiday * @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 \DateTimeImmutable|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 */ - protected function calculateSummerWinterTime($year, $timezone, $summer): ?DateTime + protected function calculateSummerWinterTime($year, $timezone, $summer): ?\DateTimeImmutable { $zone = new DateTimeZone($timezone); @@ -500,7 +500,7 @@ protected function calculateSummerWinterTime($year, $timezone, $summer): ?DateTi foreach ($transitions as $transition) { if ($transition['isdst'] !== $dst && $transition['isdst'] === $summer) { - return new DateTime(\substr($transition['time'], 0, 10), $zone); + return new \DateTimeImmutable(\substr($transition['time'], 0, 10), $zone); } $dst = $transition['isdst']; } @@ -529,7 +529,7 @@ public function winterTime($year, $timezone, $locale, $type = null): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, false); - if ($date) { + if ($date instanceof \DateTimeImmutable) { return new Holiday( 'winterTime', [], From e9187bfbf6969b8b1d159c227339198aa73d018c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 21:43:13 +0900 Subject: [PATCH 002/687] Removed unused variable. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 60f187909..c15ed325f 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -537,7 +537,7 @@ private function calculateSubstituteHolidays(): void $dates = $this->getHolidayDates(); // Loop through all holidays - foreach ($this->getHolidays() as $shortName => $holiday) { + foreach ($this->getHolidays() as $holiday) { $date = clone $holiday; // If holidays falls on a Sunday From 6ef3440246541abf1ea35d9bf184eb7aa736b0db Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 22:47:45 +0900 Subject: [PATCH 003/687] Remove unnecessary brackets. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Finland.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 427b975a3..00ed19e81 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -140,7 +140,7 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa return 0; } - return ($dateA < $dateB) ? -1 : 1; + return $dateA < $dateB ? -1 : 1; } /** diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 00f861a9c..f93ea1330 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -85,7 +85,7 @@ public function initialize(): void */ private function calculateStJohnsDay(): void { - $stJohnsDay = ($this->year < 1955) ? "$this->year-6-24" : "$this->year-6-20 this saturday"; + $stJohnsDay = $this->year < 1955 ? "$this->year-6-24" : "$this->year-6-20 this saturday"; $this->addHoliday(new Holiday( 'stJohnsDay', From 3294d05434ad87f6b2aa1eabd2f4d4709499acce Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 22:54:20 +0900 Subject: [PATCH 004/687] Set nullable parameters as such. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 00ed19e81..d3592aaf1 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -106,7 +106,7 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato * represented * @param TranslationsInterface|null $globalTranslations global translations */ - public function __construct($year, $locale = null, TranslationsInterface $globalTranslations = null) + public function __construct($year, $locale = null, ?TranslationsInterface $globalTranslations = null) { $this->clearHolidays(); diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index e1f4c0417..d89a95c82 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -268,7 +268,7 @@ protected function calculateSummerBankHoliday(): void * * @throws \Exception */ - protected function calculateChristmasHolidays(string $type = null): void + protected function calculateChristmasHolidays(?string $type = null): void { $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); From 4982af8d04ddbd76d3dfb707100b103f2fd4065f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 23:03:53 +0900 Subject: [PATCH 005/687] Minor formatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Translations.php | 1 + src/Yasumi/Yasumi.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index ec4abe1d5..f0db6aeeb 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -89,6 +89,7 @@ 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. * diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index e9280365a..6b614a5a2 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -78,7 +78,6 @@ class Yasumi * @throws InvalidDateException * * @TODO we should accept a timezone so we can accept int/string for $startDate - * */ public static function nextWorkingDay( string $class, From d7e6132bb17d444281adb667b166f543e77676c6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 23:18:05 +0900 Subject: [PATCH 006/687] Simplified conditional structure. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia/ACT.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 4fc035f2e..270364e49 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -161,12 +161,16 @@ private function calculateLabourDay(): void */ 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' => 'Canberra Day'], $date, $this->locale)); + $datePattern = $this->year < 2007 ? "third monday of march $this->year" : "second monday of march $this->year"; + + $this->addHoliday( + new Holiday( + 'canberraDay', + ['en' => 'Canberra Day'], + new DateTime($datePattern, new DateTimeZone($this->timezone)), + $this->locale + ) + ); } /** From d304a1d2b7859486836cf25d8bbf8e8735007fc2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 7 Oct 2019 23:40:22 +0900 Subject: [PATCH 007/687] Added missing return type Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 4 ++-- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Yasumi.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index d3592aaf1..77155c2a4 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -120,7 +120,7 @@ public function __construct($year, $locale = null, ?TranslationsInterface $globa /** * Clear all holidays. */ - protected function clearHolidays() + protected function clearHolidays(): void { $this->holidays = []; } @@ -149,7 +149,7 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa * @param Holiday $holiday Holiday instance (representing a holiday) to be added to the internal list * of holidays of this country. */ - public function addHoliday(Holiday $holiday) + public function addHoliday(Holiday $holiday): void { if ($this->globalTranslations instanceof TranslationsInterface) { $holiday->mergeGlobalTranslations($this->globalTranslations); diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 9c52175f3..89a46f947 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -24,5 +24,5 @@ interface ProviderInterface /** * Initialize country holidays. */ - public function initialize(); + public function initialize(): void; } diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 1b2559dc5..371dc62be 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -102,7 +102,7 @@ public function getName(): string * * @param TranslationsInterface $globalTranslations global translations */ - public function mergeGlobalTranslations(TranslationsInterface $globalTranslations) + public function mergeGlobalTranslations(TranslationsInterface $globalTranslations): void { $this->substituteHolidayTranslations = $globalTranslations->getTranslations('substituteHoliday'); diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 6b614a5a2..033748572 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -115,7 +115,7 @@ public static function nextWorkingDay( * between 1000 and 9999. * @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 + * @return ProviderInterface 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 From fd97b5c732a66366858a4ae57fda6e9669e060d1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 8 Oct 2019 22:27:21 +0900 Subject: [PATCH 008/687] Removed the assertion of the instance type as it is already defined by the return type. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 4 +--- tests/Finland/stJohnsDayTest.php | 1 - tests/Sweden/StJohnsDayTest.php | 1 - tests/Sweden/StJohnsEveTest.php | 1 - tests/YasumiBase.php | 5 ----- 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index f65159114..c29071318 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -27,6 +27,7 @@ use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\AbstractProvider; +use Yasumi\ProviderInterface; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -108,7 +109,6 @@ public function testCreateWithAbstractExtension(): void $class, Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) ); - $this->assertInstanceOf($class, $instance); } /** @@ -138,7 +138,6 @@ public function testGetIterator(): void Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) ); - $this->assertInstanceOf(ArrayIterator::class, $holidays->getIterator()); } /** @@ -579,7 +578,6 @@ public function testCreateByISO3166_2(): void $year ); - $this->assertInstanceOf(AbstractProvider::class, $provider); $this->assertEquals($year, $provider->getYear()); } diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index e1c63bc21..c9c28ced9 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -67,7 +67,6 @@ public function testHolidayAfterAdjustment() $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); diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index 6e68e55e3..b97fa24a0 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -39,7 +39,6 @@ public function testHoliday() $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); diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index 9279cdec7..5677d4b51 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -39,7 +39,6 @@ public function testHoliday() $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); diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 8677c9116..c99c40d5b 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -104,7 +104,6 @@ public function assertHoliday($provider, $shortName, $year, $expected): void $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); - $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertNotNull($holiday); $this->assertEquals($expected, $holiday); @@ -132,7 +131,6 @@ public function assertNotHoliday($provider, $shortName, $year): void $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); - $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertNull($holiday); unset($holiday, $holidays); @@ -157,7 +155,6 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans $holidays = Yasumi::create($provider, $year); $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)); @@ -205,7 +202,6 @@ public function assertHolidayType($provider, $shortName, $year, $type): void $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); - $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertNotNull($holiday); $this->assertEquals($type, $holiday->getType()); @@ -233,7 +229,6 @@ public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek $holidays = Yasumi::create($provider, $year); $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)); From c93be03e14d00a1218985b8044463e678f39d719 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 8 Oct 2019 22:57:02 +0900 Subject: [PATCH 009/687] Set proper return type (equal to createISO3166_2 method). Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 4 ++-- tests/Base/YasumiExternalProvider.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 033748572..ff5bdf16f 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -115,7 +115,7 @@ public static function nextWorkingDay( * between 1000 and 9999. * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * - * @return ProviderInterface An instance of class $class is created and returned + * @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 @@ -123,7 +123,7 @@ public static function nextWorkingDay( * @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 + public static function create(string $class, int $year = 0, string $locale = self::DEFAULT_LOCALE): AbstractProvider { // Find and return holiday provider instance $providerClass = \sprintf('Yasumi\Provider\%s', \str_replace('/', '\\', $class)); diff --git a/tests/Base/YasumiExternalProvider.php b/tests/Base/YasumiExternalProvider.php index 2dccb5642..40ab9c0e9 100644 --- a/tests/Base/YasumiExternalProvider.php +++ b/tests/Base/YasumiExternalProvider.php @@ -12,14 +12,14 @@ namespace Yasumi\tests\Base; -use Yasumi\ProviderInterface; +use Yasumi\Provider\AbstractProvider; /** * Class YasumiExternalProvider. * * Class for testing the use of an external holiday provider class. */ -class YasumiExternalProvider implements ProviderInterface +class YasumiExternalProvider extends AbstractProvider { /** * Initialize country holidays. From 3a96bce45d34fe7ba165010da41cb1d0534b90cd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 8 Oct 2019 23:09:38 +0900 Subject: [PATCH 010/687] Removed empty tests. Reverted/corrected previous assertion for ExternalProvider classes. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index c29071318..bc149f30d 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -12,7 +12,6 @@ namespace Yasumi\tests\Base; -use ArrayIterator; use DateTime; use DateTimeImmutable; use Exception; @@ -26,8 +25,6 @@ use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; -use Yasumi\Provider\AbstractProvider; -use Yasumi\ProviderInterface; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -109,6 +106,7 @@ public function testCreateWithAbstractExtension(): void $class, Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) ); + $this->assertInstanceOf(YasumiExternalProvider::class, $instance); } /** @@ -127,19 +125,6 @@ public function testCreateWithInvalidLocale(): void ); } - /** - * Tests that the getIterator function returns an ArrayIterator object - * @throws ReflectionException - */ - public function testGetIterator(): void - { - $holidays = Yasumi::create( - 'Japan', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) - ); - - } - /** * Tests that the count function returns an integer and a correct count for the test holiday provider * @throws ReflectionException From 2150a710f612338da7ece455c5a842a85e388423 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 8 Oct 2019 23:51:34 +0900 Subject: [PATCH 011/687] Refactored if-then-else constructs as the else construct is often not necessary. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia/Queensland.php | 29 ++++++--------- src/Yasumi/Provider/Australia/SA.php | 26 ++++++------- src/Yasumi/Provider/Australia/WA.php | 37 +++++++------------ .../Provider/UnitedKingdom/Scotland.php | 3 +- 4 files changed, 38 insertions(+), 57 deletions(-) diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 0e954878b..007d3e375 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -64,23 +64,19 @@ public function initialize(): void */ private function calculateQueensBirthday(): void { + $birthDay = 'first monday of october ' . $this->year; + if ($this->year < 2012 || 2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $this->calculateHoliday( - 'queensBirthday', - ['en' => "Queen's Birthday"], - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); - } else { - $this->calculateHoliday( - 'queensBirthday', - ['en' => "Queen's Birthday"], - new DateTime('first monday of october ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); + $birthDay = 'second monday of june ' . $this->year; } + + $this->calculateHoliday( + 'queensBirthday', + ['en' => "Queen's Birthday"], + new DateTime($birthDay, new DateTimeZone($this->timezone)), + false, + false + ); } /** @@ -90,10 +86,9 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { + $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); 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/SA.php b/src/Yasumi/Provider/Australia/SA.php index 1f337c229..06d5a9eda 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -139,23 +139,19 @@ private function calculateLabourDay(): void private function calculateAdelaideCupDay(): void { if ($this->year >= 1973) { + $cupDay = 'second monday of march ' . $this->year; + if ($this->year < 2006) { - $this->calculateHoliday( - 'adelaideCup', - ['en' => 'Adelaide Cup'], - new DateTime('third monday of may ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); - } else { - $this->calculateHoliday( - 'adelaideCup', - ['en' => 'Adelaide Cup'], - new DateTime('second monday of march ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); + $cupDay = 'third monday of may ' . $this->year; } + + $this->calculateHoliday( + 'adelaideCup', + ['en' => 'Adelaide Cup'], + new DateTime($cupDay, new DateTimeZone($this->timezone)), + false, + false + ); } } diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 74649e098..1eaf91a3f 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -65,31 +65,22 @@ public function initialize(): void */ private function calculateQueensBirthday(): void { + $birthDay = 'last monday of september ' . $this->year; if (2011 === $this->year) { - $this->calculateHoliday( - 'queensBirthday', - ['en' => "Queen's Birthday"], - new DateTime('2011-10-28', new DateTimeZone($this->timezone)), - false, - false - ); - } elseif (2012 === $this->year) { - $this->calculateHoliday( - 'queensBirthday', - ['en' => "Queen's Birthday"], - new DateTime('2012-10-01', new DateTimeZone($this->timezone)), - false, - false - ); - } else { - $this->calculateHoliday( - 'queensBirthday', - ['en' => "Queen's Birthday"], - new DateTime('last monday of september ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); + $birthDay = '2011-10-28'; } + + if (2012 === $this->year) { + $birthDay = '2012-10-01'; + } + + $this->calculateHoliday( + 'queensBirthday', + ['en' => "Queen's Birthday"], + new DateTime($birthDay, new DateTimeZone($this->timezone)), + false, + false + ); } /** diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 91782564f..0427de3d9 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -90,10 +90,9 @@ protected function calculateNewYearsHolidays(): void return; } + $type = Holiday::TYPE_BANK; if ($this->year <= 1974) { $type = Holiday::TYPE_OBSERVANCE; - } else { - $type = Holiday::TYPE_BANK; } $newYearsDay = $this->newYearsDay($this->year, $this->timezone, $this->locale, $type); From 9f1c93fd2c726232865a366f785a3aa7436c8de7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 9 Oct 2019 00:08:59 +0900 Subject: [PATCH 012/687] Added missing return type. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index f611cc9e6..fa7f1f7c1 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -181,7 +181,7 @@ public function getName(): string * * @param TranslationsInterface $globalTranslations global translations */ - public function mergeGlobalTranslations(TranslationsInterface $globalTranslations) + public function mergeGlobalTranslations(TranslationsInterface $globalTranslations): void { $holidayGlobalTranslations = $globalTranslations->getTranslations($this->shortName); $this->translations = \array_merge($holidayGlobalTranslations, $this->translations); From 1f8b0294094aabbc9fe1cc6562ba8cc0600ddc40 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Tue, 8 Oct 2019 17:12:01 +0200 Subject: [PATCH 013/687] Fix locale fallback for substitute holiday (#180) --- src/Yasumi/Holiday.php | 25 +++++++++++++++++-------- src/Yasumi/SubstituteHoliday.php | 11 ++++++----- tests/Base/SubstituteHolidayTest.php | 25 ++++++++++++++++++++++++- 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index fa7f1f7c1..ee36b4a9d 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -160,14 +160,7 @@ public function jsonSerialize(): self */ public function getName(): string { - $locales = [$this->displayLocale]; - $parts = \explode('_', $this->displayLocale); - while (\array_pop($parts) && $parts) { - $locales[] = \implode('_', $parts); - } - $locales[] = self::DEFAULT_LOCALE; - - foreach ($locales as $locale) { + foreach ($this->getLocales() as $locale) { if (isset($this->translations[$locale])) { return $this->translations[$locale]; } @@ -176,6 +169,22 @@ public function getName(): string return $this->shortName; } + /** + * Returns the display locale and its fallback locales. + * + * @return array + */ + protected function getLocales(): array + { + $locales = [$this->displayLocale]; + $parts = \explode('_', $this->displayLocale); + while (\array_pop($parts) && $parts) { + $locales[] = \implode('_', $parts); + } + $locales[] = self::DEFAULT_LOCALE; + return $locales; + } + /** * Merges local translations (preferred) with global translations. * diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 371dc62be..d9d789c24 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -87,11 +87,12 @@ 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); + foreach ($this->getLocales() as $locale) { + $pattern = $this->substituteHolidayTranslations[$locale] ?? null; + if ($pattern) { + return \str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); + } + } } return $name; diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 9937835d3..9fd7ddc83 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -138,7 +138,7 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v $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']); + $translationsStub->expects($this->at(2))->method('getTranslations')->with($this->equalTo('testHoliday'))->willReturn(['en' => 'foo']); $substitute->mergeGlobalTranslations($translationsStub); @@ -146,6 +146,29 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v $this->assertEquals($translation, $substitute->getName()); } + /** + * Tests the getName function of the SubstituteHoliday object when substitute holiday pattern uses fallback. + * @throws \Exception + */ + public function testSubstituteHolidayGetNameWithPatternFallback(): void + { + $name = 'testHoliday'; + $translation = 'My Holiday'; + $locale = 'en_US'; + $holiday = new Holiday($name, [], 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(['en' => '{0} obs']); + $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 obs', $substitute->getName()); + } + /** * Tests the getName function of the SubstituteHoliday object when it has a global translation. * @throws \Exception From 7e49d1f2800541f56244a7439c3194641654835a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 12 Oct 2019 17:48:33 +0900 Subject: [PATCH 014/687] Formatting fixes. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 1 - src/Yasumi/Provider/Ukraine.php | 2 ++ src/Yasumi/data/translations/allSaintsDay.php | 1 + src/Yasumi/data/translations/allSaintsEve.php | 1 + src/Yasumi/data/translations/annunciation.php | 1 + src/Yasumi/data/translations/anzacDay.php | 1 + src/Yasumi/data/translations/armisticeDay.php | 1 + src/Yasumi/data/translations/ascensionDay.php | 1 + src/Yasumi/data/translations/ashWednesday.php | 1 + src/Yasumi/data/translations/assumptionOfMary.php | 1 + src/Yasumi/data/translations/australiaDay.php | 1 + src/Yasumi/data/translations/carnationRevolutionDay.php | 1 + src/Yasumi/data/translations/christmasDay.php | 1 + src/Yasumi/data/translations/christmasEve.php | 1 + src/Yasumi/data/translations/corpusChristi.php | 1 + src/Yasumi/data/translations/dayAfterNewYearsDay.php | 1 + src/Yasumi/data/translations/dayOfReformation.php | 1 + src/Yasumi/data/translations/easter.php | 1 + src/Yasumi/data/translations/easterMonday.php | 1 + src/Yasumi/data/translations/epiphany.php | 1 + src/Yasumi/data/translations/epiphanyEve.php | 1 + src/Yasumi/data/translations/fathersDay.php | 1 + src/Yasumi/data/translations/goodFriday.php | 1 + src/Yasumi/data/translations/immaculateConception.php | 1 + src/Yasumi/data/translations/internationalWomensDay.php | 1 + src/Yasumi/data/translations/internationalWorkersDay.php | 1 + src/Yasumi/data/translations/labourDay.php | 1 + src/Yasumi/data/translations/maundyThursday.php | 1 + src/Yasumi/data/translations/mothersDay.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + src/Yasumi/data/translations/newYearsEve.php | 1 + src/Yasumi/data/translations/pentecost.php | 1 + src/Yasumi/data/translations/pentecostMonday.php | 1 + src/Yasumi/data/translations/portugalDay.php | 1 + src/Yasumi/data/translations/portugueseRepublicDay.php | 1 + src/Yasumi/data/translations/reformationDay.php | 1 + src/Yasumi/data/translations/restorationOfIndepence.php | 1 + src/Yasumi/data/translations/secondChristmasDay.php | 1 + src/Yasumi/data/translations/secondNewYearsDay.php | 1 + src/Yasumi/data/translations/stAndrewsDay.php | 1 + src/Yasumi/data/translations/stDavidsDay.php | 1 + src/Yasumi/data/translations/stGeorgesDay.php | 1 + src/Yasumi/data/translations/stJohnsDay.php | 1 + src/Yasumi/data/translations/stJohnsEve.php | 1 + src/Yasumi/data/translations/stJosephsDay.php | 1 + src/Yasumi/data/translations/stMartinsDay.php | 1 + src/Yasumi/data/translations/stStephensDay.php | 1 + src/Yasumi/data/translations/substituteHoliday.php | 1 + src/Yasumi/data/translations/summerTime.php | 1 + src/Yasumi/data/translations/valentinesDay.php | 1 + src/Yasumi/data/translations/victoryInEuropeDay.php | 1 + src/Yasumi/data/translations/waitangiDay.php | 1 + src/Yasumi/data/translations/walpurgisEve.php | 1 + src/Yasumi/data/translations/winterTime.php | 1 + src/Yasumi/data/translations/worldAnimalDay.php | 1 + 55 files changed, 55 insertions(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 77155c2a4..82b4fcc69 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -265,7 +265,6 @@ public function whenIs($shortName): string * * @return true upon success, otherwise an InvalidArgumentException is thrown * @throws InvalidArgumentException An InvalidArgumentException is thrown if the given holiday parameter is empty. - * */ protected function isHolidayNameNotEmpty($shortName): bool { diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 4a18bfe6d..7476a27ac 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -22,6 +22,7 @@ * * Class Ukraine * @package Yasumi\Provider + * * @author Dmitry Machin */ class Ukraine extends AbstractProvider @@ -214,6 +215,7 @@ private function calculateDefenderOfUkraineDay(): void * @param string $timezone * * @return \DateTime + * * @throws \Exception */ public function calculateEaster($year, $timezone): \DateTime diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index b7e2f2cc7..84060ac5f 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -1,4 +1,5 @@ Date: Sat, 12 Oct 2019 18:14:01 +0900 Subject: [PATCH 015/687] Changed variables to camelCase. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 20 ++++++++++---------- src/Yasumi/Provider/AbstractProvider.php | 16 ++++++++-------- src/Yasumi/Provider/ChristianHolidays.php | 6 +++--- src/Yasumi/Provider/Japan.php | 6 +++--- src/Yasumi/Provider/Romania.php | 12 ++++++------ src/Yasumi/Provider/Sweden.php | 6 +++--- src/Yasumi/Yasumi.php | 10 +++++----- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 73d556d64..8e6dae7ce 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -30,12 +30,12 @@ class BetweenFilter extends AbstractFilter /** * @var string start date of the time frame to check against */ - private $start_date; + private $startDate; /** * @var string end date of the time frame to check against */ - private $end_date; + private $endDate; /** * @var bool indicates whether the start and end dates should be included in the comparison @@ -46,21 +46,21 @@ class BetweenFilter extends AbstractFilter * Construct the Between FilterIterator Object * * @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 \DateTimeInterface $startDate Start date of the time frame to check against + * @param \DateTimeInterface $endDate End date of the time frame to check against * @param bool $equal Indicate whether the start and end dates should be included in the * comparison */ public function __construct( Iterator $iterator, - \DateTimeInterface $start_date, - \DateTimeInterface $end_date, + \DateTimeInterface $startDate, + \DateTimeInterface $endDate, $equal = true ) { parent::__construct($iterator); $this->equal = $equal; - $this->start_date = $start_date->format('Y-m-d'); - $this->end_date = $end_date->format('Y-m-d'); + $this->startDate = $startDate->format('Y-m-d'); + $this->endDate = $endDate->format('Y-m-d'); } /** @@ -70,10 +70,10 @@ public function accept(): bool { $holiday = $this->getInnerIterator()->current()->format('Y-m-d'); - if ($this->equal && $holiday >= $this->start_date && $holiday <= $this->end_date) { + if ($this->equal && $holiday >= $this->startDate && $holiday <= $this->endDate) { return true; } - return $holiday > $this->start_date && $holiday < $this->end_date; + return $holiday > $this->startDate && $holiday < $this->endDate; } } diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 82b4fcc69..b2624539f 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -200,10 +200,10 @@ public function isWorkingDay(\DateTimeInterface $date): bool // Check if given date is a falls in the weekend or not // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. // @TODO Ideally avoid late static binding here (static::ID) - $weekend_data = self::WEEKEND_DATA; - $weekend_days = $weekend_data[$this::ID] ?? [0, 6]; + $weekendData = self::WEEKEND_DATA; + $weekendDays = $weekendData[$this::ID] ?? [0, 6]; - if (\in_array((int)$date->format('w'), $weekend_days, true)) { + if (\in_array((int)$date->format('w'), $weekendDays, true)) { $isWorkingDay = false; } @@ -434,8 +434,8 @@ public function previous($shortName): ?Holiday * timezone for these parameters versus the instantiated Holiday Provider, the outcome might be unexpected (but * 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 \DateTimeInterface $startDate Start date of the time frame to check against + * @param \DateTimeInterface $endDate 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 * @@ -444,13 +444,13 @@ public function previous($shortName): ?Holiday * date. * */ - public function between(\DateTimeInterface $start_date, \DateTimeInterface $end_date, $equals = null): BetweenFilter + public function between(\DateTimeInterface $startDate, \DateTimeInterface $endDate, $equals = null): BetweenFilter { - if ($start_date > $end_date) { + if ($startDate > $endDate) { throw new InvalidArgumentException('Start date must be a date before the end date.'); } - return new BetweenFilter($this->getIterator(), $start_date, $end_date, $equals ?? true); + return new BetweenFilter($this->getIterator(), $startDate, $endDate, $equals ?? true); } /** diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 17fe0aa28..e2490bd13 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -81,7 +81,7 @@ public function easter(int $year, string $timezone, string $locale, string $type protected function calculateEaster(int $year, string $timezone): DateTime { if (\extension_loaded('calendar')) { - $easter_days = \easter_days($year); + $easterDays = \easter_days($year); } else { $golden = ($year % 19) + 1; // The Golden Number @@ -124,11 +124,11 @@ protected function calculateEaster(int $year, string $timezone): DateTime $tmp += 7; } - $easter_days = $pfm + $tmp + 1; // Easter as the number of days after 21st March + $easterDays = $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')); + $easter->add(new DateInterval('P' . $easterDays . 'D')); return $easter; } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index c15ed325f..16d7ab1f9 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -468,15 +468,15 @@ private function calculateSportsDay(): void $date = new DateTime("$this->year-10-10", new DateTimeZone($this->timezone)); } - $holiday_name = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; + $holidayName = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; if ($this->year >= 2020) { - $holiday_name = ['en' => 'Sports Day', 'ja' => 'スポーツの日']; + $holidayName = ['en' => 'Sports Day', 'ja' => 'スポーツの日']; } if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'sportsDay', - $holiday_name, + $holidayName, $date, $this->locale )); diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 41f069077..450bcacbd 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -164,26 +164,26 @@ private function calculateStAndrewDay(): void */ private function calculateNationalDay(): void { - $national_day = null; + $nationalDay = null; //@link https://en.wikipedia.org/wiki/Great_Union_Day if ($this->year >= 1990) { - $national_day = "$this->year-12-01"; + $nationalDay = "$this->year-12-01"; } if ($this->year >= 1948 && $this->year <= 1989) { - $national_day = "$this->year-08-23"; + $nationalDay = "$this->year-08-23"; } if ($this->year >= 1866 && $this->year <= 1947) { - $national_day = "$this->year-05-10"; + $nationalDay = "$this->year-05-10"; } - if (\is_string($national_day)) { + if (\is_string($nationalDay)) { $this->addHoliday(new Holiday('nationalDay', [ 'en' => 'National Day', 'ro' => 'Ziua Națională', - ], new DateTime($national_day, new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime($nationalDay, new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 6df730215..5916e043e 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -224,16 +224,16 @@ private function calculateNationalDay(): void return; } - $holiday_name = 'Svenska flaggans dag'; + $holidayName = 'Svenska flaggans dag'; // Since 1983 this day was named 'Sveriges nationaldag' if ($this->year >= 1983) { - $holiday_name = 'Sveriges nationaldag'; + $holidayName = 'Sveriges nationaldag'; } $this->addHoliday(new Holiday( 'nationalDay', - ['sv' => $holiday_name], + ['sv' => $holidayName], new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index ff5bdf16f..c8616fd9c 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -177,7 +177,7 @@ public static function getAvailableLocales(): array * already with Yasumi, or your own provider by giving the 'const ID', corresponding to the ISO3166-2 Code, set in * 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 string $isoCode 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 * integer between 1000 and 9999. * @param string $locale The locale to use. If empty we'll use the default locale (en_US) @@ -191,20 +191,20 @@ public static function getAvailableLocales(): array * @throws \ReflectionException */ public static function createByISO3166_2( - string $iso3166_2, + string $isoCode, int $year = 0, string $locale = self::DEFAULT_LOCALE ): AbstractProvider { $availableProviders = self::getProviders(); - if (false === isset($availableProviders[$iso3166_2])) { + if (false === isset($availableProviders[$isoCode])) { throw new ProviderNotFoundException(\sprintf( 'Unable to find holiday provider by ISO3166-2 "%s".', - $iso3166_2 + $isoCode )); } - return self::create($availableProviders[$iso3166_2], $year, $locale); + return self::create($availableProviders[$isoCode], $year, $locale); } /** From 1a0992e4893644e62d227a4fb75d2e71f19bf2fd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 2 Nov 2019 13:45:45 +0900 Subject: [PATCH 016/687] Refactored check so it checks the instance type. A boolean as the initial data type is not correct in this situation. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index c8616fd9c..6576e3883 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -88,11 +88,11 @@ public static function nextWorkingDay( // Setup start date, if its an instance of \DateTime, clone to prevent modification to original $date = $startDate instanceof \DateTime ? clone $startDate : $startDate; - $provider = false; + $provider = null; while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$provider || $provider->getYear() !== \getdate()['year']) { + if (! $provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { @@ -282,11 +282,11 @@ public static function prevWorkingDay( // Setup start date, if its an instance of \DateTime, clone to prevent modification to original $date = $startDate instanceof \DateTime ? clone $startDate : $startDate; - $provider = false; + $provider = null; while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$provider || $provider->getYear() !== \getdate()['year']) { + if (! $provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { From 0b8e899d59fa9a26f640173c4000be343d207e2d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 2 Nov 2019 13:56:21 +0900 Subject: [PATCH 017/687] Changed method signature as parameters with defaults should come after required parameters. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia.php | 28 +++++++++---------- src/Yasumi/Provider/Australia/ACT.php | 2 +- src/Yasumi/Provider/Australia/NSW.php | 4 +-- src/Yasumi/Provider/Australia/NT.php | 4 +-- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/SA.php | 18 ++++++------ src/Yasumi/Provider/Australia/Tasmania.php | 4 +-- .../Australia/Tasmania/KingIsland.php | 2 +- .../Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 2 +- src/Yasumi/Provider/Australia/WA.php | 4 +-- tests/NewZealand/AnzacDayTest.php | 2 +- tests/NewZealand/WaitangiDayTest.php | 2 +- tests/YasumiBase.php | 8 +++--- 14 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 2f87b0e78..aba89681c 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', [], $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' => 'New Year\'s Holiday'], $newyearsday, false, false); + $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year\'s Holiday'], false, false); break; case 6: // saturday $newyearsday->add(new DateInterval('P2D')); - $this->calculateHoliday('newYearsHoliday', ['en' => 'New Year\'s Holiday'], $newyearsday, false, false); + $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year\'s Holiday'], false, false); break; } } @@ -88,8 +88,8 @@ private function calculateNewYearHolidays(): void * Function to simplify moving holidays to mondays if required * * @param string $shortName - * @param array $names * @param DateTime $date + * @param array $names * @param bool $moveFromSaturday * @param bool $moveFromSunday * @param string $type @@ -101,8 +101,8 @@ private function calculateNewYearHolidays(): void */ public function calculateHoliday( string $shortName, - array $names = [], $date, + array $names = [], $moveFromSaturday = null, $moveFromSunday = null, $type = null @@ -137,7 +137,7 @@ private function calculateAustraliaDay(): void { $date = new DateTime("$this->year-01-26", new DateTimeZone($this->timezone)); - $this->calculateHoliday('australiaDay', ['en' => 'Australia Day'], $date); + $this->calculateHoliday('australiaDay', $date, ['en' => 'Australia Day']); } /** @@ -163,7 +163,7 @@ private function calculateAnzacDay(): void } $date = new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('anzacDay', [], $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' => 'Easter Tuesday'], $easterMonday, false, false); + $this->calculateHoliday('easterTuesday', $easterMonday, ['en' => 'Easter Tuesday'], 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', [], $christmasDay, false, false); - $this->calculateHoliday('secondChristmasDay', [], $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' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); break; case 5: // friday $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], $boxingDay, false, false); + $this->calculateHoliday('secondChristmasHoliday', $boxingDay, ['en' => 'Boxing Day Holiday'], false, false); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); - $this->calculateHoliday('secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], $boxingDay, false, false); + $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); + $this->calculateHoliday('secondChristmasHoliday', $boxingDay, ['en' => 'Boxing Day Holiday'], false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 270364e49..ca14089c7 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -135,8 +135,8 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => "Queen's Birthday"], false, false ); diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index df5c7567e..0ccbf52b4 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -102,8 +102,8 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => "Queen's Birthday"], false, false ); @@ -131,8 +131,8 @@ private function calculateBankHoliday(): void { $this->calculateHoliday( 'bankHoliday', - ['en' => 'Bank Holiday'], new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Bank Holiday'], false, false, Holiday::TYPE_BANK diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 53444460c..8e9d7c80c 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -101,8 +101,8 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => "Queen's Birthday"], false, false ); @@ -132,8 +132,8 @@ private function calculatePicnicDay(): void { $this->calculateHoliday( 'picnicDay', - ['en' => 'Picnic Day'], new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Picnic Day'], false, false ); diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 007d3e375..dddd00be9 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -72,8 +72,8 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', - ['en' => "Queen's Birthday"], new DateTime($birthDay, new DateTimeZone($this->timezone)), + ['en' => "Queen's Birthday"], false, false ); diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 06d5a9eda..ba86477ac 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -109,8 +109,8 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => "Queen's Birthday"], false, false ); @@ -147,8 +147,8 @@ private function calculateAdelaideCupDay(): void $this->calculateHoliday( 'adelaideCup', - ['en' => 'Adelaide Cup'], new DateTime($cupDay, new DateTimeZone($this->timezone)), + ['en' => 'Adelaide Cup'], false, false ); @@ -163,27 +163,27 @@ private function calculateAdelaideCupDay(): void private function calculateProclamationDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', [], $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' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); break; case 5: // friday $proclamationDay = $christmasDay->add(new DateInterval('P3D')); - $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); break; default: // monday-thursday $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index bf53bbe03..01b22f009 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -79,8 +79,8 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en' => 'Queen\'s Birthday'], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Queen\'s Birthday'], false, false ); @@ -98,8 +98,8 @@ private function calculateRecreationDay(): void { $this->calculateHoliday( 'recreationDay', - ['en' => 'Recreation Day'], new DateTime('first monday of november ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Recreation Day'], false, false ); diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index f26bdd06d..a43466f02 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -53,8 +53,8 @@ private function calculateKingIslandShow(): void { $this->calculateHoliday( 'kingIslandShow', - ['en' => 'King Island Show'], new DateTime('first tuesday of march ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'King Island Show'], false, false ); diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index c1ae91d3c..73e672226 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -56,8 +56,8 @@ private function calculateHobartRegatta(): void { $this->calculateHoliday( 'hobartRegatta', - ['en' => 'Royal Hobart Regatta'], new DateTime('second monday of february ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Royal Hobart Regatta'], false, false ); diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 88a9a2ccf..b4b4445bd 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -147,8 +147,8 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en' => 'Queen\'s Birthday'], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Queen\'s Birthday'], false, false ); diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 1eaf91a3f..1ef868f6a 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -76,8 +76,8 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', - ['en' => "Queen's Birthday"], new DateTime($birthDay, new DateTimeZone($this->timezone)), + ['en' => "Queen's Birthday"], false, false ); @@ -107,8 +107,8 @@ private function calculateWesternAustraliaDay(): void { $this->calculateHoliday( 'westernAustraliaDay', - ['en' => 'Western Australia Day'], new DateTime('first monday of june ' . $this->year, new DateTimeZone($this->timezone)), + ['en' => 'Western Australia Day'], false, false ); diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index 06fdfbd2b..24afcbf3e 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -77,7 +77,7 @@ public function HolidayDataProvider(): array if ($year >= 2015 && $this->isWeekend($date)) { $date->modify('next monday'); } - }, self::TIMEZONE, 100, self::ESTABLISHMENT_YEAR); + }, 100, self::ESTABLISHMENT_YEAR, self::TIMEZONE); } /** diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index d2ca5b388..f24ac8088 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -105,6 +105,6 @@ public function HolidayDataProvider(): array if ($year >= 2015 && $this->isWeekend($date)) { $date->modify('next monday'); } - }, self::TIMEZONE, 100, self::ESTABLISHMENT_YEAR); + }, 100, self::ESTABLISHMENT_YEAR, self::TIMEZONE); } } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index c99c40d5b..330a36b2c 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -479,7 +479,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( if ($this->isWeekend($date)) { $date->modify('next monday'); } - }, $timezone ?? 'UTC', $iterations ?? 10, $range); + }, $iterations ?? 10, $range, $timezone ?? 'UTC'); } /** @@ -488,10 +488,10 @@ public function generateRandomDatesWithHolidayMovedToMonday( * @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 string $timezone name of the timezone for which the dates need to be generated * @return array list of random test dates used for assertion of holidays with applied callback. * @throws Exception */ @@ -499,9 +499,9 @@ public function generateRandomDatesWithModifier( $month, $day, callable $callback, - $timezone = null, $iterations, - $range + $range, + $timezone = null ): array { $data = []; From 9b48946cc9a45e7c9997f11669b33d211827f6ec Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 2 Nov 2019 20:23:21 +0900 Subject: [PATCH 018/687] Added parameter data types. Signed-off-by: Sacha Telgenhof --- tests/YasumiBase.php | 125 +++++++++++++++++++++++++++++-------------- 1 file changed, 85 insertions(+), 40 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 330a36b2c..f2e58b30a 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -54,8 +54,12 @@ trait YasumiBase * @throws UnknownLocaleException * @throws ReflectionException */ - public function assertDefinedHolidays($expectedHolidays, $provider, $year, $type): void - { + public function assertDefinedHolidays( + array $expectedHolidays, + string $provider, + int $year, + string $type + ): void { $holidays = Yasumi::create($provider, $year); switch ($type) { @@ -99,8 +103,12 @@ public function assertDefinedHolidays($expectedHolidays, $provider, $year, $type * @throws AssertionFailedError * @throws ReflectionException */ - public function assertHoliday($provider, $shortName, $year, $expected): void - { + public function assertHoliday( + string $provider, + string $shortName, + int $year, + DateTime $expected + ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); @@ -126,8 +134,11 @@ public function assertHoliday($provider, $shortName, $year, $expected): void * @throws AssertionFailedError * @throws ReflectionException */ - public function assertNotHoliday($provider, $shortName, $year): void - { + public function assertNotHoliday( + string $provider, + string $shortName, + int $year + ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); @@ -150,8 +161,12 @@ public function assertNotHoliday($provider, $shortName, $year): void * @throws AssertionFailedError * @throws ReflectionException */ - public function assertTranslatedHolidayName($provider, $shortName, $year, $translations): void - { + public function assertTranslatedHolidayName( + string $provider, + string $shortName, + int $year, + array $translations + ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); @@ -197,8 +212,12 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans * @throws UnknownLocaleException * @throws ReflectionException */ - public function assertHolidayType($provider, $shortName, $year, $type): void - { + public function assertHolidayType( + string $provider, + string $shortName, + int $year, + string $type + ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); @@ -224,8 +243,12 @@ public function assertHolidayType($provider, $shortName, $year, $type): void * @throws UnknownLocaleException * @throws ReflectionException */ - public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek): void - { + public function assertDayOfWeek( + string $provider, + string $shortName, + int $year, + string $expectedDayOfWeek + ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($shortName); @@ -249,8 +272,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 = null, $iterations = null, $range = null): array - { + public function generateRandomDates( + int $month, + int $day, + string $timezone = null, + int $iterations = null, + int $range = null + ): array { $data = []; $range = $range ?? 1000; for ($y = 1; $y <= ($iterations ?? 10); $y++) { @@ -271,8 +299,11 @@ public function generateRandomDates($month, $day, $timezone = null, $iterations * @return array list of random easter test dates used for assertion of holidays. * @throws Exception */ - public function generateRandomEasterDates($timezone = null, $iterations = null, $range = null): array - { + public function generateRandomEasterDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { $data = []; $range = $range ?? 1000; @@ -376,8 +407,11 @@ protected function calculateEaster(int $year, string $timezone): DateTime * * @throws Exception */ - public function generateRandomEasterMondayDates($timezone = null, $iterations = null, $range = null): array - { + public function generateRandomEasterMondayDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { $range = $range ?? 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P1D')); @@ -397,9 +431,9 @@ public function generateRandomEasterMondayDates($timezone = null, $iterations = */ public function generateRandomModifiedEasterDates( callable $cb, - $timezone = null, - $iterations = null, - $range = null + string $timezone = null, + int $iterations = null, + int $range = null ): array { $data = []; $range = $range ?? 1000; @@ -426,8 +460,11 @@ public function generateRandomModifiedEasterDates( * * @throws Exception */ - public function generateRandomGoodFridayDates($timezone = null, $iterations = null, $range = null): array - { + public function generateRandomGoodFridayDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { $range = $range ?? 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { @@ -446,8 +483,11 @@ public function generateRandomGoodFridayDates($timezone = null, $iterations = nu * * @throws Exception */ - public function generateRandomPentecostDates($timezone = null, $iterations = null, $range = null): array - { + public function generateRandomPentecostDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { $range = $range ?? 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { @@ -469,11 +509,11 @@ public function generateRandomPentecostDates($timezone = null, $iterations = nul * @throws Exception */ public function generateRandomDatesWithHolidayMovedToMonday( - $month, - $day, - $timezone = null, - $iterations = null, - $range = null + int $month, + int $day, + string $timezone = null, + int $iterations = null, + int $range = null ): array { return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date) { if ($this->isWeekend($date)) { @@ -490,18 +530,19 @@ public function generateRandomDatesWithHolidayMovedToMonday( * @param callable $callback callback(int $year, \DateTime $dateTime) to modify $dateTime by custom rules * @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 + * * @return array list of random test dates used for assertion of holidays with applied callback. + * * @throws Exception */ public function generateRandomDatesWithModifier( - $month, - $day, + int $month, + int $day, callable $callback, - $iterations, - $range, - $timezone = null + int $iterations, + int $range, + string $timezone = null ): array { $data = []; @@ -525,8 +566,10 @@ public function generateRandomDatesWithModifier( * * @return int a year number */ - public function generateRandomYear($lowerLimit = null, $upperLimit = null): int - { + public function generateRandomYear( + int $lowerLimit = null, + int $upperLimit = null + ): int { return (int)Faker::create()->numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } @@ -538,8 +581,10 @@ public function generateRandomYear($lowerLimit = null, $upperLimit = null): int * * @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 9044e9f706fb608819e9324ef626f45a73e46060 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 2 Nov 2019 22:11:37 +0900 Subject: [PATCH 019/687] Added missing parameter types. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 30 +++++++++++++--------- src/Yasumi/Provider/Australia.php | 8 +++--- src/Yasumi/Provider/Australia/ACT.php | 16 +++++++++--- src/Yasumi/Provider/Australia/NSW.php | 8 ++++-- src/Yasumi/Provider/Australia/NT.php | 8 ++++-- src/Yasumi/Provider/Australia/SA.php | 8 ++++-- src/Yasumi/Provider/Australia/Victoria.php | 16 +++++++++--- src/Yasumi/Provider/ChristianHolidays.php | 8 ++++-- src/Yasumi/Provider/CommonHolidays.php | 23 ++++++++++++----- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- tests/Base/YasumiTest.php | 10 ++++---- 14 files changed, 96 insertions(+), 47 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 8e6dae7ce..709d027d9 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -55,7 +55,7 @@ public function __construct( Iterator $iterator, \DateTimeInterface $startDate, \DateTimeInterface $endDate, - $equal = true + bool $equal = true ) { parent::__construct($iterator); $this->equal = $equal; diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index b2624539f..4f05c02a0 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -106,8 +106,11 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato * represented * @param TranslationsInterface|null $globalTranslations global translations */ - public function __construct($year, $locale = null, ?TranslationsInterface $globalTranslations = null) - { + public function __construct( + int $year, + ?string $locale = null, + ?TranslationsInterface $globalTranslations = null + ) { $this->clearHolidays(); $this->year = $year ?: \getdate()['year']; @@ -170,7 +173,7 @@ public function addHoliday(Holiday $holiday): void * * @return void */ - public function removeHoliday($shortName): void + public function removeHoliday(string $shortName): void { unset($this->holidays[$shortName]); } @@ -251,7 +254,7 @@ public function getHolidayDates(): array * @throws InvalidArgumentException when the given name is blank or empty. * */ - public function whenIs($shortName): string + public function whenIs(string $shortName): string { $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty @@ -266,7 +269,7 @@ public function whenIs($shortName): string * @return true upon success, otherwise an InvalidArgumentException is thrown * @throws InvalidArgumentException An InvalidArgumentException is thrown if the given holiday parameter is empty. */ - protected function isHolidayNameNotEmpty($shortName): bool + protected function isHolidayNameNotEmpty(string $shortName): bool { if (empty($shortName)) { throw new InvalidArgumentException('Holiday name can not be blank.'); @@ -287,7 +290,7 @@ protected function isHolidayNameNotEmpty($shortName): bool * @throws InvalidArgumentException when the given name is blank or empty. * */ - public function whatWeekDayIs($shortName): int + public function whatWeekDayIs(string $shortName): int { $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty @@ -357,7 +360,7 @@ public function getYear(): int * * @covers AbstractProvider::anotherTime */ - public function next($shortName): ?Holiday + public function next(string $shortName): ?Holiday { return $this->anotherTime($this->year + 1, $shortName); } @@ -375,7 +378,7 @@ public function next($shortName): ?Holiday * @throws UnknownLocaleException * @throws \RuntimeException */ - private function anotherTime($year, $shortName): ?Holiday + private function anotherTime(int $year, string $shortName): ?Holiday { $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty @@ -394,7 +397,7 @@ private function anotherTime($year, $shortName): ?Holiday * @throws InvalidArgumentException when the given name is blank or empty. * */ - public function getHoliday($shortName): ?Holiday + public function getHoliday(string $shortName): ?Holiday { $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty @@ -417,7 +420,7 @@ public function getHoliday($shortName): ?Holiday * * @covers AbstractProvider::anotherTime */ - public function previous($shortName): ?Holiday + public function previous(string $shortName): ?Holiday { return $this->anotherTime($this->year - 1, $shortName); } @@ -444,8 +447,11 @@ public function previous($shortName): ?Holiday * date. * */ - public function between(\DateTimeInterface $startDate, \DateTimeInterface $endDate, $equals = null): BetweenFilter - { + public function between( + \DateTimeInterface $startDate, + \DateTimeInterface $endDate, + ?bool $equals = null + ): BetweenFilter { if ($startDate > $endDate) { throw new InvalidArgumentException('Start date must be a date before the end date.'); } diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index aba89681c..4ae67a501 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -101,11 +101,11 @@ private function calculateNewYearHolidays(): void */ public function calculateHoliday( string $shortName, - $date, + DateTime $date, array $names = [], - $moveFromSaturday = null, - $moveFromSunday = null, - $type = null + ?bool $moveFromSaturday = null, + ?bool $moveFromSunday = null, + ?string $type = null ): void { $day = (int)$date->format('w'); if ((0 === $day && ($moveFromSunday ?? true)) || (6 === $day && ($moveFromSaturday ?? true))) { diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index ca14089c7..da3e00cd1 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -73,8 +73,12 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSunday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSunday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easter', ['en' => 'Easter Sunday'], @@ -105,8 +109,12 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSaturday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index 0ccbf52b4..c46be04e1 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -72,8 +72,12 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSaturday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 8e9d7c80c..b49798eb2 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -71,8 +71,12 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSaturday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index ba86477ac..425437e22 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -79,8 +79,12 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSaturday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index b4b4445bd..e158d9e6e 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -73,8 +73,12 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSunday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSunday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easter', ['en' => 'Easter Sunday'], @@ -105,8 +109,12 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = null): Holiday - { + private function easterSaturday( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): Holiday { return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index e2490bd13..5d79316ea 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -49,8 +49,12 @@ trait ChristianHolidays * @throws \InvalidArgumentException * @throws \Exception */ - public function easter(int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL): Holiday - { + public function easter( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { return new Holiday('easter', [], $this->calculateEaster($year, $timezone), $locale, $type); } diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index b2b0e2c68..09c8b87f7 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -451,8 +451,12 @@ public function internationalWomensDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function summerTime($year, $timezone, $locale, $type = null): ?Holiday - { + public function summerTime( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, true); if ($date instanceof \DateTimeImmutable) { @@ -489,8 +493,11 @@ public function summerTime($year, $timezone, $locale, $type = null): ?Holiday * timezone. If no transition time is found, a null value is returned. * @throws \Exception */ - protected function calculateSummerWinterTime($year, $timezone, $summer): ?\DateTimeImmutable - { + protected function calculateSummerWinterTime( + int $year, + string $timezone, + bool $summer + ): ?\DateTimeImmutable { $zone = new DateTimeZone($timezone); $transitions = $zone->getTransitions(\mktime(0, 0, 0, 1, 1, $year), \mktime(23, 59, 59, 12, 31, $year)); @@ -525,8 +532,12 @@ protected function calculateSummerWinterTime($year, $timezone, $summer): ?\DateT * @throws \InvalidArgumentException * @throws \Exception */ - public function winterTime($year, $timezone, $locale, $type = null): ?Holiday - { + public function winterTime( + int $year, + string $timezone, + string $locale, + ?string $type = null + ): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, false); if ($date instanceof \DateTimeImmutable) { diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index c29132560..64e0fcefe 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -126,7 +126,7 @@ private function calculateCleanMonday(): void * * @throws \Exception */ - private function calculateEaster($year, $timezone): DateTime + private function calculateEaster(int $year, string $timezone): DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 450bcacbd..dbb0e510e 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -258,7 +258,7 @@ private function calculateChildrensDay(): void * * @throws \Exception */ - public function calculateEaster($year, $timezone): DateTime + public function calculateEaster(int $year, string $timezone): DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 7476a27ac..5485d3a0c 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -218,7 +218,7 @@ private function calculateDefenderOfUkraineDay(): void * * @throws \Exception */ - public function calculateEaster($year, $timezone): \DateTime + public function calculateEaster(int $year, string $timezone): \DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index bc149f30d..43ab30899 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -193,7 +193,7 @@ public function testNextWithBlankName(): void 'Netherlands', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) ); - $holidays->next(null); + $holidays->next(''); } /** @@ -231,7 +231,7 @@ public function testPreviousWithBlankName(): void 'Netherlands', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) ); - $holidays->previous(null); + $holidays->previous(''); } /** @@ -272,7 +272,7 @@ public function testWhenIsWithBlankName(): void $this->expectException(InvalidArgumentException::class); $holidays = Yasumi::create('Japan', 2010); - $holidays->whenIs(null); + $holidays->whenIs(''); } /** @@ -285,7 +285,7 @@ public function testGetHolidayWithBlankName(): void $this->expectException(InvalidArgumentException::class); $holidays = Yasumi::create('Netherlands', 1999); - $holidays->getHoliday(null); + $holidays->getHoliday(''); } /** @@ -312,7 +312,7 @@ public function testWhatWeekDayIsWithBlankName(): void $this->expectException(InvalidArgumentException::class); $holidays = Yasumi::create('Netherlands', 2388); - $holidays->whatWeekDayIs(null); + $holidays->whatWeekDayIs(''); } /** From 05b1688193fda57f8081c3626f8f2ebd3135568b Mon Sep 17 00:00:00 2001 From: aprog Date: Sat, 9 Nov 2019 10:52:16 +0200 Subject: [PATCH 020/687] Holiday providers for states of Austria (#182) * Added holiday providers for states of Austria. * Implemented tests for holiday providers that belong to states of Austria. * Added translations for holidays that belong to states of Austria. --- src/Yasumi/Provider/Austria.php | 30 +++++ src/Yasumi/Provider/Austria/Burgenland.php | 47 ++++++++ src/Yasumi/Provider/Austria/Carinthia.php | 79 +++++++++++++ src/Yasumi/Provider/Austria/LowerAustria.php | 47 ++++++++ src/Yasumi/Provider/Austria/Salzburg.php | 80 +++++++++++++ src/Yasumi/Provider/Austria/Styria.php | 47 ++++++++ src/Yasumi/Provider/Austria/Tyrol.php | 47 ++++++++ src/Yasumi/Provider/Austria/UpperAustria.php | 81 ++++++++++++++ src/Yasumi/Provider/Austria/Vienna.php | 47 ++++++++ src/Yasumi/Provider/Austria/Vorarlberg.php | 47 ++++++++ .../data/translations/plebisciteDay.php | 18 +++ .../data/translations/stFloriansDay.php | 18 +++ .../data/translations/stLeopoldsDay.php | 18 +++ src/Yasumi/data/translations/stMartinsDay.php | 1 + src/Yasumi/data/translations/stRupertsDay.php | 18 +++ tests/Austria/AustriaBaseTestCase.php | 11 +- .../Burgenland/BurgenlandBaseTestCase.php | 29 +++++ tests/Austria/Burgenland/stMartinsDayTest.php | 80 +++++++++++++ .../Carinthia/CarinthiaBaseTestCase.php | 29 +++++ tests/Austria/Carinthia/PlebisciteDayTest.php | 105 ++++++++++++++++++ tests/Austria/Carinthia/StJosephsDayTest.php | 79 +++++++++++++ .../LowerAustria/LowerAustriaBaseTestCase.php | 29 +++++ .../LowerAustria/StLeopoldsDayTest.php | 105 ++++++++++++++++++ .../Austria/Salzburg/SalzburgBaseTestCase.php | 29 +++++ tests/Austria/Salzburg/StRupertsDayTest.php | 79 +++++++++++++ tests/Austria/Styria/StJosephsDayTest.php | 79 +++++++++++++ tests/Austria/Styria/StyriaBaseTestCase.php | 29 +++++ tests/Austria/Tyrol/StJosephsDayTest.php | 79 +++++++++++++ tests/Austria/Tyrol/TyrolBaseTestCase.php | 29 +++++ .../UpperAustria/StFloriansDayTest.php | 79 +++++++++++++ .../UpperAustria/UpperAustriaBaseTestCase.php | 29 +++++ tests/Austria/Vienna/StLeopoldsDayTest.php | 105 ++++++++++++++++++ tests/Austria/Vienna/ViennaBaseTestCase.php | 29 +++++ tests/Austria/Vorarlberg/StJosephsDayTest.php | 79 +++++++++++++ .../Vorarlberg/VorarlbergBaseTestCase.php | 29 +++++ 35 files changed, 1763 insertions(+), 3 deletions(-) create mode 100755 src/Yasumi/Provider/Austria/Burgenland.php create mode 100755 src/Yasumi/Provider/Austria/Carinthia.php create mode 100755 src/Yasumi/Provider/Austria/LowerAustria.php create mode 100755 src/Yasumi/Provider/Austria/Salzburg.php create mode 100755 src/Yasumi/Provider/Austria/Styria.php create mode 100755 src/Yasumi/Provider/Austria/Tyrol.php create mode 100755 src/Yasumi/Provider/Austria/UpperAustria.php create mode 100755 src/Yasumi/Provider/Austria/Vienna.php create mode 100755 src/Yasumi/Provider/Austria/Vorarlberg.php create mode 100644 src/Yasumi/data/translations/plebisciteDay.php create mode 100644 src/Yasumi/data/translations/stFloriansDay.php create mode 100644 src/Yasumi/data/translations/stLeopoldsDay.php create mode 100644 src/Yasumi/data/translations/stRupertsDay.php create mode 100644 tests/Austria/Burgenland/BurgenlandBaseTestCase.php create mode 100644 tests/Austria/Burgenland/stMartinsDayTest.php create mode 100644 tests/Austria/Carinthia/CarinthiaBaseTestCase.php create mode 100644 tests/Austria/Carinthia/PlebisciteDayTest.php create mode 100644 tests/Austria/Carinthia/StJosephsDayTest.php create mode 100644 tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php create mode 100644 tests/Austria/LowerAustria/StLeopoldsDayTest.php create mode 100644 tests/Austria/Salzburg/SalzburgBaseTestCase.php create mode 100644 tests/Austria/Salzburg/StRupertsDayTest.php create mode 100644 tests/Austria/Styria/StJosephsDayTest.php create mode 100644 tests/Austria/Styria/StyriaBaseTestCase.php create mode 100644 tests/Austria/Tyrol/StJosephsDayTest.php create mode 100644 tests/Austria/Tyrol/TyrolBaseTestCase.php create mode 100644 tests/Austria/UpperAustria/StFloriansDayTest.php create mode 100644 tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php create mode 100644 tests/Austria/Vienna/StLeopoldsDayTest.php create mode 100644 tests/Austria/Vienna/ViennaBaseTestCase.php create mode 100644 tests/Austria/Vorarlberg/StJosephsDayTest.php create mode 100644 tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 0d31900db..001f77a78 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -93,4 +93,34 @@ private function calculateNationalDay(): void $this->locale )); } + + /** + * Saint Leopold's Day. + * + * Saint Leopold III, known as Leopold the Good, was the Margrave of Austria + * from 1095 to his death in 1136. He was a member of the House of + * Babenberg. He was canonized on 6 January 1485 and became the patron saint + * of Austria, Lower Austria, Upper Austria, and Vienna. His feast day is 15 + * November. + * + * @link https://en.wikipedia.org/wiki/Leopold_III,_Margrave_of_Austria + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateStLeopoldsDay(): void + { + if ($this->year < 1136) { + return; + } + + $this->addHoliday(new Holiday( + 'stLeopoldsDay', + [], + new DateTime($this->year . '-11-15', new \DateTimeZone($this->timezone)), + $this->locale + )); + } } diff --git a/src/Yasumi/Provider/Austria/Burgenland.php b/src/Yasumi/Provider/Austria/Burgenland.php new file mode 100755 index 000000000..bea27c489 --- /dev/null +++ b/src/Yasumi/Provider/Austria/Burgenland.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Burgenland (Austria). + * + * @link https://en.wikipedia.org/wiki/Burgenland + */ +class Burgenland extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-1'; + + /** + * Initialize holidays for Burgenland (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom Common holidays. + $this->addHoliday($this->stMartinsDay($this->year, $this->timezone, $this->locale)); + } +} diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php new file mode 100755 index 000000000..4532877cb --- /dev/null +++ b/src/Yasumi/Provider/Austria/Carinthia.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Carinthia (Austria). + * + * @link https://en.wikipedia.org/wiki/Carinthia + */ +class Carinthia extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-2'; + + /** + * Initialize holidays for Carinthia (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom Common holidays. + $this->addHoliday($this->stJosephsDay($this->year, $this->timezone, $this->locale)); + $this->calculatePlebisciteDay(); + } + + /** + * Plebiscite Day. + * + * The Carinthian plebiscite was held on 10 October 1920 in the area + * predominantly settled by Carinthian Slovenes. It determined the final + * southern border between the Republic of Austria and the newly formed + * Kingdom of Serbs, Croats and Slovenes (Yugoslavia) after World War I. + * + * @link https://en.wikipedia.org/wiki/1920_Carinthian_plebiscite + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculatePlebisciteDay(): void + { + if ($this->year < 1920) { + return; + } + + $this->addHoliday(new Holiday( + 'plebisciteDay', + [], + new DateTime($this->year . '-10-10', new \DateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Austria/LowerAustria.php b/src/Yasumi/Provider/Austria/LowerAustria.php new file mode 100755 index 000000000..82182e671 --- /dev/null +++ b/src/Yasumi/Provider/Austria/LowerAustria.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Lower Austria (Austria). + * + * @link https://en.wikipedia.org/wiki/Lower_Austria + */ +class LowerAustria extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-3'; + + /** + * Initialize holidays for Lower Austria (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom holidays. + $this->calculateStLeopoldsDay(); + } +} diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php new file mode 100755 index 000000000..f0c1d1b26 --- /dev/null +++ b/src/Yasumi/Provider/Austria/Salzburg.php @@ -0,0 +1,80 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Salzburg (Austria). + * + * @link https://en.wikipedia.org/wiki/Salzburg_(state) + */ +class Salzburg extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-5'; + + /** + * Initialize holidays for Salzburg (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom holidays. + $this->calculateStRupertsDay(); + } + + /** + * Saint Rupert's Day. + * + * Rupert of Salzburg was Bishop of Worms as well as the first Bishop of + * Salzburg and abbot of St. Peter's in Salzburg. He was a contemporary of + * the Frankish king Childebert III and is venerated as a saint in the + * Roman Catholic and Eastern Orthodox Churches. Rupert is also patron + * saint of the Austrian state of Salzburg. His feast day in Austria is + * September 24 (since 710). + * + * @link https://en.wikipedia.org/wiki/Rupert_of_Salzburg + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateStRupertsDay(): void + { + if ($this->year < 710) { + return; + } + + $this->addHoliday(new Holiday( + 'stRupertsDay', + [], + new DateTime($this->year . '-9-24', new \DateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Austria/Styria.php b/src/Yasumi/Provider/Austria/Styria.php new file mode 100755 index 000000000..3d6d2b4ca --- /dev/null +++ b/src/Yasumi/Provider/Austria/Styria.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Styria (Austria). + * + * @link https://en.wikipedia.org/wiki/Styria + */ +class Styria extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-6'; + + /** + * Initialize holidays for Styria (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom Common holidays. + $this->addHoliday($this->stJosephsDay($this->year, $this->timezone, $this->locale)); + } +} diff --git a/src/Yasumi/Provider/Austria/Tyrol.php b/src/Yasumi/Provider/Austria/Tyrol.php new file mode 100755 index 000000000..e3e4eed66 --- /dev/null +++ b/src/Yasumi/Provider/Austria/Tyrol.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Tyrol (Austria). + * + * @link https://en.wikipedia.org/wiki/Tyrol_(state) + */ +class Tyrol extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-7'; + + /** + * Initialize holidays for Tyrol (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom Common holidays. + $this->addHoliday($this->stJosephsDay($this->year, $this->timezone, $this->locale)); + } +} diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php new file mode 100755 index 000000000..969ec4044 --- /dev/null +++ b/src/Yasumi/Provider/Austria/UpperAustria.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Upper Austria (Austria). + * + * @link https://en.wikipedia.org/wiki/Upper_Austria + */ +class UpperAustria extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-4'; + + /** + * Initialize holidays for Upper Austria (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom holidays. + $this->calculateStFloriansDay(); + } + + /** + * Saint Florian's Day. + * + * St. Florian was born around 250 AD in the ancient Roman city of Aelium + * Cetium, present-day Sankt Pölten, Austria. He joined the Roman Army and + * advanced in the ranks, rising to commander of the imperial army in the + * Roman province of Noricum. In addition to his military duties, he was + * also responsible for organizing and leading firefighting brigades. + * Florian organized and trained an elite group of soldiers whose sole duty + * was to fight fires. His feast day is May 4 (since 304). + * + * @link https://en.wikipedia.org/wiki/Saint_Florian + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateStFloriansDay(): void + { + if ($this->year < 304) { + return; + } + + $this->addHoliday(new Holiday( + 'stFloriansDay', + [], + new DateTime($this->year . '-5-4', new \DateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Austria/Vienna.php b/src/Yasumi/Provider/Austria/Vienna.php new file mode 100755 index 000000000..1607d541e --- /dev/null +++ b/src/Yasumi/Provider/Austria/Vienna.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Vienna (Austria). + * + * @link https://en.wikipedia.org/wiki/Vienna + */ +class Vienna extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-9'; + + /** + * Initialize holidays for Vienna (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom holidays. + $this->calculateStLeopoldsDay(); + } +} diff --git a/src/Yasumi/Provider/Austria/Vorarlberg.php b/src/Yasumi/Provider/Austria/Vorarlberg.php new file mode 100755 index 000000000..983e97975 --- /dev/null +++ b/src/Yasumi/Provider/Austria/Vorarlberg.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Provider\Austria; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\Austria; + +/** + * Provider for all holidays in Vorarlberg (Austria). + * + * @link https://en.wikipedia.org/wiki/Vorarlberg + */ +class Vorarlberg extends Austria +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'AT-8'; + + /** + * Initialize holidays for Vorarlberg (Austria). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + // Add custom Common holidays. + $this->addHoliday($this->stJosephsDay($this->year, $this->timezone, $this->locale)); + } +} diff --git a/src/Yasumi/data/translations/plebisciteDay.php b/src/Yasumi/data/translations/plebisciteDay.php new file mode 100644 index 000000000..7e4767a9e --- /dev/null +++ b/src/Yasumi/data/translations/plebisciteDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Plebiscite Day. +return [ + 'en' => 'Plebiscite Day', + 'de_AT' => 'Tag der Volksabstimmung', +]; diff --git a/src/Yasumi/data/translations/stFloriansDay.php b/src/Yasumi/data/translations/stFloriansDay.php new file mode 100644 index 000000000..a8fbe48ba --- /dev/null +++ b/src/Yasumi/data/translations/stFloriansDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Saint Florian's Day. +return [ + 'en' => 'Saint Florian\'s Day', + 'de_AT' => 'Florian', +]; diff --git a/src/Yasumi/data/translations/stLeopoldsDay.php b/src/Yasumi/data/translations/stLeopoldsDay.php new file mode 100644 index 000000000..ff64801b0 --- /dev/null +++ b/src/Yasumi/data/translations/stLeopoldsDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Saint Leopold's Day. +return [ + 'en' => 'Saint Leopold\'s Day', + 'de_AT' => 'Leopold', +]; diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index 89eb38b11..38f598277 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -15,4 +15,5 @@ return [ 'en' => 'St. Martin\'s Day', 'nl' => 'Sint Maarten', + 'de_AT' => 'Martin', ]; diff --git a/src/Yasumi/data/translations/stRupertsDay.php b/src/Yasumi/data/translations/stRupertsDay.php new file mode 100644 index 000000000..19d3f76fa --- /dev/null +++ b/src/Yasumi/data/translations/stRupertsDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Saint Rupert's Day. +return [ + 'en' => 'Saint Rupert\'s Day', + 'de_AT' => 'Rupert', +]; diff --git a/tests/Austria/AustriaBaseTestCase.php b/tests/Austria/AustriaBaseTestCase.php index 53c3ddf37..0e5f35d2c 100644 --- a/tests/Austria/AustriaBaseTestCase.php +++ b/tests/Austria/AustriaBaseTestCase.php @@ -23,17 +23,22 @@ abstract class AustriaBaseTestCase extends TestCase use YasumiBase; /** - * Name of the region (e.g. country / state) to be tested + * Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria'; /** - * Timezone in which this provider has holidays defined + * Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Vienna'; /** - * Locale that is considered common for this provider + * Locale that is considered common for this provider. */ public const LOCALE = 'de_AT'; + + /** + * Number of iterations to be used for the various unit tests of this provider. + */ + public const TEST_ITERATIONS = 50; } diff --git a/tests/Austria/Burgenland/BurgenlandBaseTestCase.php b/tests/Austria/Burgenland/BurgenlandBaseTestCase.php new file mode 100644 index 000000000..e0380a93b --- /dev/null +++ b/tests/Austria/Burgenland/BurgenlandBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Burgenland; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Burgenland (Austria) holiday provider. + */ +abstract class BurgenlandBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/Burgenland'; +} diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php new file mode 100644 index 000000000..cad243b77 --- /dev/null +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -0,0 +1,80 @@ + + */ + +namespace Yasumi\tests\Austria\Burgenland; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing st Martins Day in the Netherlands. + */ +class stMartinsDayTest extends BurgenlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stMartinsDay'; + + /** + * Tests Saint Martins Day. + * + * @dataProvider stMartinsDayDataProvider + * + * @param int $year the year for which Saint Martins Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function teststMartinsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of Saint Martins Day. + * + * @return array list of test dates for Saint Martins Day + * @throws Exception + */ + public function stMartinsDayDataProvider(): array + { + return $this->generateRandomDates(11, 11, 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 => 'Martin'] + ); + } + + /** + * 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/Austria/Carinthia/CarinthiaBaseTestCase.php b/tests/Austria/Carinthia/CarinthiaBaseTestCase.php new file mode 100644 index 000000000..fc2013c5d --- /dev/null +++ b/tests/Austria/Carinthia/CarinthiaBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Carinthia; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Carinthia (Austria) holiday provider. + */ +abstract class CarinthiaBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/Carinthia'; +} diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php new file mode 100644 index 000000000..12c49d302 --- /dev/null +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -0,0 +1,105 @@ + + */ + +namespace Yasumi\tests\Austria\Carinthia; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Plebiscite Day in Carinthia (Austria). + */ +class PlebisciteDayTest extends CarinthiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'plebisciteDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1920; + + /** + * Tests Plebiscite Day. + * + * @dataProvider PlebisciteDayDataProvider + * + * @param int $year the year for which Plebiscite Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testPlebisciteDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of Plebiscite Day. + * + * @return array list of test dates for Plebiscite Day. + * @throws Exception + */ + public function PlebisciteDayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $data[] = [$year, new DateTime("$year-10-10", new DateTimeZone(self::TIMEZONE))]; + } + + return $data; + } + + /** + * 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 - 2) + ); + } + + /** + * Tests 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 => 'Tag der Volksabstimmung'] + ); + } + + /** + * 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/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php new file mode 100644 index 000000000..f586979db --- /dev/null +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Austria\Carinthia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing St. Joseph's Day in Carinthia (Austria). + */ +class StJosephsDayTest extends CarinthiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stJosephsDay'; + + /** + * Tests St. Joseph's Day. + * + * @dataProvider StJosephsDayDataProvider + * + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStJosephsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public function StJosephsDayDataProvider(): array + { + return $this->generateRandomDates(3, 19, self::TIMEZONE); + } + + /** + * Tests 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 => 'Josephstag'] + ); + } + + /** + * 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/Austria/LowerAustria/LowerAustriaBaseTestCase.php b/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php new file mode 100644 index 000000000..acce349e6 --- /dev/null +++ b/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\LowerAustria; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Lower Austria (Austria) holiday provider. + */ +abstract class LowerAustriaBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/LowerAustria'; +} diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php new file mode 100644 index 000000000..78d4f6359 --- /dev/null +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -0,0 +1,105 @@ + + */ + +namespace Yasumi\tests\Austria\LowerAustria; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Saint Leopold's Day in Lower Austria (Austria). + */ +class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stLeopoldsDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1136; + + /** + * Tests Saint Leopold's Day. + * + * @dataProvider StLeopoldsDayDataProvider + * + * @param int $year the year for which Saint Leopold's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStLeopoldsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of Saint Leopold's Day. + * + * @return array list of test dates for Saint Leopold's Day. + * @throws Exception + */ + public function StLeopoldsDayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $data[] = [$year, new DateTime("$year-11-15", new DateTimeZone(self::TIMEZONE))]; + } + + return $data; + } + + /** + * 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 - 2) + ); + } + + /** + * Tests 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 => 'Leopold'] + ); + } + + /** + * 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/Austria/Salzburg/SalzburgBaseTestCase.php b/tests/Austria/Salzburg/SalzburgBaseTestCase.php new file mode 100644 index 000000000..9f9c2c1eb --- /dev/null +++ b/tests/Austria/Salzburg/SalzburgBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Salzburg; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Salzburg (Austria) holiday provider. + */ +abstract class SalzburgBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Austria/Salzburg'; +} diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php new file mode 100644 index 000000000..bbcf07d3f --- /dev/null +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Austria\Salzburg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Saint Rupert's Day in Salzburg (Austria). + */ +class StRupertsDayTest extends SalzburgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stRupertsDay'; + + /** + * Tests Saint Rupert's Day. + * + * @dataProvider StRupertsDayDataProvider + * + * @param int $year the year for which Saint Rupert's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStRupertsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of Saint Rupert's Day. + * + * @return array list of test dates for Saint Rupert's Day. + * @throws Exception + */ + public function StRupertsDayDataProvider(): array + { + return $this->generateRandomDates(9, 24, self::TIMEZONE); + } + + /** + * Tests 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 => 'Rupert'] + ); + } + + /** + * 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/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php new file mode 100644 index 000000000..530f66e4c --- /dev/null +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Austria\Styria; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing St. Joseph's Day in Styria (Austria). + */ +class StJosephsDayTest extends StyriaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stJosephsDay'; + + /** + * Tests St. Joseph's Day. + * + * @dataProvider StJosephsDayDataProvider + * + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStJosephsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public function StJosephsDayDataProvider(): array + { + return $this->generateRandomDates(3, 19, self::TIMEZONE); + } + + /** + * Tests 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 => 'Josephstag'] + ); + } + + /** + * 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/Austria/Styria/StyriaBaseTestCase.php b/tests/Austria/Styria/StyriaBaseTestCase.php new file mode 100644 index 000000000..262b222b9 --- /dev/null +++ b/tests/Austria/Styria/StyriaBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Styria; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Styria (Austria) holiday provider. + */ +abstract class StyriaBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/Styria'; +} diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php new file mode 100644 index 000000000..a78c3aded --- /dev/null +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Austria\Tyrol; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing St. Joseph's Day in Tyrol (Austria). + */ +class StJosephsDayTest extends TyrolBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stJosephsDay'; + + /** + * Tests St. Joseph's Day. + * + * @dataProvider StJosephsDayDataProvider + * + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStJosephsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public function StJosephsDayDataProvider(): array + { + return $this->generateRandomDates(3, 19, self::TIMEZONE); + } + + /** + * Tests 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 => 'Josephstag'] + ); + } + + /** + * 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/Austria/Tyrol/TyrolBaseTestCase.php b/tests/Austria/Tyrol/TyrolBaseTestCase.php new file mode 100644 index 000000000..bae44b47a --- /dev/null +++ b/tests/Austria/Tyrol/TyrolBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Tyrol; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Tyrol (Austria) holiday provider. + */ +abstract class TyrolBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/Tyrol'; +} diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php new file mode 100644 index 000000000..10ad83c04 --- /dev/null +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Austria\UpperAustria; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Saint Florian's Day in Upper Austria (Austria). + */ +class StFloriansDayTest extends UpperAustriaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stFloriansDay'; + + /** + * Tests Saint Florian's Day. + * + * @dataProvider StFloriansDayDataProvider + * + * @param int $year the year for which Saint Florian's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStFloriansDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of Saint Florian's Day. + * + * @return array list of test dates for Saint Florian's Day. + * @throws Exception + */ + public function StFloriansDayDataProvider(): array + { + return $this->generateRandomDates(5, 4, self::TIMEZONE); + } + + /** + * Tests 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 => 'Florian'] + ); + } + + /** + * 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/Austria/UpperAustria/UpperAustriaBaseTestCase.php b/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php new file mode 100644 index 000000000..67a7267bc --- /dev/null +++ b/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\UpperAustria; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Upper Austria (Austria) holiday provider. + */ +abstract class UpperAustriaBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/UpperAustria'; +} diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php new file mode 100644 index 000000000..85979037a --- /dev/null +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -0,0 +1,105 @@ + + */ + +namespace Yasumi\tests\Austria\Vienna; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Saint Leopold's Day in Lower Austria (Austria). + */ +class StLeopoldsDayTest extends ViennaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stLeopoldsDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1136; + + /** + * Tests Saint Leopold's Day. + * + * @dataProvider StLeopoldsDayDataProvider + * + * @param int $year the year for which Saint Leopold's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStLeopoldsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of Saint Leopold's Day. + * + * @return array list of test dates for Saint Leopold's Day. + * @throws Exception + */ + public function StLeopoldsDayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $data[] = [$year, new DateTime("$year-11-15", new DateTimeZone(self::TIMEZONE))]; + } + + return $data; + } + + /** + * 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 - 2) + ); + } + + /** + * Tests 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 => 'Leopold'] + ); + } + + /** + * 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/Austria/Vienna/ViennaBaseTestCase.php b/tests/Austria/Vienna/ViennaBaseTestCase.php new file mode 100644 index 000000000..90a90c98e --- /dev/null +++ b/tests/Austria/Vienna/ViennaBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Vienna; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Vienna (Austria) holiday provider. + */ +abstract class ViennaBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/Vienna'; +} diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php new file mode 100644 index 000000000..0ec91404a --- /dev/null +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Austria\Vorarlberg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing St. Joseph's Day in Vorarlberg (Austria). + */ +class StJosephsDayTest extends VorarlbergBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stJosephsDay'; + + /** + * Tests St. Joseph's Day. + * + * @dataProvider StJosephsDayDataProvider + * + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param DateTime $expected the expected date. + * + * @throws ReflectionException + */ + public function testStJosephsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public function StJosephsDayDataProvider(): array + { + return $this->generateRandomDates(3, 19, self::TIMEZONE); + } + + /** + * Tests 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 => 'Josephstag'] + ); + } + + /** + * 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/Austria/Vorarlberg/VorarlbergBaseTestCase.php b/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php new file mode 100644 index 000000000..1baf45b06 --- /dev/null +++ b/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Austria\Vorarlberg; + +use Yasumi\tests\Austria\AustriaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Vorarlberg (Austria) holiday provider. + */ +abstract class VorarlbergBaseTestCase extends AustriaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested. + */ + public const REGION = 'Austria/Vorarlberg'; +} From ce7b32d007d9c29ae73b478d5654fd472cd3561a Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 10 Nov 2019 02:24:55 +0100 Subject: [PATCH 021/687] Use fallback from DEAULT_LANGUAGE to 'en' (#183) --- src/Yasumi/Holiday.php | 6 +++++- tests/Base/HolidayTest.php | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index ee36b4a9d..c3c8dc549 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -181,7 +181,11 @@ protected function getLocales(): array while (\array_pop($parts) && $parts) { $locales[] = \implode('_', $parts); } - $locales[] = self::DEFAULT_LOCALE; + + // DEFAULT_LOCALE is en_US + $locales[] = 'en_US'; + $locales[] = 'en'; + return $locales; } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 4a1972051..c3f522bbc 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -120,11 +120,23 @@ public function testHolidayGetNameWithParentLocaleTranslation(): void * @throws Exception */ public function testHolidayGetNameWithOnlyDefaultTranslation(): void + { + $name = 'testHoliday'; + $holiday = new Holiday($name, ['en' => 'Holiday EN', 'en_US' => 'Holiday EN-US'], new DateTime(), 'nl_NL'); + + $this->assertIsString($holiday->getName()); + $this->assertEquals('Holiday EN-US', $holiday->getName()); + } + + /** + * Tests the getName function of the Holiday object with only a default translation for the name given. + * @throws Exception + */ + public function testHolidayGetNameWithOnlyDefaultTranslationAndFallback(): void { $name = 'testHoliday'; $translation = 'My Holiday'; - $locale = 'en_US'; - $holiday = new Holiday($name, [$locale => $translation], new DateTime(), $locale); + $holiday = new Holiday($name, ['en' => $translation], new DateTime(), 'nl_NL'); $this->assertIsString($holiday->getName()); $this->assertEquals($translation, $holiday->getName()); From 41c6a0a25594f326ddff6e933344296c4375789a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 3 Dec 2019 00:21:50 +0900 Subject: [PATCH 022/687] Removed support for PHP 7.1 Signed-off-by: Sacha Telgenhof --- .travis.yml | 9 ++------- CHANGELOG.md | 1 + composer.json | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 288d5033c..34c71854e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,9 @@ language: php php: - - 7.1 - 7.2 - 7.3 - - 7.4snapshot + - 7.4 - nightly dist: trusty @@ -30,19 +29,15 @@ script: matrix: allow_failures: - - php: 7.1 - - php: 7.4snapshot - php: hhvm - php: nightly include: - - php: 7.1 - env: PHPSTAN=1 - php: 7.2 env: PHPSTAN=1 - php: 7.3 env: PHPSTAN=1 - - php: 7.4snapshot + - php: 7.4 env: PHPSTAN=1 - php: hhvm env: HHVM=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 201ddcfc8..e6aed3c6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed ### Removed +- PHP 7.1 Support, as it has reached its end of life. ## [2.2.0] - 2019-10-06 diff --git a/composer.json b/composer.json index 1b256086a..fc8b6f921 100755 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=7.1", + "php": ">=7.2", "ext-json": "*" }, "require-dev": { From d577e4dbc3be7180e015f551722036b82e6e9a5f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 3 Dec 2019 22:56:04 +0900 Subject: [PATCH 023/687] Bumped versions. Signed-off-by: Sacha Telgenhof --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index fc8b6f921..d57a81231 100755 --- a/composer.json +++ b/composer.json @@ -24,8 +24,8 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "fzaninotto/faker": "~1.8", + "friendsofphp/php-cs-fixer": "^2.16", + "fzaninotto/faker": "~1.9", "mikey179/vfsstream": "~1.6", "phpunit/phpunit": "~8.4" }, From 0581d7d13ea04c01f69f63fe960388d11d3c35cc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 3 Dec 2019 23:09:22 +0900 Subject: [PATCH 024/687] Fixed typo. Minor formatting corrections. Signed-off-by: Sacha Telgenhof --- tests/Japan/ChildrensDayTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index d83decaa6..d268758bf 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -20,7 +20,7 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class testing Childrens Day in Japan. + * Class testing Children's Day in Japan. */ class ChildrensDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface { @@ -52,6 +52,7 @@ 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 */ @@ -68,6 +69,7 @@ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay() /** * Tests Children's Day before 1948. Children's Day was established after 1948 + * * @throws ReflectionException */ public function testChildrensDayBefore1948() @@ -81,6 +83,7 @@ public function testChildrensDayBefore1948() /** * Tests the translated name of the holiday defined in this test. + * * @throws ReflectionException */ public function testTranslation(): void @@ -95,6 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. + * * @throws ReflectionException */ public function testHolidayType(): void From 77f18833366dab3be01c943465fd881de2fd330b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 5 Dec 2019 01:28:17 +0900 Subject: [PATCH 025/687] Corrected clause as second part was not a condition but rather an assignment (which is incorrect and always is true). Signed-off-by: Sacha Telgenhof --- tests/Switzerland/Aargau/AargauTest.php | 2 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenTest.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenTest.php | 2 +- tests/Switzerland/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 +- tests/Switzerland/Schaffhausen/SchaffhausenTest.php | 2 +- tests/Switzerland/Schwyz/SchwyzTest.php | 2 +- tests/Switzerland/Solothurn/SolothurnTest.php | 2 +- tests/Switzerland/StGallen/StGallenTest.php | 2 +- tests/Switzerland/SwitzerlandTest.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 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index 962f8d6aa..9f70c198b 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -62,7 +62,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 3f3989248..c3fb32f7d 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -62,7 +62,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index c7aae43a1..e24359f4c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -66,7 +66,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index b0d8d2dda..996f7aaf6 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -63,7 +63,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index 2c0357799..c03b14aef 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -63,7 +63,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index 9916b59f2..4c2a6e1be 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -63,7 +63,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index d4cdf155f..4964d1937 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -61,7 +61,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index dd0bdb1e5..81c648db6 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -67,7 +67,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index 564e6e5a9..8e6a0028e 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -65,7 +65,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index aac1be88a..9a45aa4f4 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -62,7 +62,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index c9c924c40..54101ee51 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -67,7 +67,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index a54963080..3854b6659 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -67,7 +67,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index 7f9682a67..3e4f56037 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -65,7 +65,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index 6adff25ca..600e0e085 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -67,7 +67,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index 5dd21aec5..4fa78b4d1 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -68,7 +68,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index 93c16bbe3..6c54ae13d 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -64,7 +64,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index 9c89225c4..211ecbf33 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -68,7 +68,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index 51f13f1a8..70b6e87d9 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -61,7 +61,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index 25ef3f378..3c16eb990 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -63,7 +63,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index bb2b9d170..e7be01f35 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -45,7 +45,7 @@ public function testOfficialHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index f214114dd..d5a969420 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -64,7 +64,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index bd2e521d6..889acbf5b 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -69,7 +69,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index 8d4095b64..1fa6b1bc9 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -68,7 +68,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index 67500efb9..b51900b2d 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -63,7 +63,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index 2ef4757c7..69f81f5c1 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -63,7 +63,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 21a5db80b..db7b1144a 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -67,7 +67,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index 730f6c7a1..6cc151f90 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -64,7 +64,7 @@ public function testRegionalHolidays(): void public function testObservedHolidays(): void { $observedHolidays = []; - if (($this->year >= 1899 && $this->year < 1994) || $this->year = 1891) { + if (($this->year >= 1899 && $this->year < 1994) || 1891 === $this->year) { $observedHolidays[] = 'swissNationalDay'; } From 1e2f82b658152d3a2e59756dfc32175f6a03e131 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 16 Dec 2019 22:45:26 +0900 Subject: [PATCH 026/687] Updated dependencies. Signed-off-by: Sacha Telgenhof --- .travis.yml | 2 +- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34c71854e..848bfa9ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ before_script: - composer install --no-interaction script: - - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.11 && vendor/bin/phpstan analyse -l 5 src; fi + - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.12 && 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 diff --git a/composer.json b/composer.json index d57a81231..5d82961cc 100755 --- a/composer.json +++ b/composer.json @@ -25,9 +25,9 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", - "fzaninotto/faker": "~1.9", - "mikey179/vfsstream": "~1.6", - "phpunit/phpunit": "~8.4" + "fzaninotto/faker": "^1.9", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^8.5" }, "autoload": { "psr-4": { From ed73539d71b06f5fbb1a7a6cb94bdda3c79b8d58 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 28 Dec 2019 23:05:25 +0900 Subject: [PATCH 027/687] Fixed compound conditions that are always true by simplifying the condition steps. Removed unnecessary unit tests. Fixed comments. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 16 ++++++++++------ tests/Japan/AutumnalEquinoxDayTest.php | 21 +++------------------ tests/Japan/VernalEquinoxDayTest.php | 15 --------------- 3 files changed, 13 insertions(+), 39 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 16d7ab1f9..f3a19b931 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -269,9 +269,7 @@ private function calculateEmperorsBirthday(): void private function calculateVernalEquinoxDay(): void { $day = null; - if ($this->year < 1948 || $this->year > 2150) { - $day = null; - } elseif ($this->year >= 1948 && $this->year <= 1979) { + if ($this->year >= 1948 && $this->year <= 1979) { $day = \floor(self::VERNAL_EQUINOX_PARAM_1979 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1983) / 4)); } elseif ($this->year <= 2099) { $day = \floor(self::VERNAL_EQUINOX_PARAM_2099 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); @@ -279,6 +277,10 @@ private function calculateVernalEquinoxDay(): void $day = \floor(self::VERNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); } + if ($this->year < 1948 || $this->year > 2150) { + $day = null; + } + if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'vernalEquinoxDay', @@ -500,9 +502,7 @@ private function calculateSportsDay(): void private function calculateAutumnalEquinoxDay(): void { $day = null; - if ($this->year < 1948 || $this->year > 2150) { - $day = null; - } elseif ($this->year >= 1948 && $this->year <= 1979) { + if ($this->year >= 1948 && $this->year <= 1979) { $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_1979 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1983) / 4)); } elseif ($this->year <= 2099) { $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_2099 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); @@ -510,6 +510,10 @@ private function calculateAutumnalEquinoxDay(): void $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); } + if ($this->year < 1948 || $this->year > 2150) { + $day = null; + } + if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'autumnalEquinoxDay', diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 0e962d950..4865df314 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -35,7 +35,7 @@ class AutumnalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCase public const ESTABLISHMENT_YEAR = 1948; /** - * Tests Vernal Equinox Day after 2150. This national holiday was established in 1948 as a day on which to honor + * Tests Autumnal Equinox Day after 2150. 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 (秋季皇霊祭). * @@ -48,7 +48,7 @@ public function testAutumnalEquinoxDayOnAfter2150() } /** - * Tests Vernal Equinox Day between 1948 and 2150. This national holiday was established in 1948 as a day on which + * Tests Autumnal Equinox Day between 1948 and 2150. 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 (秋季皇霊祭). * @@ -90,7 +90,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 + * Tests Autumnal 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 @@ -104,21 +104,6 @@ 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 - */ - public function testAutumnalEquinoxDayBetween1851And1948() - { - $this->assertNotHoliday( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(1851, self::ESTABLISHMENT_YEAR - 1) - ); - } - /** * Tests the translated name of the holiday defined in this test. * @throws ReflectionException diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index b5f24bae0..83f4fba52 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -105,21 +105,6 @@ 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 - */ - public function testVernalEquinoxDayBetween1851And1948() - { - $this->assertNotHoliday( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(1851, self::ESTABLISHMENT_YEAR - 1) - ); - } - /** * Tests the translated name of the holiday defined in this test. * @throws ReflectionException From 12d942346d3d092a9b25465681f64961b2976b52 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 28 Dec 2019 23:35:33 +0900 Subject: [PATCH 028/687] Fixed compound conditions that are always true by simplifying the condition steps. Removed unnecessary unit tests. Fixed comments. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Switzerland/Geneva.php | 21 ++++++++----- .../Switzerland/Geneva/JeuneGenevoisTest.php | 30 ++++++------------- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 0a4b08c9d..498a60f7f 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -36,6 +36,8 @@ class Geneva extends Switzerland */ public const ID = 'CH-GE'; + public const JEUNE_GENEVOIS_ESTABLISHMENT_YEAR = 1840; + /** * Initialize holidays for Geneva (Switzerland). * @@ -74,20 +76,23 @@ public function initialize(): void */ private function calculateJeuneGenevois(): void { + if (self::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR > $this->year) { + return; + } + // Find first Sunday of September $date = new DateTime('First Sunday of ' . $this->year . '-09', new DateTimeZone($this->timezone)); // Go to next Thursday $date->add(new DateInterval('P4D')); - if (($this->year >= 1840 && $this->year <= 1869) || $this->year >= 1966) { - $this->addHoliday(new Holiday('jeuneGenevois', [ - 'fr' => 'Jeûne genevois', - ], $date, $this->locale, Holiday::TYPE_OTHER)); - } elseif ($this->year > 1869 && $this->year < 1966) { - $this->addHoliday(new Holiday('jeuneGenevois', [ - 'fr' => 'Jeûne genevois', - ], $date, $this->locale, Holiday::TYPE_OBSERVANCE)); + $type = Holiday::TYPE_OTHER; + if ($this->year > 1869 && $this->year < 1966) { + $type = Holiday::TYPE_OBSERVANCE; } + + $this->addHoliday(new Holiday('jeuneGenevois', [ + 'fr' => 'Jeûne genevois', + ], $date, $this->locale, $type)); } /** diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 548844f3f..1765e95ad 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -18,6 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; +use Yasumi\Provider\Switzerland\Geneva; use Yasumi\tests\YasumiTestCaseInterface; /** @@ -30,24 +31,6 @@ class JeuneGenevoisTest extends GenevaBaseTestCase implements YasumiTestCaseInte */ public const HOLIDAY = 'jeuneGenevois'; - /** - * Tests Jeune Genevois on or after 1966 - * - * @throws ReflectionException - * @throws Exception - */ - public function testJeuneGenevoisOnAfter1966() - { - $year = $this->generateRandomYear(1966); - // Find first Sunday of September - $date = new DateTime('First Sunday of ' . $year . '-09', new DateTimeZone(self::TIMEZONE)); - // Go to next Thursday - $date->add(new DateInterval('P4D')); - - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); - } - /** * Tests Jeune Genevois between 1870 and 1965 * @@ -74,7 +57,7 @@ public function testJeuneGenevoisBetween1870And1965() */ public function testJeuneGenevoisBetween1840And1869() { - $year = $this->generateRandomYear(1840, 1869); + $year = $this->generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); // Find first Sunday of September $date = new DateTime('First Sunday of ' . $year . '-09', new DateTimeZone(self::TIMEZONE)); // Go to next Thursday @@ -90,7 +73,7 @@ public function testJeuneGenevoisBetween1840And1869() */ public function testJeuneGenevoisBefore1840() { - $year = $this->generateRandomYear(1000, 1839); + $year = $this->generateRandomYear(1000, Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -114,6 +97,11 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1966), Holiday::TYPE_OTHER); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1966), + Holiday::TYPE_OTHER + ); } } From 3314d97de75ddd59b4ddff2bbe17e5700bc9e3e1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 29 Dec 2019 11:35:22 +0900 Subject: [PATCH 029/687] Reformatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 4 ++-- src/Yasumi/data/translations/plebisciteDay.php | 4 ++-- src/Yasumi/data/translations/stFloriansDay.php | 4 ++-- src/Yasumi/data/translations/stLeopoldsDay.php | 4 ++-- src/Yasumi/data/translations/stRupertsDay.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 6576e3883..227b55282 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -92,7 +92,7 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (! $provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { + if (!$provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { @@ -286,7 +286,7 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (! $provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { + if (!$provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { diff --git a/src/Yasumi/data/translations/plebisciteDay.php b/src/Yasumi/data/translations/plebisciteDay.php index 7e4767a9e..a8d9d6eab 100644 --- a/src/Yasumi/data/translations/plebisciteDay.php +++ b/src/Yasumi/data/translations/plebisciteDay.php @@ -13,6 +13,6 @@ // Translations for Plebiscite Day. return [ - 'en' => 'Plebiscite Day', - 'de_AT' => 'Tag der Volksabstimmung', + 'en' => 'Plebiscite Day', + 'de_AT' => 'Tag der Volksabstimmung', ]; diff --git a/src/Yasumi/data/translations/stFloriansDay.php b/src/Yasumi/data/translations/stFloriansDay.php index a8fbe48ba..fe4ea42ce 100644 --- a/src/Yasumi/data/translations/stFloriansDay.php +++ b/src/Yasumi/data/translations/stFloriansDay.php @@ -13,6 +13,6 @@ // Translations for Saint Florian's Day. return [ - 'en' => 'Saint Florian\'s Day', - 'de_AT' => 'Florian', + 'en' => 'Saint Florian\'s Day', + 'de_AT' => 'Florian', ]; diff --git a/src/Yasumi/data/translations/stLeopoldsDay.php b/src/Yasumi/data/translations/stLeopoldsDay.php index ff64801b0..50941bce6 100644 --- a/src/Yasumi/data/translations/stLeopoldsDay.php +++ b/src/Yasumi/data/translations/stLeopoldsDay.php @@ -13,6 +13,6 @@ // Translations for Saint Leopold's Day. return [ - 'en' => 'Saint Leopold\'s Day', - 'de_AT' => 'Leopold', + 'en' => 'Saint Leopold\'s Day', + 'de_AT' => 'Leopold', ]; diff --git a/src/Yasumi/data/translations/stRupertsDay.php b/src/Yasumi/data/translations/stRupertsDay.php index 19d3f76fa..4e6152874 100644 --- a/src/Yasumi/data/translations/stRupertsDay.php +++ b/src/Yasumi/data/translations/stRupertsDay.php @@ -13,6 +13,6 @@ // Translations for Saint Rupert's Day. return [ - 'en' => 'Saint Rupert\'s Day', - 'de_AT' => 'Rupert', + 'en' => 'Saint Rupert\'s Day', + 'de_AT' => 'Rupert', ]; From 3510230cb0b4b485fe2a69a95ccd35ff74a146a0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 29 Dec 2019 11:50:22 +0900 Subject: [PATCH 030/687] Simplified condition structure. Reformatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 102 +++++++++++++++-------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 94886454a..2d933d3b0 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -50,7 +50,7 @@ class SouthKorea extends AbstractProvider * 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. + * 박(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 = [ @@ -458,65 +458,67 @@ public function calculateHangulDay(): void /** * Substitute Holidays. - * related statutes: Article 3 Alternative Statutory Holidays of the Regulations on Holidays of Government Offices + * 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. + * When public holidays fall on each other, the first non-public holiday after the holiday becomes 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 => $holiday) { - // Get list of holiday dates except this - $holidayDates = \array_map(static 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)$holiday->format('w') - || \in_array($holiday, $holidayDates, false) - || (6 === (int)$holiday->format('w') && 'childrensDay' === $shortName) - ) - ) { - $date = clone $holiday; - - // Find next week day (not being another holiday) - 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 - $substitute = new SubstituteHoliday( - $holiday, - [], - $date, - $this->locale - ); - - // Add a new holiday that is substituting the original holiday - $this->addHoliday($substitute); - - // Add substitute holiday to the list - $holidays[] = $substitute; + if ($this->year <= 2013) { + return; + } + + // Initialize holidays variable + $holidays = $this->getHolidays(); + $acceptedHolidays = [ + 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', + 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', + 'childrensDay', + ]; + + // Loop through all holidays + 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; + }, $holidays); + + // Only process accepted holidays and conditions + if (\in_array($shortName, $acceptedHolidays, true) + && ( + 0 === (int)$holiday->format('w') + || \in_array($holiday, $holidayDates, false) + || (6 === (int)$holiday->format('w') && 'childrensDay' === $shortName) + ) + ) { + $date = clone $holiday; + + // Find next week day (not being another holiday) + 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 + $substitute = new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + ); + + // Add a new holiday that is substituting the original holiday + $this->addHoliday($substitute); + + // Add substitute holiday to the list + $holidays[] = $substitute; } } } From 651c8d1ef9198eec86e24b436db9f603a5253dee Mon Sep 17 00:00:00 2001 From: Thomas Niemann Date: Tue, 31 Dec 2019 14:18:21 +0100 Subject: [PATCH 031/687] Fix issue if calculated workday is in next year (#194) Currently, the year of the calculated date is not changed if it is in the next year. When u try to get the next working day starting from 28.12.2019 and with 3 working days the calculated day is 1.1.2019 which is in the past. --- CHANGELOG.md | 1 + src/Yasumi/Yasumi.php | 2 +- tests/Base/YasumiWorkdayTest.php | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6aed3c6b..6dde75794 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Changed ### Fixed +- Fixed issue if the next working day happens to be in the next year ### Removed - PHP 7.1 Support, as it has reached its end of life. diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 227b55282..888c5c725 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -92,7 +92,7 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { + if (! $provider instanceof ProviderInterface || $provider->getYear() !== (int)$date->format('Y')) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index acb84fe20..31baaf3ee 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -142,4 +142,44 @@ public function testYearBoundary(): void $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); } + + + /** + * Tests when the next working day happens to be in the next year. + * + * @dataProvider dataProviderWorkDayNextYear + * @param string $start + * @param int $workdays + * @param string $expectedNext + * @throws ReflectionException + * @throws Exception + */ + public function testWorkDayIsNextYear(string $start, int $workdays, string $expectedNext): void + { + $provider = 'USA'; + $timezone = 'America/New_York'; + $startDate = new DateTime($start, new DateTimeZone($timezone)); + $result = Yasumi::nextWorkingDay($provider, $startDate, $workdays); + + $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + } + + /** + * @return array + */ + public function dataProviderWorkDayNextYear(): array + { + return [ + [ + '2019-12-30', + 2, + '2020-01-02', + ], + [ + '2018-12-28', + 2, + '2019-01-02', + ], + ]; + } } From 931ecd663453653f58190658a0a043447ed4ab08 Mon Sep 17 00:00:00 2001 From: bruce aldridge Date: Wed, 1 Jan 2020 03:18:35 +1300 Subject: [PATCH 032/687] Add AFL Grand Final Friday dates for 2019 / 2020 (#190) * Add AFL Grand Final Friday dates for 2019 / 2020 sources 2019: https://www.timeanddate.com/holidays/australia/afl-grand-final-friday 2020: https://publicholidays.com.au/afl-grand-final-holiday/ --- CHANGELOG.md | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 6 ++++++ tests/Australia/Victoria/AFLGrandFinalFridayTest.php | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dde75794..34da0fc05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added - +- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) ### Changed ### Fixed diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index e158d9e6e..77dd6ef8f 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -194,6 +194,12 @@ private function calculateAFLGrandFinalDay(): void case 2018: $aflGrandFinalFriday = '2018-09-28'; break; + case 2019: + $aflGrandFinalFriday = '2019-09-27'; + break; + case 2020: + $aflGrandFinalFriday = '2020-09-25'; + break; default: return; } diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 303ce70aa..09760f0fd 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -30,7 +30,7 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements YasumiTest public const HOLIDAY = 'aflGrandFinalFriday'; public const ESTABLISHMENT_YEAR = 2015; - public const LAST_KNOWN_YEAR = 2018; + public const LAST_KNOWN_YEAR = 2020; /** * Tests AFL Grand Final Friday @@ -103,6 +103,8 @@ public function HolidayDataProvider(): array [2016, '2016-09-30'], [2017, '2017-09-29'], [2018, '2018-09-28'], + [2019, '2019-09-27'], + [2020, '2020-09-25'], ]; return $data; From 18f5c338edd9069d407087fd19bfb365594e68b5 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Tue, 31 Dec 2019 15:19:29 +0100 Subject: [PATCH 033/687] Do not capitalise names in DA/NB/NL (#185) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Denmark.php | 4 ++-- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/data/translations/allSaintsEve.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 6 +++--- src/Yasumi/data/translations/christmasEve.php | 2 +- src/Yasumi/data/translations/easter.php | 6 +++--- src/Yasumi/data/translations/easterMonday.php | 6 +++--- src/Yasumi/data/translations/epiphanyEve.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 4 ++-- src/Yasumi/data/translations/internationalWorkersDay.php | 6 +++--- src/Yasumi/data/translations/maundyThursday.php | 4 ++-- src/Yasumi/data/translations/newYearsDay.php | 4 ++-- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/pentecost.php | 8 ++++---- src/Yasumi/data/translations/pentecostMonday.php | 6 +++--- src/Yasumi/data/translations/secondChristmasDay.php | 4 ++-- src/Yasumi/data/translations/stJohnsDay.php | 2 +- src/Yasumi/data/translations/stJohnsEve.php | 2 +- src/Yasumi/data/translations/summerTime.php | 4 ++-- src/Yasumi/data/translations/winterTime.php | 4 ++-- tests/Belgium/EasterMondayTest.php | 2 +- tests/Belgium/EasterTest.php | 2 +- tests/Belgium/NationalDayTest.php | 2 +- tests/Belgium/PentecostTest.php | 2 +- tests/Belgium/pentecostMondayTest.php | 2 +- tests/Denmark/ChristmasDayTest.php | 2 +- tests/Denmark/ChristmasEveTest.php | 2 +- tests/Denmark/ConstitutionDayTest.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/PentecostTest.php | 2 +- tests/Denmark/SummerTimeTest.php | 2 +- tests/Denmark/WinterTimeTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/EasterMondayTest.php | 2 +- tests/Netherlands/EasterTest.php | 2 +- tests/Netherlands/PentecostTest.php | 2 +- tests/Netherlands/SummertimeTest.php | 2 +- tests/Netherlands/WintertimeTest.php | 2 +- tests/Netherlands/pentecostMondayTest.php | 2 +- tests/Netherlands/secondChristmasdayTest.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/PentecostMondayTest.php | 2 +- tests/Norway/PentecostTest.php | 2 +- tests/Norway/SecondChristmasDayTest.php | 2 +- tests/Sweden/InternationalWorkersDayTest.php | 2 +- tests/Sweden/PentecostTest.php | 2 +- 63 files changed, 83 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34da0fc05..81bbebb60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) ### Changed +- Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) ### Fixed - Fixed issue if the next working day happens to be in the next year diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 720a68c56..c13c8d824 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/Denmark.php b/src/Yasumi/Provider/Denmark.php index 689b21deb..b4b0212b2 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' => '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' => 'Grundlovsdag'], + ['da' => 'grundlovsdag'], new DateTime("$this->year-6-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index e589e62d3..c71b459e1 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -304,7 +304,7 @@ private function calculateCommemorationLiberationDay(): void if ($this->year >= 1947) { $this->addHoliday(new Holiday( 'commemorationDay', - ['en' => 'Commemoration Day', 'nl' => 'Dodenherdenking'], + ['en' => 'Commemoration Day', 'nl' => 'dodenherdenking'], new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 39e02ba38..e0b90c400 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' => 'Grunnlovsdagen'], + ['nb' => 'grunnlovsdagen'], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index d835564d3..53a351526 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -13,7 +13,7 @@ // Translations for All Saints' Eve return [ - 'da' => 'Allehelgensaften', + 'da' => 'allehelgensaften', 'en' => 'All Saints\' Eve', 'sv' => 'alla helgons afton', ]; diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 61403f3d8..b1aef3b20 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -16,7 +16,7 @@ 'bs_Latn' => 'Božić', 'cs' => '1. svátek vánoční', 'cy' => 'Nadolig', - 'da' => 'Juledag', + 'da' => 'juledag', 'de' => '1. Weihnachtsfeiertag', 'de_AT' => 'Christtag', 'de_CH' => 'Weihnachtstag', @@ -33,8 +33,8 @@ 'ko' => '기독탄신일', 'lt' => 'Šv. Kalėdos', 'lv' => 'Ziemassvētki', - 'nb' => 'Første juledag', - 'nl' => 'Eerste kerstdag', + 'nb' => 'første juledag', + 'nl' => 'eerste kerstdag', 'nl_BE' => 'Kerstmis', 'pl' => 'pierwszy dzień Bożego Narodzenia', 'pt' => 'Natal', diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index bb201afcd..beb7b3ed5 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -15,7 +15,7 @@ return [ 'cs' => 'Štědrý den', 'cy' => 'Noswyl Nadolig', - 'da' => 'Juleaften', + 'da' => 'juleaften', 'de' => 'Heiliger Abend', 'en' => 'Christmas Eve', 'et' => 'Jõululaupäev', diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index b3d243387..e28371a96 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -15,7 +15,7 @@ return [ 'bs_Latn' => 'Uskrs', 'cy' => 'Sul y Pasg', - 'da' => 'Påskedag', + 'da' => 'påskedag', 'de' => 'Ostersonntag', 'de_CH' => 'Ostern', 'el' => 'Κυριακή του Πάσχα', @@ -29,8 +29,8 @@ 'it' => 'Pasqua', 'lt' => 'Velykos', 'lv' => 'Lieldienas', - 'nb' => 'Første påskedag', - 'nl' => 'Eerste paasdag', + 'nb' => 'første påskedag', + 'nl' => 'eerste paasdag', 'pl' => 'Wielkanoc', 'pt' => 'Páscoa', 'ro' => 'Paștele', diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 72668b423..55a599fe8 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -29,9 +29,9 @@ 'it_CH' => 'Lunedi di Pasqua', 'lt' => 'Antroji Velykų diena', 'lv' => 'Otrās Lieldienas', - 'nb' => 'Andre påskedag', - 'nl_BE' => 'Paasmaandag', - 'nl' => 'Tweede paasdag', + 'nb' => 'andre påskedag', + 'nl_BE' => 'paasmaandag', + 'nl' => 'tweede paasdag', 'pl' => 'Poniedziałek Wielkanocny', 'ro' => 'A doua zi de Paște', 'sk' => 'Veľkonočný pondelok', diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php index a05bac762..faf40672c 100644 --- a/src/Yasumi/data/translations/epiphanyEve.php +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -13,7 +13,7 @@ // Translations for Epiphany Eve return [ - 'da' => 'Helligtrekongersaften', + 'da' => 'helligtrekongersaften', 'en' => 'Epiphany Eve', 'sv' => 'trettondagsafton', ]; diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 5ca23ca60..d3b23d8ee 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -15,7 +15,7 @@ return [ 'cs' => 'Velký pátek', 'cy' => 'Gwener y Groglith', - 'da' => 'Langfredag', + 'da' => 'langfredag', 'de' => 'Karfreitag', 'el' => 'Μεγάλη Παρασκευή', 'en' => 'Good Friday', @@ -28,7 +28,7 @@ 'it' => 'Venerdi Santo', 'ja' => 'グッドフライデー', 'lv' => 'Lielā Piektdiena', - 'nb' => 'Langfredag', + 'nb' => 'langfredag', 'nl' => 'Goede Vrijdag', 'pl' => 'Wielki Piątek', 'pt' => 'Sexta feira santa', diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index 68dba8399..b62cc758f 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -15,7 +15,7 @@ return [ 'bs_Latn' => 'Praznik rada', 'cs' => 'Svátek práce', - 'da' => 'Første maj', + 'da' => 'første maj', 'de' => 'Tag der Arbeit', 'de_AT' => 'Staatsfeiertag', 'el' => 'Εργατική Πρωτομαγιά', @@ -33,7 +33,7 @@ 'ko' => '노동절', 'lt' => 'Tarptautinė darbo diena', 'lv' => 'Darba svētki', - 'nb' => 'Arbeidernes dag', + 'nb' => 'arbeidernes dag', 'nl' => 'Dag van de arbeid', 'pl' => 'Święto Pracy', 'pt' => 'Dia internacional do trabalhador', @@ -41,6 +41,6 @@ 'ro' => 'Ziua internațională a muncii', 'ru' => 'День международной солидарности трудящихся', 'sk' => 'Sviatok práce', - 'sv' => 'Första maj', + 'sv' => 'första maj', 'uk' => 'День міжнародної солідарності трудящих', ]; diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index 0a39bb641..405c70049 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -13,9 +13,9 @@ // Translations for Maundy Thursday return [ - 'da' => 'Skærtorsdag', + 'da' => 'skærtorsdag', 'el' => 'Μεγάλη Πέμπτη', 'en' => 'Maundy Thursday', 'es' => 'Jueves Santo', - 'nb' => 'Skjærtorsdag', + 'nb' => 'skjærtorsdag', ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 28d394d00..8818a63d9 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -16,7 +16,7 @@ 'bs_Latn' => 'Nova godina', 'cs' => 'Nový rok', 'cy' => 'Dydd Calan', - 'da' => 'Nytårsdag', + 'da' => 'nytårsdag', 'de' => 'Neujahr', 'el' => 'Πρωτοχρονιά', 'en' => 'New Year\'s Day', @@ -34,7 +34,7 @@ 'ko' => '새해', 'lt' => 'Naujųjų metų diena', 'lv' => 'Jaunais Gads', - 'nb' => 'Første nyttårsdag', + 'nb' => 'første nyttårsdag', 'nl' => 'Nieuwjaar', 'pl' => 'Nowy Rok', 'pt' => 'Ano novo', diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 961dc8aa2..ffe2c4dcc 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -13,7 +13,7 @@ // Translations for New Year's Eve return [ - 'da' => 'Nytårsaften', + 'da' => 'nytårsaften', 'en' => 'New Year\'s Eve', 'ko' => '신년전야', 'lv' => 'Vecgada vakars', diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index a8d303e4a..933be561f 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -13,7 +13,7 @@ // Translations for Whitsunday return [ - 'da' => 'Pinsedag', + 'da' => 'pinsedag', 'de' => 'Pfingstsonntag', 'de_AT' => 'Pfingsten', 'de_CH' => 'Pfingsten', @@ -25,11 +25,11 @@ 'ga' => 'Domhnach Cincíse', 'hu' => 'Pünkösd', 'it' => 'Pentecoste', - 'nb' => 'Første pinsedag', - 'nl' => 'Eerste pinksterdag', + 'nb' => 'første pinsedag', + 'nl' => 'eerste pinksterdag', 'pl' => 'Zielone Świątki', 'ro' => 'Rusaliile', 'ru' => 'Троица', - 'sv' => 'Pingstdagen', + 'sv' => 'pingstdagen', 'uk' => 'Трійця', ]; diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 1f237b894..bf1af85d4 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -21,8 +21,8 @@ 'ga' => 'Luan Cincíse', 'hu' => 'Pünkösdhétfő', 'it' => 'Lunedi di Pentecoste', - 'nb' => 'Andre pinsedag', - 'nl' => 'Tweede pinksterdag', - 'nl_BE' => 'Pinkstermaandag', + 'nb' => 'andre pinsedag', + 'nl' => 'tweede pinksterdag', + 'nl_BE' => 'pinkstermaandag', 'ro' => 'A doua zi de Rusalii', ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index 18267dac2..7f308f8a0 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -27,8 +27,8 @@ 'ko' => '성탄절 연휴', 'lt' => 'Kalėdos (antra diena)', 'lv' => 'Otrie Ziemassvētki', - 'nb' => 'Andre juledag', - 'nl' => 'Tweede kerstdag', + 'nb' => 'andre juledag', + 'nl' => 'tweede kerstdag', 'pl' => 'drugi dzień Bożego Narodzenia', 'ro' => 'A doua zi de Crăciun', 'sk' => 'Druhý sviatok vianočný', diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index c8750e792..c76829f8e 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -13,7 +13,7 @@ // Translations for St. John's Day return [ - 'da' => 'Sankthansaften', + 'da' => 'sankthansaften', 'el' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', 'en' => 'St. John\'s Day', 'es' => 'Sant Joan', diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index f957d9e1c..45f2b79a6 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -13,7 +13,7 @@ // Translations for St. John's Eve return [ - 'da' => 'Sankthansaften', + 'da' => 'sankthansaften', 'en' => 'St. John\'s Eve', 'sv' => 'midsommarafton', ]; diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 41bf528ae..8932db8d7 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -13,8 +13,8 @@ // Translations for Summertime return [ - 'da' => 'Sommertid starter', + 'da' => 'sommertid starter', 'en' => 'Summertime', 'ko' => '서머타임', - 'nl' => 'Zomertijd', + 'nl' => 'zomertijd', ]; diff --git a/src/Yasumi/data/translations/winterTime.php b/src/Yasumi/data/translations/winterTime.php index a2cbd90ca..d482b7e12 100644 --- a/src/Yasumi/data/translations/winterTime.php +++ b/src/Yasumi/data/translations/winterTime.php @@ -13,7 +13,7 @@ // Translations for Wintertime return [ - 'da' => 'Sommertid slutter', + 'da' => 'sommertid slutter', 'en' => 'Wintertime', - 'nl' => 'Wintertijd', + 'nl' => 'wintertijd', ]; diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index f39b18c7f..2302362e1 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Paasmaandag'] + [self::LOCALE => 'paasmaandag'] ); } diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 88d8506ff..33c68c0ad 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste paasdag'] + [self::LOCALE => 'eerste paasdag'] ); } diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index 8ddc79cbe..ec1ee8bd1 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Nationale feestdag'] + [self::LOCALE => 'nationale feestdag'] ); } diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index c994be531..77f44a95c 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste pinksterdag'] + [self::LOCALE => 'eerste pinksterdag'] ); } diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 6f4c0b99f..b9521a536 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Pinkstermaandag'] + [self::LOCALE => 'pinkstermaandag'] ); } diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 215eaeaee..9578f4116 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Juledag'] + [self::LOCALE => 'juledag'] ); } diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 92f7897cb..d9d47816d 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Juleaften'] + [self::LOCALE => 'juleaften'] ); } diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index 3879fc4e5..48be77dfc 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -73,7 +73,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Grundlovsdag'] + [self::LOCALE => 'grundlovsdag'] ); } diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index 1affea3a8..59da8c55d 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Påskedag'] + [self::LOCALE => 'påskedag'] ); } diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 0baea5c52..bb67a540d 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Langfredag'] + [self::LOCALE => 'langfredag'] ); } diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index ffcd70864..3155c4401 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -73,7 +73,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Store bededag'] + [self::LOCALE => 'store bededag'] ); } diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 8089a1516..3e7a17813 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Første maj'] + [self::LOCALE => 'første maj'] ); } diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index 5552a3357..05bcd197d 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Skærtorsdag'] + [self::LOCALE => 'skærtorsdag'] ); } diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index ee2157508..fab76da79 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Nytårsdag'] + [self::LOCALE => 'nytårsdag'] ); } diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index b1d72f816..1723cea3e 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Nytårsaften'] + [self::LOCALE => 'nytårsaften'] ); } diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index bd6ec9ea2..e7c2281a5 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Pinsedag'] + [self::LOCALE => 'pinsedag'] ); } diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 04e63ca8a..cedad76b3 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -65,7 +65,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(1980, 2037), - [self::LOCALE => 'Sommertid starter'] + [self::LOCALE => 'sommertid starter'] ); } diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 8392c84bb..2fc62f09c 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -66,7 +66,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(1980, 2037), - [self::LOCALE => 'Sommertid slutter'] + [self::LOCALE => 'sommertid slutter'] ); } diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 782251d48..c18d36808 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste kerstdag'] + [self::LOCALE => 'eerste kerstdag'] ); } diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 4c66e4cb3..bd1aced75 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -73,7 +73,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Dodenherdenking'] + [self::LOCALE => 'dodenherdenking'] ); } diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index b92040171..601d7140e 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -55,7 +55,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 6c30b083d..69ad57658 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -55,7 +55,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 2b6ceabf3..e15318093 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste pinksterdag'] + [self::LOCALE => 'eerste pinksterdag'] ); } diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index ce978a17e..82d0c40c2 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -66,7 +66,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(1978, 2037), - [self::LOCALE => 'Zomertijd'] + [self::LOCALE => 'zomertijd'] ); } diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index 902d580a1..681970aff 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -65,7 +65,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(1978, 2037), - [self::LOCALE => 'Wintertijd'] + [self::LOCALE => 'wintertijd'] ); } diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index e8700703d..e55086154 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -55,7 +55,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 0abdc265d..084f7ebf9 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Tweede kerstdag'] + [self::LOCALE => 'tweede kerstdag'] ); } diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 40514307f..bb6e1ea52 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Første juledag'] + [self::LOCALE => 'første juledag'] ); } diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index ecc54718d..625c949e1 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -73,7 +73,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Grunnlovsdagen'] + [self::LOCALE => 'grunnlovsdagen'] ); } diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 4b2bc040e..f5c226b55 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Andre påskedag'] + [self::LOCALE => 'andre påskedag'] ); } diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index c279b4716..6e6bff1ec 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Første påskedag'] + [self::LOCALE => 'første påskedag'] ); } diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index d63ef604e..3e2218f2a 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Langfredag'] + [self::LOCALE => 'langfredag'] ); } diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 633a7a4cb..db0271b2b 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Arbeidernes dag'] + [self::LOCALE => 'arbeidernes dag'] ); } diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index e43b6d03a..68ff0fd63 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Skjærtorsdag'] + [self::LOCALE => 'skjærtorsdag'] ); } diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index 8daaa6cbc..eefe2c5a5 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Første nyttårsdag'] + [self::LOCALE => 'første nyttårsdag'] ); } diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 3a3046f1d..b5c5c0fbc 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Andre pinsedag'] + [self::LOCALE => 'andre pinsedag'] ); } diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index af94d3a32..e0d2865dc 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Første pinsedag'] + [self::LOCALE => 'første pinsedag'] ); } diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index 62b249e6f..b348198c8 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Andre juledag'] + [self::LOCALE => 'andre juledag'] ); } diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 500e0b633..d19daeb03 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Första maj'] + [self::LOCALE => 'första maj'] ); } diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index 755e27a36..9cfdad1e7 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Pingstdagen'] + [self::LOCALE => 'pingstdagen'] ); } From e5dd4ecd6bd4b3f771949900a16597e7a7bd7835 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 1 Jan 2020 22:10:17 +0900 Subject: [PATCH 034/687] - Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 4 ++- src/Yasumi/Yasumi.php | 2 +- tests/Base/YasumiWorkdayTest.php | 45 ++++++++++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81bbebb60..f9471a408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) + ### Changed - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) ### Fixed -- Fixed issue if the next working day happens to be in the next year +- Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) +- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) ### Removed - PHP 7.1 Support, as it has reached its end of life. diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 888c5c725..812a35cf1 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -286,7 +286,7 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== \getdate()['year']) { + if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int)$date->format('Y')) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index 31baaf3ee..c9cc2c78d 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -131,7 +131,6 @@ public function testYearBoundary(): void $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); @@ -143,14 +142,15 @@ public function testYearBoundary(): void $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); } - /** * Tests when the next working day happens to be in the next year. * * @dataProvider dataProviderWorkDayNextYear + * * @param string $start * @param int $workdays * @param string $expectedNext + * * @throws ReflectionException * @throws Exception */ @@ -182,4 +182,45 @@ public function dataProviderWorkDayNextYear(): array ], ]; } + + /** + * Tests when the previous working day happens to be in the previous year. + * + * @dataProvider dataProviderWorkDayPreviousYear + * + * @param string $start + * @param int $workdays + * @param string $expectedNext + * + * @throws ReflectionException + * @throws Exception + */ + public function testWorkDayIsPreviousYear(string $start, int $workdays, string $expectedNext): void + { + $provider = 'USA'; + $timezone = 'America/New_York'; + $startDate = new DateTime($start, new DateTimeZone($timezone)); + $result = Yasumi::prevWorkingDay($provider, $startDate, $workdays); + + $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + } + + /** + * @return array + */ + public function dataProviderWorkDayPreviousYear(): array + { + return [ + [ + '2020-01-02', + 2, + '2019-12-30', + ], + [ + '2019-01-02', + 2, + '2018-12-28', + ], + ]; + } } From 3eb3cb2dbb56d1a462be5bfedf5c66a61c794005 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 1 Jan 2020 22:18:43 +0900 Subject: [PATCH 035/687] Updated Copyright year. Signed-off-by: Sacha Telgenhof --- .php_cs | 2 +- LICENSE | 2 +- phpunit.xml | 10 +++++----- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidDateException.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- src/Yasumi/Exception/ProviderNotFoundException.php | 2 +- src/Yasumi/Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 2 +- 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/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Australia.php | 2 +- src/Yasumi/Provider/Australia/ACT.php | 2 +- src/Yasumi/Provider/Australia/NSW.php | 2 +- src/Yasumi/Provider/Australia/NT.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SA.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- .../Provider/Australia/Tasmania/CentralNorth.php | 2 +- .../Provider/Australia/Tasmania/FlindersIsland.php | 2 +- src/Yasumi/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 | 2 +- src/Yasumi/Provider/Australia/WA.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.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 | 2 +- src/Yasumi/Provider/CommonHolidays.php | 2 +- 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 | 2 +- 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 +- src/Yasumi/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 +- .../Provider/Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 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 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- .../Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- .../Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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 | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.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/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 +- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.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 +- src/Yasumi/data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/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 +- src/Yasumi/data/translations/immaculateConception.php | 2 +- .../data/translations/internationalWomensDay.php | 2 +- .../data/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/plebisciteDay.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- src/Yasumi/data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- .../data/translations/restorationOfIndepence.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stFloriansDay.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/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- src/Yasumi/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/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 +- .../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 +- .../Australia/Queensland/Brisbane/ChristmasDayTest.php | 2 +- .../Australia/Queensland/Brisbane/EasterMondayTest.php | 2 +- tests/Australia/Queensland/Brisbane/GoodFridayTest.php | 2 +- tests/Australia/Queensland/Brisbane/LabourDayTest.php | 2 +- .../Australia/Queensland/Brisbane/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 2 +- .../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 +- .../Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthBaseTestCase.php | 2 +- .../Tasmania/CentralNorth/CentralNorthTest.php | 2 +- .../Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- .../Tasmania/CentralNorth/DevonportShowTest.php | 2 +- .../Tasmania/CentralNorth/EasterMondayTest.php | 2 +- .../Tasmania/CentralNorth/EightHourDayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/GoodFridayTest.php | 2 +- .../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 +- .../Australia/Tasmania/FlindersIsland/AnzacDayTest.php | 2 +- .../Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- .../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 +- .../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 +- .../Australia/Tasmania/KingIsland/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/BoxingDayTest.php | 2 +- .../Australia/Tasmania/KingIsland/ChristmasDayTest.php | 2 +- .../Australia/Tasmania/KingIsland/EasterMondayTest.php | 2 +- .../Australia/Tasmania/KingIsland/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/GoodFridayTest.php | 2 +- .../Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- .../Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Australia/Tasmania/KingIsland/NewYearsDayTest.php | 2 +- .../Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- .../Tasmania/KingIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 2 +- .../Australia/Tasmania/Northeast/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/BoxingDayTest.php | 2 +- .../Australia/Tasmania/Northeast/ChristmasDayTest.php | 2 +- .../Australia/Tasmania/Northeast/EasterMondayTest.php | 2 +- .../Australia/Tasmania/Northeast/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/GoodFridayTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 2 +- .../Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- .../Tasmania/Northeast/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/Northeast/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 2 +- .../Australia/Tasmania/Northwest/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Australia/Tasmania/Northwest/ChristmasDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/BoxingDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/BurnieShowTest.php | 2 +- .../Northwest/CircularHead/ChristmasDayTest.php | 2 +- .../CircularHead/CircularHeadBaseTestCase.php | 2 +- .../Northwest/CircularHead/CircularHeadTest.php | 2 +- .../Northwest/CircularHead/EasterMondayTest.php | 2 +- .../Northwest/CircularHead/EightHourDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/GoodFridayTest.php | 2 +- .../Northwest/CircularHead/NewYearsDayTest.php | 2 +- .../Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Northwest/CircularHead/RecreationDayTest.php | 2 +- .../Australia/Tasmania/Northwest/EasterMondayTest.php | 2 +- .../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 +- .../Tasmania/Northwest/QueensBirthdayTest.php | 2 +- .../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 +- .../Tasmania/South/Southeast/AnzacDayTest.php | 2 +- .../Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- .../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 +- .../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/Burgenland/BurgenlandBaseTestCase.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.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 +- .../Austria/LowerAustria/LowerAustriaBaseTestCase.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- .../Austria/UpperAustria/UpperAustriaBaseTestCase.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/SubstituteHolidayTest.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 +- .../Germany/BadenWurttemberg/BadenWurttembergTest.php | 2 +- tests/Germany/BadenWurttemberg/CorpusChristiTest.php | 2 +- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/BadenWurttemberg/GermanUnityDayTest.php | 2 +- .../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 +- .../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 +- .../Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../Germany/NorthRhineWestphalia/CorpusChristiTest.php | 2 +- .../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 +- .../Germany/RhinelandPalatinate/CorpusChristiTest.php | 2 +- .../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 +- .../Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- tests/Germany/SchleswigHolstein/GermanUnityDayTest.php | 2 +- .../SchleswigHolstein/ReformationDay2017Test.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- .../SchleswigHolsteinBaseTestCase.php | 2 +- .../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 +- .../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/StAndrewsDayTest.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 +- .../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 +- .../Spain/BasqueCountry/BasqueCountryBaseTestCase.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryDayTest.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryTest.php | 2 +- .../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 +- .../CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- .../CastillaLaMancha/CastillaLaManchaBaseTestCase.php | 2 +- .../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 +- .../CommunityOfMadridBaseTestCase.php | 2 +- .../Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- .../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 +- .../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 +- .../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 +- .../AppenzellAusserrhodenTest.php | 2 +- .../AppenzellAusserrhoden/AscensionDayTest.php | 2 +- .../AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/EasterMondayTest.php | 2 +- .../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 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- .../AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.php | 2 +- .../BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- .../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 +- .../BaselLandschaft/PentecostMondayTest.php | 2 +- .../Switzerland/BaselLandschaft/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/WorkersDayTest.php | 2 +- tests/Switzerland/BaselStadt/AscensionDayTest.php | 2 +- .../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 +- .../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 +- .../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 +- .../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/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 | 2 +- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/ChristmasDayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/EasterMondayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php | 2 +- .../NorthernIreland/MayDayBankHolidayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- .../NorthernIreland/NorthernIrelandTest.php | 2 +- .../NorthernIreland/SpringBankHolidayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- .../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 | 2 +- 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/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.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 | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- tests/YasumiBase.php | 2 +- tests/YasumiTestCaseInterface.php | 2 +- 1485 files changed, 1489 insertions(+), 1489 deletions(-) diff --git a/.php_cs b/.php_cs index 231c3b0a2..81169b11a 100644 --- a/.php_cs +++ b/.php_cs @@ -2,7 +2,7 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2019 AzuyaLabs + * Copyright (c) 2015 - 2020 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index 9ffbc6f6b..0408169d4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2019 AzuyaLabs +Copyright (c) 2015 - 2020 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/phpunit.xml b/phpunit.xml index 7cbade3eb..aa3aca34c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,13 @@ Date: Thu, 2 Jan 2020 05:13:18 +0100 Subject: [PATCH 036/687] Added fr translation for Second Christmas Day (#188) --- src/Yasumi/data/translations/secondChristmasDay.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index acbdd092e..763cb84c1 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -23,6 +23,7 @@ 'en_ZA' => 'Day of Goodwill', 'et' => 'Teine Jõulupüha', 'fi' => '2. joulupäivä', + 'fr' => 'Lendemain de Noël', 'hu' => 'Karácsony másnapja', 'ko' => '성탄절 연휴', 'lt' => 'Kalėdos (antra diena)', From b011860a9d28d682cdf001b09ff7b5f867384d68 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Thu, 2 Jan 2020 05:22:45 +0100 Subject: [PATCH 037/687] Add Catalan translations (#189) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Spain.php | 10 ++++++++-- src/Yasumi/Provider/Spain/BalearicIslands.php | 5 ++++- src/Yasumi/Provider/Spain/Catalonia.php | 5 ++++- src/Yasumi/Provider/Spain/ValencianCommunity.php | 12 +++++++++--- src/Yasumi/data/translations/allSaintsDay.php | 1 + src/Yasumi/data/translations/assumptionOfMary.php | 1 + src/Yasumi/data/translations/christmasDay.php | 1 + src/Yasumi/data/translations/easter.php | 1 + src/Yasumi/data/translations/easterMonday.php | 1 + src/Yasumi/data/translations/epiphany.php | 1 + src/Yasumi/data/translations/goodFriday.php | 1 + .../data/translations/immaculateConception.php | 1 + .../data/translations/internationalWorkersDay.php | 1 + src/Yasumi/data/translations/maundyThursday.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + src/Yasumi/data/translations/stGeorgesDay.php | 1 + src/Yasumi/data/translations/stJohnsDay.php | 1 + src/Yasumi/data/translations/stJosephsDay.php | 1 + src/Yasumi/data/translations/stStephensDay.php | 1 + src/Yasumi/data/translations/valentinesDay.php | 1 + tests/Spain/Catalonia/nationalCataloniaDayTest.php | 5 ++++- 22 files changed, 46 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9471a408..43e1eacb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added +- Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) ### Changed diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index e98c93db8..7b356fef9 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -83,7 +83,10 @@ private function calculateNationalDay(): void if ($this->year >= 1981) { $this->addHoliday(new Holiday( 'nationalDay', - ['es' => 'Fiesta Nacional de España'], + [ + 'ca' => 'Festa Nacional d\'Espanya', + 'es' => 'Fiesta Nacional de España', + ], new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), $this->locale )); @@ -109,7 +112,10 @@ private function calculateConstitutionDay(): void if ($this->year >= 1978) { $this->addHoliday(new Holiday( 'constitutionDay', - ['es' => 'Día de la Constitución'], + [ + 'ca' => 'Dia de la Constitució', + '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/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 8d96308ea..93c62e542 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -80,7 +80,10 @@ private function calculateBalearicIslandsDay(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday( 'balearicIslandsDay', - ['es' => 'Día de les Illes Balears'], + [ + 'ca' => 'Diada 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/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index ca405eeba..0a30868bc 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -83,7 +83,10 @@ private function calculateNationalDayOfCatalonia(): void if ($this->year >= 1886) { $this->addHoliday(new Holiday( 'nationalCataloniaDay', - ['es' => 'Diada Nacional de Catalunya'], + [ + 'ca' => 'Diada Nacional de Catalunya', + 'es' => 'Diada Nacional de Cataluña', + ], new DateTime("$this->year-9-11", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index c0977da52..f886a019b 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -83,9 +83,15 @@ public function initialize(): void private function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { - $this->addHoliday(new Holiday('valencianCommunityDay', [ - 'es' => 'Día de la Comunidad Valenciana', - ], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale)); + $this->addHoliday(new Holiday( + 'valencianCommunityDay', + [ + 'ca' => 'Diada Nacional del País Valencià', + 'es' => 'Día de la Comunidad Valenciana', + ], + new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), + $this->locale + )); } } } diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index fae02e67a..43145060b 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -13,6 +13,7 @@ // Translations for All Saints' Day return [ + 'ca' => 'Dia de Tots Sants', 'de' => 'Allerheiligen', 'el' => 'Άγιοι Πάντες', 'en' => 'All Saints\' Day', diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 663369705..fec1c415c 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -13,6 +13,7 @@ // Translations for Assumption of Mary return [ + 'ca' => 'l\'Assumpció', 'de' => 'Mariä Himmelfahrt', 'el' => 'Κοίμηση της Θεοτόκου', 'en' => 'Assumption of Mary', diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 6cfb1a727..e9130bbaf 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -14,6 +14,7 @@ // Translations for Christmas return [ 'bs_Latn' => 'Božić', + 'ca' => 'Nadal', 'cs' => '1. svátek vánoční', 'cy' => 'Nadolig', 'da' => 'juledag', diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index 610069422..bee383877 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -14,6 +14,7 @@ // Translations for Easter Sunday return [ 'bs_Latn' => 'Uskrs', + 'ca' => 'Pasqua', 'cy' => 'Sul y Pasg', 'da' => 'påskedag', 'de' => 'Ostersonntag', diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 804031b46..b6e4eaff8 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -13,6 +13,7 @@ // Translations for Easter Monday return [ + 'ca' => 'dilluns de Pasqua', 'cs' => 'Velikonoční pondělí', 'cy' => 'Llun y Pasg', 'da' => '2. påskedag', diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index 8e2360006..8b7f6c415 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -13,6 +13,7 @@ // Translations for Epiphany return [ + 'ca' => 'Epifania', 'de_AT' => 'Heilige Drei Könige', 'de_CH' => 'Heilige Drei Könige', 'de' => 'Heilige 3 Könige', diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 5dcba4bca..f9bcc8b9c 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -13,6 +13,7 @@ // Translations for Good Friday return [ + 'ca' => 'Divendres Sant', 'cs' => 'Velký pátek', 'cy' => 'Gwener y Groglith', 'da' => 'langfredag', diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index b6a4a84f9..506149ef8 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -13,6 +13,7 @@ // Translations for Immaculate Conception return [ + 'ca' => 'Immaculada Concepció', 'de' => 'Mariä Empfängnis', 'el' => 'Ευαγγελισμός της Θεοτόκου', 'en' => 'Immaculate Conception', diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index 737c39ddb..0c0124a66 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -14,6 +14,7 @@ // Translations for International Workers' Day return [ 'bs_Latn' => 'Praznik rada', + 'ca' => 'Dia del Treball', 'cs' => 'Svátek práce', 'da' => 'første maj', 'de' => 'Tag der Arbeit', diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index e7b97a264..f74797603 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -13,6 +13,7 @@ // Translations for Maundy Thursday return [ + 'ca' => 'dijous Sant', 'da' => 'skærtorsdag', 'el' => 'Μεγάλη Πέμπτη', 'en' => 'Maundy Thursday', diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index c7b055b53..121ba621b 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -14,6 +14,7 @@ // Translations for New Year's Day return [ 'bs_Latn' => 'Nova godina', + 'ca' => 'Cap d\'any', 'cs' => 'Nový rok', 'cy' => 'Dydd Calan', 'da' => 'nytårsdag', diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index f2991fcc9..22bb731b8 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -13,6 +13,7 @@ // Translations for St. George's Day return [ + 'ca' => 'Sant Jordi', '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 1ca9c933d..e817f242d 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -13,6 +13,7 @@ // Translations for St. John's Day return [ + 'ca' => 'Sant Joan', 'da' => 'sankthansaften', 'el' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', 'en' => 'St. John\'s Day', diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index 223132cc7..dd32038ed 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -13,6 +13,7 @@ // Translations for St. Joseph's Day return [ + 'ca' => 'Sant Josep', 'de' => 'Josephstag', 'en' => 'St. Joseph\'s Day', 'es' => 'San José', diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index be43845e8..7ad3ffedd 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -13,6 +13,7 @@ // Translations for St. Stephen's Day return [ + 'ca' => 'Sant Esteve', 'cy' => 'Gŵyl San Steffan', 'de' => 'Stephanstag', 'en' => 'St. Stephen\'s Day', diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 2925b357f..5a9fd3fd2 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -13,6 +13,7 @@ // Translations for Valentine's Day return [ + 'ca' => 'Dia de Sant Valentí', 'de' => 'Valentinstag', 'el' => 'Αγίου Βαλεντίνου', 'en' => 'Valentine\'s Day', diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index dfe6646a1..94ebfc3d2 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -73,7 +73,10 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Diada Nacional de Catalunya'] + [ + 'es' => 'Diada Nacional de Cataluña', + 'ca' => 'Diada Nacional de Catalunya', + ] ); } From fd8522ae7c94f070c0fcec81a87b31e2d3b46a5f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 2 Jan 2020 13:44:34 +0900 Subject: [PATCH 038/687] Updated CHANGELOG.md to reflect the latest changes (and some older ones). Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43e1eacb2..d0fad67fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,17 +7,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) +- Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) +- Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) +- Added missing return (correct) and parameter types in various methods. ### Changed - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) +- Changed fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) +- Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) +- Explicitly set nullable parameters as such. +- Refactored various conditional structures. +- Changed signature of some methods as parameters with defaults should come after required parameters. +- Updated third party dependencies. ### Fixed - Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) - Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) +- Fix locale fallback for substitute holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) +- Fixed compound conditions that are always true by simplifying the condition steps. ### Removed - PHP 7.1 Support, as it has reached its end of life. +- Removed the assertion of the instance type in some functions as it is already defined by the return type. +- Removed unused variables, brackets, empty tests, etc. ## [2.2.0] - 2019-10-06 From c0f41cdd4b71d55f5ec0c8c7434e6bf97e378a44 Mon Sep 17 00:00:00 2001 From: Christian Mohr Date: Wed, 8 Jan 2020 16:24:50 +0100 Subject: [PATCH 039/687] One-time holiday: Day of Liberation, 2020-05-08, Berlin, Germany (#196) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Germany/Berlin.php | 41 +++++++ .../data/translations/dayOfLiberation.php | 17 +++ .../Berlin/DayOfLiberation2020Test.php | 105 ++++++++++++++++++ 4 files changed, 164 insertions(+) create mode 100644 src/Yasumi/data/translations/dayOfLiberation.php create mode 100644 tests/Germany/Berlin/DayOfLiberation2020Test.php diff --git a/CHANGELOG.md b/CHANGELOG.md index d0fad67fa..81bdb306a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) - Added missing return (correct) and parameter types in various methods. +- Day of Liberation (Tag der Befreiung) is an one-time official holiday in 2020 in Berlin (Germany). ### Changed - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 6771ad0bf..288fb8b3d 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -12,8 +12,11 @@ namespace Yasumi\Provider\Germany; +use DateTime; +use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; use Yasumi\Provider\Germany; /** @@ -49,5 +52,43 @@ public function initialize(): void if ($this->year >= 2019) { $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); } + + if ($this->year == 2020) { + $this->addHoliday($this->dayOfLiberation($this->timezone, $this->locale)); + } + } + + /** + * Day of Liberation + * + * Day of Liberation (Tag der Befreiung) is celebrated on May 8 2020 to commemorate the 75th anniversary + * of the German Instrument of Surrender. + * + * @link https://de.wikipedia.org/wiki/Tag_der_Befreiung + * + * @param string $timezone the timezone in which Day of Liberation is celebrated + * @param string $locale the locale for which Day of Liberation needs 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 InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function dayOfLiberation( + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'dayOfLiberation', + [], + new DateTime('2020-05-08', new DateTimeZone($timezone)), + $locale, + $type + ); } } diff --git a/src/Yasumi/data/translations/dayOfLiberation.php b/src/Yasumi/data/translations/dayOfLiberation.php new file mode 100644 index 000000000..ed03b050a --- /dev/null +++ b/src/Yasumi/data/translations/dayOfLiberation.php @@ -0,0 +1,17 @@ + + */ + +// Translations for Day of Liberation +return [ + 'de' => 'Tag der Befreiung', + 'en' => 'Day of Liberation', +]; diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberation2020Test.php new file mode 100644 index 000000000..84842284e --- /dev/null +++ b/tests/Germany/Berlin/DayOfLiberation2020Test.php @@ -0,0 +1,105 @@ + + */ + +namespace Yasumi\tests\Germany\Berlin; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Day of Liberation 2020 in Berlin (Germany). + */ +class DayOfLiberation2020Test extends BerlinBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'dayOfLiberation'; + + /** + * The year in which the holiday takes place + */ + public const YEAR = 2020; + + /** + * Test the holiday defined in this test + * @throws Exception + * @throws ReflectionException + */ + public function testHolidayInYear() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + self::YEAR, + new DateTime(self::YEAR . '-05-08', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Test the holiday defined in this test in the years before + * @throws ReflectionException + */ + public function testHolidayBeforeYear() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::YEAR - 1) + ); + } + + /** + * Test the holiday defined in this test in the years after + * @throws ReflectionException + */ + public function testHolidayAfterYear() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::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, + self::YEAR, + [self::LOCALE => 'Tag der Befreiung'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + self::YEAR, + Holiday::TYPE_OFFICIAL + ); + } +} From 39ac324da7c038b8b3c4bcac3a6e464c14351436 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 12 Jan 2020 15:48:30 +0100 Subject: [PATCH 040/687] Use typographical apostrophe (#197) --- src/Yasumi/Provider/Australia.php | 4 +- src/Yasumi/Provider/Australia/ACT.php | 2 +- src/Yasumi/Provider/Australia/NSW.php | 2 +- src/Yasumi/Provider/Australia/NT.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- .../Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SA.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 2 +- src/Yasumi/Provider/Australia/WA.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Netherlands.php | 6 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Romania.php | 4 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 6 +- src/Yasumi/Provider/Spain.php | 2 +- src/Yasumi/Provider/USA.php | 4 +- .../UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/data/translations/allSaintsDay.php | 2 +- src/Yasumi/data/translations/allSaintsEve.php | 2 +- .../data/translations/assumptionOfMary.php | 2 +- .../data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/data/translations/easterMonday.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- .../translations/internationalWomensDay.php | 2 +- .../translations/internationalWorkersDay.php | 4 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 6 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- .../data/translations/queensBirthday.php | 21 ++++++ src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- .../data/translations/stFloriansDay.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 +- .../data/translations/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- .../data/translations/stStephensDay.php | 2 +- .../data/translations/valentinesDay.php | 2 +- tests/Australia/ACT/QueensBirthdayTest.php | 2 +- tests/Australia/NSW/QueensBirthdayTest.php | 2 +- tests/Australia/NT/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 4 +- .../Queensland/Brisbane/PeoplesDayTest.php | 2 +- .../Queensland/QueensBirthdayTest.php | 2 +- tests/Australia/SA/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/QueensBirthdayTest.php | 2 +- .../Australia/Victoria/QueensBirthdayTest.php | 2 +- tests/Australia/WA/QueensBirthdayTest.php | 2 +- tests/Base/HolidayTest.php | 8 +-- tests/Base/TranslationsTest.php | 22 +++--- tests/France/NewYearsDayTest.php | 2 +- tests/Ireland/NewYearsDayTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 2 +- tests/Ireland/StStephensDayTest.php | 2 +- tests/Italy/EasterMondayTest.php | 2 +- tests/Latvia/NewYearsEveDayTest.php | 2 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 2 +- tests/NewZealand/NewYearsDayTest.php | 2 +- tests/NewZealand/QueensBirthdayTest.php | 2 +- tests/SouthAfrica/NationalWomensDayTest.php | 2 +- tests/SouthAfrica/NewYearsDayTest.php | 2 +- tests/SouthAfrica/WorkersDayTest.php | 2 +- tests/TypographyTest.php | 67 +++++++++++++++++++ tests/USA/MartinLutherKingDayTest.php | 2 +- tests/USA/NewYearsDayTest.php | 2 +- tests/USA/WashingtonsBirthdayTest.php | 2 +- .../UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- .../NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- .../Scotland/NewYearsDayTest.php | 2 +- .../Scotland/StAndrewsDayTest.php | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- 81 files changed, 191 insertions(+), 103 deletions(-) create mode 100644 src/Yasumi/data/translations/queensBirthday.php create mode 100644 tests/TypographyTest.php diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index bc3883fe7..4e08f9eb0 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -75,11 +75,11 @@ private function calculateNewYearHolidays(): void switch ($newyearsday->format('w')) { case 0: // sunday $newyearsday->add(new DateInterval('P1D')); - $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year\'s Holiday'], false, false); + $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year’s Holiday'], false, false); break; case 6: // saturday $newyearsday->add(new DateInterval('P2D')); - $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year\'s Holiday'], false, false); + $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year’s Holiday'], false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index a8ee4533a..6c0429e22 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -144,7 +144,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - ['en' => "Queen's Birthday"], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index cb7b56d94..3c5d73c36 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -107,7 +107,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - ['en' => "Queen's Birthday"], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index f9e66df87..b400f7be6 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -106,7 +106,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - ['en' => "Queen's Birthday"], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index bfdb1b1e0..6ad30542d 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -73,7 +73,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime($birthDay, new DateTimeZone($this->timezone)), - ['en' => "Queen's Birthday"], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index 297c07764..13432aace 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' => '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 4207392b5..a9c228618 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -114,7 +114,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - ['en' => "Queen's Birthday"], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index d05b29ced..681556ab3 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -80,7 +80,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - ['en' => 'Queen\'s Birthday'], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index fed3b03a8..6392d5b83 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -156,7 +156,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - ['en' => 'Queen\'s Birthday'], + [], false, false ); diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 4520c9194..9a8bb04cb 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -77,7 +77,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', new DateTime($birthDay, new DateTimeZone($this->timezone)), - ['en' => "Queen's Birthday"], + [], false, false ); diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index f003e99c9..d8aee8f87 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -85,7 +85,7 @@ public function initialize(): void * Day after New Years Day */ $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ - 'en' => 'Day after New Year\'s Day', + '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)); diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 74156c313..2a2cf8749 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -242,7 +242,7 @@ private function calculateStPatricksDay(): void } $holiday = new Holiday( 'stPatricksDay', - ['en' => 'St. Patrick\'s Day', 'ga' => '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 ); diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 7848dabb2..9d4922015 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -180,7 +180,7 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday( 'childrensDay', [ - 'en' => 'Children\'s Day', + 'en' => 'Children’s Day', 'ja' => 'こどもの日', ], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 1bd3c7119..14ca841aa 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -186,7 +186,7 @@ private function calculateStNicholasDay(): void */ $this->addHoliday(new Holiday( 'stNicholasDay', - ['en' => 'St. Nicholas\' Day', 'nl' => 'Sinterklaas'], + ['en' => 'St. Nicholas’ Day', 'nl' => 'Sinterklaas'], new DateTime("$this->year-12-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE @@ -228,7 +228,7 @@ private function calculatePrincesDay(): void { $this->addHoliday(new Holiday( 'princesDay', - ['en' => 'Prince\'s Day', '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' => 'Queen\'s Day', 'nl' => 'Koninginnedag'], + ['en' => 'Queen’s Day', 'nl' => 'Koninginnedag'], $date, $this->locale )); diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 5890fe985..9a9bd887e 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' => 'Queens Birthday'], + [], new DateTime("first monday of june $this->year", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index ad6e3d6e2..be917f7e2 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -233,7 +233,7 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday( 'childrensDay', [ - 'en' => 'International Children\'s Day', + 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), @@ -244,7 +244,7 @@ private function calculateChildrensDay(): void if ($this->year >= 2017) { $this->addHoliday(new Holiday('childrensDay', [ - 'en' => 'International Children\'s Day', + '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 68ce6742c..809d84ef5 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -67,7 +67,7 @@ private function addNewYearsHolidays(): void foreach ($holidayDays as $day) { $this->addHoliday(new Holiday('newYearHolidaysDay' . $day, [ - 'en' => 'New Year\'s holidays', + 'en' => 'New Year’s holidays', 'ru' => 'Новогодние каникулы', ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); } diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 57abdd6f5..c3a274f4d 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -223,7 +223,7 @@ private function calculateNationalWomensDay(): void { $this->addHoliday(new Holiday( 'nationalWomensDay', - ['en' => 'National Women\'s Day'], + ['en' => 'National Women’s Day'], new DateTime($this->year . '-8-9', new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 1d71fe162..769099604 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' => 'Two Days Later New Year\'s Day', 'ko' => '새해 연휴'], + ['en' => 'Two Days Later New Year’s Day', 'ko' => '새해 연휴'], new DateTime("$this->year-1-3", new DateTimeZone($this->timezone)), $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' => 'Buddha\'s Birthday', 'ko' => '부처님오신날'], + ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'], new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), $this->locale )); @@ -332,7 +332,7 @@ public function calculateChildrensDay(): void if ($this->year >= 1970) { $this->addHoliday(new Holiday( 'childrensDay', - ['en' => 'Children\'s Day', 'ko' => '어린이날'], + ['en' => 'Children’s Day', 'ko' => '어린이날'], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 7b356fef9..76a6313f1 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -84,7 +84,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', [ - 'ca' => 'Festa Nacional d\'Espanya', + 'ca' => 'Festa Nacional d’Espanya', 'es' => 'Fiesta Nacional de España', ], new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 42f9736e9..4f9f971f6 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)); } } diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index da7eb78be..6575b016f 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' => 'St. Patrick\'s Day'], + ['en' => 'St. Patrick’s Day'], new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 43145060b..84a4aba10 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -16,7 +16,7 @@ 'ca' => 'Dia de Tots Sants', 'de' => 'Allerheiligen', 'el' => 'Άγιοι Πάντες', - 'en' => 'All Saints\' Day', + 'en' => 'All Saints’ Day', 'es' => 'Día de todos los Santos', 'fi' => 'Pyhäinpäivä', 'fr_BE' => 'La Toussaint', diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index 052834a23..939e9d02d 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -14,6 +14,6 @@ // Translations for All Saints' Eve return [ 'da' => 'allehelgensaften', - 'en' => 'All Saints\' Eve', + 'en' => 'All Saints’ Eve', 'sv' => 'alla helgons afton', ]; diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index fec1c415c..b18af1ceb 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -13,7 +13,7 @@ // Translations for Assumption of Mary return [ - 'ca' => 'l\'Assumpció', + 'ca' => 'l’Assumpció', 'de' => 'Mariä Himmelfahrt', 'el' => 'Κοίμηση της Θεοτόκου', 'en' => 'Assumption of Mary', diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index 0681f6fbf..4e1af3fff 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -13,7 +13,7 @@ // Translations for Day after New Year's Day return [ - 'en' => 'Day after New Year\'s Day', + 'en' => 'Day after New Year’s Day', 'ko' => '새해 연휴', 'ro' => 'A doua zi după Anul Nou', ]; diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index b6e4eaff8..a4603bb46 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -26,7 +26,7 @@ 'ga' => 'Luan Cásca', 'hr' => 'Uskršnji ponedjeljak', 'hu' => 'Húsvéthétfő', - 'it' => 'Lunedì dell\'Angelo', + 'it' => 'Lunedì dell’Angelo', 'it_CH' => 'Lunedi di Pasqua', 'lt' => 'Antroji Velykų diena', 'lv' => 'Otrās Lieldienas', diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php index 3077f4683..395e9a4dd 100755 --- a/src/Yasumi/data/translations/fathersDay.php +++ b/src/Yasumi/data/translations/fathersDay.php @@ -15,7 +15,7 @@ return [ 'de' => 'Vatertag', 'el' => 'Γιορτή του πατέρα', - 'en' => 'Father\'s Day', + 'en' => 'Father’s Day', 'fr' => 'Fête des pères', 'it' => 'Festa del papà', 'nl' => 'Vaderdag', diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index f242b8a78..23181bd63 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -14,7 +14,7 @@ // Translations for International Women's Day return [ 'de' => 'Internationaler Frauentag', - 'en' => 'International Women\'s Day', + '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 0c0124a66..b3ef5a30a 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -20,8 +20,8 @@ 'de' => 'Tag der Arbeit', 'de_AT' => 'Staatsfeiertag', 'el' => 'Εργατική Πρωτομαγιά', - 'en_US' => 'International Workers\' Day', - 'en_ZA' => 'Workers\' Day', + 'en_US' => 'International Workers’ Day', + 'en_ZA' => 'Workers’ Day', 'es' => 'Día del Trabajador', 'et' => 'Kevadpüha', 'fi' => 'Vappu', diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php index 42d87f322..3d0eda88c 100755 --- a/src/Yasumi/data/translations/mothersDay.php +++ b/src/Yasumi/data/translations/mothersDay.php @@ -15,7 +15,7 @@ return [ 'de' => 'Muttertag', 'el' => 'Ημέρα της μητέρας', - 'en' => 'Mother\'s Day', + 'en' => 'Mother’s Day', 'fr' => 'Fête des mères', 'it' => 'Festa della mamma', 'nl' => 'Moederdag', diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 121ba621b..5cfa6dc96 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -14,19 +14,19 @@ // Translations for New Year's Day return [ 'bs_Latn' => 'Nova godina', - 'ca' => 'Cap d\'any', + 'ca' => 'Cap d’any', 'cs' => 'Nový rok', 'cy' => 'Dydd Calan', 'da' => 'nytårsdag', 'de' => 'Neujahr', 'el' => 'Πρωτοχρονιά', - 'en' => 'New Year\'s Day', + 'en' => 'New Year’s Day', 'es' => 'Año Nuevo', 'et' => 'Uusaasta', 'fi' => 'Uudenvuodenpäivä', 'fr_BE' => 'Nouvel An', 'fr_CH' => 'Nouvel An', - 'fr' => 'Jour de l\'An', + 'fr' => 'Jour de l’An', 'ga' => 'Lá Caille', 'hr' => 'Nova godina', 'hu' => 'Újév', diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 17b9356ef..20433b385 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -14,7 +14,7 @@ // Translations for New Year's Eve return [ 'da' => 'nytårsaften', - 'en' => 'New Year\'s Eve', + 'en' => 'New Year’s Eve', 'ko' => '신년전야', 'lv' => 'Vecgada vakars', 'sv' => 'nyårsafton', diff --git a/src/Yasumi/data/translations/queensBirthday.php b/src/Yasumi/data/translations/queensBirthday.php new file mode 100644 index 000000000..bfbf7a660 --- /dev/null +++ b/src/Yasumi/data/translations/queensBirthday.php @@ -0,0 +1,21 @@ + + */ + +// Translations for Queen's Birthday +return [ + 'da' => 'Dronningens fødselsdag', + 'en' => 'Queen’s Birthday', + 'pt' => 'Aniversário da Rainha', + 'fr' => 'Anniversaire officiel de la reine', + 'ru' => 'Официальный день рождения королевы', +]; diff --git a/src/Yasumi/data/translations/stAndrewsDay.php b/src/Yasumi/data/translations/stAndrewsDay.php index 2793fb98c..de1f75a41 100644 --- a/src/Yasumi/data/translations/stAndrewsDay.php +++ b/src/Yasumi/data/translations/stAndrewsDay.php @@ -13,6 +13,6 @@ // Translations for St. Andrew's Day return [ - 'en' => 'St. Andrew\'s Day', + '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 e43557f37..be03a879c 100644 --- a/src/Yasumi/data/translations/stDavidsDay.php +++ b/src/Yasumi/data/translations/stDavidsDay.php @@ -14,5 +14,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/stFloriansDay.php b/src/Yasumi/data/translations/stFloriansDay.php index 77cdd0bda..c9641f74a 100644 --- a/src/Yasumi/data/translations/stFloriansDay.php +++ b/src/Yasumi/data/translations/stFloriansDay.php @@ -13,6 +13,6 @@ // Translations for Saint Florian's Day. return [ - 'en' => 'Saint Florian\'s Day', + 'en' => 'Saint Florian’s Day', 'de_AT' => 'Florian', ]; diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index 22bb731b8..b0bccb8c4 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -15,6 +15,6 @@ return [ 'ca' => 'Sant Jordi', 'el' => 'Αγίου Γεωργίου', - 'en' => 'St. George\'s Day', + '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 e817f242d..647bdc789 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -16,7 +16,7 @@ 'ca' => 'Sant Joan', 'da' => 'sankthansaften', 'el' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', - 'en' => 'St. John\'s Day', + 'en' => 'St. John’s Day', 'es' => 'Sant Joan', 'et' => 'Jaanipäev', 'fi' => 'Juhannuspäivä', diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index 69dcba900..9418d44e8 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -14,6 +14,6 @@ // Translations for St. John's Eve return [ 'da' => 'sankthansaften', - 'en' => 'St. John\'s Eve', + 'en' => 'St. John’s Eve', 'sv' => 'midsommarafton', ]; diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index dd32038ed..46fd0a378 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -15,7 +15,7 @@ return [ 'ca' => 'Sant Josep', 'de' => 'Josephstag', - 'en' => 'St. Joseph\'s Day', + 'en' => 'St. Joseph’s Day', 'es' => 'San José', 'fr' => 'Saint-Joseph', 'it' => 'San Giuseppe', diff --git a/src/Yasumi/data/translations/stLeopoldsDay.php b/src/Yasumi/data/translations/stLeopoldsDay.php index 8044f6b88..1f4b6f0de 100644 --- a/src/Yasumi/data/translations/stLeopoldsDay.php +++ b/src/Yasumi/data/translations/stLeopoldsDay.php @@ -13,6 +13,6 @@ // Translations for Saint Leopold's Day. return [ - 'en' => 'Saint Leopold\'s Day', + 'en' => 'Saint Leopold’s Day', 'de_AT' => 'Leopold', ]; diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index c49f4f69a..bf0ce13bb 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -13,7 +13,7 @@ // Translations for St. Martin's Day return [ - 'en' => 'St. Martin\'s Day', + 'en' => 'St. Martin’s Day', 'nl' => 'Sint Maarten', 'de_AT' => 'Martin', ]; diff --git a/src/Yasumi/data/translations/stRupertsDay.php b/src/Yasumi/data/translations/stRupertsDay.php index 7294d8e27..5d4471fd5 100644 --- a/src/Yasumi/data/translations/stRupertsDay.php +++ b/src/Yasumi/data/translations/stRupertsDay.php @@ -13,6 +13,6 @@ // Translations for Saint Rupert's Day. return [ - 'en' => 'Saint Rupert\'s Day', + 'en' => 'Saint Rupert’s Day', 'de_AT' => 'Rupert', ]; diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index 7ad3ffedd..ec09b09fb 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -16,7 +16,7 @@ 'ca' => 'Sant Esteve', 'cy' => 'Gŵyl San Steffan', 'de' => 'Stephanstag', - 'en' => 'St. Stephen\'s Day', + 'en' => 'St. Stephen’s Day', 'es' => 'Sant Esteve', 'fr' => 'Saint-Étienne', 'ga' => 'Lá Fhéile Stiofáin', diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 5a9fd3fd2..b8be09ea5 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -16,7 +16,7 @@ 'ca' => 'Dia de Sant Valentí', 'de' => 'Valentinstag', 'el' => 'Αγίου Βαλεντίνου', - 'en' => 'Valentine\'s Day', + 'en' => 'Valentine’s Day', 'es' => 'San Valentín', 'fr' => 'Saint-Valentin', 'it' => 'San Valentino', diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/ACT/QueensBirthdayTest.php index d433c0f11..658704d3d 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/ACT/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NSW/QueensBirthdayTest.php index 0bfe1ad91..8cbc96af7 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NSW/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NT/QueensBirthdayTest.php index 998021d79..55b02e85c 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NT/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 05228c802..dc72a6aa2 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -101,13 +101,13 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY2, 2017, - [self::LOCALE => 'New Year\'s Holiday'] + [self::LOCALE => 'New Year’s Holiday'] ); } diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 5899b312c..61344c1e8 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -84,7 +84,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(1990), - [self::LOCALE => 'Ekka People\'s Day'] + [self::LOCALE => 'Ekka People’s Day'] ); } diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index a4f543995..d11372cfb 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SA/QueensBirthdayTest.php index dd612f10c..ddb3f621a 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SA/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 561fcd706..2beb3b1b6 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 03e30e294..733187d74 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WA/QueensBirthdayTest.php index 6cdb9b2ee..f14685db6 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WA/QueensBirthdayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->region, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queen\'s Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 8aded6efb..50ef9e192 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -168,7 +168,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); $translations = [ - 'en_US' => 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'pl_PL' => 'Nowy Rok', ]; @@ -194,7 +194,7 @@ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); $translations = [ - 'en_US' => 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'pl' => 'Nowy Rok', ]; @@ -220,7 +220,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); $translations = [ - 'en_US' => 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'pl_PL' => 'Nowy Rok', ]; @@ -252,7 +252,7 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); $translations = [ - 'en_US' => 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'pl_PL' => 'Nowy Rok', ]; diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 4f16714a5..22715ce14 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -40,7 +40,7 @@ public function testAddTranslation(): void $locale = 'en_US'; $shortName = 'newYearsDay'; - $translation = 'New Year\'s Day'; + $translation = 'New Year’s Day'; $this->assertNull($translations->getTranslation($shortName, $locale)); $this->assertEmpty($translations->getTranslations($shortName)); @@ -65,7 +65,7 @@ public function testAddMultipleTranslations(): void $firstLocale = 'en_US'; $firstShortName = 'newYearsDay'; - $firstTranslation = 'New Year\'s Day'; + $firstTranslation = 'New Year’s Day'; $translations->addTranslation($firstShortName, $firstLocale, $firstTranslation); @@ -121,7 +121,7 @@ public function testAddTranslationUnknownLocaleException(): void $unknownLocale = 'en_XY'; $shortName = 'newYearsDay'; - $translation = 'New Year\'s Day'; + $translation = 'New Year’s Day'; $translations->addTranslation($shortName, $unknownLocale, $translation); } @@ -135,7 +135,7 @@ public function testNoTranslationForUnknownHoliday(): void $locale = 'en_US'; $shortName = 'newYearsDay'; - $translation = 'New Year\'s Day'; + $translation = 'New Year’s Day'; $unknownShortName = 'unknownHoliday'; @@ -154,7 +154,7 @@ public function testNoTranslationForNotTranslatedLocale(): void $locale = 'en_US'; $shortName = 'newYearsDay'; - $translation = 'New Year\'s Day'; + $translation = 'New Year’s Day'; $unknownLocale = 'pl_PL'; @@ -172,7 +172,7 @@ public function testLoadingTranslationsFromDirectory(): void $fileContents = <<<'FILE' 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'nl_NL' => 'Nieuwjaar', 'pl_PL' => 'Nowy Rok', ]; @@ -184,7 +184,7 @@ public function testLoadingTranslationsFromDirectory(): void $translations->loadTranslations(vfsStream::url('root/lang')); $locale = 'en_US'; - $translation = 'New Year\'s Day'; + $translation = 'New Year’s Day'; $this->assertNotNull($translations->getTranslations($shortName)); $this->assertNotEmpty($translations->getTranslations($shortName)); @@ -201,7 +201,7 @@ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void $fileContents = <<<'FILE' 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'nl_NL' => 'Nieuwjaar', 'pl_PL' => 'Nowy Rok', ]; @@ -228,7 +228,7 @@ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException() $fileContents = <<<'FILE' 'New Year\'s Day', + 'en_XY' => 'New Year’s Day', 'nl_NL' => 'Nieuwjaar', ]; FILE; @@ -262,7 +262,7 @@ public function testLoadingMultipleTranslationsFromDirectory(): void $firstFileContents = <<<'FILE' 'New Year\'s Day', + 'en_US' => 'New Year’s Day', 'nl_NL' => 'Nieuwjaar', 'pl_PL' => 'Nowy Rok', ]; @@ -289,7 +289,7 @@ public function testLoadingMultipleTranslationsFromDirectory(): void $translations->loadTranslations(vfsStream::url('root/lang')); $locale = 'en_US'; - $translation = 'New Year\'s Day'; + $translation = 'New Year’s Day'; $this->assertNotNull($translations->getTranslations($firstShortName)); $this->assertNotEmpty($translations->getTranslations($firstShortName)); diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index d00fc59fd..dc9f267ca 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Jour de l\'An'] + [self::LOCALE => 'Jour de l’An'] ); } diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index a3bd6d98e..4e3799a37 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -99,7 +99,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index a01a2e79e..fa6723959 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -99,7 +99,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'St. Patrick\'s Day'] + [self::LOCALE => 'St. Patrick’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index d8f595696..05c956c1d 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -81,7 +81,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'St. Stephen\'s Day'] + [self::LOCALE => 'St. Stephen’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 18dca2ec5..7542ac0ab 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => "Lunedì dell'Angelo"] + [self::LOCALE => 'Lunedì dell’Angelo'] ); } diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index a7b7f3009..3d51fb1b4 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' => 'New Year\'s Eve'] + [self::LOCALE => 'Vecgada vakars', 'en' => 'New Year’s Eve'] ); } diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index fa828b665..7cbe3334e 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -61,7 +61,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Day after New Year\'s Day'] + [self::LOCALE => 'Day after New Year’s Day'] ); } diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 1b334c4ea..7145a1883 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -90,7 +90,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 5177eb6d8..fa09a5895 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -87,7 +87,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Queens Birthday'] + [self::LOCALE => 'Queen’s Birthday'] ); } diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 064fa6d77..1950ed25f 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -104,7 +104,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'National Women\'s Day'] + [self::LOCALE => 'National Women’s Day'] ); } diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index 4504a8df1..ec51c43e2 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -104,7 +104,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index e2829000b..d1799d08e 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -104,7 +104,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Workers\' Day'] + [self::LOCALE => 'Workers’ Day'] ); } diff --git a/tests/TypographyTest.php b/tests/TypographyTest.php new file mode 100644 index 000000000..9d0269214 --- /dev/null +++ b/tests/TypographyTest.php @@ -0,0 +1,67 @@ + + */ + +namespace Yasumi\tests; + +use PHPUnit\Framework\TestCase; +use Yasumi\Translations; +use Yasumi\Yasumi; + +/** + * Class TypographyTest. + * + * Verifies that translations uses typographic apostrophe (’) and quotation marks (“ ”) + * rather than their typewriter versions (' and "). + * + * @link https://en.wikipedia.org/wiki/Apostrophe + * @link https://en.wikipedia.org/wiki/Quotation_mark + */ +class TypographyTest extends TestCase +{ + use YasumiBase; + + /** + * @dataProvider translationProvider + * + * @param string $name The localized holiday name + * @param string $class The provider + * @param string $shortName The short name (internal name) of the holiday + * @param string $locale The locale + */ + public function testTranslations($name, $class, $shortName, $locale) + { + $this->assertStringNotContainsString("'", $name, 'Translation contains typewriter apostrophe'); + $this->assertStringNotContainsString('"', $name, 'Translation contains typewriter quote'); + } + + /** + * Provides test data for testProvider(). + */ + public function translationProvider(): array + { + $classes = Yasumi::getProviders(); + + $tests = []; + + foreach ($classes as $class) { + $provider = Yasumi::create($class, $this->generateRandomYear()); + + foreach ($provider->getHolidays() as $holiday) { + foreach ($holiday->translations as $locale => $name) { + $tests[$name] = [$name, $class, $holiday->shortName, $locale]; + } + } + } + + return \array_values($tests); + } +} diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index f7e616f0f..46c93d2f2 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -75,7 +75,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Dr. Martin Luther King Jr\'s Birthday'] + [self::LOCALE => 'Dr. Martin Luther King Jr’s Birthday'] ); } diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 119b9053a..78f54ca45 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -88,7 +88,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index f08c17703..1001502fa 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -92,7 +92,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Washington\'s Birthday'] + [self::LOCALE => 'Washington’s Birthday'] ); } diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index b9d142c9e..0693204bc 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -108,7 +108,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 4b33eab83..e8760c6d2 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -108,7 +108,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index 27d539539..afa47f9ec 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -108,7 +108,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 812a7037f..6872c0f6a 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -99,7 +99,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'St. Patrick\'s Day'] + [self::LOCALE => 'St. Patrick’s Day'] ); } diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index d1f083048..bceaab964 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -118,7 +118,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index d8a63da34..93d3e9871 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -86,7 +86,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'St. Andrew\'s Day'] + [self::LOCALE => 'St. Andrew’s Day'] ); } diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index f85dedf5c..a0eaa04de 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -108,7 +108,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'New Year\'s Day'] + [self::LOCALE => 'New Year’s Day'] ); } From 7d9738b634703a4b76f7e94aefc028d6644c4722 Mon Sep 17 00:00:00 2001 From: livingBEEF Date: Tue, 14 Jan 2020 14:21:27 +0100 Subject: [PATCH 041/687] Add AbstractProvider::isWeekendDay function (#139) Expose the ability to recognize weekend days in a separate public function. This can be useful if the user needs to know why a given day isn't a working day. TODO: Need to fix a few things and unit tests are missing. Co-authored-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 26 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 492a934a5..0f82db7c6 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -193,24 +193,32 @@ public function removeHoliday(string $shortName): void */ public function isWorkingDay(\DateTimeInterface $date): bool { - $isWorkingDay = true; - - // First check if the given date is a holiday - if ($this->isHoliday($date)) { - $isWorkingDay = false; - } + return !$this->isHoliday($date) && !$this->isWeekendDay($date); + } + /** + * Determines whether a date represents a weekend day or not. + * + * @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 weekend day, otherwise false + */ + public function isWeekendDay(\DateTimeInterface $date): bool + { // Check if given date is a falls in the weekend or not // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. // @TODO Ideally avoid late static binding here (static::ID) $weekendData = self::WEEKEND_DATA; $weekendDays = $weekendData[$this::ID] ?? [0, 6]; - if (\in_array((int)$date->format('w'), $weekendDays, true)) { - $isWorkingDay = false; + if (\in_array((int)$date->format('w'), $weekend_days, true)) { + return true; } - return $isWorkingDay; + return false; } /** From daf0dea03077626d0faddb9ede01d8c96f6f28fa Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 14 Jan 2020 23:25:53 +0900 Subject: [PATCH 042/687] Fixed issue with incorrect variable. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 0f82db7c6..6a1a39261 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -202,19 +202,19 @@ public function isWorkingDay(\DateTimeInterface $date): bool * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, * \DateTime) * + * @return bool true if date represents a weekend day, otherwise false * @throws \Yasumi\Exception\InvalidDateException * - * @return bool true if date represents a weekend day, otherwise false */ public function isWeekendDay(\DateTimeInterface $date): bool { - // Check if given date is a falls in the weekend or not // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. - // @TODO Ideally avoid late static binding here (static::ID) - $weekendData = self::WEEKEND_DATA; - $weekendDays = $weekendData[$this::ID] ?? [0, 6]; - - if (\in_array((int)$date->format('w'), $weekend_days, true)) { + if (\in_array( + (int)$date->format('w'), + self::WEEKEND_DATA[$this::ID] ?? [0, 6], + true + ) + ) { return true; } From d76b6482824dd7041c036d119cd753e42958c825 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 14 Jan 2020 23:35:04 +0900 Subject: [PATCH 043/687] Added clarification. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 3f799ec1d..68225d0a0 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -354,6 +354,10 @@ public function testGetProvidersStaticCall(): void /** * Tests that the isHoliday function returns a boolean true for a date that is defined as a holiday. + * + * Note that this function does *NOT* determine whether a date is a working or non-working day. It + * only asserts that it is a date calculated by the Holiday Provider. + * * @throws Exception * @throws ReflectionException * @throws Exception @@ -380,6 +384,10 @@ public function testIsHoliday(): void /** * Tests that the isHoliday function returns a boolean false for a date that is not defined as a holiday. + * + * Note that this function does *NOT* determine whether a date is a working or non-working day. It + * only asserts that it is a date calculated by the Holiday Provider. + * * @throws Exception * @throws ReflectionException * @throws Exception @@ -407,6 +415,7 @@ 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 */ public function testIsHolidayException(): void From 08e78381c858916eecd9d8bb4fa135e13c5dbddb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 15 Jan 2020 00:11:56 +0900 Subject: [PATCH 044/687] Added tests for the isWeekendDay function. This covers only for those countries that follow the global, common definition for weekend days. Signed-off-by: Sacha Telgenhof --- tests/Base/WeekendTest.php | 115 +++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 tests/Base/WeekendTest.php diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php new file mode 100644 index 000000000..1185d6df2 --- /dev/null +++ b/tests/Base/WeekendTest.php @@ -0,0 +1,115 @@ + + */ + +namespace Yasumi\tests\Base; + +use PHPUnit\Framework\TestCase; +use Yasumi\Yasumi; + +/** + * Class containing various tests pertaining to the determination of a date + * being a weekend (i.e. non-working day) or not. + */ +class WeekendTest extends TestCase +{ + private const HOLIDAY_PROVIDER = 'Belgium'; + + /** + * Tests that the isWeekendDay function correctly assesses that the given date falls into the + * weekend. + * + * Note: this test uses Belgium as a representative country for the global, common weekend definition. + * Tests for countries that deviate from the global definition will be added as soon as their respective + * Holiday Provider is created. + * + * @dataProvider dataProviderWeekendDays + * + * @param \DateTimeImmutable $date + * @throws \ReflectionException + */ + public function testWeekendDay(\DateTimeImmutable $date): void + { + $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int)$date->format('Y')); + $isWeekendDay = $yasumiProvider->isWeekendDay($date); + + $this->assertIsBool($isWeekendDay); + $this->assertTrue($isWeekendDay); + } + + /** + * @return array + * @throws \Exception + */ + public function dataProviderWeekendDays(): array + { + return [ + [ + new \DateTimeImmutable('2020-04-19'), + ], + [ + new \DateTimeImmutable('2019-12-29'), + ], + [ + new \DateTimeImmutable('2019-12-28'), + ], + [ + new \DateTimeImmutable('2018-06-16'), + ], + ]; + } + + /** + * Tests that the isWeekendDay function correctly assesses that the given date does not + * fall into the weekend. + * + * Note: this test uses Belgium as a representative country for the global, common weekend definition. + * Tests for countries that deviate from the global definition will be added as soon as their respective + * Holiday Provider is created. + * + * @dataProvider dataProviderNonWeekendDays + * + * @param \DateTimeImmutable $date + * @throws \ReflectionException + */ + public function testNonWeekendDay(\DateTimeImmutable $date): void + { + $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int)$date->format('Y')); + $isWeekendDay = $yasumiProvider->isWeekendDay($date); + + $this->assertIsBool($isWeekendDay); + $this->assertFalse($isWeekendDay); + } + + /** + * @return array + * @throws \Exception + */ + public function dataProviderNonWeekendDays(): array + { + return [ + [ + new \DateTimeImmutable('2020-04-20'), + ], + [ + new \DateTimeImmutable('2019-12-30'), + ], + [ + new \DateTimeImmutable('2019-12-27'), + ], + [ + new \DateTimeImmutable('2018-06-15'), + ], + ]; + } +} From adfb747e1d56b8e94b6ca3463f02d258368c7faf Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 15 Jan 2020 00:20:45 +0900 Subject: [PATCH 045/687] Minor reformatting --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6c365558..d44a9af57 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Introduction ------------ Yasumi (Japanese for 'Holiday'「休み」) is an easy PHP library to help you calculate the dates and names of holidays and other -special celebrations from various countries/states. Many services exist on the internet that provide holidays, however +special celebrations from various countries/states. + +Many services exist on the internet that provide holidays, however are either not free or offer only limited information. In addition, no complete PHP library seems to exist today that covers a wide range of holidays and countries, except maybe [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) which unfortunately hasn't been updated for a long time. From 3b3165148d91ffa9e764ab85991077c6e3cf915e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 Feb 2020 00:22:28 +0900 Subject: [PATCH 046/687] Removed unnecessary qualifier. 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 6a1a39261..3455bca25 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -203,7 +203,7 @@ public function isWorkingDay(\DateTimeInterface $date): bool * \DateTime) * * @return bool true if date represents a weekend day, otherwise false - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * */ public function isWeekendDay(\DateTimeInterface $date): bool From ff5f2ce112c3bf6b996dc64df5cca00f55dab3b2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 Feb 2020 00:22:42 +0900 Subject: [PATCH 047/687] Used stronger type checking. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Germany/Berlin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 288fb8b3d..81231360b 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -53,7 +53,7 @@ public function initialize(): void $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); } - if ($this->year == 2020) { + if (2020 === $this->year) { $this->addHoliday($this->dayOfLiberation($this->timezone, $this->locale)); } } From c9f53d58842275c8700820ef4d6a9a4db9424fb0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 Feb 2020 00:45:48 +0900 Subject: [PATCH 048/687] No need to use variable as structure can be returned without it. Signed-off-by: Sacha Telgenhof --- tests/Australia/ACT/CanberraDayTest.php | 4 +--- tests/Australia/ACT/LabourDayTest.php | 4 +--- tests/Australia/ACT/QueensBirthdayTest.php | 4 +--- tests/Australia/ACT/ReconciliationDayTest.php | 4 +--- tests/Australia/AnzacDayTest.php | 4 +--- tests/Australia/AustraliaDayTest.php | 4 +--- tests/Australia/BoxingDayTest.php | 4 +--- tests/Australia/ChristmasDayTest.php | 4 +--- tests/Australia/EasterMondayTest.php | 4 +--- tests/Australia/NSW/BankHolidayTest.php | 4 +--- tests/Australia/NSW/LabourDayTest.php | 4 +--- tests/Australia/NSW/QueensBirthdayTest.php | 4 +--- tests/Australia/NT/MayDayTest.php | 4 +--- tests/Australia/NT/PicnicDayTest.php | 4 +--- tests/Australia/NT/QueensBirthdayTest.php | 4 +--- tests/Australia/NewYearsDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 4 +--- tests/Australia/Queensland/LabourDayTest.php | 4 +--- tests/Australia/Queensland/QueensBirthdayTest.php | 4 +--- tests/Australia/SA/AdelaideCupDayTest.php | 4 +--- tests/Australia/SA/ChristmasDayTest.php | 4 +--- tests/Australia/SA/LabourDayTest.php | 4 +--- tests/Australia/SA/ProclamationDayTest.php | 4 +--- tests/Australia/SA/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php | 4 +--- tests/Australia/Tasmania/EightHourDayTest.php | 4 +--- .../Tasmania/FlindersIsland/FlindersIslandShowTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php | 4 +--- tests/Australia/Tasmania/Northeast/LauncestonShowTest.php | 4 +--- tests/Australia/Tasmania/Northwest/BurnieShowTest.php | 4 +--- .../Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php | 4 +--- tests/Australia/Tasmania/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/South/HobartShowTest.php | 4 +--- .../Australia/Tasmania/South/Southeast/HobartRegattaTest.php | 4 +--- tests/Australia/Victoria/AFLGrandFinalFridayTest.php | 4 +--- tests/Australia/Victoria/LabourDayTest.php | 4 +--- tests/Australia/Victoria/MelbourneCupDayTest.php | 4 +--- tests/Australia/Victoria/QueensBirthdayTest.php | 4 +--- tests/Australia/WA/LabourDayTest.php | 4 +--- tests/Australia/WA/QueensBirthdayTest.php | 4 +--- tests/Australia/WA/WesternAustraliaDayTest.php | 4 +--- 42 files changed, 42 insertions(+), 126 deletions(-) diff --git a/tests/Australia/ACT/CanberraDayTest.php b/tests/Australia/ACT/CanberraDayTest.php index 10e247a8a..433f10681 100644 --- a/tests/Australia/ACT/CanberraDayTest.php +++ b/tests/Australia/ACT/CanberraDayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-03-08'], [2011, '2011-03-14'], [2012, '2012-03-12'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-03-11'], [2020, '2020-03-09'], ]; - - return $data; } /** diff --git a/tests/Australia/ACT/LabourDayTest.php b/tests/Australia/ACT/LabourDayTest.php index 46c1b4ea2..01fa22668 100644 --- a/tests/Australia/ACT/LabourDayTest.php +++ b/tests/Australia/ACT/LabourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-04'], [2011, '2011-10-03'], [2012, '2012-10-01'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-07'], [2020, '2020-10-05'], ]; - - return $data; } /** diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/ACT/QueensBirthdayTest.php index 658704d3d..132e87d33 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/ACT/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-06-11'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-10'], [2020, '2020-06-08'], ]; - - return $data; } /** diff --git a/tests/Australia/ACT/ReconciliationDayTest.php b/tests/Australia/ACT/ReconciliationDayTest.php index eb4a479c2..346e18056 100644 --- a/tests/Australia/ACT/ReconciliationDayTest.php +++ b/tests/Australia/ACT/ReconciliationDayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2018, '2018-05-28'], [2019, '2019-05-27'], [2020, '2020-06-01'], @@ -77,8 +77,6 @@ public function HolidayDataProvider(): array [2029, '2029-05-28'], [2030, '2030-05-27'], ]; - - return $data; } /** diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index d38b705da..2151f5183 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -71,7 +71,7 @@ public function testNotHoliday() */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-04-25'], [2011, '2011-04-25'], [2012, '2012-04-25'], @@ -85,8 +85,6 @@ public function HolidayDataProvider(): array [2019, '2019-04-25'], [2020, '2020-04-25'], ]; - - return $data; } /** diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 9a9b4afaa..7c9da1fd3 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -81,7 +81,7 @@ public function testHolidayType(): void */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-01-26'], [2011, '2011-01-26'], [2012, '2012-01-26'], @@ -94,7 +94,5 @@ public function HolidayDataProvider(): array [2019, '2019-01-28'], [2020, '2020-01-27'], ]; - - return $data; } } diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 18620e912..5c6c4a8ef 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -73,7 +73,7 @@ public function testHoliday($year, $expected, $expectedExtra) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-12-26', '2010-12-28'], [2011, '2011-12-26', null], [2012, '2012-12-26', null], @@ -86,8 +86,6 @@ public function HolidayDataProvider(): array [2019, '2019-12-26', null], [2020, '2020-12-26', '2020-12-28'], ]; - - return $data; } /** diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 6660716f2..5fab37045 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -73,7 +73,7 @@ public function testHoliday($year, $expected, $expectedExtra) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-12-25', '2010-12-27'], [2011, '2011-12-25', '2011-12-27'], [2012, '2012-12-25', null], @@ -86,8 +86,6 @@ public function HolidayDataProvider(): array [2019, '2019-12-25', null], [2020, '2020-12-25', null], ]; - - return $data; } /** diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index e6309ef98..be695b2db 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -101,14 +101,12 @@ public function HolidayDataProvider(): array */ public function HolidayDataProvider2(): array { - $data = [ + return [ [2011, '2011-04-26'], [2038, '2038-04-27'], [2095, '2095-04-26'], [2163, '2163-04-26'], ]; - - return $data; } /** diff --git a/tests/Australia/NSW/BankHolidayTest.php b/tests/Australia/NSW/BankHolidayTest.php index e02e17a1c..5911c6ab4 100644 --- a/tests/Australia/NSW/BankHolidayTest.php +++ b/tests/Australia/NSW/BankHolidayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-08-02'], [2011, '2011-08-01'], [2012, '2012-08-06'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-08-05'], [2020, '2020-08-03'], ]; - - return $data; } /** diff --git a/tests/Australia/NSW/LabourDayTest.php b/tests/Australia/NSW/LabourDayTest.php index 2078aaf57..eff77a06f 100644 --- a/tests/Australia/NSW/LabourDayTest.php +++ b/tests/Australia/NSW/LabourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-04'], [2011, '2011-10-03'], [2012, '2012-10-01'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-07'], [2020, '2020-10-05'], ]; - - return $data; } /** diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NSW/QueensBirthdayTest.php index 8cbc96af7..7806c3f3e 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NSW/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-06-11'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-10'], [2020, '2020-06-08'], ]; - - return $data; } /** diff --git a/tests/Australia/NT/MayDayTest.php b/tests/Australia/NT/MayDayTest.php index bb9552fd3..642aae82f 100644 --- a/tests/Australia/NT/MayDayTest.php +++ b/tests/Australia/NT/MayDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-05-03'], [2011, '2011-05-02'], [2012, '2012-05-07'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-05-06'], [2020, '2020-05-04'], ]; - - return $data; } /** diff --git a/tests/Australia/NT/PicnicDayTest.php b/tests/Australia/NT/PicnicDayTest.php index 447454a78..556f3fb03 100644 --- a/tests/Australia/NT/PicnicDayTest.php +++ b/tests/Australia/NT/PicnicDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-08-02'], [2011, '2011-08-01'], [2012, '2012-08-06'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-08-05'], [2020, '2020-08-03'], ]; - - return $data; } /** diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NT/QueensBirthdayTest.php index 55b02e85c..758e71612 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NT/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-06-11'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-10'], [2020, '2020-06-08'], ]; - - return $data; } /** diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index dc72a6aa2..e493721d3 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -73,7 +73,7 @@ public function testHoliday($year, $expected, $expectedExtra) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-01-01', null], [2011, '2011-01-01', '2011-01-03'], [2012, '2012-01-01', '2012-01-02'], @@ -86,8 +86,6 @@ public function HolidayDataProvider(): array [2019, '2019-01-01', null], [2020, '2020-01-01', null], ]; - - return $data; } /** diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 61344c1e8..add610548 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-08-11'], [2011, '2011-08-10'], [2012, '2012-08-15'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-08-14'], [2020, '2020-08-12'], ]; - - return $data; } /** diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 890fe7cc0..825f3febe 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-05-03'], [2011, '2011-05-02'], [2012, '2012-05-07'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-05-06'], [2020, '2020-05-04'], ]; - - return $data; } /** diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index d11372cfb..57d8f34af 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-10-01'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-07'], [2020, '2020-10-05'], ]; - - return $data; } /** diff --git a/tests/Australia/SA/AdelaideCupDayTest.php b/tests/Australia/SA/AdelaideCupDayTest.php index 1de44f8e0..ad47fa8e4 100644 --- a/tests/Australia/SA/AdelaideCupDayTest.php +++ b/tests/Australia/SA/AdelaideCupDayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2000, '2000-05-15'], [2001, '2001-05-21'], [2002, '2002-05-20'], @@ -85,8 +85,6 @@ public function HolidayDataProvider(): array [2019, '2019-03-11'], [2020, '2020-03-09'], ]; - - return $data; } /** diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SA/ChristmasDayTest.php index ce6766158..c9bc92671 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SA/ChristmasDayTest.php @@ -73,7 +73,7 @@ public function testHoliday($year, $expected, $expectedExtra) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-12-25', '2010-12-27'], [2011, '2011-12-25', '2011-12-26'], [2012, '2012-12-25', null], @@ -86,8 +86,6 @@ public function HolidayDataProvider(): array [2019, '2019-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 2625e5a20..30d5de9a8 100644 --- a/tests/Australia/SA/LabourDayTest.php +++ b/tests/Australia/SA/LabourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-04'], [2011, '2011-10-03'], [2012, '2012-10-01'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-07'], [2020, '2020-10-05'], ]; - - return $data; } /** diff --git a/tests/Australia/SA/ProclamationDayTest.php b/tests/Australia/SA/ProclamationDayTest.php index 65187b42c..6a1287855 100644 --- a/tests/Australia/SA/ProclamationDayTest.php +++ b/tests/Australia/SA/ProclamationDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-12-28'], [2011, '2011-12-27'], [2012, '2012-12-26'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-12-26'], [2020, '2020-12-28'], ]; - - return $data; } /** diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SA/QueensBirthdayTest.php index ddb3f621a..c202d8ce8 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SA/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-06-11'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-10'], [2020, '2020-06-08'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index 7a5dcda03..a5a9dce8c 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-11-26'], [2011, '2011-11-25'], [2012, '2012-11-30'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-11-29'], [2020, '2020-11-27'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 377e9d5a9..a3346339a 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-03-08'], [2011, '2011-03-14'], [2012, '2012-03-12'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-03-11'], [2020, '2020-03-09'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index 7ecae1e99..15017f18d 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-15'], [2011, '2011-10-14'], [2012, '2012-10-19'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-18'], [2020, '2020-10-16'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 78c66d80c..328ae2aef 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-03-02'], [2011, '2011-03-01'], [2012, '2012-03-06'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-03-05'], [2020, '2020-03-03'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 8b48aa856..696d54bf0 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-07'], [2011, '2011-10-06'], [2012, '2012-10-11'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-10'], [2020, '2020-10-08'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index ef47c743b..ecec82595 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-01'], [2011, '2011-09-30'], [2012, '2012-10-05'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-04'], [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 a07f5b962..3ded129af 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-05-07'], [2011, '2011-05-06'], [2012, '2012-05-04'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-05-03'], [2020, '2020-05-08'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 2beb3b1b6..4b6455ddf 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-06-11'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-10'], [2020, '2020-06-08'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 70e1fa6be..e98d0c251 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-11-01'], [2011, '2011-11-07'], [2012, '2012-11-05'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-11-04'], [2020, '2020-11-02'], ]; - - return $data; } /** diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index b19f82dc7..943839f83 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-10-21'], [2011, '2011-10-20'], [2012, '2012-10-25'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-10-24'], [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 e5b97e692..40e187b8d 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-02-08'], [2011, '2011-02-14'], [2012, '2012-02-13'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-02-11'], [2020, '2020-02-10'], ]; - - return $data; } /** diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 2ab3dfb3b..841d9bad3 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -98,7 +98,7 @@ public function testNotHoliday() */ public function HolidayDataProvider(): array { - $data = [ + return [ [2015, '2015-10-02'], [2016, '2016-09-30'], [2017, '2017-09-29'], @@ -106,7 +106,5 @@ public function HolidayDataProvider(): array [2019, '2019-09-27'], [2020, '2020-09-25'], ]; - - return $data; } } diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 65f5745d0..4d1afdbea 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-03-08'], [2011, '2011-03-14'], [2012, '2012-03-12'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-03-11'], [2020, '2020-03-09'], ]; - - return $data; } /** diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 567ee4c5c..9ead58882 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-11-02'], [2011, '2011-11-01'], [2012, '2012-11-06'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-11-05'], [2020, '2020-11-03'], ]; - - return $data; } /** diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 733187d74..5410cdd2e 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-14'], [2011, '2011-06-13'], [2012, '2012-06-11'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-10'], [2020, '2020-06-08'], ]; - - return $data; } /** diff --git a/tests/Australia/WA/LabourDayTest.php b/tests/Australia/WA/LabourDayTest.php index 07168dc94..332ead2f1 100644 --- a/tests/Australia/WA/LabourDayTest.php +++ b/tests/Australia/WA/LabourDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-03-01'], [2011, '2011-03-07'], [2012, '2012-03-05'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-03-04'], [2020, '2020-03-02'], ]; - - return $data; } /** diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WA/QueensBirthdayTest.php index f14685db6..06f362d2c 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WA/QueensBirthdayTest.php @@ -62,7 +62,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-09-27'], [2011, '2011-10-28'], [2012, '2012-10-01'], @@ -75,8 +75,6 @@ public function HolidayDataProvider(): array [2019, '2019-09-30'], [2020, '2020-09-28'], ]; - - return $data; } /** diff --git a/tests/Australia/WA/WesternAustraliaDayTest.php b/tests/Australia/WA/WesternAustraliaDayTest.php index 92f970995..9618ea515 100644 --- a/tests/Australia/WA/WesternAustraliaDayTest.php +++ b/tests/Australia/WA/WesternAustraliaDayTest.php @@ -57,7 +57,7 @@ public function testHoliday($year, $expected) */ public function HolidayDataProvider(): array { - $data = [ + return [ [2010, '2010-06-07'], [2011, '2011-06-06'], [2012, '2012-06-04'], @@ -70,8 +70,6 @@ public function HolidayDataProvider(): array [2019, '2019-06-03'], [2020, '2020-06-01'], ]; - - return $data; } /** From 931c993098310b0a3e7466a816f2b8e4120d8ca8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 Feb 2020 00:47:03 +0900 Subject: [PATCH 049/687] Added missing strict type declaration. Added missing return type. Signed-off-by: Sacha Telgenhof --- tests/TypographyTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/TypographyTest.php b/tests/TypographyTest.php index 9d0269214..f59c52867 100644 --- a/tests/TypographyTest.php +++ b/tests/TypographyTest.php @@ -1,4 +1,5 @@ assertStringNotContainsString("'", $name, 'Translation contains typewriter apostrophe'); $this->assertStringNotContainsString('"', $name, 'Translation contains typewriter quote'); From 88f609c7a0cbd950db1ff53c1b0a5e294c446bdf Mon Sep 17 00:00:00 2001 From: HeinrichConvidera <49152239+HeinrichConvidera@users.noreply.github.com> Date: Wed, 5 Feb 2020 15:54:32 +0100 Subject: [PATCH 050/687] Update ukraine holidays (#202) --- CHANGELOG.md | 3 + src/Yasumi/Holiday.php | 1 + src/Yasumi/Provider/Ukraine.php | 77 +++++++- tests/Base/WeekendTest.php | 3 +- tests/Ukraine/CatholicChristmasDayTest.php | 104 ++++++++++ .../SecondInternationalWorkersDayTest.php | 36 +++- tests/Ukraine/SubstitutedHolidayTest.php | 184 ++++++++++++++++++ tests/Ukraine/UkraineTest.php | 38 +++- 8 files changed, 432 insertions(+), 14 deletions(-) create mode 100644 tests/Ukraine/CatholicChristmasDayTest.php create mode 100644 tests/Ukraine/SubstitutedHolidayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 81bdb306a..dffa5eaea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) - Added missing return (correct) and parameter types in various methods. - Day of Liberation (Tag der Befreiung) is an one-time official holiday in 2020 in Berlin (Germany). +- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) ### Changed - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) @@ -21,12 +22,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Refactored various conditional structures. - Changed signature of some methods as parameters with defaults should come after required parameters. - Updated third party dependencies. +- Second International Workers Day was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) ### Fixed - Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) - Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) - Fix locale fallback for substitute holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) - Fixed compound conditions that are always true by simplifying the condition steps. +- Fixed Ukraine holidays on weekends. These days need to be substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) ### Removed - PHP 7.1 Support, as it has reached its end of life. diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 9a185db50..55841b65a 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -1,4 +1,5 @@ timezone = 'Europe/Kiev'; // Add common holidays - $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + // New Years Day will not be substituted to an monday if it's on a weekend! + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale), false); $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); @@ -63,6 +66,42 @@ public function initialize(): void $this->calculateConstitutionDay(); $this->calculateIndependenceDay(); $this->calculateDefenderOfUkraineDay(); + $this->calculateCatholicChristmasDay(); + } + + /** + * Adds a holiday to the holidays providers (i.e. country/state) list of holidays. + * + * @param Holiday $holiday Holiday instance (representing a holiday) to be added to the internal list + * of holidays of this country. + * @param bool $substitutable Holidays on a weekend will be substituted to the next monday. + * + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function addHoliday(Holiday $holiday, bool $substitutable = true): void + { + parent::addHoliday($holiday); + + if (!$substitutable) { + return; + } + + // Substitute holiday is on the next available weekday + // if a holiday falls on a Saturday or Sunday. + if ($this->isWeekendDay($holiday)) { + $date = clone $holiday; + $date->modify('next monday'); + + parent::addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); + } } /** @@ -85,6 +124,7 @@ private function calculateChristmasDay(): void /** * International Workers' Day. + * National holiday until 2018. * * @link https://en.wikipedia.org/wiki/International_Workers%27_Day#Ukraine * @@ -95,6 +135,10 @@ private function calculateChristmasDay(): void */ private function calculateSecondInternationalWorkersDay(): void { + if ($this->year >= 2018) { + return; + } + $this->addHoliday(new Holiday('secondInternationalWorkersDay', [ 'uk' => 'День міжнародної солідарності трудящих', 'ru' => 'День международной солидарности трудящихся', @@ -222,4 +266,35 @@ public function calculateEaster(int $year, string $timezone): \DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } + + /** + * Catholic Christmas Day. + * (since 2017 instead of International Workers' Day 2. May) + * + * @link https://en.wikipedia.org/wiki/Christmas_in_Ukraine + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateCatholicChristmasDay(): void + { + if ($this->year < 2017) { + return; + } + + $this->addHoliday( + new Holiday( + 'catholicChristmasDay', + [ + 'uk' => 'Католицький день Різдва', + 'ru' => 'Католическое рождество', + ], + new \DateTime("$this->year-12-25", new \DateTimeZone($this->timezone)), + $this->locale + ), + false // Catholic Christmas Day will not be substituted to an monday if it's on a weekend! + ); + } } diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index 1185d6df2..ef4c3cfbc 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -1,5 +1,4 @@ - + */ + +namespace Yasumi\tests\Ukraine; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\Yasumi; + +/** + * Class CatholicChristmasDayTest + * @package Yasumi\tests\Ukraine + */ +class CatholicChristmasDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'catholicChristmasDay'; + + /** + * Tests Catholic Christmas Day. + * + * @dataProvider CatholicChristmasDayDataProvider + * + * @param int $year the year for which International Workers' Day needs to be tested + * @param DateTime $expected the expected date + * + * @throws ReflectionException + */ + public function testCatholicChristmasDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests Catholic Christmas Day before 2017. + * @throws ReflectionException + */ + public function testNoCatholicChristmasDayBefore2017() + { + $year = $this->generateRandomYear(null, 2016); + $holidays = Yasumi::create(self::REGION, $year); + $holiday = $holidays->getHoliday(self::HOLIDAY); + + $this->assertNull($holiday); + + unset($year, $holiday, $holidays); + } + + /** + * Tests translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(2017), + [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(2017), Holiday::TYPE_OFFICIAL); + } + + /** + * Returns a list of random test dates used for assertion of Catholic Christmas Day. + * + * @return array list of test dates for Catholic Christmas Day + * @throws Exception + */ + public function CatholicChristmasDayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < 10; $y++) { + $year = $this->generateRandomYear(2017); + $data[] = [$year, new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE))]; + } + + return $data; + } +} diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 10c6fb859..9fff35ba3 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -1,4 +1,5 @@ assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } + /** + * Tests International Workers' Day since 2018. + * @throws ReflectionException + */ + public function testNoSecondInternationalWorkersDaySince2018() + { + $year = $this->generateRandomYear(2018); + $holidays = Yasumi::create(self::REGION, $year); + $holiday = $holidays->getHoliday(self::HOLIDAY); + + $this->assertNull($holiday); + + unset($year, $holiday, $holidays); + } + /** * Tests translated name of the holiday defined in this test. * @throws ReflectionException @@ -53,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $this->generateRandomYear(null, 2017), [self::LOCALE => 'День міжнародної солідарності трудящих'] ); } @@ -64,7 +80,12 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(null, 2017), + Holiday::TYPE_OFFICIAL + ); } /** @@ -75,6 +96,13 @@ public function testHolidayType(): void */ public function SecondInternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 2, self::TIMEZONE); + $data = []; + + for ($y = 0; $y < 10; $y++) { + $year = $this->generateRandomYear(null, 2017); + $data[] = [$year, new \DateTime("$year-05-02", new \DateTimeZone(self::TIMEZONE))]; + } + + return $data; } } diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php new file mode 100644 index 000000000..b8e8db952 --- /dev/null +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -0,0 +1,184 @@ + + */ + +namespace Yasumi\tests\Ukraine; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; +use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\Yasumi; + +/** + * Class SubstitutedHolidayTest + * @package Yasumi\tests\Ukraine + */ +class SubstitutedHolidayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +{ + /** + * Tests the substitution of holidays on saturday (weekend). + * @throws Exception + * @throws ReflectionException + */ + public function testSaturdaySubstitution() + { + // 2020-05-09 victoryDay (День перемоги) + $year = 2020; + $holiday = 'victoryDay'; + + $this->assertHolidayWithSubstitution( + self::REGION, + $holiday, + $year, + new DateTime("$year-05-09", new DateTimeZone(self::TIMEZONE)), + new DateTime("$year-05-11", new DateTimeZone(self::TIMEZONE)) + ); + + unset($year, $holiday); + } + + /** + * Tests the substitution of holidays on sunday (weekend). + * @throws Exception + * @throws ReflectionException + */ + public function testSundaySubstitution(): void + { + // 2020-06-28 constitutionDay (День Конституції) + $year = 2020; + $holiday = 'constitutionDay'; + + $this->assertHolidayWithSubstitution( + self::REGION, + $holiday, + $year, + new DateTime("$year-06-28", new DateTimeZone(self::TIMEZONE)), + new DateTime("$year-06-29", new DateTimeZone(self::TIMEZONE)) + ); + + unset($year, $holiday); + } + + /** + * Tests the substitution of new year (1. January) on a weekend. + * Special: no substitution at new year (1. January) on a weekend. + * @throws Exception + * @throws ReflectionException + */ + public function testNewYearNoSubstitution(): void + { + // 2022-01-01 (Saturday) constitutionDay (Новий Рік) + $year = 2022; + $holiday = 'newYearsDay'; + + $this->assertHolidayWithSubstitution( + self::REGION, + $holiday, + $year, + new DateTime("$year-01-01", new DateTimeZone(self::TIMEZONE)) + ); + + unset($year, $holiday); + } + + /** + * Tests the substitution of Catholic Christmas Day (25. December) on a weekend. + * Special: no substitution at Catholic Christmas Day (25. December) on a weekend. + * @throws Exception + * @throws ReflectionException + */ + public function testCatholicChristmasDayNoSubstitution(): void + { + // 2022-12-25 (Sunday) catholicChristmasDay (Католицький день Різдва) + $year = 2022; + $holiday = 'catholicChristmasDay'; + + $this->assertHolidayWithSubstitution( + self::REGION, + $holiday, + $year, + new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + ); + + unset($year, $holiday); + } + + /** + * Dummy: Tests the translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTrue(true); + } + + /** + * Dummy: Tests type of the holiday defined in this test. + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertTrue(true); + } + + /** + * 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 official date to be checked against + * @param DateTime $expected the substituted date to be checked against + * + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws AssertionFailedError + * @throws ReflectionException + */ + public function assertHolidayWithSubstitution( + string $provider, + string $shortName, + int $year, + DateTime $expectedOfficial, + DateTime $expectedSubstitution = null + ): void { + $holidays = Yasumi::create($provider, $year); + + $holidayOfficial = $holidays->getHoliday($shortName); + $this->assertInstanceOf(Holiday::class, $holidayOfficial); + $this->assertNotNull($holidayOfficial); + $this->assertEquals($expectedOfficial, $holidayOfficial); + $this->assertTrue($holidays->isHoliday($holidayOfficial)); + $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); + + $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->shortName); + if ($expectedSubstitution === null) { + // without substitution + $this->assertNull($holidaySubstitution); + } else { + // with substitution + $this->assertNotNull($holidaySubstitution); + $this->assertInstanceOf(SubstituteHoliday::class, $holidaySubstitution); + $this->assertEquals($expectedSubstitution, $holidaySubstitution); + $this->assertTrue($holidays->isHoliday($holidaySubstitution)); + $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidaySubstitution->getType()); + } + + unset($holidayOfficial, $holidaySubstitution, $holidays); + } +} diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 6ceb4a95f..6c82c390e 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -1,4 +1,5 @@ assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'internationalWorkersDay', - 'secondInternationalWorkersDay', 'christmasDay', 'easter', 'pentecost', 'internationalWomensDay', 'victoryDay', - 'constitutionDay', - 'independenceDay', - 'defenderOfUkraineDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 1996) { + $holidays[] = 'constitutionDay'; + } + + if ($this->year >= 1991) { + $holidays[] = 'independenceDay'; + } + + if ($this->year >= 2015) { + $holidays[] = 'defenderOfUkraineDay'; + } + + if ($this->year < 2018) { + $holidays[] = 'secondInternationalWorkersDay'; + } + + if ($this->year >= 2017) { + $holidays[] = 'catholicChristmasDay'; + } + + $this->assertDefinedHolidays( + $holidays, + self::REGION, + $this->year, + Holiday::TYPE_OFFICIAL + ); } /** @@ -88,6 +112,6 @@ public function testOtherHolidays(): void */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2015, 2025); + $this->year = $this->generateRandomYear(); } } From dfaec2cac8b0a5d8adc7749b9bdaaca954d96cb8 Mon Sep 17 00:00:00 2001 From: Marko Kruljac Date: Sun, 16 Feb 2020 12:47:37 +0100 Subject: [PATCH 051/687] Updates to the holidays of Croatia, starting from the year 2020 (#203) * Add updates to the holidays starting from the year 2020 Changes can be found https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html Includes changes to Croatia holidays starting from 2020 --- CHANGELOG.md | 4 + src/Yasumi/Provider/Croatia.php | 85 +++++++++++++---- tests/Croatia/HomelandThanksgivingDayTest.php | 20 +++- tests/Croatia/IndependenceDayTest.php | 24 ++++- tests/Croatia/RemembranceDayTest.php | 94 +++++++++++++++++++ tests/Croatia/StatehoodDayTest.php | 23 ++++- 6 files changed, 224 insertions(+), 26 deletions(-) create mode 100644 tests/Croatia/RemembranceDayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index dffa5eaea..7821de4ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] +- Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) ### Added - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index bc019de60..4b1b38fa2 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -69,34 +69,85 @@ public function initialize(): void ], new DateTime("$this->year-6-22", new DateTimeZone($this->timezone)), $this->locale)); } - /** - * Croatian Statehood Day - */ - if ($this->year >= 1991) { + $this->calculateStatehoodDay(); + $this->calculateHomelandThanksgivingDay(); + $this->calculateIndependenceDay(); + $this->calculateRemembranceDayForHomelandWarVictims(); + } + + /** + * Starting from the year 2020. statehood day is celebrated at a new date + * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + */ + private function calculateStatehoodDay(): void + { + $statehoodDayDate = null; + + if ($this->year >= 1991 && $this->year < 2020) { + $statehoodDayDate = new DateTime("$this->year-6-25", new DateTimeZone($this->timezone)); + } elseif ($this->year >= 2020) { + $statehoodDayDate = new DateTime("$this->year-5-30", new DateTimeZone($this->timezone)); + } + + if ($statehoodDayDate != null) { $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'hr' => 'Dan državnosti', - ], new DateTime("$this->year-6-25", new DateTimeZone($this->timezone)), $this->locale)); + ], $statehoodDayDate, $this->locale)); } + } - /** - * Homeland Thanksgiving Day - */ - if ($this->year >= 1995) { - $this->addHoliday(new Holiday('homelandThanksgiving', [ - 'en' => 'Homeland Thanksgiving Day', - 'hr' => 'Dan domovinske zahvalnosti', - ], new DateTime("$this->year-8-5", new DateTimeZone($this->timezone)), $this->locale)); + /** + * Starting from the year 2020. Homeland Thanksgiving Day name is slightly changed + * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + */ + private function calculateHomelandThanksgivingDay(): void + { + $names = null; + if ($this->year >= 1995 && $this->year < 2020) { + $names['en'] = 'Homeland Thanksgiving Day'; + $names['hr'] = 'Dan domovinske zahvalnosti'; + } elseif ($this->year >= 2020) { + $names['en'] = 'Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders'; + $names['hr'] = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; } - /** - * Independence Day - */ - if ($this->year >= 1991) { + if ($names != null) { + $this->addHoliday(new Holiday( + 'homelandThanksgiving', + $names, + new DateTime("$this->year-8-5", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Starting from the year 2020. Independence Day is no longer an official holiday, + * but is still remembered under a different name as Croatian Parliament Day (Dan Hrvatskog sabora) + * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + */ + private function calculateIndependenceDay(): void + { + if ($this->year >= 1991 && $this->year < 2020) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'hr' => 'Dan neovisnosti', ], new DateTime("$this->year-10-8", new DateTimeZone($this->timezone)), $this->locale)); } } + + /** + * Starting from the year 2020. a new holiday was added + * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + */ + private function calculateRemembranceDayForHomelandWarVictims(): void + { + if ($this->year >= 2020) { + $this->addHoliday(new Holiday('remembranceDay', [ + 'en' => 'Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja', + 'hr' => 'Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje', + ], new DateTime("$this->year-11-18", new DateTimeZone($this->timezone)), $this->locale)); + } + } } diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 703847e72..24ee36efd 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -34,6 +34,11 @@ class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements YasumiT */ public const ESTABLISHMENT_YEAR = 1995; + /** + * The year in which the holiday name was changed + */ + public const NAME_CHANGED_YEAR = 2020; + /** * Tests Homeland Thanksgiving Day on or after 1995. * @throws Exception @@ -69,11 +74,22 @@ public function testHomelandThanksgivingDayBefore1995() */ public function testTranslation(): void { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::NAME_CHANGED_YEAR - 1); + $expectedText = 'Dan domovinske zahvalnosti'; $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Dan domovinske zahvalnosti'] + $year, + [self::LOCALE => $expectedText] + ); + + $year = $this->generateRandomYear(self::NAME_CHANGED_YEAR); + $expectedText = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => $expectedText] ); } diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 13dc5cc62..95a40d791 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -34,6 +34,11 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseI */ public const ESTABLISHMENT_YEAR = 1991; + /** + * The year after which this is no longer a holiday + */ + public const DISBANDMENT_YEAR = 2020; + /** * Tests Independence Day on or after 1991. * @throws Exception @@ -41,7 +46,7 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseI */ public function testIndependenceDayOnAfter1991() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,6 +68,19 @@ public function testIndependenceDayBefore1991() ); } + /** + * Tests Independence Day before 1991. + * @throws ReflectionException + */ + public function testIndependenceDayAfterDisbandment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::DISBANDMENT_YEAR) + ); + } + /** * Tests translated name of Independence Day. * @throws ReflectionException @@ -72,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1), [self::LOCALE => 'Dan neovisnosti'] ); } @@ -86,7 +104,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php new file mode 100644 index 000000000..3d58faa0d --- /dev/null +++ b/tests/Croatia/RemembranceDayTest.php @@ -0,0 +1,94 @@ + + */ + +namespace Yasumi\tests\Croatia; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Statehood Day in Croatia. + */ +class RemembranceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'remembranceDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 2020; + + /** + * Tests Remembrance Day + * @throws Exception + * @throws ReflectionException + */ + public function testRemembranceDayAfterItWasEstablished() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-11-18", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Remembrance Day + * @throws Exception + * @throws ReflectionException + */ + public function testRemembranceDayBeforeItWasEstablished() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Remembrance Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje'] + ); + } + + /** + * 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/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 95429a1cd..a8d1100d2 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -35,18 +35,33 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte public const ESTABLISHMENT_YEAR = 1991; /** - * Tests Statehood Day on or after 1991. + * The year in which the holiday celebration date has changed + */ + public const DATE_CHANGE_YEAR = 2020; + + /** + * Tests Statehood Day * @throws Exception * @throws ReflectionException */ - public function testStatehoodDayOnAfter1991() + public function testStatehoodDay() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DATE_CHANGE_YEAR - 1); + $expectedDate = "$year-6-25"; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expectedDate, new DateTimeZone(self::TIMEZONE)) + ); + + $year = $this->generateRandomYear(self::DATE_CHANGE_YEAR); + $expectedDate = "$year-5-30"; $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-25", new DateTimeZone(self::TIMEZONE)) + new DateTime($expectedDate, new DateTimeZone(self::TIMEZONE)) ); } From 1127c0dc2586455b4fa1cd9f91009ec17a4af888 Mon Sep 17 00:00:00 2001 From: Arkounay Date: Tue, 18 Feb 2020 16:30:11 +0100 Subject: [PATCH 052/687] Added Luxembourg Provider (#205) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Luxembourg.php | 103 ++++++++++++++++++ src/Yasumi/data/translations/allSaintsDay.php | 1 + src/Yasumi/data/translations/ascensionDay.php | 1 + .../data/translations/assumptionOfMary.php | 1 + src/Yasumi/data/translations/christmasDay.php | 1 + src/Yasumi/data/translations/easterMonday.php | 1 + .../translations/internationalWorkersDay.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + .../data/translations/pentecostMonday.php | 7 +- .../data/translations/secondChristmasDay.php | 1 + tests/Luxembourg/AllSaintsDayTest.php | 79 ++++++++++++++ tests/Luxembourg/AscensionDayTest.php | 70 ++++++++++++ tests/Luxembourg/AssumptionOfMaryTest.php | 79 ++++++++++++++ tests/Luxembourg/ChristmasDayTest.php | 79 ++++++++++++++ tests/Luxembourg/EasterMondayTest.php | 70 ++++++++++++ tests/Luxembourg/EuropeDayTest.php | 93 ++++++++++++++++ .../InternationalWorkersDayTest.php | 79 ++++++++++++++ tests/Luxembourg/LuxembourgBaseTestCase.php | 39 +++++++ tests/Luxembourg/LuxembourgTest.php | 92 ++++++++++++++++ tests/Luxembourg/NationalDayTest.php | 79 ++++++++++++++ tests/Luxembourg/NewYearsDayTest.php | 79 ++++++++++++++ tests/Luxembourg/PentecostMondayTest.php | 70 ++++++++++++ tests/Luxembourg/SecondChristmasDayTest.php | 79 ++++++++++++++ 24 files changed, 1103 insertions(+), 3 deletions(-) create mode 100755 src/Yasumi/Provider/Luxembourg.php create mode 100644 tests/Luxembourg/AllSaintsDayTest.php create mode 100644 tests/Luxembourg/AscensionDayTest.php create mode 100644 tests/Luxembourg/AssumptionOfMaryTest.php create mode 100644 tests/Luxembourg/ChristmasDayTest.php create mode 100644 tests/Luxembourg/EasterMondayTest.php create mode 100644 tests/Luxembourg/EuropeDayTest.php create mode 100644 tests/Luxembourg/InternationalWorkersDayTest.php create mode 100644 tests/Luxembourg/LuxembourgBaseTestCase.php create mode 100644 tests/Luxembourg/LuxembourgTest.php create mode 100644 tests/Luxembourg/NationalDayTest.php create mode 100644 tests/Luxembourg/NewYearsDayTest.php create mode 100644 tests/Luxembourg/PentecostMondayTest.php create mode 100644 tests/Luxembourg/SecondChristmasDayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 7821de4ca..0a6dd65c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) ### Added +- Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php new file mode 100755 index 000000000..d6d179560 --- /dev/null +++ b/src/Yasumi/Provider/Luxembourg.php @@ -0,0 +1,103 @@ +timezone = 'Europe/Luxembourg'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($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)); + $this->calculateEuropeDay(); + $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); + $this->calculateNationalDay(); + $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->allSaintsDay($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)); + } + + /** + * Europe Day. + * + * Europe Day is celebrated on 5 May by the Council of Europe and on 9 May by the European Union. + * The first recognition of Europe Day was by the Council of Europe, introduced in 1964. + * The European Union later started to celebrate its own European Day in commemoration of the 1950 + * Schuman Declaration, leading it to be referred to by some as "Schuman Day". + * Both days are celebrated by displaying the Flag of Europe. + * + * @link https://en.wikipedia.org/wiki/Europe_Day + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function calculateEuropeDay(): void + { + if ($this->year >= 2019) { + $this->addHoliday(new Holiday('europeDay', [ + 'en_US' => 'Europe day', + 'fr_FR' => 'La Journée de l\'Europe', + 'lu' => 'La Journée de l\'Europe', + ], new DateTime("$this->year-5-9", new DateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * Luxembourgish National Day. + * + * The Grand Duke's Official Birthday (French: Célébration publique de l'anniversaire du souverain), + * also known as Luxembourgish National Day (French: Fête nationale luxembourgeoise, Luxembourgish: + * Lëtzebuerger Nationalfeierdag), is celebrated as the annual national holiday of Luxembourg. + * It is celebrated on 23 June, although this has never been the actual birthday of any ruler of Luxembourg. + * When the monarch of Luxembourg is female, it is known as the Grand Duchess' Official Birthday. + * + * @link https://en.wikipedia.org/wiki/Grand_Duke%27s_Official_Birthday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function calculateNationalDay(): void + { + $this->addHoliday(new Holiday('nationalDay', [ + 'en_US' => 'National day', + 'fr_FR' => 'La Fête nationale', + 'lu' => 'La Fête nationale', + ], new DateTime("$this->year-6-23", new DateTimeZone($this->timezone)), $this->locale)); + } +} diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 84a4aba10..f5e6fc5c3 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -26,6 +26,7 @@ 'it' => 'Festa di Tutti i Santi', 'it_CH' => 'Ognissanti', 'lt' => 'Visų šventųjų diena (Vėlinės)', + 'lu' => 'Toussaint', 'nl' => 'Allerheiligen', 'pl' => 'Uroczystość Wszystkich Świętych', 'pt' => 'Dia de todos os Santos', diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index ecf9ff78e..ee10b670d 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -21,6 +21,7 @@ 'fi' => 'Helatorstai', 'fr' => 'Ascension', 'it' => 'Ascensione', + 'lu' => 'Ascension', 'nb' => 'Kristi himmelfartsdag', 'nl' => 'Hemelvaart', 'sv' => 'Kristi himmelsfärdsdag', diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index b18af1ceb..e61d5895c 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -23,6 +23,7 @@ 'it' => 'Assunzione di Maria Vergine', 'it_CH' => 'Assunzione', 'lt' => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)', + 'lu' => 'Assomption', 'nl' => 'Onze Lieve Vrouw hemelvaart', 'pl' => 'Wniebowzięcie Najświętszej Marii Panny', 'pt' => 'Assunção de Nossa Senhora', diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index e9130bbaf..9c4ffcf0e 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -33,6 +33,7 @@ 'it' => 'Natale', 'ko' => '기독탄신일', 'lt' => 'Šv. Kalėdos', + 'lu' => 'Noël', 'lv' => 'Ziemassvētki', 'nb' => 'første juledag', 'nl' => 'eerste kerstdag', diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index a4603bb46..be4f3adb8 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -29,6 +29,7 @@ 'it' => 'Lunedì dell’Angelo', 'it_CH' => 'Lunedi di Pasqua', 'lt' => 'Antroji Velykų diena', + 'lu' => 'Lundi de Pâques', 'lv' => 'Otrās Lieldienas', 'nb' => 'andre påskedag', 'nl_BE' => 'paasmaandag', diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index b3ef5a30a..7cc183d3a 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -33,6 +33,7 @@ 'ja' => '労働の日', 'ko' => '노동절', 'lt' => 'Tarptautinė darbo diena', + 'lu' => 'Fête du Travail', 'lv' => 'Darba svētki', 'nb' => 'arbeidernes dag', 'nl' => 'Dag van de arbeid', diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 5cfa6dc96..495d8e4c5 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -34,6 +34,7 @@ 'ja' => '元日', 'ko' => '새해', 'lt' => 'Naujųjų metų diena', + 'lu' => 'Jour de l\'An', 'lv' => 'Jaunais Gads', 'nb' => 'første nyttårsdag', 'nl' => 'Nieuwjaar', diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 4c83c14f4..1f3dd85b8 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -21,8 +21,9 @@ 'ga' => 'Luan Cincíse', 'hu' => 'Pünkösdhétfő', 'it' => 'Lunedi di Pentecoste', - 'nb' => 'andre pinsedag', - 'nl' => 'tweede pinksterdag', - 'nl_BE' => 'pinkstermaandag', + 'lu' => 'Lundi de Pentecôte', + 'nb' => 'Andre pinsedag', + 'nl' => 'Tweede pinksterdag', + 'nl_BE' => 'Pinkstermaandag', 'ro' => 'A doua zi de Rusalii', ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index 763cb84c1..e080bfb7e 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -27,6 +27,7 @@ 'hu' => 'Karácsony másnapja', 'ko' => '성탄절 연휴', 'lt' => 'Kalėdos (antra diena)', + 'lu' => 'Lendemain de Noël', 'lv' => 'Otrie Ziemassvētki', 'nb' => 'andre juledag', 'nl' => 'tweede kerstdag', diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php new file mode 100644 index 000000000..719868284 --- /dev/null +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing All Saints' Day in Luxembourg. + */ +class AllSaintsDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'allSaintsDay'; + + /** + * Tests All Saints' Day. + * + * @dataProvider AllSaintsDayDataProvider + * + * @param int $year the year for which All Saints' Day needs to be tested + * @param DateTime $expected the expected date + * + * @throws ReflectionException + */ + public function testAllSaintsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests translated name of All Saints' Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Toussaint'] + ); + } + + /** + * 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); + } + + /** + * 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 + */ + public function AllSaintsDayDataProvider(): array + { + return $this->generateRandomDates(11, 1, self::TIMEZONE); + } +} diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php new file mode 100644 index 000000000..8fdbf386e --- /dev/null +++ b/tests/Luxembourg/AscensionDayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Ascension Day in Luxembourg. + */ +class AscensionDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'ascensionDay'; + + /** + * Tests Ascension Day. + * @throws Exception + * @throws ReflectionException + */ + public function testAscensionDay() + { + $year = 1901; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of Ascension Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Ascension'] + ); + } + + /** + * 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/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php new file mode 100644 index 000000000..277483f6e --- /dev/null +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the day of the Assumption of Mary in Luxembourg. + */ +class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param DateTime $expected the expected date + * + * @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(8, 15, 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 => 'Assomption'] + ); + } + + /** + * 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/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php new file mode 100644 index 000000000..1b242dca9 --- /dev/null +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Christmas in Luxembourg. + */ +class ChristmasDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * Tests Christmas Day. + * + * @dataProvider ChristmasDayDataProvider + * + * @param int $year the year for which Christmas Day needs to be tested + * @param DateTime $expected the expected date + * + * @throws ReflectionException + */ + public function testChristmasDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public function ChristmasDayDataProvider(): array + { + return $this->generateRandomDates(12, 25, self::TIMEZONE); + } + + /** + * Tests translated name of Christmas Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Noël'] + ); + } + + /** + * 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/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php new file mode 100644 index 000000000..a9e5b3bb8 --- /dev/null +++ b/tests/Luxembourg/EasterMondayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Easter Monday in Luxembourg. + */ +class EasterMondayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests Easter Monday. + * @throws Exception + * @throws ReflectionException + */ + public function testEasterMonday() + { + $year = 2016; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of Easter Monday. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Lundi de Pâques'] + ); + } + + /** + * 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/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php new file mode 100644 index 000000000..3836f8f67 --- /dev/null +++ b/tests/Luxembourg/EuropeDayTest.php @@ -0,0 +1,93 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Europe Day in Luxembourg. + */ +class EuropeDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'europeDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 2019; + + /** + * Tests Europe Day on or after 2019. + * @throws Exception + * @throws ReflectionException + */ + public function testEuropeDayOnAfter2019() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-9", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Europe Day before 2019. + * @throws ReflectionException + */ + public function testEuropeDayBefore2019() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Europe Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'La Journée de l\'Europe'] + ); + } + + /** + * 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/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php new file mode 100644 index 000000000..735de22c2 --- /dev/null +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for International Workers' Day (i.e. Labour Day) in Luxembourg. + */ +class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'internationalWorkersDay'; + + /** + * Tests International Workers' Day. + * + * @dataProvider InternationalWorkersDayDataProvider + * + * @param int $year the year for which International Workers' Day needs to be tested + * @param DateTime $expected the expected date + * + * @throws ReflectionException + */ + public function testInternationalWorkersDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests translated name of International Workers' Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Fête du Travail'] + ); + } + + /** + * 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); + } + + /** + * 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 + */ + public function InternationalWorkersDayDataProvider(): array + { + return $this->generateRandomDates(5, 1, self::TIMEZONE); + } +} diff --git a/tests/Luxembourg/LuxembourgBaseTestCase.php b/tests/Luxembourg/LuxembourgBaseTestCase.php new file mode 100644 index 000000000..12474f1f8 --- /dev/null +++ b/tests/Luxembourg/LuxembourgBaseTestCase.php @@ -0,0 +1,39 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the France holiday provider. + */ +abstract class LuxembourgBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Country (name) to be tested + */ + public const REGION = 'Luxembourg'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'Europe/Luxembourg'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'lu'; +} diff --git a/tests/Luxembourg/LuxembourgTest.php b/tests/Luxembourg/LuxembourgTest.php new file mode 100644 index 000000000..ab5727d76 --- /dev/null +++ b/tests/Luxembourg/LuxembourgTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\Luxembourg; + +/** + * Class for testing holidays in Luxembourg. + */ +class LuxembourgTest extends LuxembourgBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Luxembourg are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'newYearsDay', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'nationalDay', + 'assumptionOfMary', + 'allSaintsDay', + 'christmasDay', + 'secondChristmasDay', + ]; + + $year = $this->generateRandomYear(); + + if ($year >= Luxembourg::EUROPE_DAY_START_YEAR) { + $holidays[] = 'europeDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Luxembourg are defined by the provider class + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Luxembourg are defined by the provider class + * @throws ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in Luxembourg are defined by the provider class + * @throws ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in Luxembourg are defined by the provider class + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + } +} diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php new file mode 100644 index 000000000..4103f8787 --- /dev/null +++ b/tests/Luxembourg/NationalDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the National Day of Luxembourg. + */ +class NationalDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'nationalDay'; + + /** + * 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(6, 23, 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 => 'La Fête nationale'] + ); + } + + /** + * 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/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php new file mode 100644 index 000000000..97d3cbf5f --- /dev/null +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for New Years Day in France. + */ +class NewYearsDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests New Years Day. + * + * @dataProvider NewYearsDayDataProvider + * + * @param int $year the year for which New Years Day needs to be tested + * @param DateTime $expected the expected date + * + * @throws ReflectionException + */ + public function testNewYearsDay($year, $expected) + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests translated name of New Years Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Jour de l\'An'] + ); + } + + /** + * 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); + } + + /** + * 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 + */ + public function NewYearsDayDataProvider(): array + { + return $this->generateRandomDates(1, 1, self::TIMEZONE); + } +} diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php new file mode 100644 index 000000000..7a86a32a2 --- /dev/null +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Pentecost Monday in Luxembourg. + */ +class PentecostMondayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'pentecostMonday'; + + /** + * Tests Pentecost Monday. + * @throws Exception + * @throws ReflectionException + */ + public function testPentecostMonday() + { + $year = 1977; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of Pentecost Monday. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Lundi de Pentecôte'] + ); + } + + /** + * 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/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php new file mode 100644 index 000000000..297f0831c --- /dev/null +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Luxembourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Second Christmas Day in Luxembourg. + */ +class SecondChristmasDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + 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 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, 26, 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 => 'Lendemain de Noël'] + ); + } + + /** + * 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); + } +} From 6c53b0d9104aab31dad8632edc4c4bb8379f6f6e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 4 Mar 2020 22:04:30 +0900 Subject: [PATCH 053/687] Create stale.yml --- .github/workflows/stale.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..5deeb3bf9 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,21 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been open 30 days with no activity. Please remove the stale label or comment, or this will be closed in 5 days' + stale-pr-message: 'This pull request has been open 30 days with no activity. Please remove the stale label or comment, or this will be closed in 5 days' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + days-before-stale: 30 + days-before-close: 5 From 80ec54727dbe10b73f6ae8876bb0fc21e52f19dd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 4 Mar 2020 22:19:04 +0900 Subject: [PATCH 054/687] Update CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 56 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index cb48dfbfe..48cdd3a95 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,11 +2,17 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. ## Our Standards -Examples of behavior that contributes to creating a positive environment include: +Examples of behavior that contributes to creating a positive environment +include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences @@ -16,31 +22,55 @@ Examples of behavior that contributes to creating a positive environment include Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances +* The use of sexualized language or imagery and unwelcome sexual attention or + advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting ## Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. ## Scope -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at me@sachatelgenhof.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at me@sachatelgenhof.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html -[homepage]: https://contributor-covenant.org -[version]: https://contributor-covenant.org/version/1/4/ +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq From 4793a282237c05e107d7729c46a8ab12c1ed8441 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 5 Mar 2020 11:13:03 +0900 Subject: [PATCH 055/687] Increased the days The default number of days is a bit short, as activity is usually low. --- .github/workflows/stale.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5deeb3bf9..7d6e7df7d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,9 +13,9 @@ jobs: - uses: actions/stale@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been open 30 days with no activity. Please remove the stale label or comment, or this will be closed in 5 days' - stale-pr-message: 'This pull request has been open 30 days with no activity. Please remove the stale label or comment, or this will be closed in 5 days' + stale-issue-message: 'This issue has been open 60 days with no activity. Please remove the stale label or comment, or this will be closed in 10 days.' + stale-pr-message: 'This pull request has been open 60 days with no activity. Please remove the stale label or comment, or this will be closed in 10 days.' stale-issue-label: 'no-issue-activity' stale-pr-label: 'no-pr-activity' - days-before-stale: 30 - days-before-close: 5 + days-before-stale: 60 + days-before-close: 10 From 5324c0881447bd168de10bed2ad9ae593ba5476b Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Thu, 12 Mar 2020 15:37:32 +0100 Subject: [PATCH 056/687] Use fr_LU as locale identifier for Luxembourg (#209) --- src/Yasumi/Provider/Luxembourg.php | 6 ++---- src/Yasumi/data/translations/allSaintsDay.php | 1 - src/Yasumi/data/translations/ascensionDay.php | 1 - src/Yasumi/data/translations/assumptionOfMary.php | 1 - src/Yasumi/data/translations/christmasDay.php | 1 - src/Yasumi/data/translations/easterMonday.php | 1 - src/Yasumi/data/translations/internationalWorkersDay.php | 1 - src/Yasumi/data/translations/newYearsDay.php | 1 - src/Yasumi/data/translations/pentecostMonday.php | 7 +++---- src/Yasumi/data/translations/secondChristmasDay.php | 1 - tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/LuxembourgBaseTestCase.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- 13 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index d6d179560..f40e46ed6 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -70,8 +70,7 @@ public function calculateEuropeDay(): void if ($this->year >= 2019) { $this->addHoliday(new Holiday('europeDay', [ 'en_US' => 'Europe day', - 'fr_FR' => 'La Journée de l\'Europe', - 'lu' => 'La Journée de l\'Europe', + 'fr' => 'La Journée de l’Europe', ], new DateTime("$this->year-5-9", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -96,8 +95,7 @@ public function calculateNationalDay(): void { $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', - 'fr_FR' => 'La Fête nationale', - 'lu' => 'La Fête nationale', + 'fr' => 'La Fête nationale', ], new DateTime("$this->year-6-23", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index f5e6fc5c3..84a4aba10 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -26,7 +26,6 @@ 'it' => 'Festa di Tutti i Santi', 'it_CH' => 'Ognissanti', 'lt' => 'Visų šventųjų diena (Vėlinės)', - 'lu' => 'Toussaint', 'nl' => 'Allerheiligen', 'pl' => 'Uroczystość Wszystkich Świętych', 'pt' => 'Dia de todos os Santos', diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index ee10b670d..ecf9ff78e 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -21,7 +21,6 @@ 'fi' => 'Helatorstai', 'fr' => 'Ascension', 'it' => 'Ascensione', - 'lu' => 'Ascension', 'nb' => 'Kristi himmelfartsdag', 'nl' => 'Hemelvaart', 'sv' => 'Kristi himmelsfärdsdag', diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index e61d5895c..b18af1ceb 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -23,7 +23,6 @@ 'it' => 'Assunzione di Maria Vergine', 'it_CH' => 'Assunzione', 'lt' => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)', - 'lu' => 'Assomption', 'nl' => 'Onze Lieve Vrouw hemelvaart', 'pl' => 'Wniebowzięcie Najświętszej Marii Panny', 'pt' => 'Assunção de Nossa Senhora', diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 9c4ffcf0e..e9130bbaf 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -33,7 +33,6 @@ 'it' => 'Natale', 'ko' => '기독탄신일', 'lt' => 'Šv. Kalėdos', - 'lu' => 'Noël', 'lv' => 'Ziemassvētki', 'nb' => 'første juledag', 'nl' => 'eerste kerstdag', diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index be4f3adb8..a4603bb46 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -29,7 +29,6 @@ 'it' => 'Lunedì dell’Angelo', 'it_CH' => 'Lunedi di Pasqua', 'lt' => 'Antroji Velykų diena', - 'lu' => 'Lundi de Pâques', 'lv' => 'Otrās Lieldienas', 'nb' => 'andre påskedag', 'nl_BE' => 'paasmaandag', diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index 7cc183d3a..b3ef5a30a 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -33,7 +33,6 @@ 'ja' => '労働の日', 'ko' => '노동절', 'lt' => 'Tarptautinė darbo diena', - 'lu' => 'Fête du Travail', 'lv' => 'Darba svētki', 'nb' => 'arbeidernes dag', 'nl' => 'Dag van de arbeid', diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 495d8e4c5..5cfa6dc96 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -34,7 +34,6 @@ 'ja' => '元日', 'ko' => '새해', 'lt' => 'Naujųjų metų diena', - 'lu' => 'Jour de l\'An', 'lv' => 'Jaunais Gads', 'nb' => 'første nyttårsdag', 'nl' => 'Nieuwjaar', diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 1f3dd85b8..4c83c14f4 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -21,9 +21,8 @@ 'ga' => 'Luan Cincíse', 'hu' => 'Pünkösdhétfő', 'it' => 'Lunedi di Pentecoste', - 'lu' => 'Lundi de Pentecôte', - 'nb' => 'Andre pinsedag', - 'nl' => 'Tweede pinksterdag', - 'nl_BE' => 'Pinkstermaandag', + 'nb' => 'andre pinsedag', + 'nl' => 'tweede pinksterdag', + 'nl_BE' => 'pinkstermaandag', 'ro' => 'A doua zi de Rusalii', ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index e080bfb7e..763cb84c1 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -27,7 +27,6 @@ 'hu' => 'Karácsony másnapja', 'ko' => '성탄절 연휴', 'lt' => 'Kalėdos (antra diena)', - 'lu' => 'Lendemain de Noël', 'lv' => 'Otrie Ziemassvētki', 'nb' => 'andre juledag', 'nl' => 'tweede kerstdag', diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index 3836f8f67..0a3fdfe83 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -73,7 +73,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'La Journée de l\'Europe'] + [self::LOCALE => 'La Journée de l’Europe'] ); } diff --git a/tests/Luxembourg/LuxembourgBaseTestCase.php b/tests/Luxembourg/LuxembourgBaseTestCase.php index 12474f1f8..fa0c4645a 100644 --- a/tests/Luxembourg/LuxembourgBaseTestCase.php +++ b/tests/Luxembourg/LuxembourgBaseTestCase.php @@ -35,5 +35,5 @@ abstract class LuxembourgBaseTestCase extends TestCase /** * Locale that is considered common for this provider */ - public const LOCALE = 'lu'; + public const LOCALE = 'fr_LU'; } diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index 97d3cbf5f..1ecbf48de 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Jour de l\'An'] + [self::LOCALE => 'Jour de l’An'] ); } From 32b8c634165e1a78b3cb6fc14671eb294073ecf0 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 15 Mar 2020 13:20:04 +0100 Subject: [PATCH 057/687] Update translation for fr_LU and fr_CA (#211) * Update translation for fr_LU and fr_CA * Update translation for fr_LU --- src/Yasumi/data/translations/secondChristmasDay.php | 4 +++- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index 763cb84c1..3e45b5071 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -23,7 +23,9 @@ 'en_ZA' => 'Day of Goodwill', 'et' => 'Teine Jõulupüha', 'fi' => '2. joulupäivä', - 'fr' => 'Lendemain de Noël', + 'fr' => 'Saint-Étienne', + 'fr_CA' => 'Lendemain de Noël', + 'fr_LU' => 'Deuxième jour de Noël', 'hu' => 'Karácsony másnapja', 'ko' => '성탄절 연휴', 'lt' => 'Kalėdos (antra diena)', diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index 297f0831c..5981a4549 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -64,7 +64,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Lendemain de Noël'] + [self::LOCALE => 'Deuxième jour de Noël'] ); } From 51aed0e43f4e9f4bd59803624dbf7bbe90f9fbd7 Mon Sep 17 00:00:00 2001 From: Pierrick V Date: Wed, 29 Apr 2020 12:46:26 +0200 Subject: [PATCH 058/687] Save CPU time resources on DateTimeZone creation (#213) Co-authored-by: Pierrick VIGNAND --- src/Yasumi/Provider/Australia.php | 11 ++-- src/Yasumi/Provider/Australia/ACT.php | 10 ++-- src/Yasumi/Provider/Australia/NSW.php | 8 +-- src/Yasumi/Provider/Australia/NT.php | 8 +-- src/Yasumi/Provider/Australia/Queensland.php | 8 +-- .../Australia/Queensland/Brisbane.php | 4 +- src/Yasumi/Provider/Australia/SA.php | 10 ++-- src/Yasumi/Provider/Australia/Tasmania.php | 8 +-- .../Australia/Tasmania/CentralNorth.php | 4 +- .../Australia/Tasmania/FlindersIsland.php | 4 +- .../Australia/Tasmania/KingIsland.php | 4 +- .../Provider/Australia/Tasmania/Northeast.php | 4 +- .../Provider/Australia/Tasmania/Northwest.php | 4 +- .../Tasmania/Northwest/CircularHead.php | 4 +- .../Provider/Australia/Tasmania/South.php | 4 +- .../Australia/Tasmania/South/Southeast.php | 4 +- src/Yasumi/Provider/Australia/Victoria.php | 10 ++-- src/Yasumi/Provider/Australia/WA.php | 8 +-- src/Yasumi/Provider/Belgium.php | 3 +- src/Yasumi/Provider/Bosnia.php | 11 ++-- src/Yasumi/Provider/Brazil.php | 11 ++-- src/Yasumi/Provider/ChristianHolidays.php | 31 ++++++----- src/Yasumi/Provider/CommonHolidays.php | 25 +++++---- src/Yasumi/Provider/Croatia.php | 13 +++-- src/Yasumi/Provider/DateTimeZoneFactory.php | 33 ++++++++++++ src/Yasumi/Provider/Denmark.php | 5 +- src/Yasumi/Provider/Finland.php | 7 ++- src/Yasumi/Provider/France.php | 3 +- src/Yasumi/Provider/Germany/Berlin.php | 4 +- src/Yasumi/Provider/Germany/Saxony.php | 4 +- src/Yasumi/Provider/Greece.php | 9 ++-- src/Yasumi/Provider/Hungary.php | 7 ++- src/Yasumi/Provider/Ireland.php | 15 +++--- src/Yasumi/Provider/Italy.php | 5 +- src/Yasumi/Provider/Japan.php | 51 +++++++++---------- src/Yasumi/Provider/Luxembourg.php | 5 +- src/Yasumi/Provider/Netherlands.php | 17 +++---- src/Yasumi/Provider/NewZealand.php | 17 +++---- src/Yasumi/Provider/Norway.php | 3 +- src/Yasumi/Provider/Poland.php | 5 +- src/Yasumi/Provider/Portugal.php | 9 ++-- src/Yasumi/Provider/Romania.php | 15 +++--- src/Yasumi/Provider/Slovakia.php | 13 +++-- src/Yasumi/Provider/SouthAfrica.php | 17 +++---- src/Yasumi/Provider/SouthKorea.php | 29 +++++------ src/Yasumi/Provider/Spain.php | 5 +- src/Yasumi/Provider/Spain/Andalusia.php | 4 +- 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 | 4 +- 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/RegionOfMurcia.php | 4 +- .../Provider/Spain/ValencianCommunity.php | 4 +- src/Yasumi/Provider/Sweden.php | 11 ++-- src/Yasumi/Provider/Switzerland.php | 9 ++-- src/Yasumi/Provider/Switzerland/Geneva.php | 6 +-- src/Yasumi/Provider/Switzerland/Glarus.php | 4 +- src/Yasumi/Provider/Switzerland/Jura.php | 4 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 4 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 6 +-- src/Yasumi/Provider/Switzerland/Ticino.php | 4 +- src/Yasumi/Provider/USA.php | 23 ++++----- src/Yasumi/Provider/UnitedKingdom.php | 17 +++---- .../UnitedKingdom/NorthernIreland.php | 6 +-- .../Provider/UnitedKingdom/Scotland.php | 8 +-- 74 files changed, 330 insertions(+), 327 deletions(-) create mode 100644 src/Yasumi/Provider/DateTimeZoneFactory.php diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 4e08f9eb0..8760dc629 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -70,7 +69,7 @@ public function initialize(): void */ private function calculateNewYearHolidays(): void { - $newyearsday = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); + $newyearsday = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->calculateHoliday('newYearsDay', $newyearsday, [], false, false); switch ($newyearsday->format('w')) { case 0: // sunday @@ -135,7 +134,7 @@ public function calculateHoliday( */ private function calculateAustraliaDay(): void { - $date = new DateTime("$this->year-01-26", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->calculateHoliday('australiaDay', $date, ['en' => 'Australia Day']); } @@ -162,7 +161,7 @@ private function calculateAnzacDay(): void return; } - $date = new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->calculateHoliday('anzacDay', $date, [], false, false); $easter = $this->calculateEaster($this->year, $this->timezone); @@ -191,8 +190,8 @@ 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)); + $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $boxingDay = new DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->calculateHoliday('christmasDay', $christmasDay, [], false, false); $this->calculateHoliday('secondChristmasDay', $boxingDay, [], false, false); diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 6c0429e22..8566794a4 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Australian Capital Territory (Australia). @@ -143,7 +143,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -157,7 +157,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -175,7 +175,7 @@ private function calculateCanberraDay(): void new Holiday( 'canberraDay', ['en' => 'Canberra Day'], - new DateTime($datePattern, new DateTimeZone($this->timezone)), + new DateTime($datePattern, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ) ); @@ -192,7 +192,7 @@ private function calculateReconciliationDay(): void return; } - $date = new DateTime($this->year . '-05-27', new DateTimeZone($this->timezone)); + $date = new DateTime($this->year . '-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $day = (int)$date->format('w'); if (1 !== $day) { $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index 3c5d73c36..8ee2b06f8 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in New South Wales (Australia). @@ -106,7 +106,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -120,7 +120,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -135,7 +135,7 @@ private function calculateBankHoliday(): void { $this->calculateHoliday( 'bankHoliday', - new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Bank Holiday'], false, false, diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index b400f7be6..2953fdfce 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Northern Territory (Australia). @@ -105,7 +105,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -119,7 +119,7 @@ private function calculateQueensBirthday(): void */ private function calculateMayDay(): void { - $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mayDay', ['en' => 'May Day'], $date, $this->locale)); } @@ -136,7 +136,7 @@ private function calculatePicnicDay(): void { $this->calculateHoliday( 'picnicDay', - new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Picnic Day'], false, false diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 6ad30542d..bf94ea364 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\Australia; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Queensland (Australia). @@ -72,7 +72,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', - new DateTime($birthDay, new DateTimeZone($this->timezone)), + new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -86,9 +86,9 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($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 13432aace..33792a533 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Queensland; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Brisbane (Australia). @@ -67,7 +67,7 @@ public function initialize(): void */ private function calculatePeoplesDay(): void { - $date = new DateTime('first friday of august ' . $this->year, new DateTimeZone($this->timezone)); + $date = new DateTime('first friday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($date->format('d') < 5) { $date = $date->add(new DateInterval('P7D')); } diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index a9c228618..0df4ba8ac 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in South Australia (Australia). @@ -113,7 +113,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -127,7 +127,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', ['en' => 'Labour Day'], $date, $this->locale)); } @@ -151,7 +151,7 @@ private function calculateAdelaideCupDay(): void $this->calculateHoliday( 'adelaideCup', - new DateTime($cupDay, new DateTimeZone($this->timezone)), + new DateTime($cupDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Adelaide Cup'], false, false @@ -166,7 +166,7 @@ private function calculateAdelaideCupDay(): void */ private function calculateProclamationDay(): void { - $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); + $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->calculateHoliday('christmasDay', $christmasDay, [], false, false); switch ($christmasDay->format('w')) { case 0: // sunday diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 681556ab3..9da36a0f2 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\Australia; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Tasmania (Australia). @@ -55,7 +55,7 @@ public function initialize(): void */ private function calculateEightHoursDay(): void { - $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('eightHourDay', ['en' => 'Eight Hour Day'], $date, $this->locale)); } @@ -79,7 +79,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -98,7 +98,7 @@ private function calculateRecreationDay(): void { $this->calculateHoliday( 'recreationDay', - new DateTime('first monday of november ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('first monday of november ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Recreation Day'], false, false diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 599f8738d..6cd5fb86c 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\Australia\Tasmania; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in central north Tasmania (Australia). @@ -52,7 +52,7 @@ public function initialize(): void */ private function calculateDevonportShow(): void { - $date = new DateTime($this->year . '-12-02', new DateTimeZone($this->timezone)); + $date = new DateTime($this->year . '-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); $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 6d13e38cb..3b05cf76e 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Flinders Island (Australia). @@ -53,7 +53,7 @@ public function initialize(): void */ private function calculateFlindersIslandShow(): void { - $date = new DateTime('third saturday of october ' . $this->year, new DateTimeZone($this->timezone)); + $date = new DateTime('third saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P1D')); $this->addHoliday(new Holiday('flindersIslandShow', ['en' => 'Flinders Island Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index fffabbb39..59772daf6 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -13,9 +13,9 @@ namespace Yasumi\Provider\Australia\Tasmania; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Australia\Tasmania; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in King Island (Australia). @@ -53,7 +53,7 @@ private function calculateKingIslandShow(): void { $this->calculateHoliday( 'kingIslandShow', - new DateTime('first tuesday of march ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('first tuesday of march ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'King Island Show'], false, false diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 1502d6282..fd6a3ff24 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in northeastern Tasmania (Australia). @@ -53,7 +53,7 @@ public function initialize(): void */ private function calculateLauncestonShow(): void { - $date = new DateTime('second saturday of october ' . $this->year, new DateTimeZone($this->timezone)); + $date = new DateTime('second saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P2D')); $this->addHoliday(new Holiday('launcestonShow', ['en' => 'Royal Launceston Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index eaac5e36b..a5374294c 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in northwestern Tasmania (Australia). @@ -53,7 +53,7 @@ public function initialize(): void */ private function calculateBurnieShow(): void { - $date = new DateTime('first saturday of october ' . $this->year, new DateTimeZone($this->timezone)); + $date = new DateTime('first saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P1D')); $this->addHoliday(new Holiday('burnieShow', ['en' => 'Burnie Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index beb033f88..8e7571bba 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania\Northwest; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Circular Head (Australia). @@ -53,7 +53,7 @@ public function initialize(): void */ private function calculateAGFEST(): void { - $date = new DateTime('first thursday of may ' . $this->year, new DateTimeZone($this->timezone)); + $date = new DateTime('first thursday of may ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->add(new DateInterval('P1D')); $this->addHoliday(new Holiday('agfest', ['en' => 'AGFEST'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index ad72fcb6b..3e5c1a0ad 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in southern Tasmania (Australia). @@ -53,7 +53,7 @@ public function initialize(): void */ private function calculateHobartShow(): void { - $date = new DateTime('fourth saturday of october ' . $this->year, new DateTimeZone($this->timezone)); + $date = new DateTime('fourth saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P2D')); $this->addHoliday(new Holiday('hobartShow', ['en' => 'Royal Hobart Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index 3211858cf..2887ad2ae 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -13,9 +13,9 @@ namespace Yasumi\Provider\Australia\Tasmania\South; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Australia\Tasmania\South; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in southeastern Tasmania (Australia). @@ -56,7 +56,7 @@ private function calculateHobartRegatta(): void { $this->calculateHoliday( 'hobartRegatta', - new DateTime('second monday of february ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of february ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Royal Hobart Regatta'], false, false diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 6392d5b83..50eb34216 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Victoria (Australia). @@ -131,7 +131,7 @@ private function easterSaturday( */ private function calculateLabourDay(): void { - $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -155,7 +155,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -169,7 +169,7 @@ private function calculateQueensBirthday(): void */ private function calculateMelbourneCupDay(): void { - $date = new DateTime('first Tuesday of November' . " $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime('first Tuesday of November' . " $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } @@ -204,7 +204,7 @@ private function calculateAFLGrandFinalDay(): void return; } - $date = new DateTime($aflGrandFinalFriday, new DateTimeZone($this->timezone)); + $date = new DateTime($aflGrandFinalFriday, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'aflGrandFinalFriday', diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 9a8bb04cb..f0e6dceb6 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\Australia; use DateTime; -use DateTimeZone; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; +use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Western Australia (Australia). @@ -76,7 +76,7 @@ private function calculateQueensBirthday(): void $this->calculateHoliday( 'queensBirthday', - new DateTime($birthDay, new DateTimeZone($this->timezone)), + new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], false, false @@ -90,7 +90,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of march $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("first monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -107,7 +107,7 @@ private function calculateWesternAustraliaDay(): void { $this->calculateHoliday( 'westernAustraliaDay', - new DateTime('first monday of june ' . $this->year, new DateTimeZone($this->timezone)), + new DateTime('first monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Western Australia Day'], false, false diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 23ae25505..aa7f4179c 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -67,6 +66,6 @@ public function initialize(): void 'fr' => 'Fête nationale', 'en' => 'Belgian National Day', 'nl' => 'nationale feestdag', - ], new DateTime("$this->year-7-21", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-7-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index d8aee8f87..abd2b131e 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -59,7 +58,7 @@ public function initialize(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', 'bs_Latn' => 'Pravoslavni Božić', - ], new DateTime("{$this->year}-01-07", new DateTimeZone($this->timezone)))); + ], new DateTime("{$this->year}-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); /** * Independence Day @@ -68,7 +67,7 @@ public function initialize(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'bs_Latn' => 'Dan Nezavisnosti', - ], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -78,7 +77,7 @@ public function initialize(): void $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'bs_Latn' => 'Dan državnosti', - ], new DateTime("$this->year-11-25", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-11-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -87,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', - ], new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); /** * Second Labour day @@ -95,6 +94,6 @@ public function initialize(): void $this->addHoliday(new Holiday('secondLabourDay', [ 'en' => 'Second Labour Day', 'bs_Latn' => 'Praznik rada - drugi dan', - ], new DateTime("$this->year-05-02", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-05-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index f6a4bf08c..849691df7 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -98,7 +97,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'tiradentesDay', ['pt' => 'Dia de Tiradentes'], - new DateTime("$this->year-04-21", new DateTimeZone($this->timezone)), + new DateTime("$this->year-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -115,7 +114,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'independenceDay', ['pt' => 'Dia da Independência do Brasil'], - new DateTime("$this->year-09-07", new DateTimeZone($this->timezone)), + new DateTime("$this->year-09-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -135,7 +134,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'ourLadyOfAparecidaDay', ['pt' => 'Dia de Nossa Senhora Aparecida'], - new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -151,7 +150,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'allSoulsDay', ['pt' => 'Dia de Finados'], - new DateTime("$this->year-11-02", new DateTimeZone($this->timezone)), + new DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -169,7 +168,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'proclamationOfRepublicDay', ['pt' => 'Dia da Proclamação da República'], - new DateTime("$this->year-11-15", new DateTimeZone($this->timezone)), + new DateTime("$this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 165cd83b7..67897824f 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -131,7 +130,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime $easterDays = $pfm + $tmp + 1; // Easter as the number of days after 21st March } - $easter = new DateTime("$year-3-21", new DateTimeZone($timezone)); + $easter = new DateTime("$year-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); $easter->add(new DateInterval('P' . $easterDays . 'D')); return $easter; @@ -348,7 +347,7 @@ public function christmasEve( return new Holiday( 'christmasEve', [], - new DateTime("$year-12-24", new DateTimeZone($timezone)), + new DateTime("$year-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -383,7 +382,7 @@ public function christmasDay( return new Holiday( 'christmasDay', [], - new DateTime("$year-12-25", new DateTimeZone($timezone)), + new DateTime("$year-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -418,7 +417,7 @@ public function secondChristmasDay( return new Holiday( 'secondChristmasDay', [], - new DateTime("$year-12-26", new DateTimeZone($timezone)), + new DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -453,7 +452,7 @@ public function allSaintsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('allSaintsDay', [], new DateTime("$year-11-1", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('allSaintsDay', [], new DateTime("$year-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -487,7 +486,7 @@ public function assumptionOfMary( return new Holiday( 'assumptionOfMary', [], - new DateTime("$year-8-15", new DateTimeZone($timezone)), + new DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -558,7 +557,7 @@ public function epiphany( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('epiphany', [], new DateTime("$year-1-6", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('epiphany', [], new DateTime("$year-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -630,7 +629,7 @@ public function immaculateConception( return new Holiday( 'immaculateConception', [], - new DateTime("$year-12-8", new DateTimeZone($timezone)), + new DateTime("$year-12-8", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -669,7 +668,7 @@ public function stStephensDay( return new Holiday( 'stStephensDay', [], - new DateTime("$year-12-26", new DateTimeZone($timezone)), + new DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -705,7 +704,7 @@ public function stJosephsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stJosephsDay', [], new DateTime("$year-3-19", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('stJosephsDay', [], new DateTime("$year-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -775,7 +774,7 @@ public function stGeorgesDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stGeorgesDay', [], new DateTime("$year-4-23", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('stGeorgesDay', [], new DateTime("$year-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -808,7 +807,7 @@ public function stJohnsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stJohnsDay', [], new DateTime("$year-06-24", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('stJohnsDay', [], new DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -844,7 +843,7 @@ public function annunciation( return new Holiday( 'annunciation', [], - new DateTime("$year-03-25", new DateTimeZone($timezone)), + new DateTime("$year-03-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -872,7 +871,7 @@ public function calculateOrthodoxEaster(int $year, string $timezone): DateTime $month = \floor(($d + $e + 114) / 31); $day = (($d + $e + 114) % 31) + 1; - return (new DateTime("$year-$month-$day", new DateTimeZone($timezone)))->add(new DateInterval('P13D')); + return (new DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new DateInterval('P13D')); } /** @@ -912,7 +911,7 @@ public function reformationDay( return new Holiday( 'reformationDay', [], - new DateTime("$year-10-31", new DateTimeZone($timezone)), + new DateTime("$year-10-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index fd063c05c..c2cbd8eb3 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -54,7 +53,7 @@ public function newYearsEve( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('newYearsEve', [], new DateTime("$year-12-31", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('newYearsEve', [], new DateTime("$year-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -88,7 +87,7 @@ public function newYearsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('newYearsDay', [], new DateTime("$year-1-1", new DateTimeZone($timezone)), $locale, $type); + return new Holiday('newYearsDay', [], new DateTime("$year-1-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -124,7 +123,7 @@ public function internationalWorkersDay( return new Holiday( 'internationalWorkersDay', [], - new DateTime("$year-5-1", new DateTimeZone($timezone)), + new DateTime("$year-5-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -163,7 +162,7 @@ public function valentinesDay( return new Holiday( 'valentinesDay', [], - new DateTime("$year-2-14", new DateTimeZone($timezone)), + new DateTime("$year-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -200,7 +199,7 @@ public function worldAnimalDay( return new Holiday( 'worldAnimalDay', [], - new DateTime("$year-10-4", new DateTimeZone($timezone)), + new DateTime("$year-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -239,7 +238,7 @@ public function stMartinsDay( return new Holiday( 'stMartinsDay', [], - new DateTime("$year-11-11", new DateTimeZone($timezone)), + new DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -277,7 +276,7 @@ public function fathersDay( return new Holiday( 'fathersDay', [], - new DateTime("third sunday of june $year", new DateTimeZone($timezone)), + new DateTime("third sunday of june $year", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -315,7 +314,7 @@ public function mothersDay( return new Holiday( 'mothersDay', [], - new DateTime("second sunday of may $year", new DateTimeZone($timezone)), + new DateTime("second sunday of may $year", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -353,7 +352,7 @@ public function victoryInEuropeDay( return new Holiday( 'victoryInEuropeDay', [], - new DateTime("$year-5-8", new DateTimeZone($timezone)), + new DateTime("$year-5-8", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -393,7 +392,7 @@ public function armisticeDay( return new Holiday( 'armisticeDay', [], - new DateTime("$year-11-11", new DateTimeZone($timezone)), + new DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -428,7 +427,7 @@ public function internationalWomensDay( return new Holiday( 'internationalWomensDay', [], - new DateTime("$year-03-08", new DateTimeZone($timezone)), + new DateTime("$year-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -498,7 +497,7 @@ protected function calculateSummerWinterTime( string $timezone, bool $summer ): ?\DateTimeImmutable { - $zone = new DateTimeZone($timezone); + $zone = DateTimeZoneFactory::getDateTimeZone($timezone); $transitions = $zone->getTransitions(\mktime(0, 0, 0, 1, 1, $year), \mktime(23, 59, 59, 12, 31, $year)); diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 4b1b38fa2..21b68f5f7 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -66,7 +65,7 @@ public function initialize(): void $this->addHoliday(new Holiday('antifascistStruggleDay', [ 'en' => 'Day of Antifascist Struggle', 'hr' => 'Dan antifašističke borbe', - ], new DateTime("$this->year-6-22", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } $this->calculateStatehoodDay(); @@ -84,9 +83,9 @@ private function calculateStatehoodDay(): void $statehoodDayDate = null; if ($this->year >= 1991 && $this->year < 2020) { - $statehoodDayDate = new DateTime("$this->year-6-25", new DateTimeZone($this->timezone)); + $statehoodDayDate = new DateTime("$this->year-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2020) { - $statehoodDayDate = new DateTime("$this->year-5-30", new DateTimeZone($this->timezone)); + $statehoodDayDate = new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($statehoodDayDate != null) { @@ -116,7 +115,7 @@ private function calculateHomelandThanksgivingDay(): void $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, - new DateTime("$this->year-8-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-8-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -133,7 +132,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'hr' => 'Dan neovisnosti', - ], new DateTime("$this->year-10-8", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -147,7 +146,7 @@ private function calculateRemembranceDayForHomelandWarVictims(): void $this->addHoliday(new Holiday('remembranceDay', [ 'en' => 'Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja', 'hr' => 'Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje', - ], new DateTime("$this->year-11-18", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-11-18", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php new file mode 100644 index 000000000..dd82f5603 --- /dev/null +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -0,0 +1,33 @@ + + */ + +namespace Yasumi\Provider; + +/** + * This factory keep references to already instantiated DateTimeZone to save CPU time resources + * + * @author Pierrick VIGNAND + */ +final class DateTimeZoneFactory +{ + /** @var array */ + private static $dateTimeZones; + + public static function getDateTimeZone(string $timezone): \DateTimeZone + { + if (!isset(self::$dateTimeZones[$timezone])) { + self::$dateTimeZones[$timezone] = new \DateTimeZone($timezone); + } + + return self::$dateTimeZones[$timezone]; + } +} diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index 295d551fb..73e45dbdb 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -98,7 +97,7 @@ private function calculateGreatPrayerDay(): void $this->addHoliday(new Holiday( 'greatPrayerDay', ['da' => 'store bededag'], - new DateTime("fourth friday $easter", new DateTimeZone($this->timezone)), + new DateTime("fourth friday $easter", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -126,7 +125,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['da' => 'grundlovsdag'], - new DateTime("$this->year-6-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-6-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index ea77ec1a4..05c66fc79 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -90,7 +89,7 @@ private function calculateStJohnsDay(): void $this->addHoliday(new Holiday( 'stJohnsDay', [], - new DateTime($stJohnsDay, new DateTimeZone($this->timezone)), + new DateTime($stJohnsDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -122,7 +121,7 @@ private function calculateAllSaintsDay(): void $this->addHoliday(new Holiday( 'allSaintsDay', [], - new DateTime("$this->year-10-31 this saturday", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -151,7 +150,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['fi' => 'Itsenäisyyspäivä'], - new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)), + new DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 3f4611640..1a7801646 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -90,7 +89,7 @@ private function calculateBastilleDay(): void $this->addHoliday(new Holiday('bastilleDay', [ 'en' => 'Bastille Day', 'fr' => 'La Fête nationale', - ], new DateTime("$this->year-7-14", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-7-14", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 81231360b..9fdc7f75e 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\Germany; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Germany; /** @@ -86,7 +86,7 @@ public function dayOfLiberation( return new Holiday( 'dayOfLiberation', [], - new DateTime('2020-05-08', new DateTimeZone($timezone)), + new DateTime('2020-05-08', DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index c0e9d4bdc..8b2c20d52 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\Germany; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Germany; /** @@ -93,7 +93,7 @@ private function calculateRepentanceAndPrayerDay(): void $this->addHoliday(new Holiday( 'repentanceAndPrayerDay', ['de' => 'Buß- und Bettag'], - new DateTime("next wednesday $this->year-11-15", new DateTimeZone($this->timezone)), + new DateTime("next wednesday $this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index c65a5edd2..1b56f3635 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function calculateThreeHolyHierarchs(): void $this->addHoliday(new Holiday( 'threeHolyHierarchs', ['el' => 'Τριών Ιεραρχών'], - new DateTime("$this->year-1-30", new DateTimeZone($this->timezone)), + new DateTime("$this->year-1-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -150,7 +149,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['el' => 'Εικοστή Πέμπτη Μαρτίου'], - new DateTime("$this->year-3-25", new DateTimeZone($this->timezone)), + new DateTime("$this->year-3-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -174,7 +173,7 @@ private function calculateOhiDay(): void $this->addHoliday(new Holiday( 'ohiDay', ['el' => 'Επέτειος του Όχι'], - new DateTime("$this->year-10-28", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -198,7 +197,7 @@ private function calculatePolytechnio(): void $this->addHoliday(new Holiday( 'polytechnio', ['el' => 'Πολυτεχνείο'], - new DateTime("$this->year-11-17", new DateTimeZone($this->timezone)), + new DateTime("$this->year-11-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index 7988e4282..f9ef68e67 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -68,7 +67,7 @@ public function initialize(): void $this->addHoliday(new Holiday('memorialDay1848', [ '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)); + ], new DateTime("$this->year-3-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -78,7 +77,7 @@ public function initialize(): void $this->addHoliday(new Holiday('stateFoundation', [ 'en' => 'State Foundation Day', 'hu' => 'Az államalapítás ünnepe', - ], new DateTime("$this->year-8-20", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-8-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -88,7 +87,7 @@ public function initialize(): void $this->addHoliday(new Holiday('memorialDay1956', [ '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)); + ], new DateTime("$this->year-10-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 2a2cf8749..74dfb009f 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -69,7 +68,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'augustHoliday', ['en' => 'August Holiday', 'ga' => 'Lá Saoire i mí Lúnasa'], - new DateTime("next monday $this->year-7-31", new DateTimeZone($this->timezone)), + new DateTime("next monday $this->year-7-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); $this->calculateOctoberHoliday(); @@ -158,7 +157,7 @@ private function calculateChristmasDay(): void $holiday = new Holiday( 'christmasDay', ['en' => 'Christmas Day', 'ga' => 'Lá Nollag'], - new DateTime($this->year . '-12-25', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -198,7 +197,7 @@ private function calculateStStephensDay(): void $holiday = new Holiday( 'stStephensDay', [], - new DateTime($this->year . '-12-26', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -243,7 +242,7 @@ private function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day', 'ga' => 'Lá Fhéile Pádraig'], - new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -289,7 +288,7 @@ private function calculateMayDay(): void $this->addHoliday(new Holiday( 'mayDay', ['en' => 'May Day', 'ga' => 'Lá Bealtaine'], - new DateTime("next monday $this->year-4-30", new DateTimeZone($this->timezone)), + new DateTime("next monday $this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -317,7 +316,7 @@ private function calculateJuneHoliday(): void $this->addHoliday(new Holiday( 'juneHoliday', ['en' => 'June Holiday', 'ga' => 'Lá Saoire i mí an Mheithimh'], - new DateTime("next monday $this->year-5-31", new DateTimeZone($this->timezone)), + new DateTime("next monday $this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -344,7 +343,7 @@ private function calculateOctoberHoliday(): void $this->addHoliday(new Holiday( 'octoberHoliday', ['en' => 'October Holiday', 'ga' => 'Lá Saoire i mí Dheireadh Fómhair'], - new DateTime("previous monday $this->year-11-01", new DateTimeZone($this->timezone)), + new DateTime("previous monday $this->year-11-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 859d86c88..c210944cc 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -85,7 +84,7 @@ private function calculateLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['it' => 'Festa della Liberazione'], - new DateTime("$this->year-4-25", new DateTimeZone($this->timezone)), + new DateTime("$this->year-4-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -113,7 +112,7 @@ private function calculateRepublicDay(): void $this->addHoliday(new Holiday( 'republicDay', ['it' => 'Festa della Repubblica'], - new DateTime("$this->year-6-2", new DateTimeZone($this->timezone)), + new DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 9d4922015..9d65991df 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -16,7 +16,6 @@ use DateInterval; use DateTime; use DateTimeInterface; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -123,7 +122,7 @@ private function calculateNationalFoundationDay(): void 'en' => 'National Foundation Day', 'ja' => '建国記念の日', ], - new DateTime("$this->year-2-11", new DateTimeZone($this->timezone)), + new DateTime("$this->year-2-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -143,7 +142,7 @@ private function calculateShowaDay(): void 'en' => 'Showa Day', 'ja' => '昭和の日', ], - new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)), + new DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -163,7 +162,7 @@ private function calculateConstitutionMemorialDay(): void 'en' => 'Constitution Memorial Day', 'ja' => '憲法記念日', ], - new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -183,7 +182,7 @@ private function calculateChildrensDay(): void 'en' => 'Children’s Day', 'ja' => 'こどもの日', ], - new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -200,7 +199,7 @@ private function calculateCultureDay(): void $this->addHoliday(new Holiday( 'cultureDay', ['en' => 'Culture Day', 'ja' => '文化の日'], - new DateTime("$this->year-11-3", new DateTimeZone($this->timezone)), + new DateTime("$this->year-11-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -217,7 +216,7 @@ private function calculateLaborThanksgivingDay(): void $this->addHoliday(new Holiday( 'laborThanksgivingDay', ['en' => 'Labor Thanksgiving Day', 'ja' => '勤労感謝の日'], - new DateTime("$this->year-11-23", new DateTimeZone($this->timezone)), + new DateTime("$this->year-11-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -246,7 +245,7 @@ private function calculateEmperorsBirthday(): void $this->addHoliday(new Holiday( 'emperorsBirthday', ['en' => 'Emperors Birthday', 'ja' => '天皇誕生日'], - new DateTime($emperorsBirthday, new DateTimeZone($this->timezone)), + new DateTime($emperorsBirthday, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -285,7 +284,7 @@ private function calculateVernalEquinoxDay(): void $this->addHoliday(new Holiday( 'vernalEquinoxDay', ['en' => 'Vernal Equinox Day', 'ja' => '春分の日'], - new DateTime("$this->year-3-$day", new DateTimeZone($this->timezone)), + new DateTime("$this->year-3-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -307,9 +306,9 @@ private function calculateComingOfAgeDay(): void { $date = null; if ($this->year >= 2000) { - $date = new DateTime("second monday of january $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("second monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1948) { - $date = new DateTime("$this->year-1-15", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof DateTimeInterface) { @@ -337,9 +336,9 @@ private function calculateGreeneryDay(): void { $date = null; if ($this->year >= 2007) { - $date = new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1989) { - $date = new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof DateTimeInterface) { @@ -369,11 +368,11 @@ private function calculateMarineDay(): void { $date = null; if (2020 === $this->year) { - $date = new DateTime("$this->year-7-23", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2003) { - $date = new DateTime("third monday of july $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("third monday of july $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new DateTime("$this->year-7-20", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-7-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof DateTimeInterface) { @@ -400,9 +399,9 @@ private function calculateMountainDay(): void { $date = null; if (2020 === $this->year) { - $date = new DateTime("$this->year-8-10", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-8-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2016) { - $date = new DateTime("$this->year-8-11", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-8-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof DateTimeInterface) { @@ -431,9 +430,9 @@ private function calculateRespectForTheAgeDay(): void { $date = null; if ($this->year >= 2003) { - $date = new DateTime("third monday of september $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("third monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new DateTime("$this->year-9-15", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-9-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof DateTimeInterface) { @@ -463,11 +462,11 @@ private function calculateSportsDay(): void { $date = null; if (2020 === $this->year) { - $date = new DateTime("$this->year-7-24", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-7-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2000) { - $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new DateTime("$this->year-10-10", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-10-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $holidayName = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; @@ -518,7 +517,7 @@ private function calculateAutumnalEquinoxDay(): void $this->addHoliday(new Holiday( 'autumnalEquinoxDay', ['en' => 'Autumnal Equinox Day', 'ja' => '秋分の日'], - new DateTime("$this->year-9-$day", new DateTimeZone($this->timezone)), + new DateTime("$this->year-9-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -586,7 +585,7 @@ private function calculateCoronationDay(): void $this->addHoliday(new Holiday( 'coronationDay', ['en' => 'Coronation Day', 'ja' => '即位の日'], - new DateTime("$this->year-5-1", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -604,7 +603,7 @@ private function calculateEnthronementProclamationCeremony(): void $this->addHoliday(new Holiday( 'enthronementProclamationCeremony', ['en' => 'Enthronement Proclamation Ceremony', 'ja' => '即位礼正殿の儀'], - new DateTime("$this->year-10-22", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index f40e46ed6..8c08b34f9 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -3,7 +3,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -71,7 +70,7 @@ public function calculateEuropeDay(): void $this->addHoliday(new Holiday('europeDay', [ 'en_US' => 'Europe day', 'fr' => 'La Journée de l’Europe', - ], new DateTime("$this->year-5-9", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-5-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -96,6 +95,6 @@ public function calculateNationalDay(): void $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', 'fr' => 'La Fête nationale', - ], new DateTime("$this->year-6-23", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-6-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 14ca841aa..0035d99ec 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -187,7 +186,7 @@ private function calculateStNicholasDay(): void $this->addHoliday(new Holiday( 'stNicholasDay', ['en' => 'St. Nicholas’ Day', 'nl' => 'Sinterklaas'], - new DateTime("$this->year-12-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-12-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -210,7 +209,7 @@ private function calculateHalloween(): void $this->addHoliday(new Holiday( 'halloween', ['en' => 'Halloween', 'nl' => 'Halloween'], - new DateTime("$this->year-10-31", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -229,7 +228,7 @@ private function calculatePrincesDay(): void $this->addHoliday(new Holiday( 'princesDay', ['en' => 'Prince’s Day', 'nl' => 'Prinsjesdag'], - new DateTime("third tuesday of september $this->year", new DateTimeZone($this->timezone)), + new DateTime("third tuesday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -247,9 +246,9 @@ private function calculatePrincesDay(): void private function calculateQueensday(): void { if ($this->year >= 1891 && $this->year <= 2013) { - $date = new DateTime("$this->year-4-30", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year <= 1948) { - $date = new DateTime("$this->year-8-31", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-8-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } // Determine substitution day @@ -277,7 +276,7 @@ private function calculateQueensday(): void private function calculateKingsday(): void { if ($this->year >= 2014) { - $date = new DateTime("$this->year-4-27", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (0 === (int)$date->format('w')) { $date->sub(new DateInterval('P1D')); @@ -305,14 +304,14 @@ private function calculateCommemorationLiberationDay(): void $this->addHoliday(new Holiday( 'commemorationDay', ['en' => 'Commemoration Day', 'nl' => 'dodenherdenking'], - new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], - new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 9a9bd887e..d3d42256a 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -75,8 +74,8 @@ public function initialize(): 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)); + $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $dayAfterNewYearsDay = new DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); switch ($newYearsDay->format('w')) { case 0: @@ -119,7 +118,7 @@ private function calculateWaitangiDay(): void return; } - $date = new DateTime("$this->year-02-6", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-02-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 2015 && !$this->isWorkingDay($date)) { $date->modify('next monday'); @@ -149,7 +148,7 @@ private function calculateAnzacDay(): void return; } - $date = new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 2015 && !$this->isWorkingDay($date)) { $date->modify('next monday'); @@ -185,7 +184,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime("first monday of june $this->year", new DateTimeZone($this->timezone)), + new DateTime("first monday of june $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -217,7 +216,7 @@ private function calculateLabourDay(): void $date = new DateTime( ($this->year < 1910 ? 'second wednesday of october' : 'fourth monday of october') . " $this->year", - new DateTimeZone($this->timezone) + DateTimeZoneFactory::getDateTimeZone($this->timezone) ); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); @@ -240,8 +239,8 @@ 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)); + $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $boxingDay = new DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); switch ($christmasDay->format('w')) { case 0: diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 5d3fdfcb0..24d380f3d 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['nb' => 'grunnlovsdagen'], - new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index f7d8f59e0..5bbd6c835 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -88,7 +87,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'pl' => 'Narodowe Święto Niepodległości', - ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -116,6 +115,6 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday('constitutionDay', [ 'en' => 'Constitution Day', 'pl' => 'Święto Narodowe Trzeciego Maja', - ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 4bf27f5d1..4e33ae7d6 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -89,7 +88,7 @@ private function calculateCarnationRevolutionDay(): void $this->addHoliday(new Holiday( '25thApril', ['pt' => 'Dia da Liberdade'], - new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)), + new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -136,7 +135,7 @@ private function calculatePortugalDay(): void $this->addHoliday(new Holiday( 'portugalDay', ['pt' => 'Dia de Portugal'], - new DateTime("$this->year-06-10", new DateTimeZone($this->timezone)), + new DateTime("$this->year-06-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -170,7 +169,7 @@ private function calculatePortugueseRepublicDay(): void $this->addHoliday(new Holiday( 'portugueseRepublic', ['pt' => 'Implantação da República Portuguesa'], - new DateTime("$this->year-10-05", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-05", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -226,7 +225,7 @@ private function calculateRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday( 'restorationOfIndependence', ['pt' => 'Restauração da Independência'], - new DateTime("$this->year-12-01", new DateTimeZone($this->timezone)), + new DateTime("$this->year-12-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index be917f7e2..eb7f909b3 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -91,7 +90,7 @@ private function calculateDayAfterNewYearsDay(): void $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', [], - new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), + new DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -118,7 +117,7 @@ private function calculateUnitedPrincipalitiesDay(): void $this->addHoliday(new Holiday('unitedPrincipalitiesDay', [ 'en' => 'Union Day / Small Union', 'ro' => 'Unirea Principatelor Române / Mica Unire', - ], new DateTime("$this->year-01-24", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-01-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -140,7 +139,7 @@ private function calculateStAndrewDay(): void $this->addHoliday(new Holiday( 'stAndrewsDay', [], - new DateTime($this->year . '-11-30', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -183,7 +182,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday('nationalDay', [ 'en' => 'National Day', 'ro' => 'Ziua Națională', - ], new DateTime($nationalDay, new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime($nationalDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -207,7 +206,7 @@ private function calculateConstantinBrancusiDay(): void 'en' => 'Constantin Brâncuși day', 'ro' => 'Ziua Constantin Brâncuși', ], - new DateTime("$this->year-02-19", new DateTimeZone($this->timezone)), + new DateTime("$this->year-02-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -236,7 +235,7 @@ private function calculateChildrensDay(): void 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', ], - new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), + new DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -246,7 +245,7 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday('childrensDay', [ 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', - ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index da365cf92..48c0b17bf 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -125,7 +124,7 @@ private function calculateSlovakIndependenceDay(): void 'sk' => 'Deň vzniku Slovenskej republiky', 'en' => 'Day of the Establishment of the Slovak Republic', ], - new DateTime($this->year . '-01-01', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -151,7 +150,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new DateTime($this->year . '-07-05', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -175,7 +174,7 @@ private function calculateSlovakNationalUprisingDay(): void '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)), + new DateTime($this->year . '-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -199,7 +198,7 @@ private function calculateSlovakConstitutionDay(): void 'sk' => 'Deň Ústavy Slovenskej republiky', 'en' => 'Day of the Constitution of the Slovak Republic', ], - new DateTime($this->year . '-09-01', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -224,7 +223,7 @@ private function calculateOurLadyOfSorrowsDay(): void $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', 'en' => 'Our Lady of Sorrows Day', - ], new DateTime($this->year . '-09-15', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); + ], new DateTime($this->year . '-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } /** @@ -246,7 +245,7 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new DateTime($this->year . '-11-17', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index c3a274f4d..6ffd17863 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -15,7 +15,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -100,7 +99,7 @@ private function calculateHumanRightsDay(): void $this->addHoliday(new Holiday( 'humanRightsDay', ['en' => 'Human Rights Day'], - new DateTime($this->year . '-3-21', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -145,7 +144,7 @@ private function calculateFreedomDay(): void $this->addHoliday(new Holiday( 'freedomDay', ['en' => 'Freedom Day'], - new DateTime($this->year . '-4-27', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -172,7 +171,7 @@ private function calculateYouthDay(): void $this->addHoliday(new Holiday( 'youthDay', ['en' => 'Youth Day'], - new DateTime($this->year . '-6-16', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -199,7 +198,7 @@ private function calculate2016MunicipalElectionsDay(): void $this->addHoliday(new Holiday( '2016MunicipalElectionsDay', ['en' => '2016 Municipal Elections Day'], - new DateTime('2016-8-3', new DateTimeZone($this->timezone)), + new DateTime('2016-8-3', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -224,7 +223,7 @@ private function calculateNationalWomensDay(): void $this->addHoliday(new Holiday( 'nationalWomensDay', ['en' => 'National Women’s Day'], - new DateTime($this->year . '-8-9', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -249,7 +248,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'heritageDay', ['en' => 'Heritage Day'], - new DateTime($this->year . '-9-24', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -276,7 +275,7 @@ private function calculateDayOfReconciliation(): void $this->addHoliday(new Holiday( 'reconciliationDay', ['en' => 'Day of Reconciliation'], - new DateTime($this->year . '-12-16', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -306,7 +305,7 @@ private function calculateSubstituteDayOfGoodwill(): void $this->addHoliday(new Holiday( 'substituteDayOfGoodwill', ['en' => 'Day of Goodwill observed'], - new DateTime('2016-12-27', new DateTimeZone($this->timezone)), + new DateTime('2016-12-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 769099604..161a6be26 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -15,7 +15,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -165,7 +164,7 @@ public function calculateNewYearsDay(): void $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', [], - new DateTime("$this->year-1-2", new DateTimeZone($this->timezone)), + new DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -173,7 +172,7 @@ public function calculateNewYearsDay(): void $this->addHoliday(new Holiday( 'twoDaysLaterNewYearsDay', ['en' => 'Two Days Later New Year’s Day', 'ko' => '새해 연휴'], - new DateTime("$this->year-1-3", new DateTimeZone($this->timezone)), + new DateTime("$this->year-1-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -191,7 +190,7 @@ public function calculateNewYearsDay(): void public function calculateSeollal(): void { if ($this->year >= 1985 && isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { - $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], new DateTimeZone($this->timezone)); + $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'seollal', ['en' => 'Seollal', 'ko' => '설날'], @@ -232,7 +231,7 @@ public function calculateBuddhasBirthday(): void $this->addHoliday(new Holiday( 'buddhasBirthday', ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'], - new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), + new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -255,7 +254,7 @@ public function calculateChuseok(): void $chuseok = new Holiday( 'chuseok', ['en' => 'Chuseok', 'ko' => '추석'], - new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], new DateTimeZone($this->timezone)), + new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); $this->addHoliday($chuseok); @@ -295,7 +294,7 @@ public function calculateIndependenceMovementDay(): void $this->addHoliday(new Holiday( 'independenceMovementDay', ['en' => 'Independence Movement Day', 'ko' => '삼일절'], - new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), + new DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -314,7 +313,7 @@ public function calculateArborDay(): void $this->addHoliday(new Holiday( 'arborDay', ['en' => 'Arbor Day', 'ko' => '식목일'], - new DateTime("$this->year-4-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-4-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -333,7 +332,7 @@ public function calculateChildrensDay(): void $this->addHoliday(new Holiday( 'childrensDay', ['en' => 'Children’s Day', 'ko' => '어린이날'], - new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -352,7 +351,7 @@ public function calculateMemorialDay(): void $this->addHoliday(new Holiday( 'memorialDay', ['en' => 'Memorial Day', 'ko' => '현충일'], - new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), + new DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -374,7 +373,7 @@ public function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['en' => 'Constitution Day', 'ko' => '제헌절'], - new DateTime("$this->year-7-17", new DateTimeZone($this->timezone)), + new DateTime("$this->year-7-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -393,7 +392,7 @@ public function calculateLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'ko' => '광복절'], - new DateTime("$this->year-8-15", new DateTimeZone($this->timezone)), + new DateTime("$this->year-8-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -412,7 +411,7 @@ public function calculateArmedForcesDay(): void $this->addHoliday(new Holiday( 'armedForcesDay', ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], - new DateTime("$this->year-10-1", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -431,7 +430,7 @@ public function calculateNationalFoundationDay(): void $this->addHoliday(new Holiday( 'nationalFoundationDay', ['en' => 'National Foundation Day', 'ko' => '개천절'], - new DateTime("$this->year-10-3", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -450,7 +449,7 @@ public function calculateHangulDay(): void $this->addHoliday(new Holiday( 'hangulDay', ['en' => 'Hangul Day', 'ko' => '한글날'], - new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 76a6313f1..52a5cd2a0 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -13,7 +13,6 @@ namespace Yasumi\Provider; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -87,7 +86,7 @@ private function calculateNationalDay(): void 'ca' => 'Festa Nacional d’Espanya', 'es' => 'Fiesta Nacional de España', ], - new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -116,7 +115,7 @@ private function calculateConstitutionDay(): void 'ca' => 'Dia de la Constitució', 'es' => 'Día de la Constitución', ], - new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)), + new DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index fc10f7287..e26a01b6c 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -79,7 +79,7 @@ private function calculateAndalusiaDay(): void $this->addHoliday(new Holiday( 'andalusiaDay', ['es' => 'Día de Andalucía'], - new DateTime("$this->year-2-28", new DateTimeZone($this->timezone)), + new DateTime("$this->year-2-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index a8b81295f..808120363 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -81,7 +81,7 @@ private function calculateAsturiasDay(): void $this->addHoliday(new Holiday( 'asturiasDay', ['es' => 'Día de Asturias'], - new DateTime("$this->year-9-8", new DateTimeZone($this->timezone)), + new DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 93c62e542..86174102d 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -84,7 +84,7 @@ private function calculateBalearicIslandsDay(): void 'ca' => 'Diada de les Illes Balears', 'es' => 'Día de les Illes Balears', ], - new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), + new DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 63f1d025f..e1ca2de98 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -81,7 +81,7 @@ private function calculateBasqueCountryDay(): void $this->addHoliday(new Holiday( 'basqueCountryDay', ['es' => 'Euskadi Eguna'], - new DateTime("$this->year-10-25", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index f49b76087..f58982e21 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -80,7 +80,7 @@ private function calculateCanaryIslandsDay(): void $this->addHoliday(new Holiday( 'canaryIslandsDay', ['es' => 'Día de las Canarias'], - new DateTime("$this->year-5-30", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 9a9035b71..3800303f5 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -84,7 +84,7 @@ private function calculateCantabriaDay(): void $this->addHoliday(new Holiday( 'cantabriaDay', ['es' => 'Día de Cantabria'], - new DateTime("second sunday of august $this->year", new DateTimeZone($this->timezone)), + new DateTime("second sunday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 80fd3408d..86bbb21b3 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -14,11 +14,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -81,7 +81,7 @@ private function calculateCastileAndLeonDay(): void $this->addHoliday(new Holiday( 'castileAndLeonDay', ['es' => 'Día de Castilla y León'], - new DateTime("$this->year-4-23", new DateTimeZone($this->timezone)), + new DateTime("$this->year-4-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index ef2a21277..9e2d41864 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -14,11 +14,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -84,7 +84,7 @@ private function calculateCastillaLaManchaDay(): void $this->addHoliday(new Holiday( 'castillaLaManchaDay', ['es' => 'Día de la Región Castilla-La Mancha'], - new DateTime("$this->year-5-31", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index 0a30868bc..406a6610f 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -87,7 +87,7 @@ private function calculateNationalDayOfCatalonia(): void 'ca' => 'Diada Nacional de Catalunya', 'es' => 'Diada Nacional de Cataluña', ], - new DateTime("$this->year-9-11", new DateTimeZone($this->timezone)), + new DateTime("$this->year-9-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 199bbfd8c..4c82f9cd0 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -78,7 +78,7 @@ private function calculateDayOfCeuta(): void $this->addHoliday(new Holiday( 'ceutaDay', ['es' => 'Día de Ceuta'], - new DateTime("$this->year-9-2", new DateTimeZone($this->timezone)), + new DateTime("$this->year-9-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index a583943eb..cd2c10cd5 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -84,7 +84,7 @@ private function calculateDosdeMayoUprisingDay(): void $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', ['es' => 'Fiesta de la Comunidad de Madrid'], - new DateTime("$this->year-5-2", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index cf3d0dab7..2f55b36a1 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -81,7 +81,7 @@ private function calculateDayOfExtremadura(): void $this->addHoliday(new Holiday( 'extremaduraDay', ['es' => 'Día de Extremadura'], - new DateTime("$this->year-9-8", new DateTimeZone($this->timezone)), + new DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index ef5563516..6336ecbd5 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -82,7 +82,7 @@ private function calculateGalicianLiteratureDay(): void $this->addHoliday(new Holiday('galicianLiteratureDay', [ '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)); + ], new DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -109,7 +109,7 @@ private function calculateStJamesDay(): void if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ 'es' => 'Santiago Apostol', - ], new DateTime("$this->year-7-25", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-7-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 1082f1e79..0073fa266 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -77,7 +77,7 @@ private function calculateLaRiojaDay(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ 'es' => 'Día de La Rioja', - ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index fa3938049..ff3de625d 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -78,7 +78,7 @@ private function calculateDayOfMurcia(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ 'es' => 'Día de la Región de Murcia', - ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index f886a019b..9583427f5 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Spain; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Spain; /** @@ -89,7 +89,7 @@ private function calculateValencianCommunityDay(): void 'ca' => 'Diada Nacional del País Valencià', 'es' => 'Día de la Comunidad Valenciana', ], - new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), + new DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 89f4abe01..67bac72a9 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -90,7 +89,7 @@ public function calculateEpiphanyEve(): void $this->addHoliday(new Holiday( 'epiphanyEve', [], - new DateTime("$this->year-1-5", new DateTimeZone($this->timezone)), + new DateTime("$this->year-1-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -118,7 +117,7 @@ public function calculateWalpurgisEve(): void $this->addHoliday(new Holiday( 'walpurgisEve', [], - new DateTime("$this->year-4-30", new DateTimeZone($this->timezone)), + new DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -145,7 +144,7 @@ public function calculateWalpurgisEve(): void */ private function calculateStJohnsHolidays(): void { - $date = new DateTime("$this->year-6-20 this saturday", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'stJohnsDay', [], @@ -186,7 +185,7 @@ private function calculateStJohnsHolidays(): void */ private function calculateAllSaintsHolidays(): void { - $date = new DateTime("$this->year-10-31 this saturday", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'allSaintsDay', [], @@ -234,7 +233,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', ['sv' => $holidayName], - new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), + new DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index 011d9bada..3ee6d4e3b 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -75,7 +74,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new DateTime($this->year . '-08-01', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -83,7 +82,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new DateTime($this->year . '-08-01', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -113,7 +112,7 @@ public function calculateBerchtoldsTag(): void 'fr' => 'Jour de la Saint-Berthold', 'en' => 'Berchtoldstag', ], - new DateTime($this->year . '-01-02', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -138,7 +137,7 @@ public function calculateBettagsMontag(): void { if ($this->year >= 1832) { // Find third Sunday of September - $date = new DateTime('Third Sunday of ' . $this->year . '-09', new DateTimeZone($this->timezone)); + $date = new DateTime('Third Sunday of ' . $this->year . '-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday $date->add(new DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index a82112c3b..2896476a0 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -14,11 +14,11 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** @@ -81,7 +81,7 @@ private function calculateJeuneGenevois(): void } // Find first Sunday of September - $date = new DateTime('First Sunday of ' . $this->year . '-09', new DateTimeZone($this->timezone)); + $date = new DateTime('First Sunday of ' . $this->year . '-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday $date->add(new DateInterval('P4D')); @@ -118,7 +118,7 @@ private function calculateRestaurationGenevoise(): void [ 'fr' => 'Restauration de la République', ], - new DateTime($this->year . '-12-31', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 310729a68..3d9c029aa 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Switzerland; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** @@ -77,7 +77,7 @@ public function initialize(): void private function calculateNafelserFahrt(): void { if ($this->year >= 1389) { - $date = new DateTime('First Thursday of ' . $this->year . '-04', new DateTimeZone($this->timezone)); + $date = new DateTime('First Thursday of ' . $this->year . '-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ 'de' => 'Näfelser Fahrt', ], $date, $this->locale, Holiday::TYPE_OTHER)); diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index 6d86ea258..1d5501312 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Switzerland; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** @@ -85,7 +85,7 @@ private function calculatePlebisciteJurassien(): void [ 'fr' => 'Commémoration du plébiscite jurassien', ], - new DateTime($this->year . '-06-23', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 2ae9e936d..39eda16bf 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Switzerland; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** @@ -83,7 +83,7 @@ private function calculateInstaurationRepublique(): void [ 'fr' => 'Instauration de la République', ], - new DateTime($this->year . '-03-01', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index 4c74f8f8c..36ea0c270 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Switzerland; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** @@ -87,7 +87,7 @@ private function calculateBruderKlausenFest(): void [ 'de' => 'Bruder-Klausen-Fest', ], - new DateTime($this->year . '-09-25', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -97,7 +97,7 @@ private function calculateBruderKlausenFest(): void [ 'de' => 'Bruder-Klausen-Fest', ], - new DateTime($this->year . '-09-21', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 426780034..9b885dac4 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -13,11 +13,11 @@ namespace Yasumi\Provider\Switzerland; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** @@ -94,7 +94,7 @@ private function calculateStPeterPaul(): void 'fr' => 'Solennité des saints Pierre et Paul', 'de' => 'St. Peter und Paul', ], - new DateTime($this->year . '-06-29', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 4f9f971f6..3cf5d4a88 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -79,7 +78,7 @@ private function calculateMartinLutherKingday(): void if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ 'en' => 'Dr. Martin Luther King Jr’s Birthday', - ], new DateTime("third monday of january $this->year", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("third monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -101,9 +100,9 @@ private function calculateMartinLutherKingday(): void private function calculateWashingtonsBirthday(): void { if ($this->year >= 1879) { - $date = new DateTime("$this->year-2-22", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1968) { - $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ 'en' => 'Washington’s Birthday', @@ -126,9 +125,9 @@ private function calculateWashingtonsBirthday(): void private function calculateMemorialDay(): void { if ($this->year >= 1865) { - $date = new DateTime("$this->year-5-30", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1968) { - $date = new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ 'en' => 'Memorial Day', @@ -153,7 +152,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - ], new DateTime("$this->year-7-4", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-7-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -175,7 +174,7 @@ private function calculateLabourDay(): void [ 'en' => 'Labour Day', ], - new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), + new DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -197,9 +196,9 @@ private function calculateLabourDay(): void private function calculateColumbusDay(): void { if ($this->year >= 1937) { - $date = new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)); + $date = new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1970) { - $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); + $date = new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ 'en' => 'Columbus Day', @@ -225,7 +224,7 @@ private function calculateVeteransDay(): void $this->addHoliday(new Holiday('veteransDay', [ 'en' => $name, - ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); + ], new DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -249,7 +248,7 @@ private function calculateThanksgivingDay(): void [ 'en' => 'Thanksgiving Day', ], - new DateTime("fourth thursday of november $this->year", new DateTimeZone($this->timezone)), + new DateTime("fourth thursday of november $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index e3a481784..0c89fd675 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -87,7 +86,7 @@ protected function calculateNewYearsDay(): void $type = Holiday::TYPE_OBSERVANCE; } - $newYearsDay = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); + $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); // If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) if (\in_array((int)$newYearsDay->format('w'), [0, 6], true)) { @@ -126,7 +125,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en' => 'May Day Bank Holiday'], - new DateTime("$this->year-5-8", new DateTimeZone($this->timezone)), + new DateTime("$this->year-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -137,7 +136,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en' => 'May Day Bank Holiday'], - new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)), + new DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -172,7 +171,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new DateTime("$this->year-6-4", new DateTimeZone($this->timezone)), + new DateTime("$this->year-6-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -183,7 +182,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)), + new DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -215,7 +214,7 @@ protected function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'August Bank Holiday'], - new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -230,7 +229,7 @@ protected function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'Summer Bank Holiday'], - new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), + new DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -241,7 +240,7 @@ protected function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'Summer Bank Holiday'], - new DateTime("last monday of august $this->year", new DateTimeZone($this->timezone)), + new DateTime("last monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index 6575b016f..43f35b7e4 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -13,10 +13,10 @@ namespace Yasumi\Provider\UnitedKingdom; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\UnitedKingdom; use Yasumi\SubstituteHoliday; @@ -79,7 +79,7 @@ private function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day'], - new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -125,7 +125,7 @@ private function calculateBattleOfTheBoyne(): void $holiday = new Holiday( 'battleOfTheBoyne', ['en' => 'Battle of the Boyne'], - new DateTime($this->year . '-7-12', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index ee25a7ac4..ebcb5435e 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -14,10 +14,10 @@ use DateInterval; use DateTime; -use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\UnitedKingdom; use Yasumi\SubstituteHoliday; @@ -99,7 +99,7 @@ protected function calculateNewYearsHolidays(): void $secondNewYearsDay = new Holiday( 'secondNewYearsDay', [], - new DateTime("$this->year-1-2", new DateTimeZone($this->timezone)), + new DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, $type ); @@ -153,7 +153,7 @@ protected function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'August Bank Holiday'], - new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -180,7 +180,7 @@ private function calculateStAndrewsDay(): void $holiday = new Holiday( 'stAndrewsDay', [], - new DateTime($this->year . '-11-30', new DateTimeZone($this->timezone)), + new DateTime($this->year . '-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); From 2c2d87d4f935237cb5e0063eacfcdcb736a948c0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 29 Apr 2020 20:04:42 +0900 Subject: [PATCH 059/687] Removed unnecessary namespace. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Luxembourg.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 8c08b34f9..c1342f547 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -25,9 +25,9 @@ class Luxembourg extends AbstractProvider /** * Initialize holidays for Luxembourg. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void From 20d2d48e5413dacd1b1dfd817928f168e6afe3b2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 29 Apr 2020 20:05:10 +0900 Subject: [PATCH 060/687] Stricter type check. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Croatia.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 21b68f5f7..36e695329 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -111,7 +111,7 @@ private function calculateHomelandThanksgivingDay(): void $names['hr'] = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; } - if ($names != null) { + if ($names !== null) { $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, From 6c6307e60475ac687cf2464203882741ad36de8a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 29 Apr 2020 20:06:58 +0900 Subject: [PATCH 061/687] Removed unnecessary pass by reference. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/AbstractFilter.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index b3e55c582..747913458 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -33,7 +33,7 @@ abstract class AbstractFilter extends FilterIterator implements Countable */ public function count(): int { - $names = \array_map(static function (&$holiday) { + $names = \array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { return $holiday->substitutedHoliday->shortName; } diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 3455bca25..618c0009c 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -313,7 +313,7 @@ public function whatWeekDayIs(string $shortName): int */ public function count(): int { - $names = \array_map(static function (&$holiday) { + $names = \array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { return $holiday->substitutedHoliday->shortName; } From 889f1e110250b3dfe82892d2d2e332886657d3ff Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 29 Apr 2020 20:49:26 +0900 Subject: [PATCH 062/687] Reorganized latest changes. Fixed various grammar errors, typos, etc. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 66 ++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a6dd65c2..827241ea3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,42 +4,46 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] -- Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) ### Added - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) +- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) -- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) +- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) +- Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). + - Added missing return (correct) and parameter types in various methods. -- Day of Liberation (Tag der Befreiung) is an one-time official holiday in 2020 in Berlin (Germany). -- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) ### Changed +- Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Second International Workers Day was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) -- Changed fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) +- Changed the fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) + +- Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated DateTimezone, thus saving resources. [\#213](https://github.com/azuyalabs/yasumi/pull/213) ([pvgnd](https://github.com/pvgn)) - Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) - Explicitly set nullable parameters as such. - Refactored various conditional structures. - Changed signature of some methods as parameters with defaults should come after required parameters. - Updated third party dependencies. -- Second International Workers Day was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) ### Fixed +- Fixed Ukraine holidays on weekends. These days need to be substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) -- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) - Fix locale fallback for substitute holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) +- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) + - Fixed compound conditions that are always true by simplifying the condition steps. -- Fixed Ukraine holidays on weekends. These days need to be substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) ### Removed - PHP 7.1 Support, as it has reached its end of life. - Removed the assertion of the instance type in some functions as it is already defined by the return type. -- Removed unused variables, brackets, empty tests, etc. +- Removed unused variables, namespaces, brackets, empty tests, etc. ## [2.2.0] - 2019-10-06 @@ -51,7 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) +- Created a 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. @@ -68,7 +72,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) +- Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider is 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)) @@ -90,7 +94,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [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)) +- As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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 @@ -100,13 +104,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) +- "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). +- 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)) @@ -130,7 +134,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports Day. [\#113](https://github.com/azuyalabs/yasumi/pull/113) ([cookie-maker](https://github.com/cookie-maker)) - Summer/winter time is now fetched from PHP's tz database. [\#103](https://github.com/azuyalabs/yasumi/pull/103) ([c960657](https://github.com/c960657)) - Changed translation for Norway's national day. [\#98](https://github.com/azuyalabs/yasumi/pull/98) ([c960657](https://github.com/c960657)) -- Applied proper null checks in the summertime and wintertime calculations for Denmark and The Netherlands. +- Applied proper null checks in the summer time and wintertime calculations for Denmark and The Netherlands. - Corrected some namespaces for Australia and Germany. - Updated copyright year. - Upgraded various dependency packages. @@ -140,7 +144,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed - Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place. -- Fixed issue for summertime in Denmark in 1980. By default summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th. +- Fixed issue for summer time in Denmark in 1980. By default summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th. - Fixed spelling issue in the Swedish translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) - Fixed spelling issues in the Danish translation. [\#96](https://github.com/azuyalabs/yasumi/pull/96) ([c960657](https://github.com/c960657)) - Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg). [\#100](https://github.com/azuyalabs/yasumi/pull/100) ([TalonTR](https://github.com/TalonTR)) @@ -169,7 +173,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Removed unnecessary NULL checks. ### Fixed -- Fixed Brazilian Carnaval Day and added Ash Wednesday to Brazilian Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) +- Fixed Brazilian Carnival Day and added Ash Wednesday to Brazilian Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) - Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix made that recognizes Easter Sunday as being observed (in all regions). [\#86](https://github.com/azuyalabs/yasumi/pull/86) ([Bastian Konetzny](https://github.com/bkonetzny)) - Corrected reference to the Holiday Provider's ID to be static. - Changed weekend data property into constant as it is not dynamic (runtime). @@ -193,7 +197,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Changed - Made `calculate` method public and use of proper camel casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) - Upgraded Faker Library to version 1.7 -- Renamed the holiday type NATIONAL to OFFICIAL. Subregions may have official holidays and the name NATIONAL doesn't suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) +- Renamed the holiday type NATIONAL to OFFICIAL. Sub regions may have official holidays, and the name NATIONAL doesn't suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) - Upgraded PHP-CS-Fixer to version 2.6 ### Fixed @@ -259,7 +263,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - To determine a set of holidays between two dates you can now use the aptly named 'between()' method. ### Changed -- All Holiday Provider must now implement a code that will identify it. Typically this is the ISO3166 code +- All Holiday Provider must now implement a code that will identify it. Typically, this is the ISO3166 code corresponding to the respective country or sub-region. This can help for purposes such as translations or interfacing with other API's for example. @@ -295,16 +299,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this holidays have been removed from the France Holiday providers and new providers for the departments Moselle, Bas-Rhin and Haut-Rhin are added. [\#17](https://github.com/azuyalabs/yasumi/issues/17) ([R2c](https://github.com/R2c)) - Updated locales list based on CLDR version 29. Removed locales of which the region identifier is not specified. -- Fixed issue for Sweden as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However the +- Fixed issue for Sweden as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, the holiday has always been celebrated on a Saturday (between June 20 and June 26). - Fixed base test for some Spain/LaRioja as some holidays have been established only in a particular year, causing false failures in the unit tests. - Running php-cs-fixer fix . --level=psr2 generated a massive list of changes, and broke unit tests. Added a custom - .php_cs config file to adhere to the PSR-2 Coding Standards and resolve this issue. In addition the php-cs-fixer - command to has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be + .php_cs config file to adhere to the PSR-2 Coding Standards and resolve this issue. In addition, the php-cs-fixer + command has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be PSR2 compliant before they can be merged. If any files do not pass, the build fails. [\#15](https://github.com/azuyalabs/yasumi/issues/15) [\#16](https://github.com/azuyalabs/yasumi/pull/16) ([badams](https://github.com/badams)) - Accidentally the timezone for Norway was set to "Europe/Copenhagen". This has been corrected to "Europe/Oslo". [\#11](https://github.com/azuyalabs/yasumi/issues/11) [\#12](https://github.com/azuyalabs/yasumi/pull/12) ([badams](https://github.com/badams)) -- Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However since +- Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, since 1955, the holiday has always been celebrated on a Saturday (between June 20 and June 26). @@ -315,7 +319,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Holiday Provider for Sweden - Added Holiday Provider for Finland - New function 'isWorkingDay' added that determines whether a date represents a working day or not. A working day is - considered a date that is neither a holiday nor falls into the weekend. + a date that is neither a holiday nor falls into the weekend. ### Changed - Refactoring and cleanup of unit tests @@ -335,8 +339,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Corpus Christi, St. Joseph's Day, Maundy Thursday, St. George's Day, St. John's Day to the common Christian Holidays. - Created separate tests for holidays that are substituted on different days. -- Allow for name spaced holiday providers. -- Added test for translation of Ash Wednesday and Valentinesday in the Netherlands. +- Allow for namespaced holiday providers. +- Added test for translation of Ash Wednesday and Valentines day in the Netherlands. - Added test to check whether all holidays for a Holiday Provider are defined by the respective provider class. ### Changed @@ -347,8 +351,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - For Japan substituted holidays had same date as the original holidays. ### Removed -- Removed support for PHP 5.4. Minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still allowed - to fail +- Removed support for PHP 5.4. The minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still allowed + to fail. ## [1.0.0] - 2015-04-21 From 8d6e103ae5f4504a472c4c5662cdd119809ad4a4 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Wed, 29 Apr 2020 15:32:48 +0200 Subject: [PATCH 063/687] Add substituted holidays for Australia (#201) --- CHANGELOG.md | 2 +- src/Yasumi/Provider/Australia.php | 152 ++++++++++++------ src/Yasumi/Provider/Australia/ACT.php | 10 +- src/Yasumi/Provider/Australia/NSW.php | 19 ++- src/Yasumi/Provider/Australia/NT.php | 20 +-- src/Yasumi/Provider/Australia/Queensland.php | 10 +- src/Yasumi/Provider/Australia/SA.php | 76 +++++++-- src/Yasumi/Provider/Australia/Tasmania.php | 20 +-- .../Australia/Tasmania/KingIsland.php | 11 +- .../Australia/Tasmania/South/Southeast.php | 11 +- src/Yasumi/Provider/Australia/Victoria.php | 10 +- src/Yasumi/Provider/Australia/WA.php | 20 +-- tests/Australia/AustraliaDayTest.php | 66 ++++++-- tests/YasumiBase.php | 70 ++++++-- 14 files changed, 334 insertions(+), 163 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 827241ea3..ee3516d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) - Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). - - Added missing return (correct) and parameter types in various methods. +- Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) ### Changed - Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 8760dc629..2c7b0119d 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -14,9 +14,9 @@ use DateInterval; use DateTime; -use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in Australia. @@ -69,51 +69,38 @@ public function initialize(): void */ private function calculateNewYearHolidays(): void { - $newyearsday = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $this->calculateHoliday('newYearsDay', $newyearsday, [], false, false); - switch ($newyearsday->format('w')) { + $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $this->addHoliday(new Holiday( + 'newYearsDay', + [], + $newYearsDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); + switch ($newYearsDay->format('w')) { case 0: // sunday - $newyearsday->add(new DateInterval('P1D')); - $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year’s Holiday'], false, false); + $newYearsDay->add(new DateInterval('P1D')); + $this->addHoliday(new Holiday( + 'newYearsHoliday', + ['en' => 'New Year’s Holiday'], + $newYearsDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; case 6: // saturday - $newyearsday->add(new DateInterval('P2D')); - $this->calculateHoliday('newYearsHoliday', $newyearsday, ['en' => 'New Year’s Holiday'], false, false); + $newYearsDay->add(new DateInterval('P2D')); + $this->addHoliday(new Holiday( + 'newYearsHoliday', + ['en' => 'New Year’s Holiday'], + $newYearsDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; } } - /** - * Function to simplify moving holidays to mondays if required - * - * @param string $shortName - * @param DateTime $date - * @param array $names - * @param bool $moveFromSaturday - * @param bool $moveFromSunday - * @param string $type - * - * @throws InvalidDateException - * @throws \InvalidArgumentException - * @throws UnknownLocaleException - * @throws \Exception - */ - public function calculateHoliday( - string $shortName, - DateTime $date, - array $names = [], - ?bool $moveFromSaturday = null, - ?bool $moveFromSunday = null, - ?string $type = null - ): void { - $day = (int)$date->format('w'); - 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 ?? Holiday::TYPE_OFFICIAL)); - } - /** * Australia Day. * @@ -136,7 +123,27 @@ private function calculateAustraliaDay(): void { $date = new DateTime("$this->year-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $this->calculateHoliday('australiaDay', $date, ['en' => 'Australia Day']); + $holiday = new Holiday( + 'australiaDay', + ['en' => 'Australia Day'], + $date, + $this->locale, + Holiday::TYPE_OFFICIAL + ); + $this->addHoliday($holiday); + + $day = (int)$date->format('w'); + if (0 === $day || 6 === $day) { + $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P2D')); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } } /** @@ -162,7 +169,13 @@ private function calculateAnzacDay(): void } $date = new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $this->calculateHoliday('anzacDay', $date, [], false, false); + $this->addHoliday(new Holiday( + 'anzacDay', + [], + $date, + $this->locale, + Holiday::TYPE_OFFICIAL + )); $easter = $this->calculateEaster($this->year, $this->timezone); $easterMonday = $this->calculateEaster($this->year, $this->timezone); @@ -171,9 +184,14 @@ 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', $easterMonday, ['en' => 'Easter Tuesday'], false, false); + $this->addHoliday(new Holiday( + 'easterTuesday', + ['en' => 'Easter Tuesday'], + $easterMonday, + $this->locale, + Holiday::TYPE_OFFICIAL + )); } - unset($fDate); } /** @@ -192,23 +210,59 @@ private function calculateChristmasDay(): void { $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', $christmasDay, [], false, false); - $this->calculateHoliday('secondChristmasDay', $boxingDay, [], false, false); + $this->addHoliday(new Holiday( + 'christmasDay', + [], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); + $this->addHoliday(new Holiday( + 'secondChristmasDay', + [], + $boxingDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); + $this->addHoliday(new Holiday( + 'christmasHoliday', + ['en' => 'Christmas Holiday'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; case 5: // friday $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('secondChristmasHoliday', $boxingDay, ['en' => 'Boxing Day Holiday'], false, false); + $this->addHoliday(new Holiday( + 'secondChristmasHoliday', + ['en' => 'Boxing Day Holiday'], + $boxingDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); - $this->calculateHoliday('secondChristmasHoliday', $boxingDay, ['en' => 'Boxing Day Holiday'], false, false); + $this->addHoliday(new Holiday( + 'christmasHoliday', + ['en' => 'Christmas Holiday'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); + $this->addHoliday(new Holiday( + 'secondChristmasHoliday', + ['en' => 'Boxing Day Holiday'], + $boxingDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; } } diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 8566794a4..8fe38d906 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -141,13 +141,13 @@ private function easterSaturday( */ private function calculateQueensBirthday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index 8ee2b06f8..9e7b37984 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -104,13 +104,13 @@ private function easterSaturday( */ private function calculateQueensBirthday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** @@ -133,13 +133,12 @@ private function calculateLabourDay(): void */ private function calculateBankHoliday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'bankHoliday', - new DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Bank Holiday'], - false, - false, + new DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, Holiday::TYPE_BANK - ); + )); } } diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 2953fdfce..9ced7b4f9 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -103,13 +103,13 @@ private function easterSaturday( */ private function calculateQueensBirthday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** @@ -134,12 +134,12 @@ private function calculateMayDay(): void */ private function calculatePicnicDay(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'picnicDay', - new DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Picnic Day'], - false, - false - ); + new DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index bf94ea364..61390df86 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -70,13 +70,13 @@ private function calculateQueensBirthday(): void $birthDay = 'second monday of june ' . $this->year; } - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 0df4ba8ac..9af05b5b4 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -111,13 +111,13 @@ private function easterSaturday( */ private function calculateQueensBirthday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** @@ -149,13 +149,13 @@ private function calculateAdelaideCupDay(): void $cupDay = 'third monday of may ' . $this->year; } - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'adelaideCup', - new DateTime($cupDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Adelaide Cup'], - false, - false - ); + new DateTime($cupDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } @@ -167,27 +167,69 @@ private function calculateAdelaideCupDay(): void private function calculateProclamationDay(): void { $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', $christmasDay, [], false, false); + $this->addHoliday(new Holiday( + 'christmasDay', + [], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); + $this->addHoliday(new Holiday( + 'christmasHoliday', + ['en' => 'Christmas Holiday'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); + $this->addHoliday(new Holiday( + 'proclamationDay', + ['en' => 'Proclamation Day'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; case 5: // friday $proclamationDay = $christmasDay->add(new DateInterval('P3D')); - $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); + $this->addHoliday(new Holiday( + 'proclamationDay', + ['en' => 'Proclamation Day'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', $christmasDay, ['en' => 'Christmas Holiday'], false, false); + $this->addHoliday(new Holiday( + 'christmasHoliday', + ['en' => 'Christmas Holiday'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); + $this->addHoliday(new Holiday( + 'proclamationDay', + ['en' => 'Proclamation Day'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; default: // monday-thursday $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', $proclamationDay, ['en' => 'Proclamation Day'], false, false); + $this->addHoliday(new Holiday( + 'proclamationDay', + ['en' => 'Proclamation Day'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); break; } } diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 9da36a0f2..8e959d089 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -77,13 +77,13 @@ private function calculateEightHoursDay(): void */ private function calculateQueensBirthday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** @@ -96,12 +96,12 @@ private function calculateQueensBirthday(): void */ private function calculateRecreationDay(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'recreationDay', - new DateTime('first monday of november ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Recreation Day'], - false, - false - ); + new DateTime('first monday of november ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index 59772daf6..135935f9b 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -14,6 +14,7 @@ use DateTime; use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; use Yasumi\Provider\DateTimeZoneFactory; @@ -51,12 +52,12 @@ public function initialize(): void */ private function calculateKingIslandShow(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'kingIslandShow', - new DateTime('first tuesday of march ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'King Island Show'], - false, - false - ); + new DateTime('first tuesday of march ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index 2887ad2ae..1fd234cd1 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 Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania\South; use Yasumi\Provider\DateTimeZoneFactory; @@ -54,12 +55,12 @@ public function initialize(): void */ private function calculateHobartRegatta(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'hobartRegatta', - new DateTime('second monday of february ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Royal Hobart Regatta'], - false, - false - ); + new DateTime('second monday of february ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 50eb34216..9b77d3a38 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -153,13 +153,13 @@ private function calculateLabourDay(): void */ private function calculateQueensBirthday(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index f0e6dceb6..18f6c3533 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -74,13 +74,13 @@ private function calculateQueensBirthday(): void $birthDay = '2012-10-01'; } - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'queensBirthday', - new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), [], - false, - false - ); + new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } /** @@ -105,12 +105,12 @@ private function calculateLabourDay(): void */ private function calculateWesternAustraliaDay(): void { - $this->calculateHoliday( + $this->addHoliday(new Holiday( 'westernAustraliaDay', - new DateTime('first monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), ['en' => 'Western Australia Day'], - false, - false - ); + new DateTime('first monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 7c9da1fd3..158df0e3d 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -30,7 +30,7 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn public const HOLIDAY = 'australiaDay'; /** - * Tests Australia Day + * Tests the holiday defined in this test. * * @dataProvider HolidayDataProvider * @@ -38,16 +38,39 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * @param DateTime $expected the expected date * * @throws ReflectionException - * @throws Exception */ public function testHoliday($year, $expected) { - $this->assertHoliday( - $this->region, - self::HOLIDAY, - $year, - new DateTime($expected, new DateTimeZone($this->timezone)) - ); + $this->assertHoliday($this->region, self::HOLIDAY, $year, $expected); + } + + /** + * Tests Australia Day + * + * @dataProvider SubstituteHolidayDataProvider + * + * @param 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 testSubstituteHoliday($year, $expected) + { + if ($expected) { + $this->assertSubstituteHoliday( + $this->region, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone($this->timezone)) + ); + } else { + $this->assertNotSubstituteHoliday( + $this->region, + self::HOLIDAY, + $year + ); + } } @@ -75,22 +98,33 @@ public function testHolidayType(): void } /** - * Returns a list of test dates + * 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, 26, $this->timezone); + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + */ + public function SubstituteHolidayDataProvider(): array { return [ - [2010, '2010-01-26'], - [2011, '2011-01-26'], - [2012, '2012-01-26'], + [2010, null], + [2011, null], + [2012, null], [2013, '2013-01-28'], [2014, '2014-01-27'], - [2015, '2015-01-26'], - [2016, '2016-01-26'], - [2017, '2017-01-26'], - [2018, '2018-01-26'], + [2015, null], + [2016, null], + [2017, null], + [2018, null], [2019, '2019-01-28'], [2020, '2020-01-27'], ]; diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 3d4ea703c..c6847b837 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -30,6 +30,7 @@ use Yasumi\Filters\OtherHolidaysFilter; use Yasumi\Filters\SeasonalHolidaysFilter; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; use Yasumi\Yasumi; /** @@ -84,8 +85,6 @@ public function assertDefinedHolidays( foreach ($expectedHolidays as $holiday) { $this->assertArrayHasKey($holiday, \iterator_to_array($holidays)); } - - unset($holidays); } /** @@ -113,11 +112,8 @@ public function assertHoliday( $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); $this->assertEquals($expected, $holiday); $this->assertTrue($holidays->isHoliday($holiday)); - - unset($holiday, $holidays); } /** @@ -143,8 +139,61 @@ public function assertNotHoliday( $holiday = $holidays->getHoliday($shortName); $this->assertNull($holiday); + } + + /** + * Asserts that the expected date is indeed a substitute 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 substituted holiday to be checked against + * @param int $year holiday calendar year + * @param DateTime $expected the date to be checked against + * + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws AssertionFailedError + * @throws ReflectionException + */ + public function assertSubstituteHoliday( + string $provider, + string $shortName, + int $year, + DateTime $expected + ): void { + $holidays = Yasumi::create($provider, $year); + $holiday = $holidays->getHoliday('substituteHoliday:' . $shortName); - unset($holiday, $holidays); + $this->assertInstanceOf(SubstituteHoliday::class, $holiday); + $this->assertEquals($expected, $holiday); + $this->assertTrue($holidays->isHoliday($holiday)); + } + + /** + * Asserts that the given substitute 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 $shortName the short name of the substituted holiday to be checked against + * @param int $year holiday calendar year + * + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws AssertionFailedError + * @throws ReflectionException + */ + public function assertNotSubstituteHoliday( + string $provider, + string $shortName, + int $year + ): void { + $this->assertNotHoliday( + $provider, + 'substituteHoliday:' . $shortName, + $year + ); } /** @@ -171,7 +220,6 @@ public function assertTranslatedHolidayName( $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); $this->assertTrue($holidays->isHoliday($holiday)); if (\is_array($translations) && !empty($translations)) { @@ -194,8 +242,6 @@ public function assertTranslatedHolidayName( $this->assertEquals($name, $translation); } } - - unset($holiday, $holidays); } /** @@ -222,10 +268,7 @@ public function assertHolidayType( $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); $this->assertEquals($type, $holiday->getType()); - - unset($holiday, $holidays); } /** @@ -253,11 +296,8 @@ public function assertDayOfWeek( $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); $this->assertTrue($holidays->isHoliday($holiday)); $this->assertEquals($expectedDayOfWeek, $holiday->format('l')); - - unset($holiday, $holidays); } /** From 40c78fe13c7121dbaa091b8c787265e9d76df58b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 1 May 2020 09:48:13 +0900 Subject: [PATCH 064/687] Change names of Australian States (#214) --- ...ACT.php => AustralianCapitalTerritory.php} | 2 +- .../Australia/{NSW.php => NewSouthWales.php} | 2 +- .../{NT.php => NorthernTerritory.php} | 2 +- .../Australia/{SA.php => SouthAustralia.php} | 2 +- .../{WA.php => WesternAustralia.php} | 2 +- .../AnzacDayTest.php | 20 +++++++++++++++++++ .../AustraliaDayTest.php | 20 +++++++++++++++++++ ...ustralianCapitalTerritoryBaseTestCase.php} | 8 ++++---- .../AustralianCapitalTerritoryTest.php} | 8 ++++---- .../BoxingDayTest.php | 4 ++-- .../CanberraDayTest.php | 6 +++--- .../ChristmasDayTest.php | 4 ++-- .../EasterMondayTest.php | 20 +++++++++++++++++++ .../EasterSaturdayTest.php | 6 +++--- .../EasterSundayTest.php | 6 +++--- .../GoodFridayTest.php | 20 +++++++++++++++++++ .../LabourDayTest.php | 6 +++--- .../NewYearsDayTest.php | 20 +++++++++++++++++++ .../QueensBirthdayTest.php | 6 +++--- .../ReconciliationDayTest.php | 6 +++--- .../{NSW => NewSouthWales}/AnzacDayTest.php | 4 ++-- .../AustraliaDayTest.php | 4 ++-- .../BankHolidayTest.php | 6 +++--- .../{NSW => NewSouthWales}/BoxingDayTest.php | 4 ++-- .../ChristmasDayTest.php | 4 ++-- .../EasterMondayTest.php | 4 ++-- .../EasterSaturdayTest.php | 6 +++--- .../EasterSundayTest.php | 6 +++--- .../{ACT => NewSouthWales}/GoodFridayTest.php | 4 ++-- .../{ACT => NewSouthWales}/LabourDayTest.php | 6 +++--- .../NewSouthWalesBaseTestCase.php} | 8 ++++---- .../NewSouthWalesTest.php} | 10 +++++----- .../NewYearsDayTest.php | 4 ++-- .../QueensBirthdayTest.php | 6 +++--- .../AnzacDayTest.php | 4 ++-- .../AustraliaDayTest.php | 4 ++-- .../BoxingDayTest.php | 4 ++-- .../ChristmasDayTest.php | 4 ++-- .../EasterMondayTest.php | 4 ++-- .../EasterSaturdayTest.php | 6 +++--- .../GoodFridayTest.php | 4 ++-- .../{NT => NorthernTerritory}/MayDayTest.php | 6 +++--- .../NewYearsDayTest.php | 4 ++-- .../NorthernTerritoryBaseTestCase.php} | 8 ++++---- .../NorthernTerritoryTest.php} | 8 ++++---- .../PicnicDayTest.php | 6 +++--- .../QueensBirthdayTest.php | 6 +++--- .../AdelaideCupDayTest.php | 6 +++--- .../{ACT => SouthAustralia}/AnzacDayTest.php | 4 ++-- .../AustraliaDayTest.php | 4 ++-- .../ChristmasDayTest.php | 4 ++-- .../EasterMondayTest.php | 4 ++-- .../EasterSaturdayTest.php | 6 +++--- .../GoodFridayTest.php | 4 ++-- .../{NSW => SouthAustralia}/LabourDayTest.php | 6 +++--- .../NewYearsDayTest.php | 4 ++-- .../ProclamationDayTest.php | 6 +++--- .../QueensBirthdayTest.php | 6 +++--- .../SouthAustraliaBaseTestCase.php} | 6 +++--- .../SouthAustraliaTest.php} | 8 ++++---- tests/Australia/WA/AnzacDayTest.php | 20 ------------------- tests/Australia/WA/AustraliaDayTest.php | 20 ------------------- tests/Australia/WA/EasterMondayTest.php | 20 ------------------- tests/Australia/WA/GoodFridayTest.php | 20 ------------------- tests/Australia/WA/NewYearsDayTest.php | 20 ------------------- .../{NT => WesternAustralia}/AnzacDayTest.php | 4 ++-- .../AustraliaDayTest.php | 4 ++-- .../BoxingDayTest.php | 4 ++-- .../ChristmasDayTest.php | 4 ++-- .../EasterMondayTest.php | 4 ++-- .../GoodFridayTest.php | 4 ++-- .../LabourDayTest.php | 6 +++--- .../NewYearsDayTest.php | 4 ++-- .../QueensBirthdayTest.php | 6 +++--- .../WesternAustraliaBaseTestCase.php} | 6 +++--- .../WesternAustraliaDayTest.php | 6 +++--- .../WesternAustraliaTest.php} | 8 ++++---- 77 files changed, 271 insertions(+), 271 deletions(-) rename src/Yasumi/Provider/Australia/{ACT.php => AustralianCapitalTerritory.php} (99%) rename src/Yasumi/Provider/Australia/{NSW.php => NewSouthWales.php} (99%) rename src/Yasumi/Provider/Australia/{NT.php => NorthernTerritory.php} (99%) rename src/Yasumi/Provider/Australia/{SA.php => SouthAustralia.php} (99%) rename src/Yasumi/Provider/Australia/{WA.php => WesternAustralia.php} (98%) create mode 100644 tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php create mode 100644 tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php rename tests/Australia/{ACT/ACTBaseTestCase.php => AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php} (68%) rename tests/Australia/{ACT/ACTTest.php => AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php} (78%) rename tests/Australia/{ACT => AustralianCapitalTerritory}/BoxingDayTest.php (73%) rename tests/Australia/{ACT => AustralianCapitalTerritory}/CanberraDayTest.php (91%) rename tests/Australia/{NSW => AustralianCapitalTerritory}/ChristmasDayTest.php (73%) create mode 100644 tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php rename tests/Australia/{NSW => AustralianCapitalTerritory}/EasterSaturdayTest.php (90%) rename tests/Australia/{ACT => AustralianCapitalTerritory}/EasterSundayTest.php (90%) create mode 100644 tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php rename tests/Australia/{SA => AustralianCapitalTerritory}/LabourDayTest.php (90%) create mode 100644 tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php rename tests/Australia/{ACT => AustralianCapitalTerritory}/QueensBirthdayTest.php (91%) rename tests/Australia/{ACT => AustralianCapitalTerritory}/ReconciliationDayTest.php (91%) rename tests/Australia/{NSW => NewSouthWales}/AnzacDayTest.php (77%) rename tests/Australia/{NT => NewSouthWales}/AustraliaDayTest.php (77%) rename tests/Australia/{NSW => NewSouthWales}/BankHolidayTest.php (91%) rename tests/Australia/{NSW => NewSouthWales}/BoxingDayTest.php (77%) rename tests/Australia/{ACT => NewSouthWales}/ChristmasDayTest.php (77%) rename tests/Australia/{ACT => NewSouthWales}/EasterMondayTest.php (77%) rename tests/Australia/{NT => NewSouthWales}/EasterSaturdayTest.php (91%) rename tests/Australia/{NSW => NewSouthWales}/EasterSundayTest.php (91%) rename tests/Australia/{ACT => NewSouthWales}/GoodFridayTest.php (77%) rename tests/Australia/{ACT => NewSouthWales}/LabourDayTest.php (92%) rename tests/Australia/{NSW/NSWBaseTestCase.php => NewSouthWales/NewSouthWalesBaseTestCase.php} (72%) rename tests/Australia/{NSW/NSWTest.php => NewSouthWales/NewSouthWalesTest.php} (79%) rename tests/Australia/{ACT => NewSouthWales}/NewYearsDayTest.php (77%) rename tests/Australia/{NT => NewSouthWales}/QueensBirthdayTest.php (92%) rename tests/Australia/{SA => NorthernTerritory}/AnzacDayTest.php (76%) rename tests/Australia/{SA => NorthernTerritory}/AustraliaDayTest.php (76%) rename tests/Australia/{WA => NorthernTerritory}/BoxingDayTest.php (76%) rename tests/Australia/{WA => NorthernTerritory}/ChristmasDayTest.php (76%) rename tests/Australia/{SA => NorthernTerritory}/EasterMondayTest.php (76%) rename tests/Australia/{SA => NorthernTerritory}/EasterSaturdayTest.php (91%) rename tests/Australia/{SA => NorthernTerritory}/GoodFridayTest.php (76%) rename tests/Australia/{NT => NorthernTerritory}/MayDayTest.php (91%) rename tests/Australia/{SA => NorthernTerritory}/NewYearsDayTest.php (76%) rename tests/Australia/{NT/NTBaseTestCase.php => NorthernTerritory/NorthernTerritoryBaseTestCase.php} (71%) rename tests/Australia/{NT/NTTest.php => NorthernTerritory/NorthernTerritoryTest.php} (80%) rename tests/Australia/{NT => NorthernTerritory}/PicnicDayTest.php (91%) rename tests/Australia/{NSW => NorthernTerritory}/QueensBirthdayTest.php (92%) rename tests/Australia/{SA => SouthAustralia}/AdelaideCupDayTest.php (93%) rename tests/Australia/{ACT => SouthAustralia}/AnzacDayTest.php (77%) rename tests/Australia/{NSW => SouthAustralia}/AustraliaDayTest.php (77%) rename tests/Australia/{SA => SouthAustralia}/ChristmasDayTest.php (95%) rename tests/Australia/{NSW => SouthAustralia}/EasterMondayTest.php (77%) rename tests/Australia/{ACT => SouthAustralia}/EasterSaturdayTest.php (91%) rename tests/Australia/{NSW => SouthAustralia}/GoodFridayTest.php (77%) rename tests/Australia/{NSW => SouthAustralia}/LabourDayTest.php (92%) rename tests/Australia/{NSW => SouthAustralia}/NewYearsDayTest.php (77%) rename tests/Australia/{SA => SouthAustralia}/ProclamationDayTest.php (91%) rename tests/Australia/{SA => SouthAustralia}/QueensBirthdayTest.php (92%) rename tests/Australia/{SA/SABaseTestCase.php => SouthAustralia/SouthAustraliaBaseTestCase.php} (80%) rename tests/Australia/{SA/SATest.php => SouthAustralia/SouthAustraliaTest.php} (80%) delete mode 100644 tests/Australia/WA/AnzacDayTest.php delete mode 100644 tests/Australia/WA/AustraliaDayTest.php delete mode 100644 tests/Australia/WA/EasterMondayTest.php delete mode 100644 tests/Australia/WA/GoodFridayTest.php delete mode 100644 tests/Australia/WA/NewYearsDayTest.php rename tests/Australia/{NT => WesternAustralia}/AnzacDayTest.php (76%) rename tests/Australia/{ACT => WesternAustralia}/AustraliaDayTest.php (76%) rename tests/Australia/{NT => WesternAustralia}/BoxingDayTest.php (76%) rename tests/Australia/{NT => WesternAustralia}/ChristmasDayTest.php (76%) rename tests/Australia/{NT => WesternAustralia}/EasterMondayTest.php (76%) rename tests/Australia/{NT => WesternAustralia}/GoodFridayTest.php (76%) rename tests/Australia/{WA => WesternAustralia}/LabourDayTest.php (91%) rename tests/Australia/{NT => WesternAustralia}/NewYearsDayTest.php (76%) rename tests/Australia/{WA => WesternAustralia}/QueensBirthdayTest.php (92%) rename tests/Australia/{WA/WABaseTestCase.php => WesternAustralia/WesternAustraliaBaseTestCase.php} (79%) rename tests/Australia/{WA => WesternAustralia}/WesternAustraliaDayTest.php (91%) rename tests/Australia/{WA/WATest.php => WesternAustralia/WesternAustraliaTest.php} (80%) diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php similarity index 99% rename from src/Yasumi/Provider/Australia/ACT.php rename to src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 8fe38d906..677f15d33 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -23,7 +23,7 @@ * Provider for all holidays in Australian Capital Territory (Australia). * */ -class ACT extends Australia +class AustralianCapitalTerritory extends Australia { /** * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NewSouthWales.php similarity index 99% rename from src/Yasumi/Provider/Australia/NSW.php rename to src/Yasumi/Provider/Australia/NewSouthWales.php index 9e7b37984..9b498ba12 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -23,7 +23,7 @@ * Provider for all holidays in New South Wales (Australia). * */ -class NSW extends Australia +class NewSouthWales extends Australia { /** * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php similarity index 99% rename from src/Yasumi/Provider/Australia/NT.php rename to src/Yasumi/Provider/Australia/NorthernTerritory.php index 9ced7b4f9..a053ecf32 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -23,7 +23,7 @@ * Provider for all holidays in Northern Territory (Australia). * */ -class NT extends Australia +class NorthernTerritory extends Australia { /** * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SouthAustralia.php similarity index 99% rename from src/Yasumi/Provider/Australia/SA.php rename to src/Yasumi/Provider/Australia/SouthAustralia.php index 9af05b5b4..51e2025ca 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -23,7 +23,7 @@ * Provider for all holidays in South Australia (Australia). * */ -class SA extends Australia +class SouthAustralia extends Australia { /** * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WesternAustralia.php similarity index 98% rename from src/Yasumi/Provider/Australia/WA.php rename to src/Yasumi/Provider/Australia/WesternAustralia.php index 18f6c3533..7ffe8e68f 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -22,7 +22,7 @@ * Provider for all holidays in Western Australia (Australia). * */ -class WA extends Australia +class WesternAustralia extends Australia { /** * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective diff --git a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php new file mode 100644 index 000000000..fb5dc902f --- /dev/null +++ b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php @@ -0,0 +1,20 @@ + + */ + +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; + +/** + * Class for testing ANZAC day in Australian Capital Territory (Australia).. + */ +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php new file mode 100644 index 000000000..f903a29f9 --- /dev/null +++ b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php @@ -0,0 +1,20 @@ + + */ + +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; + +/** + * Class for testing Australia day in Australian Capital Territory (Australia).. + */ +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/ACT/ACTBaseTestCase.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php similarity index 68% rename from tests/Australia/ACT/ACTBaseTestCase.php rename to tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php index 5bc4a73b6..850f4e99e 100644 --- a/tests/Australia/ACT/ACTBaseTestCase.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php @@ -10,22 +10,22 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use Yasumi\tests\Australia\AustraliaBaseTestCase; use Yasumi\tests\YasumiBase; /** - * Base class for test cases of the ACT holiday provider. + * Base class for test cases of the Australian Capital Territory holiday provider. */ -abstract class ACTBaseTestCase extends AustraliaBaseTestCase +abstract class AustralianCapitalTerritoryBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; /** * Name of the region (e.g. country / state) to be tested */ - public $region = 'Australia\ACT'; + public $region = 'Australia\AustralianCapitalTerritory'; /** * Timezone in which this provider has holidays defined diff --git a/tests/Australia/ACT/ACTTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php similarity index 78% rename from tests/Australia/ACT/ACTTest.php rename to tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index ee37b5c17..482da8b1d 100644 --- a/tests/Australia/ACT/ACTTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -10,15 +10,15 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use ReflectionException; use Yasumi\Holiday; /** - * Class for testing holidays in ACT (Australia). + * Class for testing holidays in Australian Capital Territory (Australia). */ -class ACTTest extends ACTBaseTestCase +class AustralianCapitalTerritoryTest extends AustralianCapitalTerritoryBaseTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -26,7 +26,7 @@ class ACTTest extends ACTBaseTestCase protected $year; /** - * Tests if all official holidays in ACT (Australia) are defined by the provider class + * Tests if all official holidays in Australian Capital Territory (Australia) are defined by the provider class * @throws ReflectionException */ public function testOfficialHolidays(): void diff --git a/tests/Australia/ACT/BoxingDayTest.php b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php similarity index 73% rename from tests/Australia/ACT/BoxingDayTest.php rename to tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php index 64eb91170..d14dff3ac 100644 --- a/tests/Australia/ACT/BoxingDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; /** - * Class for testing Boxing Day in ACT (Australia).. + * Class for testing Boxing Day in Australian Capital Territory (Australia).. */ class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest { diff --git a/tests/Australia/ACT/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php similarity index 91% rename from tests/Australia/ACT/CanberraDayTest.php rename to tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index 433f10681..377f67504 100644 --- a/tests/Australia/ACT/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Canberra Day in ACT (Australia).. + * Class for testing Canberra Day in Australian Capital Territory (Australia).. */ -class CanberraDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface +class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/ChristmasDayTest.php b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php similarity index 73% rename from tests/Australia/NSW/ChristmasDayTest.php rename to tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php index 2753c34f8..3704fdf38 100644 --- a/tests/Australia/NSW/ChristmasDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; /** - * Class for testing Christmas Day in NSW (Australia).. + * Class for testing Christmas Day in Australian Capital Territory (Australia).. */ class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest { diff --git a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php new file mode 100644 index 000000000..454634847 --- /dev/null +++ b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php @@ -0,0 +1,20 @@ + + */ + +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; + +/** + * Class for testing Easter Monday in Australian Capital Territory (Australia).. + */ +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/NSW/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php similarity index 90% rename from tests/Australia/NSW/EasterSaturdayTest.php rename to tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index 7294b0986..d57ebbbe4 100644 --- a/tests/Australia/NSW/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use DateInterval; use DateTime; @@ -21,9 +21,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Easter Saturday in NSW (Australia).. + * Class for testing Easter Saturday in Australian Capital Territory (Australia).. */ -class EasterSaturdayTest extends NSWBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/ACT/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php similarity index 90% rename from tests/Australia/ACT/EasterSundayTest.php rename to tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index a5bc6713c..6c3654565 100644 --- a/tests/Australia/ACT/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Easter Sunday in ACT (Australia).. + * Class for testing Easter Sunday in Australian Capital Territory (Australia).. */ -class EasterSundayTest extends ACTBaseTestCase implements YasumiTestCaseInterface +class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php new file mode 100644 index 000000000..0ecd00e31 --- /dev/null +++ b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php @@ -0,0 +1,20 @@ + + */ + +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; + +/** + * Class for testing Good Friday in Australian Capital Territory (Australia).. + */ +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/SA/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php similarity index 90% rename from tests/Australia/SA/LabourDayTest.php rename to tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index 30d5de9a8..b68c1a054 100644 --- a/tests/Australia/SA/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Labour Day in SA (Australia).. + * Class for testing Labour Day in Australian Capital Territory (Australia).. */ -class LabourDayTest extends SABaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php new file mode 100644 index 000000000..5a5104377 --- /dev/null +++ b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php @@ -0,0 +1,20 @@ + + */ + +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; + +/** + * Class for testing New Years Day in Australian Capital Territory (Australia).. + */ +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php similarity index 91% rename from tests/Australia/ACT/QueensBirthdayTest.php rename to tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index 132e87d33..4620b957d 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Queen's Birthday in ACT (Australia).. + * Class for testing Queen's Birthday in Australian Capital Territory (Australia).. */ -class QueensBirthdayTest extends ACTBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/ACT/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php similarity index 91% rename from tests/Australia/ACT/ReconciliationDayTest.php rename to tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index 346e18056..47d93e5de 100644 --- a/tests/Australia/ACT/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Reconciliation Day in ACT (Australia).. + * Class for testing Reconciliation Day in Australian Capital Territory (Australia).. */ -class ReconciliationDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface +class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/AnzacDayTest.php b/tests/Australia/NewSouthWales/AnzacDayTest.php similarity index 77% rename from tests/Australia/NSW/AnzacDayTest.php rename to tests/Australia/NewSouthWales/AnzacDayTest.php index cad528e52..c0e8aa0fc 100644 --- a/tests/Australia/NSW/AnzacDayTest.php +++ b/tests/Australia/NewSouthWales/AnzacDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing ANZAC day in NSW (Australia).. + * Class for testing ANZAC day in New South Wales (Australia).. */ class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest { diff --git a/tests/Australia/NT/AustraliaDayTest.php b/tests/Australia/NewSouthWales/AustraliaDayTest.php similarity index 77% rename from tests/Australia/NT/AustraliaDayTest.php rename to tests/Australia/NewSouthWales/AustraliaDayTest.php index 8bef5589b..cf224ed82 100644 --- a/tests/Australia/NT/AustraliaDayTest.php +++ b/tests/Australia/NewSouthWales/AustraliaDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing Australia day in NT (Australia).. + * Class for testing Australia day in New South Wales (Australia).. */ class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest { diff --git a/tests/Australia/NSW/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php similarity index 91% rename from tests/Australia/NSW/BankHolidayTest.php rename to tests/Australia/NewSouthWales/BankHolidayTest.php index 5911c6ab4..64e8fa137 100644 --- a/tests/Australia/NSW/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NewSouthWales; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Bank Holiday in NSW (Australia).. + * Class for testing Bank Holiday in New South Wales (Australia).. */ -class BankHolidayTest extends NSWBaseTestCase implements YasumiTestCaseInterface +class BankHolidayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/BoxingDayTest.php b/tests/Australia/NewSouthWales/BoxingDayTest.php similarity index 77% rename from tests/Australia/NSW/BoxingDayTest.php rename to tests/Australia/NewSouthWales/BoxingDayTest.php index 9c6ea37d3..4fecd554f 100644 --- a/tests/Australia/NSW/BoxingDayTest.php +++ b/tests/Australia/NewSouthWales/BoxingDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing Boxing Day in NSW (Australia).. + * Class for testing Boxing Day in New South Wales (Australia).. */ class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest { diff --git a/tests/Australia/ACT/ChristmasDayTest.php b/tests/Australia/NewSouthWales/ChristmasDayTest.php similarity index 77% rename from tests/Australia/ACT/ChristmasDayTest.php rename to tests/Australia/NewSouthWales/ChristmasDayTest.php index 41871a0a4..511ffb9ba 100644 --- a/tests/Australia/ACT/ChristmasDayTest.php +++ b/tests/Australia/NewSouthWales/ChristmasDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing Christmas Day in ACT (Australia).. + * Class for testing Christmas Day in New South Wales (Australia).. */ class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest { diff --git a/tests/Australia/ACT/EasterMondayTest.php b/tests/Australia/NewSouthWales/EasterMondayTest.php similarity index 77% rename from tests/Australia/ACT/EasterMondayTest.php rename to tests/Australia/NewSouthWales/EasterMondayTest.php index 173c90a76..a961bdf7d 100644 --- a/tests/Australia/ACT/EasterMondayTest.php +++ b/tests/Australia/NewSouthWales/EasterMondayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing Easter Monday in ACT (Australia).. + * Class for testing Easter Monday in New South Wales (Australia).. */ class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest { diff --git a/tests/Australia/NT/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php similarity index 91% rename from tests/Australia/NT/EasterSaturdayTest.php rename to tests/Australia/NewSouthWales/EasterSaturdayTest.php index 4195b1dd5..c6b63a312 100644 --- a/tests/Australia/NT/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NewSouthWales; use DateInterval; use DateTime; @@ -21,9 +21,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Easter Saturday in NT (Australia).. + * Class for testing Easter Saturday in New South Wales (Australia).. */ -class EasterSaturdayTest extends NTBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php similarity index 91% rename from tests/Australia/NSW/EasterSundayTest.php rename to tests/Australia/NewSouthWales/EasterSundayTest.php index 001bf205a..84dcb3e61 100644 --- a/tests/Australia/NSW/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NewSouthWales; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Easter Sunday in NSW (Australia).. + * Class for testing Easter Sunday in New South Wales (Australia).. */ -class EasterSundayTest extends NSWBaseTestCase implements YasumiTestCaseInterface +class EasterSundayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/ACT/GoodFridayTest.php b/tests/Australia/NewSouthWales/GoodFridayTest.php similarity index 77% rename from tests/Australia/ACT/GoodFridayTest.php rename to tests/Australia/NewSouthWales/GoodFridayTest.php index ac0b5380d..bca849af2 100644 --- a/tests/Australia/ACT/GoodFridayTest.php +++ b/tests/Australia/NewSouthWales/GoodFridayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing Good Friday in ACT (Australia).. + * Class for testing Good Friday in New South Wales (Australia).. */ class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest { diff --git a/tests/Australia/ACT/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php similarity index 92% rename from tests/Australia/ACT/LabourDayTest.php rename to tests/Australia/NewSouthWales/LabourDayTest.php index 01fa22668..b29e86d83 100644 --- a/tests/Australia/ACT/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\NewSouthWales; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Labour Day in ACT (Australia).. + * Class for testing Labour Day in New South Wales (Australia).. */ -class LabourDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/NSWBaseTestCase.php b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php similarity index 72% rename from tests/Australia/NSW/NSWBaseTestCase.php rename to tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php index 3e263702e..06d78db6f 100644 --- a/tests/Australia/NSW/NSWBaseTestCase.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php @@ -10,22 +10,22 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NewSouthWales; use Yasumi\tests\Australia\AustraliaBaseTestCase; use Yasumi\tests\YasumiBase; /** - * Base class for test cases of the NSW holiday provider. + * Base class for test cases of the New South Wales holiday provider. */ -abstract class NSWBaseTestCase extends AustraliaBaseTestCase +abstract class NewSouthWalesBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; /** * Name of the region (e.g. country / state) to be tested */ - public $region = 'Australia\NSW'; + public $region = 'Australia\NewSouthWales'; /** * Timezone in which this provider has holidays defined diff --git a/tests/Australia/NSW/NSWTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php similarity index 79% rename from tests/Australia/NSW/NSWTest.php rename to tests/Australia/NewSouthWales/NewSouthWalesTest.php index 953ba28f8..6f39824c8 100644 --- a/tests/Australia/NSW/NSWTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -10,15 +10,15 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NewSouthWales; use ReflectionException; use Yasumi\Holiday; /** - * Class for testing holidays in NSW (Australia). + * Class for testing holidays in New South Wales (Australia). */ -class NSWTest extends NSWBaseTestCase +class NewSouthWalesTest extends NewSouthWalesBaseTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -26,7 +26,7 @@ class NSWTest extends NSWBaseTestCase protected $year; /** - * Tests if all official holidays in NSW (Australia) are defined by the provider class + * Tests if all official holidays in New South Wales (Australia) are defined by the provider class * @throws ReflectionException */ public function testOfficialHolidays(): void @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void } /** - * Tests if all bank holidays in NSW (Australia) are defined by the provider class + * Tests if all bank holidays in New South Wales (Australia) are defined by the provider class * @throws ReflectionException */ public function testBankHolidays(): void diff --git a/tests/Australia/ACT/NewYearsDayTest.php b/tests/Australia/NewSouthWales/NewYearsDayTest.php similarity index 77% rename from tests/Australia/ACT/NewYearsDayTest.php rename to tests/Australia/NewSouthWales/NewYearsDayTest.php index 1b3ba3d2c..6a9bb5fcf 100644 --- a/tests/Australia/ACT/NewYearsDayTest.php +++ b/tests/Australia/NewSouthWales/NewYearsDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\NewSouthWales; /** - * Class for testing New Years Day in ACT (Australia).. + * Class for testing New Years Day in New South Wales (Australia).. */ class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest { diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php similarity index 92% rename from tests/Australia/NT/QueensBirthdayTest.php rename to tests/Australia/NewSouthWales/QueensBirthdayTest.php index 758e71612..905f26eb5 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NewSouthWales; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Queen's Birthday in NT (Australia).. + * Class for testing Queen's Birthday in New South Wales (Australia).. */ -class QueensBirthdayTest extends NTBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/SA/AnzacDayTest.php b/tests/Australia/NorthernTerritory/AnzacDayTest.php similarity index 76% rename from tests/Australia/SA/AnzacDayTest.php rename to tests/Australia/NorthernTerritory/AnzacDayTest.php index 08ea7b435..b4c813dd3 100644 --- a/tests/Australia/SA/AnzacDayTest.php +++ b/tests/Australia/NorthernTerritory/AnzacDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing ANZAC day in SA (Australia).. + * Class for testing ANZAC day in Northern Territory (Australia). */ class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest { diff --git a/tests/Australia/SA/AustraliaDayTest.php b/tests/Australia/NorthernTerritory/AustraliaDayTest.php similarity index 76% rename from tests/Australia/SA/AustraliaDayTest.php rename to tests/Australia/NorthernTerritory/AustraliaDayTest.php index 6718bd353..ce79b5f92 100644 --- a/tests/Australia/SA/AustraliaDayTest.php +++ b/tests/Australia/NorthernTerritory/AustraliaDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing Australia day in SA (Australia).. + * Class for testing Australia day in Northern Territory (Australia). */ class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest { diff --git a/tests/Australia/WA/BoxingDayTest.php b/tests/Australia/NorthernTerritory/BoxingDayTest.php similarity index 76% rename from tests/Australia/WA/BoxingDayTest.php rename to tests/Australia/NorthernTerritory/BoxingDayTest.php index b7b447bea..ffa71c268 100644 --- a/tests/Australia/WA/BoxingDayTest.php +++ b/tests/Australia/NorthernTerritory/BoxingDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing Boxing Day in WA (Australia).. + * Class for testing Boxing Day in Northern Territory (Australia). */ class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest { diff --git a/tests/Australia/WA/ChristmasDayTest.php b/tests/Australia/NorthernTerritory/ChristmasDayTest.php similarity index 76% rename from tests/Australia/WA/ChristmasDayTest.php rename to tests/Australia/NorthernTerritory/ChristmasDayTest.php index 2401e375b..a1f8b8dfd 100644 --- a/tests/Australia/WA/ChristmasDayTest.php +++ b/tests/Australia/NorthernTerritory/ChristmasDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing Christmas Day in WA (Australia).. + * Class for testing Christmas Day in Northern Territory (Australia). */ class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest { diff --git a/tests/Australia/SA/EasterMondayTest.php b/tests/Australia/NorthernTerritory/EasterMondayTest.php similarity index 76% rename from tests/Australia/SA/EasterMondayTest.php rename to tests/Australia/NorthernTerritory/EasterMondayTest.php index 0392a6575..bba62828b 100644 --- a/tests/Australia/SA/EasterMondayTest.php +++ b/tests/Australia/NorthernTerritory/EasterMondayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing Easter Monday in SA (Australia).. + * Class for testing Easter Monday in Northern Territory (Australia). */ class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest { diff --git a/tests/Australia/SA/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php similarity index 91% rename from tests/Australia/SA/EasterSaturdayTest.php rename to tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 90ed66508..35796632f 100644 --- a/tests/Australia/SA/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\NorthernTerritory; use DateInterval; use DateTime; @@ -21,9 +21,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Easter Saturday in SA (Australia).. + * Class for testing Easter Saturday in Northern Territory (Australia). */ -class EasterSaturdayTest extends SABaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/SA/GoodFridayTest.php b/tests/Australia/NorthernTerritory/GoodFridayTest.php similarity index 76% rename from tests/Australia/SA/GoodFridayTest.php rename to tests/Australia/NorthernTerritory/GoodFridayTest.php index 49e22b4ec..b4f77e7e1 100644 --- a/tests/Australia/SA/GoodFridayTest.php +++ b/tests/Australia/NorthernTerritory/GoodFridayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing Good Friday in SA (Australia).. + * Class for testing Good Friday in Northern Territory (Australia). */ class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest { diff --git a/tests/Australia/NT/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php similarity index 91% rename from tests/Australia/NT/MayDayTest.php rename to tests/Australia/NorthernTerritory/MayDayTest.php index 642aae82f..6c68c361f 100644 --- a/tests/Australia/NT/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NorthernTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing May Day in NT (Australia).. + * Class for testing May Day in Northern Territory (Australia). */ -class MayDayTest extends NTBaseTestCase implements YasumiTestCaseInterface +class MayDayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/SA/NewYearsDayTest.php b/tests/Australia/NorthernTerritory/NewYearsDayTest.php similarity index 76% rename from tests/Australia/SA/NewYearsDayTest.php rename to tests/Australia/NorthernTerritory/NewYearsDayTest.php index 437db0118..958f7d9b8 100644 --- a/tests/Australia/SA/NewYearsDayTest.php +++ b/tests/Australia/NorthernTerritory/NewYearsDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\NorthernTerritory; /** - * Class for testing New Years Day in SA (Australia).. + * Class for testing New Years Day in Northern Territory (Australia). */ class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest { diff --git a/tests/Australia/NT/NTBaseTestCase.php b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php similarity index 71% rename from tests/Australia/NT/NTBaseTestCase.php rename to tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php index 84f9929b9..9b6d75d28 100644 --- a/tests/Australia/NT/NTBaseTestCase.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php @@ -10,22 +10,22 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NorthernTerritory; use Yasumi\tests\Australia\AustraliaBaseTestCase; use Yasumi\tests\YasumiBase; /** - * Base class for test cases of the NT holiday provider. + * Base class for test cases of the Northern Territory holiday provider. */ -abstract class NTBaseTestCase extends AustraliaBaseTestCase +abstract class NorthernTerritoryBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; /** * Name of the region (e.g. country / state) to be tested */ - public $region = 'Australia\NT'; + public $region = 'Australia\NorthernTerritory'; /** * Timezone in which this provider has holidays defined diff --git a/tests/Australia/NT/NTTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php similarity index 80% rename from tests/Australia/NT/NTTest.php rename to tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index cc4719204..90ebcfd16 100644 --- a/tests/Australia/NT/NTTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -10,15 +10,15 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NorthernTerritory; use ReflectionException; use Yasumi\Holiday; /** - * Class for testing holidays in NT (Australia). + * Class for testing holidays in Northern Territory (Australia). */ -class NTTest extends NTBaseTestCase +class NorthernTerritoryTest extends NorthernTerritoryBaseTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -26,7 +26,7 @@ class NTTest extends NTBaseTestCase protected $year; /** - * Tests if all official holidays in NT (Australia) are defined by the provider class + * Tests if all official holidays in Northern Territory (Australia) are defined by the provider class * @throws ReflectionException */ public function testOfficialHolidays(): void diff --git a/tests/Australia/NT/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php similarity index 91% rename from tests/Australia/NT/PicnicDayTest.php rename to tests/Australia/NorthernTerritory/PicnicDayTest.php index 556f3fb03..88ba1a5f0 100644 --- a/tests/Australia/NT/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\NorthernTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Picnic Day in NT (Australia).. + * Class for testing Picnic Day in Northern Territory (Australia). */ -class PicnicDayTest extends NTBaseTestCase implements YasumiTestCaseInterface +class PicnicDayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php similarity index 92% rename from tests/Australia/NSW/QueensBirthdayTest.php rename to tests/Australia/NorthernTerritory/QueensBirthdayTest.php index 7806c3f3e..4eccecce9 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\NorthernTerritory; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Queen's Birthday in NSW (Australia).. + * Class for testing Queen's Birthday in Northern Territory (Australia). */ -class QueensBirthdayTest extends NSWBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/SA/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php similarity index 93% rename from tests/Australia/SA/AdelaideCupDayTest.php rename to tests/Australia/SouthAustralia/AdelaideCupDayTest.php index ad47fa8e4..baa61cdaf 100644 --- a/tests/Australia/SA/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\SouthAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Adelaide Cup Day in SA (Australia).. + * Class for testing Adelaide Cup Day in South Australia (Australia).. */ -class AdelaideCupDayTest extends SABaseTestCase implements YasumiTestCaseInterface +class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/ACT/AnzacDayTest.php b/tests/Australia/SouthAustralia/AnzacDayTest.php similarity index 77% rename from tests/Australia/ACT/AnzacDayTest.php rename to tests/Australia/SouthAustralia/AnzacDayTest.php index 1da59c7df..ff427385e 100644 --- a/tests/Australia/ACT/AnzacDayTest.php +++ b/tests/Australia/SouthAustralia/AnzacDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\SouthAustralia; /** - * Class for testing ANZAC day in ACT (Australia).. + * Class for testing ANZAC day in South Australia (Australia).. */ class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest { diff --git a/tests/Australia/NSW/AustraliaDayTest.php b/tests/Australia/SouthAustralia/AustraliaDayTest.php similarity index 77% rename from tests/Australia/NSW/AustraliaDayTest.php rename to tests/Australia/SouthAustralia/AustraliaDayTest.php index cc1cd24ab..ecc94f95a 100644 --- a/tests/Australia/NSW/AustraliaDayTest.php +++ b/tests/Australia/SouthAustralia/AustraliaDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\SouthAustralia; /** - * Class for testing Australia day in NSW (Australia).. + * Class for testing Australia day in South Australia (Australia).. */ class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest { diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php similarity index 95% rename from tests/Australia/SA/ChristmasDayTest.php rename to tests/Australia/SouthAustralia/ChristmasDayTest.php index c9bc92671..09702618e 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\SouthAustralia; use DateTime; use DateTimeZone; @@ -22,7 +22,7 @@ /** * Class for testing Christmas Day in South Australia. */ -class ChristmasDayTest extends SABaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/EasterMondayTest.php b/tests/Australia/SouthAustralia/EasterMondayTest.php similarity index 77% rename from tests/Australia/NSW/EasterMondayTest.php rename to tests/Australia/SouthAustralia/EasterMondayTest.php index 200caae01..81ac35ad7 100644 --- a/tests/Australia/NSW/EasterMondayTest.php +++ b/tests/Australia/SouthAustralia/EasterMondayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\SouthAustralia; /** - * Class for testing Easter Monday in NSW (Australia).. + * Class for testing Easter Monday in South Australia (Australia).. */ class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest { diff --git a/tests/Australia/ACT/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php similarity index 91% rename from tests/Australia/ACT/EasterSaturdayTest.php rename to tests/Australia/SouthAustralia/EasterSaturdayTest.php index 4ddea1cad..ee047a322 100644 --- a/tests/Australia/ACT/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\SouthAustralia; use DateInterval; use DateTime; @@ -21,9 +21,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Easter Saturday in ACT (Australia).. + * Class for testing Easter Saturday in South Australia (Australia).. */ -class EasterSaturdayTest extends ACTBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/GoodFridayTest.php b/tests/Australia/SouthAustralia/GoodFridayTest.php similarity index 77% rename from tests/Australia/NSW/GoodFridayTest.php rename to tests/Australia/SouthAustralia/GoodFridayTest.php index 23e0f81de..1e58b5005 100644 --- a/tests/Australia/NSW/GoodFridayTest.php +++ b/tests/Australia/SouthAustralia/GoodFridayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\SouthAustralia; /** - * Class for testing Good Friday in NSW (Australia).. + * Class for testing Good Friday in South Australia (Australia).. */ class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest { diff --git a/tests/Australia/NSW/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php similarity index 92% rename from tests/Australia/NSW/LabourDayTest.php rename to tests/Australia/SouthAustralia/LabourDayTest.php index eff77a06f..d569e16a6 100644 --- a/tests/Australia/NSW/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\SouthAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Labour Day in NSW (Australia).. + * Class for testing Labour Day in South Australia (Australia).. */ -class LabourDayTest extends NSWBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NSW/NewYearsDayTest.php b/tests/Australia/SouthAustralia/NewYearsDayTest.php similarity index 77% rename from tests/Australia/NSW/NewYearsDayTest.php rename to tests/Australia/SouthAustralia/NewYearsDayTest.php index a5da65406..713d01848 100644 --- a/tests/Australia/NSW/NewYearsDayTest.php +++ b/tests/Australia/SouthAustralia/NewYearsDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NSW; +namespace Yasumi\tests\Australia\SouthAustralia; /** - * Class for testing New Years Day in NSW (Australia).. + * Class for testing New Years Day in South Australia (Australia).. */ class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest { diff --git a/tests/Australia/SA/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php similarity index 91% rename from tests/Australia/SA/ProclamationDayTest.php rename to tests/Australia/SouthAustralia/ProclamationDayTest.php index 6a1287855..7cd08be1c 100644 --- a/tests/Australia/SA/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\SouthAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Proclamation Day in SA (Australia).. + * Class for testing Proclamation Day in South Australia (Australia).. */ -class ProclamationDayTest extends SABaseTestCase implements YasumiTestCaseInterface +class ProclamationDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php similarity index 92% rename from tests/Australia/SA/QueensBirthdayTest.php rename to tests/Australia/SouthAustralia/QueensBirthdayTest.php index c202d8ce8..05499bbf2 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\SouthAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Queen's Birthday in SA (Australia).. + * Class for testing Queen's Birthday in South Australia (Australia).. */ -class QueensBirthdayTest extends SABaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/SA/SABaseTestCase.php b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php similarity index 80% rename from tests/Australia/SA/SABaseTestCase.php rename to tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php index bd54dfed8..486ebd45f 100644 --- a/tests/Australia/SA/SABaseTestCase.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\SouthAustralia; use Yasumi\tests\Australia\AustraliaBaseTestCase; use Yasumi\tests\YasumiBase; @@ -18,14 +18,14 @@ /** * Base class for test cases of the Victoria holiday provider. */ -abstract class SABaseTestCase extends AustraliaBaseTestCase +abstract class SouthAustraliaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; /** * Name of the region (e.g. country / state) to be tested */ - public $region = 'Australia\SA'; + public $region = 'Australia\SouthAustralia'; /** * Timezone in which this provider has holidays defined diff --git a/tests/Australia/SA/SATest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php similarity index 80% rename from tests/Australia/SA/SATest.php rename to tests/Australia/SouthAustralia/SouthAustraliaTest.php index 9f4334de2..26880e85b 100644 --- a/tests/Australia/SA/SATest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -10,15 +10,15 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\SA; +namespace Yasumi\tests\Australia\SouthAustralia; use ReflectionException; use Yasumi\Holiday; /** - * Class for testing holidays in SA (Australia). + * Class for testing holidays in South Australia (Australia). */ -class SATest extends SABaseTestCase +class SouthAustraliaTest extends SouthAustraliaBaseTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -26,7 +26,7 @@ class SATest extends SABaseTestCase protected $year; /** - * Tests if all official holidays in SA (Australia) are defined by the provider class + * Tests if all official holidays in South Australia (Australia) are defined by the provider class * @throws ReflectionException */ public function testOfficialHolidays(): void diff --git a/tests/Australia/WA/AnzacDayTest.php b/tests/Australia/WA/AnzacDayTest.php deleted file mode 100644 index a1882b3ac..000000000 --- a/tests/Australia/WA/AnzacDayTest.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - -namespace Yasumi\tests\Australia\WA; - -/** - * Class for testing ANZAC day in WA (Australia).. - */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} diff --git a/tests/Australia/WA/AustraliaDayTest.php b/tests/Australia/WA/AustraliaDayTest.php deleted file mode 100644 index d12119c9d..000000000 --- a/tests/Australia/WA/AustraliaDayTest.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - -namespace Yasumi\tests\Australia\WA; - -/** - * Class for testing Australia day in WA (Australia).. - */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} diff --git a/tests/Australia/WA/EasterMondayTest.php b/tests/Australia/WA/EasterMondayTest.php deleted file mode 100644 index 9be4cdf61..000000000 --- a/tests/Australia/WA/EasterMondayTest.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - -namespace Yasumi\tests\Australia\WA; - -/** - * Class for testing Easter Monday in WA (Australia).. - */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} diff --git a/tests/Australia/WA/GoodFridayTest.php b/tests/Australia/WA/GoodFridayTest.php deleted file mode 100644 index 09a1fc36b..000000000 --- a/tests/Australia/WA/GoodFridayTest.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - -namespace Yasumi\tests\Australia\WA; - -/** - * Class for testing Good Friday in WA (Australia).. - */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} diff --git a/tests/Australia/WA/NewYearsDayTest.php b/tests/Australia/WA/NewYearsDayTest.php deleted file mode 100644 index 41c2e85a9..000000000 --- a/tests/Australia/WA/NewYearsDayTest.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - -namespace Yasumi\tests\Australia\WA; - -/** - * Class for testing New Years Day in WA (Australia).. - */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} diff --git a/tests/Australia/NT/AnzacDayTest.php b/tests/Australia/WesternAustralia/AnzacDayTest.php similarity index 76% rename from tests/Australia/NT/AnzacDayTest.php rename to tests/Australia/WesternAustralia/AnzacDayTest.php index a2f7950e9..575fce171 100644 --- a/tests/Australia/NT/AnzacDayTest.php +++ b/tests/Australia/WesternAustralia/AnzacDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing ANZAC day in NT (Australia).. + * Class for testing ANZAC day in Western Australia (Australia).. */ class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest { diff --git a/tests/Australia/ACT/AustraliaDayTest.php b/tests/Australia/WesternAustralia/AustraliaDayTest.php similarity index 76% rename from tests/Australia/ACT/AustraliaDayTest.php rename to tests/Australia/WesternAustralia/AustraliaDayTest.php index cae6f5ba9..73c179278 100644 --- a/tests/Australia/ACT/AustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/AustraliaDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\ACT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing Australia day in ACT (Australia).. + * Class for testing Australia day in Western Australia (Australia).. */ class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest { diff --git a/tests/Australia/NT/BoxingDayTest.php b/tests/Australia/WesternAustralia/BoxingDayTest.php similarity index 76% rename from tests/Australia/NT/BoxingDayTest.php rename to tests/Australia/WesternAustralia/BoxingDayTest.php index de2e2dd2b..d1d663ce1 100644 --- a/tests/Australia/NT/BoxingDayTest.php +++ b/tests/Australia/WesternAustralia/BoxingDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing Boxing Day in NT (Australia).. + * Class for testing Boxing Day in Western Australia (Australia).. */ class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest { diff --git a/tests/Australia/NT/ChristmasDayTest.php b/tests/Australia/WesternAustralia/ChristmasDayTest.php similarity index 76% rename from tests/Australia/NT/ChristmasDayTest.php rename to tests/Australia/WesternAustralia/ChristmasDayTest.php index d18a577bb..a30cbb307 100644 --- a/tests/Australia/NT/ChristmasDayTest.php +++ b/tests/Australia/WesternAustralia/ChristmasDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing Christmas Day in NT (Australia).. + * Class for testing Christmas Day in Western Australia (Australia).. */ class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest { diff --git a/tests/Australia/NT/EasterMondayTest.php b/tests/Australia/WesternAustralia/EasterMondayTest.php similarity index 76% rename from tests/Australia/NT/EasterMondayTest.php rename to tests/Australia/WesternAustralia/EasterMondayTest.php index 4ce1b6868..0cd3ac2a4 100644 --- a/tests/Australia/NT/EasterMondayTest.php +++ b/tests/Australia/WesternAustralia/EasterMondayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing Easter Monday in NT (Australia).. + * Class for testing Easter Monday in Western Australia (Australia).. */ class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest { diff --git a/tests/Australia/NT/GoodFridayTest.php b/tests/Australia/WesternAustralia/GoodFridayTest.php similarity index 76% rename from tests/Australia/NT/GoodFridayTest.php rename to tests/Australia/WesternAustralia/GoodFridayTest.php index a5bbd3066..58be8e558 100644 --- a/tests/Australia/NT/GoodFridayTest.php +++ b/tests/Australia/WesternAustralia/GoodFridayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing Good Friday in NT (Australia).. + * Class for testing Good Friday in Western Australia (Australia).. */ class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest { diff --git a/tests/Australia/WA/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php similarity index 91% rename from tests/Australia/WA/LabourDayTest.php rename to tests/Australia/WesternAustralia/LabourDayTest.php index 332ead2f1..fc9c2b0ff 100644 --- a/tests/Australia/WA/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\WesternAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Labour Day in WA (Australia).. + * Class for testing Labour Day in Western Australia (Australia).. */ -class LabourDayTest extends WABaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends WesternAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/NT/NewYearsDayTest.php b/tests/Australia/WesternAustralia/NewYearsDayTest.php similarity index 76% rename from tests/Australia/NT/NewYearsDayTest.php rename to tests/Australia/WesternAustralia/NewYearsDayTest.php index 4ce8fbf7e..9cb90792a 100644 --- a/tests/Australia/NT/NewYearsDayTest.php +++ b/tests/Australia/WesternAustralia/NewYearsDayTest.php @@ -10,10 +10,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\NT; +namespace Yasumi\tests\Australia\WesternAustralia; /** - * Class for testing New Years Day in NT (Australia).. + * Class for testing New Years Day in Western Australia (Australia).. */ class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest { diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php similarity index 92% rename from tests/Australia/WA/QueensBirthdayTest.php rename to tests/Australia/WesternAustralia/QueensBirthdayTest.php index 06f362d2c..23e396bb5 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\WesternAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Queen's Birthday in WA (Australia).. + * Class for testing Queen's Birthday in Western Australia (Australia).. */ -class QueensBirthdayTest extends WABaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/WA/WABaseTestCase.php b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php similarity index 79% rename from tests/Australia/WA/WABaseTestCase.php rename to tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php index 0579c94c0..f5e79212b 100644 --- a/tests/Australia/WA/WABaseTestCase.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\WesternAustralia; use Yasumi\tests\Australia\AustraliaBaseTestCase; use Yasumi\tests\YasumiBase; @@ -18,14 +18,14 @@ /** * Base class for test cases of the Queensland holiday provider. */ -abstract class WABaseTestCase extends AustraliaBaseTestCase +abstract class WesternAustraliaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; /** * Name of the region (e.g. country / state) to be tested */ - public $region = 'Australia\WA'; + public $region = 'Australia\WesternAustralia'; /** * Timezone in which this provider has holidays defined diff --git a/tests/Australia/WA/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php similarity index 91% rename from tests/Australia/WA/WesternAustraliaDayTest.php rename to tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index 9618ea515..27f05e9cf 100644 --- a/tests/Australia/WA/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\WesternAustralia; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing Western Australia Day in WA (Australia).. + * Class for testing Western Australia Day in Western Australia (Australia).. */ -class WesternAustraliaDayTest extends WABaseTestCase implements YasumiTestCaseInterface +class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Australia/WA/WATest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php similarity index 80% rename from tests/Australia/WA/WATest.php rename to tests/Australia/WesternAustralia/WesternAustraliaTest.php index 1ac79f522..bd9d43fa1 100644 --- a/tests/Australia/WA/WATest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -10,15 +10,15 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Australia\WA; +namespace Yasumi\tests\Australia\WesternAustralia; use ReflectionException; use Yasumi\Holiday; /** - * Class for testing holidays in WA (Australia). + * Class for testing holidays in Western Australia (Australia). */ -class WATest extends WABaseTestCase +class WesternAustraliaTest extends WesternAustraliaBaseTestCase { /** @@ -27,7 +27,7 @@ class WATest extends WABaseTestCase protected $year; /** - * Tests if all official holidays in WA (Australia) are defined by the provider class + * Tests if all official holidays in Western Australia (Australia) are defined by the provider class * @throws ReflectionException */ public function testOfficialHolidays(): void From c4fe55d455b42949a39aceb576160129814e0886 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 1 May 2020 10:03:31 +0900 Subject: [PATCH 065/687] Removed dead code. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia/SouthAustralia.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 51e2025ca..04df783ab 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -184,7 +184,6 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); - $proclamationDay = $christmasDay->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], @@ -194,7 +193,6 @@ private function calculateProclamationDay(): void )); break; case 5: // friday - $proclamationDay = $christmasDay->add(new DateInterval('P3D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], @@ -204,7 +202,6 @@ private function calculateProclamationDay(): void )); break; case 6: // saturday - $christmasDay->add(new DateInterval('P2D')); $this->addHoliday(new Holiday( 'christmasHoliday', ['en' => 'Christmas Holiday'], @@ -212,7 +209,6 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); - $proclamationDay = $christmasDay->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], @@ -222,7 +218,6 @@ private function calculateProclamationDay(): void )); break; default: // monday-thursday - $proclamationDay = $christmasDay->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], From 517f45dcf08ef580c90fd4d4425a2beef7bfcde1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 1 May 2020 10:09:01 +0900 Subject: [PATCH 066/687] Add missing strict type declaration. Changed to Yoda style condition Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Croatia.php | 4 ++-- src/Yasumi/Provider/Luxembourg.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 36e695329..033ff9e4d 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -88,7 +88,7 @@ private function calculateStatehoodDay(): void $statehoodDayDate = new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if ($statehoodDayDate != null) { + if (null != $statehoodDayDate) { $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'hr' => 'Dan državnosti', @@ -111,7 +111,7 @@ private function calculateHomelandThanksgivingDay(): void $names['hr'] = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; } - if ($names !== null) { + if (null !== $names) { $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index c1342f547..5cf42747a 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -1,4 +1,5 @@ Date: Fri, 1 May 2020 10:12:00 +0900 Subject: [PATCH 067/687] Updated CHANGELOG. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee3516d2b..d67397d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) ### Changed +- Renamed the Australian states to be full names in stead of abbreviations to be in line with other Holiday Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) - Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) From 46ff738a1d994fe9fad396266f6cb39a554e6b38 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 1 May 2020 10:27:23 +0900 Subject: [PATCH 068/687] Reverted accidentally removed dead code. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia/SouthAustralia.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 04df783ab..a4bb1e046 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -184,6 +184,7 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); + $christmasDay->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], @@ -193,6 +194,7 @@ private function calculateProclamationDay(): void )); break; case 5: // friday + $christmasDay->add(new DateInterval('P3D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], @@ -202,6 +204,7 @@ private function calculateProclamationDay(): void )); break; case 6: // saturday + $christmasDay->add(new DateInterval('P2D')); $this->addHoliday(new Holiday( 'christmasHoliday', ['en' => 'Christmas Holiday'], @@ -209,6 +212,7 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); + $christmasDay->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], @@ -218,6 +222,7 @@ private function calculateProclamationDay(): void )); break; default: // monday-thursday + $christmasDay->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'proclamationDay', ['en' => 'Proclamation Day'], From 91eec58000b2a226d11f63b94ba43cef4c872dbb Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 1 May 2020 14:38:59 +0200 Subject: [PATCH 069/687] Locale override for getName() (with multiple fallbacks) (#195) --- .../Exception/MissingTranslationException.php | 32 +++++ src/Yasumi/Holiday.php | 74 ++++++++--- src/Yasumi/SubstituteHoliday.php | 23 +++- tests/Base/HolidayTest.php | 123 +++++++++++------- 4 files changed, 181 insertions(+), 71 deletions(-) create mode 100644 src/Yasumi/Exception/MissingTranslationException.php diff --git a/src/Yasumi/Exception/MissingTranslationException.php b/src/Yasumi/Exception/MissingTranslationException.php new file mode 100644 index 000000000..eac6f75ab --- /dev/null +++ b/src/Yasumi/Exception/MissingTranslationException.php @@ -0,0 +1,32 @@ + + */ + +namespace Yasumi\Exception; + +use Exception as BaseException; + +/** + * Class MissingTranslationException. + */ +class MissingTranslationException extends BaseException implements Exception +{ + /** + * Initializes the Exception instance + * + * @param string $shortName The short name (internal name) of the holiday + * @param array $locales The locales that was searched + */ + public function __construct(string $shortName, array $locales) + { + parent::__construct(\sprintf("Translation for '%s' not found for any locale: '%s'", $shortName, \implode("', '", $locales))); + } +} diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 55841b65a..1696e1284 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -17,6 +17,7 @@ use InvalidArgumentException; use JsonSerializable; use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\MissingTranslationException; use Yasumi\Exception\UnknownLocaleException; /** @@ -54,6 +55,11 @@ class Holiday extends DateTime implements JsonSerializable */ public const DEFAULT_LOCALE = 'en_US'; + /** + * Pseudo-locale representing the short name (internal name) of the holiday. + */ + public const LOCALE_SHORT_NAME = 'shortName'; + /** * @var array list of all defined locales */ @@ -153,41 +159,75 @@ public function jsonSerialize(): self } /** - * Returns the name of this holiday. + * Returns the localized name of this holiday + * + * The provided locales are searched for a translation. The first locale containing a translation will be used. * - * 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. + * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and + * Holiday::LOCALE_SHORT_NAME (the short name (internal name) of this holiday) was provided. + * + * @param array $locales The locales to search for translations + * + * @throws MissingTranslationException + * + * @see Holiday::DEFAULT_LOCALE + * @see Holiday::LOCALE_SHORT_NAME */ - public function getName(): string + public function getName(array $locales = null): string { - foreach ($this->getLocales() as $locale) { + $locales = $this->getLocales($locales); + foreach ($locales as $locale) { + if ($locale === self::LOCALE_SHORT_NAME) { + return $this->shortName; + } if (isset($this->translations[$locale])) { return $this->translations[$locale]; } } - return $this->shortName; + throw new MissingTranslationException($this->shortName, $locales); } /** - * Returns the display locale and its fallback locales. + * Expands the provided locale into an array of locales to check for translations. + * + * For each provided locale, return all locales including their parent locales. E.g. + * ['ca_ES_VALENCIA', 'es_ES'] is expanded into ['ca_ES_VALENCIA', 'ca_ES', 'ca', 'es_ES', 'es']. + * + * If a string is provided, return as if this string, Holiday::DEFAULT_LOCALE, and Holiday::LOCALE_SHORT_NAM + * was provided. E.g. 'de_DE' is expanded into ['de_DE', 'de', 'en_US', 'en', Holiday::LOCALE_SHORT_NAME]. + * + * If null is provided, return as if the display locale was provided as a string. + * + * @param array $locales Array of locales, or null if the display locale should be used * * @return array + * + * @see Holiday::DEFAULT_LOCALE + * @see Holiday::LOCALE_SHORT_NAME */ - protected function getLocales(): array + protected function getLocales(?array $locales): array { - $locales = [$this->displayLocale]; - $parts = \explode('_', $this->displayLocale); - while (\array_pop($parts) && $parts) { - $locales[] = \implode('_', $parts); + if ($locales) { + $expanded = []; + $locales = $locales; + } else { + $locales = [$this->displayLocale]; + // DEFAULT_LOCALE is 'en_US', and its parent is 'en'. + $expanded = [self::LOCALE_SHORT_NAME, 'en', 'en_US']; } - // DEFAULT_LOCALE is en_US - $locales[] = 'en_US'; - $locales[] = 'en'; + // Expand e.g. ['de_DE', 'en_GB'] into ['de_DE', 'de', 'en_GB', 'en']. + foreach (\array_reverse($locales) as $locale) { + $parent = \strtok($locale, '_'); + while ($child = \strtok('_')) { + $expanded[] = $parent; + $parent .= '_' . $child; + } + $expanded[] = $locale; + } - return $locales; + return \array_reverse($expanded); } /** diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 5e1a4c942..9321c8493 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -13,6 +13,7 @@ namespace Yasumi; use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\MissingTranslationException; use Yasumi\Exception\UnknownLocaleException; /** @@ -76,19 +77,27 @@ public function __construct( } /** - * Returns the name of this holiday. + * Returns the localized 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. + * The provided locales are searched for a translation. The first locale containing a translation will be used. + * + * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and + * Holiday::LOCALE_SHORT_NAME (the short name (internal name) of this holiday) was provided. + * + * @param array $locales The locales to search for translations + * + * @throws MissingTranslationException + * + * @see Holiday::DEFAULT_LOCALE + * @see Holiday::LOCALE_SHORT_NAME */ - public function getName(): string + public function getName($locales = null): string { $name = parent::getName(); if ($name === $this->shortName) { - foreach ($this->getLocales() as $locale) { - $pattern = $this->substituteHolidayTranslations[$locale] ?? null; + foreach ($this->getLocales($locales) as $locales) { + $pattern = $this->substituteHolidayTranslations[$locales] ?? null; if ($pattern) { return \str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 50ef9e192..c4839c9a6 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -17,6 +17,7 @@ use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use Yasumi\Exception\MissingTranslationException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\tests\YasumiBase; @@ -89,73 +90,101 @@ public function testHolidayWithDateTimeInterface(): void } /** - * Tests the getName function of the Holiday object with no translations for the name given. - * @throws Exception + * Tests the getLocales function of the Holiday object. */ - public function testHolidayGetNameWithNoTranslations(): void + public function testHolidayGetLocales(): void { - $name = 'testHoliday'; - $holiday = new Holiday($name, [], new DateTime(), 'en_US'); + $holiday = new Holiday('testHoliday', [], new DateTime(), 'ca_ES_VALENCIA'); + $method = new \ReflectionMethod(Holiday::class, 'getLocales'); + $method->setAccessible(true); - $this->assertIsString($holiday->getName()); - $this->assertEquals($name, $holiday->getName()); + $this->assertEquals(['ca_ES_VALENCIA', 'ca_ES', 'ca', 'en_US', 'en', Holiday::LOCALE_SHORT_NAME], $method->invoke($holiday, null)); + $this->assertEquals(['de_DE', 'de', 'es_ES', 'es'], $method->invoke($holiday, ['de_DE', 'es_ES'])); + $this->assertEquals(['de_DE', 'de', Holiday::LOCALE_SHORT_NAME], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_SHORT_NAME])); } /** - * Tests the getName function of the Holiday object with only a parent translation for the name given. - * @throws Exception + * Tests the getName function of the Holiday object without any arguments provided. */ - public function testHolidayGetNameWithParentLocaleTranslation(): void + public function testHolidayGetNameWithoutArgument(): void { - $name = 'testHoliday'; - $translation = 'My Holiday'; - $holiday = new Holiday($name, ['de' => $translation], new DateTime(), 'de_DE'); + // 'en_US' fallback + $translations = [ + 'de' => 'Holiday DE', + 'de_AT' => 'Holiday DE-AT', + 'en' => 'Holiday EN', + 'en_US' => 'Holiday EN-US', + ]; - $this->assertIsString($holiday->getName()); - $this->assertEquals($translation, $holiday->getName()); - } + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_AT'); + $this->assertEquals('Holiday DE-AT', $holiday->getName()); - /** - * Tests the getName function of the Holiday object with only a default translation for the name given. - * @throws Exception - */ - public function testHolidayGetNameWithOnlyDefaultTranslation(): void - { - $name = 'testHoliday'; - $holiday = new Holiday($name, ['en' => 'Holiday EN', 'en_US' => 'Holiday EN-US'], new DateTime(), 'nl_NL'); + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de'); + $this->assertEquals('Holiday DE', $holiday->getName()); - $this->assertIsString($holiday->getName()); + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $this->assertEquals('Holiday DE', $holiday->getName()); + + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); $this->assertEquals('Holiday EN-US', $holiday->getName()); - } - /** - * Tests the getName function of the Holiday object with only a default translation for the name given. - * @throws Exception - */ - public function testHolidayGetNameWithOnlyDefaultTranslationAndFallback(): void - { - $name = 'testHoliday'; - $translation = 'My Holiday'; - $holiday = new Holiday($name, ['en' => $translation], new DateTime(), 'nl_NL'); + // 'en' fallback + $translations = [ + 'de' => 'Holiday DE', + 'en' => 'Holiday EN', + ]; - $this->assertIsString($holiday->getName()); - $this->assertEquals($translation, $holiday->getName()); + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $this->assertEquals('Holiday DE', $holiday->getName()); + + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $this->assertEquals('Holiday EN', $holiday->getName()); + + + // No 'en' or 'en_US' fallback + $translations = [ + 'de' => 'Holiday DE', + ]; + + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $this->assertEquals('Holiday DE', $holiday->getName()); + + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $this->assertEquals('testHoliday', $holiday->getName()); } /** - * Tests the getName function of the Holiday object with only a default translation for the name given. - * - * @throws Exception + * Tests the getName function of the Holiday object with an explicit list of locales. */ - public function testHolidayGetNameWithOneNonDefaultTranslation(): void + public function testHolidayGetNameWithArgument(): void { - $name = 'testHoliday'; - $translation = 'My Holiday'; - $holiday = new Holiday($name, ['en_US' => $translation], new DateTime(), 'nl_NL'); + $translations = [ + 'de' => 'Holiday DE', + 'de_AT' => 'Holiday DE-AT', + 'nl' => 'Holiday NL', + 'it_IT' => 'Holiday IT-IT', + 'en_US' => 'Holiday EN-US', + ]; + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + + $this->assertEquals('Holiday DE', $holiday->getName(['de'])); + $this->assertEquals('Holiday DE', $holiday->getName(['ja', 'de', 'nl', 'it_IT'])); + $this->assertEquals('Holiday DE', $holiday->getName(['de_DE'])); + $this->assertEquals('Holiday DE', $holiday->getName(['de_DE_berlin'])); + $this->assertEquals('Holiday DE', $holiday->getName(['de_DE_berlin', 'nl', 'it_IT'])); + $this->assertEquals('Holiday DE-AT', $holiday->getName(['de_AT'])); + $this->assertEquals('Holiday DE-AT', $holiday->getName(['de_AT_vienna'])); + $this->assertEquals('Holiday NL', $holiday->getName(['nl'])); + $this->assertEquals('Holiday NL', $holiday->getName(['nl_NL'])); + $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT'])); + $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT', Holiday::LOCALE_SHORT_NAME])); + $this->assertEquals('testHoliday', $holiday->getName([Holiday::LOCALE_SHORT_NAME])); + + $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $this->assertEquals('Holiday EN-US', $holiday->getName()); - $this->assertNotNull($holiday->getName()); - $this->assertIsString($holiday->getName()); - $this->assertEquals($translation, $holiday->getName()); + $this->expectException(MissingTranslationException::class); + $holiday->getName(['it']); } /** From 91a2859c103ebe469104c4099081734f4c00fb6c Mon Sep 17 00:00:00 2001 From: John Luxford Date: Mon, 4 May 2020 22:57:24 -0500 Subject: [PATCH 070/687] Added Canada provider (#215) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Canada.php | 253 ++++++++++++++++++ src/Yasumi/Provider/Canada/Alberta.php | 79 ++++++ .../Provider/Canada/BritishColumbia.php | 53 ++++ src/Yasumi/Provider/Canada/Manitoba.php | 103 +++++++ src/Yasumi/Provider/Canada/NewBrunswick.php | 53 ++++ .../Canada/NewfoundlandAndLabrador.php | 150 +++++++++++ .../Provider/Canada/NorthwestTerritories.php | 53 ++++ src/Yasumi/Provider/Canada/NovaScotia.php | 103 +++++++ src/Yasumi/Provider/Canada/Nunavut.php | 78 ++++++ src/Yasumi/Provider/Canada/Ontario.php | 53 ++++ .../Provider/Canada/PrinceEdwardIsland.php | 103 +++++++ src/Yasumi/Provider/Canada/Quebec.php | 117 ++++++++ src/Yasumi/Provider/Canada/Saskatchewan.php | 79 ++++++ src/Yasumi/Provider/Canada/Yukon.php | 104 +++++++ src/Yasumi/data/translations/canadaDay.php | 18 ++ src/Yasumi/data/translations/civicHoliday.php | 18 ++ src/Yasumi/data/translations/discoveryDay.php | 18 ++ src/Yasumi/data/translations/familyDay.php | 18 ++ .../data/translations/goldCupParadeDay.php | 18 ++ src/Yasumi/data/translations/heritageDay.php | 18 ++ src/Yasumi/data/translations/islanderDay.php | 18 ++ src/Yasumi/data/translations/labourDay.php | 1 + src/Yasumi/data/translations/louisRielDay.php | 18 ++ src/Yasumi/data/translations/natalHoliday.php | 18 ++ .../nationalIndigenousPeoplesDay.php | 18 ++ .../data/translations/nationalPatriotsDay.php | 18 ++ .../translations/novaScotiaHeritageDay.php | 18 ++ .../data/translations/orangemensDay.php | 18 ++ .../data/translations/remembranceDay.php | 18 ++ .../translations/saintJeanBaptisteDay.php | 18 ++ .../data/translations/saskatchewanDay.php | 18 ++ src/Yasumi/data/translations/terryFoxDay.php | 18 ++ .../data/translations/thanksgivingDay.php | 18 ++ src/Yasumi/data/translations/victoriaDay.php | 18 ++ .../data/translations/yukonHeritageDay.php | 18 ++ tests/Canada/Alberta/AlbertaBaseTestCase.php | 44 +++ tests/Canada/Alberta/AlbertaTest.php | 86 ++++++ .../BritishColumbiaBaseTestCase.php | 44 +++ .../BritishColumbia/BritishColumbiaTest.php | 86 ++++++ tests/Canada/CanadaBaseTestCase.php | 39 +++ tests/Canada/CanadaDayTest.php | 93 +++++++ tests/Canada/CanadaTest.php | 90 +++++++ tests/Canada/ChristmasDayTest.php | 70 +++++ tests/Canada/LabourDayTest.php | 93 +++++++ .../Canada/Manitoba/ManitobaBaseTestCase.php | 44 +++ tests/Canada/Manitoba/ManitobaTest.php | 86 ++++++ .../NewBrunswick/NewBrunswickBaseTestCase.php | 44 +++ .../Canada/NewBrunswick/NewBrunswickTest.php | 86 ++++++ tests/Canada/NewYearsDayTest.php | 70 +++++ .../NewfoundlandAndLabradorBaseTestCase.php | 44 +++ .../NewfoundlandAndLabradorTest.php | 87 ++++++ .../NorthwestTerritoriesBaseTestCase.php | 44 +++ .../NorthwestTerritoriesTest.php | 86 ++++++ .../NovaScotia/NovaScotiaBaseTestCase.php | 44 +++ tests/Canada/NovaScotia/NovaScotiaTest.php | 86 ++++++ tests/Canada/Nunavut/NunavutBaseTestCase.php | 44 +++ tests/Canada/Nunavut/NunavutTest.php | 85 ++++++ tests/Canada/Ontario/OntarioBaseTestCase.php | 44 +++ tests/Canada/Ontario/OntarioTest.php | 86 ++++++ .../PrinceEdwardIslandBaseTestCase.php | 44 +++ .../PrinceEdwardIslandTest.php | 86 ++++++ tests/Canada/Quebec/QuebecBaseTestCase.php | 44 +++ tests/Canada/Quebec/QuebecTest.php | 85 ++++++ tests/Canada/RemembranceDayTest.php | 93 +++++++ .../Saskatchewan/SaskatchewanBaseTestCase.php | 44 +++ .../Canada/Saskatchewan/SaskatchewanTest.php | 86 ++++++ tests/Canada/ThanksgivingDayTest.php | 95 +++++++ tests/Canada/Yukon/YukonBaseTestCase.php | 44 +++ tests/Canada/Yukon/YukonTest.php | 87 ++++++ 70 files changed, 4076 insertions(+) create mode 100644 src/Yasumi/Provider/Canada.php create mode 100644 src/Yasumi/Provider/Canada/Alberta.php create mode 100644 src/Yasumi/Provider/Canada/BritishColumbia.php create mode 100644 src/Yasumi/Provider/Canada/Manitoba.php create mode 100644 src/Yasumi/Provider/Canada/NewBrunswick.php create mode 100644 src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php create mode 100644 src/Yasumi/Provider/Canada/NorthwestTerritories.php create mode 100644 src/Yasumi/Provider/Canada/NovaScotia.php create mode 100644 src/Yasumi/Provider/Canada/Nunavut.php create mode 100644 src/Yasumi/Provider/Canada/Ontario.php create mode 100644 src/Yasumi/Provider/Canada/PrinceEdwardIsland.php create mode 100644 src/Yasumi/Provider/Canada/Quebec.php create mode 100644 src/Yasumi/Provider/Canada/Saskatchewan.php create mode 100644 src/Yasumi/Provider/Canada/Yukon.php create mode 100644 src/Yasumi/data/translations/canadaDay.php create mode 100644 src/Yasumi/data/translations/civicHoliday.php create mode 100644 src/Yasumi/data/translations/discoveryDay.php create mode 100644 src/Yasumi/data/translations/familyDay.php create mode 100644 src/Yasumi/data/translations/goldCupParadeDay.php create mode 100644 src/Yasumi/data/translations/heritageDay.php create mode 100644 src/Yasumi/data/translations/islanderDay.php create mode 100644 src/Yasumi/data/translations/louisRielDay.php create mode 100644 src/Yasumi/data/translations/natalHoliday.php create mode 100644 src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php create mode 100644 src/Yasumi/data/translations/nationalPatriotsDay.php create mode 100644 src/Yasumi/data/translations/novaScotiaHeritageDay.php create mode 100644 src/Yasumi/data/translations/orangemensDay.php create mode 100644 src/Yasumi/data/translations/remembranceDay.php create mode 100644 src/Yasumi/data/translations/saintJeanBaptisteDay.php create mode 100644 src/Yasumi/data/translations/saskatchewanDay.php create mode 100644 src/Yasumi/data/translations/terryFoxDay.php create mode 100644 src/Yasumi/data/translations/thanksgivingDay.php create mode 100644 src/Yasumi/data/translations/victoriaDay.php create mode 100644 src/Yasumi/data/translations/yukonHeritageDay.php create mode 100644 tests/Canada/Alberta/AlbertaBaseTestCase.php create mode 100644 tests/Canada/Alberta/AlbertaTest.php create mode 100644 tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php create mode 100644 tests/Canada/BritishColumbia/BritishColumbiaTest.php create mode 100644 tests/Canada/CanadaBaseTestCase.php create mode 100644 tests/Canada/CanadaDayTest.php create mode 100644 tests/Canada/CanadaTest.php create mode 100644 tests/Canada/ChristmasDayTest.php create mode 100644 tests/Canada/LabourDayTest.php create mode 100644 tests/Canada/Manitoba/ManitobaBaseTestCase.php create mode 100644 tests/Canada/Manitoba/ManitobaTest.php create mode 100644 tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php create mode 100644 tests/Canada/NewBrunswick/NewBrunswickTest.php create mode 100644 tests/Canada/NewYearsDayTest.php create mode 100644 tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php create mode 100644 tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php create mode 100644 tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php create mode 100644 tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php create mode 100644 tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php create mode 100644 tests/Canada/NovaScotia/NovaScotiaTest.php create mode 100644 tests/Canada/Nunavut/NunavutBaseTestCase.php create mode 100644 tests/Canada/Nunavut/NunavutTest.php create mode 100644 tests/Canada/Ontario/OntarioBaseTestCase.php create mode 100644 tests/Canada/Ontario/OntarioTest.php create mode 100644 tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php create mode 100644 tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php create mode 100644 tests/Canada/Quebec/QuebecBaseTestCase.php create mode 100644 tests/Canada/Quebec/QuebecTest.php create mode 100644 tests/Canada/RemembranceDayTest.php create mode 100644 tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php create mode 100644 tests/Canada/Saskatchewan/SaskatchewanTest.php create mode 100644 tests/Canada/ThanksgivingDayTest.php create mode 100644 tests/Canada/Yukon/YukonBaseTestCase.php create mode 100644 tests/Canada/Yukon/YukonTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index d67397d7e..315c2909d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added +- Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php new file mode 100644 index 000000000..6ed1f7ea2 --- /dev/null +++ b/src/Yasumi/Provider/Canada.php @@ -0,0 +1,253 @@ + + */ + +namespace Yasumi\Provider; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Provider for all holidays in Canada. + */ +class Canada 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 = 'CA'; + + /** + * Initialize holidays for Canada. + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'America/Toronto'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + + // Add Christian holidays + $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); + + // Calculate other holidays + $this->calculateCanadaDay(); + $this->calculateLabourDay(); + $this->calculateThanksgivingDay(); + $this->calculateRemembranceDay(); + } + + /** + * Family Day. + * + * @link https://en.wikipedia.org/wiki/Family_Day_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateFamilyDay(): void + { + if ($this->year < 2009) { + return; + } + + $this->addHoliday(new Holiday( + 'familyDay', + [], + new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Victoria Day. + * + * @link https://en.wikipedia.org/wiki/Victoria_Day + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateVictoriaDay(): void + { + if ($this->year < 1845) { + return; + } + + $this->addHoliday(new Holiday( + 'victoriaDay', + [], + new DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * National Indigenous Peoples Day. + * + * @link https://www.rcaanc-cirnac.gc.ca/eng/1100100013248/1534872397533 + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateNationalIndigenousPeoplesDay(): void + { + if ($this->year < 1996) { + return; + } + + $this->addHoliday(new Holiday( + 'nationalIndigenousPeoplesDay', + [], + new DateTime("$this->year-06-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Canada Day. + * + * @link https://en.wikipedia.org/wiki/Canada_Day + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateCanadaDay(): void + { + if ($this->year < 1983) { + return; + } + + $this->addHoliday(new Holiday( + 'canadaDay', + [], + new DateTime($this->year . '-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Civic Holiday. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateCivicHoliday(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'civicHoliday', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Labour Day. + * + * @link https://en.wikipedia.org/wiki/Labour_Day + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateLabourDay(): void + { + if ($this->year < 1894) { + return; + } + + $this->addHoliday(new Holiday( + 'labourDay', + [], + new DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Thanksgiving. + * + * @link https://en.wikipedia.org/wiki/Thanksgiving_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateThanksgivingDay(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'thanksgivingDay', + [], + new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Remembrance Day. + * + * @link https://en.wikipedia.org/wiki/Remembrance_Day_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateRemembranceDay(): void + { + if ($this->year < 1919) { + return; + } + + $this->addHoliday(new Holiday( + 'remembranceDay', + [], + new DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php new file mode 100644 index 000000000..3c4057f46 --- /dev/null +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Alberta (Canada). + * + * Manitoba is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Alberta + */ +class Alberta extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-AB'; + + /** + * Initialize holidays for Alberta (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Edmonton'; + + $this->calculateHeritageDay(); + $this->calculateFamilyDay(); + $this->calculateVictoriaDay(); + } + + /** + * Heritage Day. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateHeritageDay(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'heritageDay', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/BritishColumbia.php b/src/Yasumi/Provider/Canada/BritishColumbia.php new file mode 100644 index 000000000..2227be6bf --- /dev/null +++ b/src/Yasumi/Provider/Canada/BritishColumbia.php @@ -0,0 +1,53 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; + +/** + * Provider for all holidays in British Columbia (Canada). + * + * British Columbia is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/British_Columbia + */ +class BritishColumbia extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-BC'; + + /** + * Initialize holidays for British Columbia (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Vancouver'; + + $this->calculateCivicHoliday(); + $this->calculateFamilyDay(); + $this->calculateVictoriaDay(); + } +} diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php new file mode 100644 index 000000000..8587202ff --- /dev/null +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -0,0 +1,103 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Manitoba (Canada). + * + * Manitoba is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Manitoba + */ +class Manitoba extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-MB'; + + /** + * Initialize holidays for Manitoba (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Winnipeg'; + + $this->calculateCivicHoliday(); + $this->calculateLouisRielDay(); + $this->calculateVictoriaDay(); + } + + /** + * Civic Holiday. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateCivicHoliday(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'terryFoxDay', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Louis Riel Day. + * + * @link https://en.wikipedia.org/wiki/Family_Day_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateLouisRielDay(): void + { + if ($this->year < 2008) { + return; + } + + $this->addHoliday(new Holiday( + 'louisRielDay', + [], + new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/NewBrunswick.php b/src/Yasumi/Provider/Canada/NewBrunswick.php new file mode 100644 index 000000000..1ecbe7191 --- /dev/null +++ b/src/Yasumi/Provider/Canada/NewBrunswick.php @@ -0,0 +1,53 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; + +/** + * Provider for all holidays in New Brunswick (Canada). + * + * New Brunswick is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/New_Brunswick + */ +class NewBrunswick extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-NB'; + + /** + * Initialize holidays for New Brunswick (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Halifax'; + + $this->calculateCivicHoliday(); + $this->calculateFamilyDay(); + $this->calculateVictoriaDay(); + } +} diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php new file mode 100644 index 000000000..a484827c2 --- /dev/null +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -0,0 +1,150 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; +use Yasumi\SubstituteHoliday; + +/** + * Provider for all holidays in Newfoundland and Labrador (Canada). + * + * Manitoba is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Newfoundland_and_Labrador + */ +class NewfoundlandAndLabrador extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-NL'; + + /** + * Initialize holidays for Newfoundland and Labrador (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/St_Johns'; + + $this->calculateStPatricksDay(); + $this->calculateOrangemensDay(); + $this->addHoliday($this->stGeorgesDay($this->year, $this->timezone, $this->locale)); + } + + /** + * 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 InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + * @throws \Exception + */ + private function calculateStPatricksDay(): void + { + if ($this->year < 1971) { + return; + } + + $holiday = new Holiday( + 'stPatricksDay', + ['en' => 'St. Patrick’s Day'], + new DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($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 + )); + } + } + + /** + * Orangemen's Day. + * + * 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 InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + * @throws \Exception + */ + private function calculateOrangemensDay(): void + { + if ($this->year < 1926) { + return; + } + + $holiday = new Holiday( + 'orangemensDay', + [], + new DateTime($this->year . '-7-12', DateTimeZoneFactory::getDateTimeZone($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/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php new file mode 100644 index 000000000..301e8b1db --- /dev/null +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -0,0 +1,53 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; + +/** + * Provider for all holidays in Northwest Territories (Canada). + * + * Northwest Territories is a territory of Canada. + * + * @link https://en.wikipedia.org/wiki/Northwest_Territories + */ +class NorthwestTerritories extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-NT'; + + /** + * Initialize holidays for Northwest Territories (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Yellowknife'; + + $this->calculateCivicHoliday(); + $this->calculateNationalIndigenousPeoplesDay(); + $this->calculateVictoriaDay(); + } +} diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php new file mode 100644 index 000000000..d6177a5f6 --- /dev/null +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -0,0 +1,103 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Nova Scotia (Canada). + * + * Nova Scotia is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Nova_Scotia + */ +class NovaScotia extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-NS'; + + /** + * Initialize holidays for Nova Scotia (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Halifax'; + + $this->calculateCivicHoliday(); + $this->calculateHeritageDay(); + $this->calculateVictoriaDay(); + } + + /** + * Civic Holiday. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateCivicHoliday(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'natalHoliday', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Nova Scotia Heritage Day. + * + * @link https://en.wikipedia.org/wiki/Family_Day_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateHeritageDay(): void + { + if ($this->year < 2015) { + return; + } + + $this->addHoliday(new Holiday( + 'novaScotiaHeritageDay', + [], + new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/Nunavut.php b/src/Yasumi/Provider/Canada/Nunavut.php new file mode 100644 index 000000000..9c5177774 --- /dev/null +++ b/src/Yasumi/Provider/Canada/Nunavut.php @@ -0,0 +1,78 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Nunavut (Canada). + * + * Nunavut is a territory of Canada. + * + * @link https://en.wikipedia.org/wiki/Nunavut + */ +class Nunavut extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-NU'; + + /** + * Initialize holidays for Nunavut (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Iqaluit'; + + $this->calculateCivicHoliday(); + $this->calculateVictoriaDay(); + } + + /** + * Civic Holiday. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateCivicHoliday(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'civicHoliday', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/Ontario.php b/src/Yasumi/Provider/Canada/Ontario.php new file mode 100644 index 000000000..d7bff7b50 --- /dev/null +++ b/src/Yasumi/Provider/Canada/Ontario.php @@ -0,0 +1,53 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; + +/** + * Provider for all holidays in Ontario (Canada). + * + * Ontario is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Ontario + */ +class Ontario extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-ON'; + + /** + * Initialize holidays for Ontario (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Toronto'; + + $this->calculateCivicHoliday(); + $this->calculateFamilyDay(); + $this->calculateVictoriaDay(); + } +} diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php new file mode 100644 index 000000000..7cbc53a69 --- /dev/null +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -0,0 +1,103 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Prince Edward Island (Canada). + * + * Prince Edward Island is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Prince_Edward_Island + */ +class PrinceEdwardIsland extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-PE'; + + /** + * Initialize holidays for Prince Edward Island (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Halifax'; + + $this->calculateIslanderDay(); + $this->calculateGoldCupParadeDay(); + $this->calculateVictoriaDay(); + } + + /** + * Islander Day. + * + * @link https://en.wikipedia.org/wiki/Family_Day_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateIslanderDay(): void + { + if ($this->year < 2009) { + return; + } + + $this->addHoliday(new Holiday( + 'islanderDay', + [], + new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Gold Cup Parade Day. + * + * @link https://en.wikipedia.org/wiki/Public_holidays_in_Canada#Statutory_holidays + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateGoldCupParadeDay(): void + { + if ($this->year < 1962) { + return; + } + + $this->addHoliday(new Holiday( + 'goldCupParadeDay', + [], + new DateTime("third friday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php new file mode 100644 index 000000000..d23e01960 --- /dev/null +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -0,0 +1,117 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Quebec (Canada). + * + * Quebec is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Quebec + */ +class Quebec extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-QC'; + + /** + * Initialize holidays for Quebec (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Toronto'; + + $this->addHoliday($this->saintJeanBaptisteDay($this->year, $this->timezone, $this->locale)); + $this->calculateNationalPatriotsDay(); + } + + /** + * Saint-Jean-Baptiste Day. + * + * The Nativity of John the Baptist (or Birth of John the Baptist, or Nativity of the Forerunner) is a Christian + * feast day celebrating the birth of John the Baptist, a prophet who foretold the coming of the Messiah in the + * person of Jesus, whom he later baptised. The Nativity of John the Baptist on June 24 comes three months after the + * celebration on March 25 of the Annunciation, when the angel Gabriel told Mary that her cousin Elizabeth was in + * her sixth month of pregnancy. + * + * @link https://en.wikipedia.org/wiki/Saint-Jean-Baptiste_Day + * + * @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, + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. + * + * @return Holiday + * + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function saintJeanBaptisteDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'saintJeanBaptisteDay', + [], + new DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * National Patriot's Day. + * + * @link https://en.wikipedia.org/wiki/National_Patriots%27_Day + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateNationalPatriotsDay(): void + { + if ($this->year < 2003) { + return; + } + + $this->addHoliday(new Holiday( + 'nationalPatriotsDay', + [], + new DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php new file mode 100644 index 000000000..f70736f12 --- /dev/null +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Saskatchewan (Canada). + * + * Saskatchewan is a province of Canada. + * + * @link https://en.wikipedia.org/wiki/Saskatchewan + */ +class Saskatchewan extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-SK'; + + /** + * Initialize holidays for Saskatchewan (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Regina'; + + $this->calculateSaskatchewanDay(); + $this->calculateFamilyDay(); + $this->calculateVictoriaDay(); + } + + /** + * Civic Holiday. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateSaskatchewanDay(): void + { + if ($this->year < 1879) { + return; + } + + $this->addHoliday(new Holiday( + 'saskatchewanDay', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php new file mode 100644 index 000000000..17c129191 --- /dev/null +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -0,0 +1,104 @@ + + */ + +namespace Yasumi\Provider\Canada; + +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\Canada; +use Yasumi\Provider\DateTimeZoneFactory; + +/** + * Provider for all holidays in Yukon (Canada). + * + * Manitoba is a territory of Canada. + * + * @link https://en.wikipedia.org/wiki/Yukon + */ +class Yukon extends Canada +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'CA-YT'; + + /** + * Initialize holidays for Yukon (Canada). + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->timezone = 'America/Whitehorse'; + + $this->calculateDiscoveryDay(); + $this->calculateHeritageDay(); + $this->calculateNationalIndigenousPeoplesDay(); + $this->calculateVictoriaDay(); + } + + /** + * Discovery Day. + * + * @link https://en.wikipedia.org/wiki/Civic_Holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateDiscoveryDay(): void + { + if ($this->year < 1897) { + return; + } + + $this->addHoliday(new Holiday( + 'discoveryDay', + [], + new DateTime("third monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Yukon Heritage Day. + * + * @link https://en.wikipedia.org/wiki/Family_Day_(Canada) + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateHeritageDay(): void + { + if ($this->year < 2009) { + return; + } + + $this->addHoliday(new Holiday( + 'yukonHeritageDay', + [], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/src/Yasumi/data/translations/canadaDay.php b/src/Yasumi/data/translations/canadaDay.php new file mode 100644 index 000000000..d1afb0b1e --- /dev/null +++ b/src/Yasumi/data/translations/canadaDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Canada Day +return [ + 'en' => 'Canada Day', + 'fr' => 'Fête du Canada', +]; diff --git a/src/Yasumi/data/translations/civicHoliday.php b/src/Yasumi/data/translations/civicHoliday.php new file mode 100644 index 000000000..75f697a3e --- /dev/null +++ b/src/Yasumi/data/translations/civicHoliday.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Civic Holiday +return [ + 'en' => 'Civic Holiday', + 'fr' => 'Premier lundi d’août', +]; diff --git a/src/Yasumi/data/translations/discoveryDay.php b/src/Yasumi/data/translations/discoveryDay.php new file mode 100644 index 000000000..1ba56039d --- /dev/null +++ b/src/Yasumi/data/translations/discoveryDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Discovery Day +return [ + 'en' => 'Discovery Day', + 'fr' => 'Journée découverte', +]; diff --git a/src/Yasumi/data/translations/familyDay.php b/src/Yasumi/data/translations/familyDay.php new file mode 100644 index 000000000..9160573f8 --- /dev/null +++ b/src/Yasumi/data/translations/familyDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Family Day +return [ + 'en' => 'Family Day', + 'fr' => 'Fête de la famille', +]; diff --git a/src/Yasumi/data/translations/goldCupParadeDay.php b/src/Yasumi/data/translations/goldCupParadeDay.php new file mode 100644 index 000000000..0fb7a66fe --- /dev/null +++ b/src/Yasumi/data/translations/goldCupParadeDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Gold Cup Parade Day +return [ + 'en' => 'Gold Cup Parade Day', + 'fr' => 'Défilé de la Coupe d’or', +]; diff --git a/src/Yasumi/data/translations/heritageDay.php b/src/Yasumi/data/translations/heritageDay.php new file mode 100644 index 000000000..a7b0c788b --- /dev/null +++ b/src/Yasumi/data/translations/heritageDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Heritage Day +return [ + 'en' => 'Heritage Day', + 'fr' => 'Fête du patrimoine', +]; diff --git a/src/Yasumi/data/translations/islanderDay.php b/src/Yasumi/data/translations/islanderDay.php new file mode 100644 index 000000000..6cf9aff95 --- /dev/null +++ b/src/Yasumi/data/translations/islanderDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Islander Day +return [ + 'en' => 'Islander Day', + 'fr' => 'Fête des Insulaires', +]; diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index d8abc0c2e..53dea8d78 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -18,4 +18,5 @@ 'ko' => '노동절', 'nl' => 'Dag van de arbeid', 'sk' => 'Sviatok práce', + 'fr' => 'Fête du travail', ]; diff --git a/src/Yasumi/data/translations/louisRielDay.php b/src/Yasumi/data/translations/louisRielDay.php new file mode 100644 index 000000000..bd79411de --- /dev/null +++ b/src/Yasumi/data/translations/louisRielDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Louis Riel Day +return [ + 'en' => 'Louis Riel Day', + 'fr' => 'Journée Louis Riel', +]; diff --git a/src/Yasumi/data/translations/natalHoliday.php b/src/Yasumi/data/translations/natalHoliday.php new file mode 100644 index 000000000..03b88bb59 --- /dev/null +++ b/src/Yasumi/data/translations/natalHoliday.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Natal Holiday +return [ + 'en' => 'Natal Holiday', + 'fr' => 'Jour de la Fondation', +]; diff --git a/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php b/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php new file mode 100644 index 000000000..e8f14441c --- /dev/null +++ b/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for National Indigenous Peoples Day +return [ + 'en' => 'National Indigenous Peoples Day', + 'fr' => 'Journée nationale des peuples autochtones', +]; diff --git a/src/Yasumi/data/translations/nationalPatriotsDay.php b/src/Yasumi/data/translations/nationalPatriotsDay.php new file mode 100644 index 000000000..8f85292a7 --- /dev/null +++ b/src/Yasumi/data/translations/nationalPatriotsDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for National Patriot's Day +return [ + 'en' => 'National Patriot’s Day', + 'fr' => 'Journée nationale des patriotes', +]; diff --git a/src/Yasumi/data/translations/novaScotiaHeritageDay.php b/src/Yasumi/data/translations/novaScotiaHeritageDay.php new file mode 100644 index 000000000..6169637f6 --- /dev/null +++ b/src/Yasumi/data/translations/novaScotiaHeritageDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Nova Scotia Heritage Day +return [ + 'en' => 'Nova Scotia Heritage Day', + 'fr' => 'Journée du patrimoine de la Nouvelle-Écosse', +]; diff --git a/src/Yasumi/data/translations/orangemensDay.php b/src/Yasumi/data/translations/orangemensDay.php new file mode 100644 index 000000000..24981cea4 --- /dev/null +++ b/src/Yasumi/data/translations/orangemensDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Orangemen's Day +return [ + 'en' => 'Orangemen’s Day', + 'fr' => 'Fête des orangistes', +]; diff --git a/src/Yasumi/data/translations/remembranceDay.php b/src/Yasumi/data/translations/remembranceDay.php new file mode 100644 index 000000000..0ee4f1c6c --- /dev/null +++ b/src/Yasumi/data/translations/remembranceDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Remembrance Day +return [ + 'en' => 'Remembrance Day', + 'fr' => 'Jour du souvenir', +]; diff --git a/src/Yasumi/data/translations/saintJeanBaptisteDay.php b/src/Yasumi/data/translations/saintJeanBaptisteDay.php new file mode 100644 index 000000000..0d1f1cf0e --- /dev/null +++ b/src/Yasumi/data/translations/saintJeanBaptisteDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Saint-Jean Baptiste Day +return [ + 'en' => 'Saint-Jean-Baptiste Day', + 'fr' => 'Fête de la Saint-Jean-Baptiste', +]; diff --git a/src/Yasumi/data/translations/saskatchewanDay.php b/src/Yasumi/data/translations/saskatchewanDay.php new file mode 100644 index 000000000..f35d3d7c6 --- /dev/null +++ b/src/Yasumi/data/translations/saskatchewanDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Saskatchewan Day +return [ + 'en' => 'Saskatchewan Day', + 'fr' => 'Jour Saskatchewan', +]; diff --git a/src/Yasumi/data/translations/terryFoxDay.php b/src/Yasumi/data/translations/terryFoxDay.php new file mode 100644 index 000000000..41d6394f0 --- /dev/null +++ b/src/Yasumi/data/translations/terryFoxDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Terry Fox Day +return [ + 'en' => 'Terry Fox Day', + 'fr' => 'Journée Terry Fox', +]; diff --git a/src/Yasumi/data/translations/thanksgivingDay.php b/src/Yasumi/data/translations/thanksgivingDay.php new file mode 100644 index 000000000..5fad7ed10 --- /dev/null +++ b/src/Yasumi/data/translations/thanksgivingDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Thanksgiving +return [ + 'en' => 'Thanksgiving', + 'fr' => 'Action de grâce', +]; diff --git a/src/Yasumi/data/translations/victoriaDay.php b/src/Yasumi/data/translations/victoriaDay.php new file mode 100644 index 000000000..d4b87cb0c --- /dev/null +++ b/src/Yasumi/data/translations/victoriaDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Victoria Day +return [ + 'en' => 'Victoria Day', + 'fr' => 'Fête de la Reine', +]; diff --git a/src/Yasumi/data/translations/yukonHeritageDay.php b/src/Yasumi/data/translations/yukonHeritageDay.php new file mode 100644 index 000000000..a4d10b426 --- /dev/null +++ b/src/Yasumi/data/translations/yukonHeritageDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Yukon Heritage Day +return [ + 'en' => 'Yukon Heritage Day', + 'fr' => 'Journée du patrimoine du Yukon', +]; diff --git a/tests/Canada/Alberta/AlbertaBaseTestCase.php b/tests/Canada/Alberta/AlbertaBaseTestCase.php new file mode 100644 index 000000000..305b2c781 --- /dev/null +++ b/tests/Canada/Alberta/AlbertaBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Alberta; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Alberta holiday provider. + */ +abstract class AlbertaBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Alberta'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Edmonton'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php new file mode 100644 index 000000000..d4a3e313d --- /dev/null +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\Alberta; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Alberta. + */ +class AlbertaTest extends AlbertaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Alberta are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'heritageDay', + 'familyDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Alberta 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 Alberta 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 Alberta 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 Alberta 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/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php b/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php new file mode 100644 index 000000000..8be5614cc --- /dev/null +++ b/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\BritishColumbia; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the British Columbia holiday provider. + */ +abstract class BritishColumbiaBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\BritishColumbia'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Vancouver'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php new file mode 100644 index 000000000..b29541e60 --- /dev/null +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\BritishColumbia; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in British Columbia. + */ +class BritishColumbiaTest extends BritishColumbiaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in BritishColumbia are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'civicHoliday', + 'familyDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in BritishColumbia 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 BritishColumbia 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 BritishColumbia 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 BritishColumbia 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/Canada/CanadaBaseTestCase.php b/tests/Canada/CanadaBaseTestCase.php new file mode 100644 index 000000000..5dc8f7a23 --- /dev/null +++ b/tests/Canada/CanadaBaseTestCase.php @@ -0,0 +1,39 @@ + + */ + +namespace Yasumi\tests\Canada; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Class CanadaBaseTestCase. + */ +abstract class CanadaBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Country (name) to be tested + */ + public const REGION = 'Canada'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Toronto'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; +} diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php new file mode 100644 index 000000000..e49293f70 --- /dev/null +++ b/tests/Canada/CanadaDayTest.php @@ -0,0 +1,93 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Canada Day in Canada. + */ +class CanadaDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'canadaDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1983; + + /** + * Tests Canada Day on or after 1983. Canada Day was established in 1983 on July 1st. + * @throws Exception + * @throws ReflectionException + */ + public function testCanadaDayOnAfter1983() + { + $year = $this->generateRandomYear(1983); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-07-01", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Canada Day before 1879. Canada Day was established as Dominion Day in 1879 on July 1st. + * @throws ReflectionException + */ + public function testCanadaDayBefore1879() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests 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 => 'Canada 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_OFFICIAL + ); + } +} diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php new file mode 100644 index 000000000..a0af70f03 --- /dev/null +++ b/tests/Canada/CanadaTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Canada; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in the Canada. + */ +class CanadaTest extends CanadaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in the USA are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'canadaDay', + 'labourDay', + 'remembranceDay', + 'thanksgivingDay', + 'christmasDay', + 'secondChristmasDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in the Canada 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 the Canada 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 the Canada 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 the Canada 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(1986); + } +} diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php new file mode 100644 index 000000000..7b21f9708 --- /dev/null +++ b/tests/Canada/ChristmasDayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in the USA. + */ +class ChristmasDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * Tests Christmas Day. Christmas Day is celebrated on December 25th. + * @throws Exception + * @throws ReflectionException + */ + public function testChristmasDay() + { + $year = 2001; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests 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/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php new file mode 100644 index 000000000..abb9303d5 --- /dev/null +++ b/tests/Canada/LabourDayTest.php @@ -0,0 +1,93 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Labour Day in Canada. + */ +class LabourDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'labourDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1894; + + /** + * Tests Labour Day on or after 1894. Labour Day was established since 1894 on the first Monday of September. + * @throws Exception + * @throws ReflectionException + */ + public function testLabourDayOnAfter1894() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("first monday of september $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Labour Day before 1894. Labour Day was established since 1894 on the first Monday of September. + * @throws ReflectionException + */ + public function testLabourDayBefore1894() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests 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 => 'Labour 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_OFFICIAL + ); + } +} diff --git a/tests/Canada/Manitoba/ManitobaBaseTestCase.php b/tests/Canada/Manitoba/ManitobaBaseTestCase.php new file mode 100644 index 000000000..3813a457c --- /dev/null +++ b/tests/Canada/Manitoba/ManitobaBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Manitoba; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Manitoba holiday provider. + */ +abstract class ManitobaBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Manitoba'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Winnipeg'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php new file mode 100644 index 000000000..c01302460 --- /dev/null +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\Manitoba; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Manitoba. + */ +class ManitobaTest extends ManitobaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Manitoba are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'terryFoxDay', + 'louisRielDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Manitoba 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 Manitoba 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 Manitoba 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 Manitoba 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/Canada/NewBrunswick/NewBrunswickBaseTestCase.php b/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php new file mode 100644 index 000000000..cad679d25 --- /dev/null +++ b/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\NewBrunswick; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the New Brunswick holiday provider. + */ +abstract class NewBrunswickBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\NewBrunswick'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Halifax'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php new file mode 100644 index 000000000..7952bb723 --- /dev/null +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\NewBrunswick; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in New Brunswick. + */ +class NewBrunswickTest extends NewBrunswickBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in NewBrunswick are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'civicHoliday', + 'familyDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in NewBrunswick 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 NewBrunswick 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 NewBrunswick 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 NewBrunswick 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/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php new file mode 100644 index 000000000..867512312 --- /dev/null +++ b/tests/Canada/NewYearsDayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in Canada. + */ +class NewYearsDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests New Years Day. + * @throws Exception + * @throws ReflectionException + */ + public function testNewYearsDay() + { + $year = 1997; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests 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 => '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(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php new file mode 100644 index 000000000..891b8dcd7 --- /dev/null +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\NewfoundlandAndLabrador; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Newfoundland and Labrador holiday provider. + */ +abstract class NewfoundlandAndLabradorBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\NewfoundlandAndLabrador'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/St_Johns'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php new file mode 100644 index 000000000..57d26378e --- /dev/null +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -0,0 +1,87 @@ + + */ + +namespace Yasumi\tests\Canada\NewfoundlandAndLabrador; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Newfoundland and Labrador. + */ +class NewfoundlandAndLabradorTest extends NewfoundlandAndLabradorBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in NewfoundlandAndLabrador are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'stGeorgesDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in NewfoundlandAndLabrador 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 NewfoundlandAndLabrador 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 NewfoundlandAndLabrador are defined by the provider class + * @throws ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([ + 'stPatricksDay', + 'orangemensDay', + ], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in NewfoundlandAndLabrador 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/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php new file mode 100644 index 000000000..105188a60 --- /dev/null +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\NorthwestTerritories; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Northwest Territories holiday provider. + */ +abstract class NorthwestTerritoriesBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\NorthwestTerritories'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Yellowknife'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php new file mode 100644 index 000000000..e25894788 --- /dev/null +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\NorthwestTerritories; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Northwest Territories. + */ +class NorthwestTerritoriesTest extends NorthwestTerritoriesBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in NorthwestTerritories are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'civicHoliday', + 'nationalIndigenousPeoplesDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in NorthwestTerritories 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 NorthwestTerritories 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 NorthwestTerritories 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 NorthwestTerritories 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/Canada/NovaScotia/NovaScotiaBaseTestCase.php b/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php new file mode 100644 index 000000000..40cd1de90 --- /dev/null +++ b/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\NovaScotia; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Nova Scotia holiday provider. + */ +abstract class NovaScotiaBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\NovaScotia'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Halifax'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php new file mode 100644 index 000000000..891661bf9 --- /dev/null +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\NovaScotia; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Nova Scotia. + */ +class NovaScotiaTest extends NovaScotiaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Nova Scotia are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'natalHoliday', + 'novaScotiaHeritageDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in NovaScotia 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 NovaScotia 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 NovaScotia 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 NovaScotia 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/Canada/Nunavut/NunavutBaseTestCase.php b/tests/Canada/Nunavut/NunavutBaseTestCase.php new file mode 100644 index 000000000..bcffb099f --- /dev/null +++ b/tests/Canada/Nunavut/NunavutBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Nunavut; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Nunavut holiday provider. + */ +abstract class NunavutBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Nunavut'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Iqaluit'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php new file mode 100644 index 000000000..a540b905c --- /dev/null +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -0,0 +1,85 @@ + + */ + +namespace Yasumi\tests\Canada\Nunavut; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Nunavut. + */ +class NunavutTest extends NunavutBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Nunavut are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'civicHoliday', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Nunavut 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 Nunavut 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 Nunavut 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 Nunavut 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/Canada/Ontario/OntarioBaseTestCase.php b/tests/Canada/Ontario/OntarioBaseTestCase.php new file mode 100644 index 000000000..d7e0ad953 --- /dev/null +++ b/tests/Canada/Ontario/OntarioBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Ontario; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Ontario holiday provider. + */ +abstract class OntarioBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Ontario'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Toronto'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php new file mode 100644 index 000000000..97d6bfb3d --- /dev/null +++ b/tests/Canada/Ontario/OntarioTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\Ontario; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Ontario. + */ +class OntarioTest extends OntarioBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Ontario are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'civicHoliday', + 'familyDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Ontario 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 Ontario 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 Ontario 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 Ontario 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/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php new file mode 100644 index 000000000..033cb2119 --- /dev/null +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\PrinceEdwardIsland; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Prince Edward Island holiday provider. + */ +abstract class PrinceEdwardIslandBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\PrinceEdwardIsland'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Halifax'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php new file mode 100644 index 000000000..36a76514a --- /dev/null +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\PrinceEdwardIsland; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Prince Edward Island. + */ +class PrinceEdwardIslandTest extends PrinceEdwardIslandBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Prince Edward Island are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'goldCupParadeDay', + 'islanderDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in PrinceEdwardIsland 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 PrinceEdwardIsland 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 PrinceEdwardIsland 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 PrinceEdwardIsland 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/Canada/Quebec/QuebecBaseTestCase.php b/tests/Canada/Quebec/QuebecBaseTestCase.php new file mode 100644 index 000000000..d77226b39 --- /dev/null +++ b/tests/Canada/Quebec/QuebecBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Quebec; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Quebec holiday provider. + */ +abstract class QuebecBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Quebec'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Toronto'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php new file mode 100644 index 000000000..f97f3d1f0 --- /dev/null +++ b/tests/Canada/Quebec/QuebecTest.php @@ -0,0 +1,85 @@ + + */ + +namespace Yasumi\tests\Canada\Quebec; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Quebec. + */ +class QuebecTest extends QuebecBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Quebec are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'saintJeanBaptisteDay', + 'nationalPatriotsDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Quebec 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 Quebec 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 Quebec 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 Quebec 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/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php new file mode 100644 index 000000000..1efc8bb91 --- /dev/null +++ b/tests/Canada/RemembranceDayTest.php @@ -0,0 +1,93 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Remembrance Day in Canada. + */ +class RemembranceDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'remembranceDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1919; + + /** + * Tests Remembrance Day on or after 1919. Remembrance Day was established in 1919 on November 11. + * @throws Exception + * @throws ReflectionException + */ + public function testRemembranceDayOnAfter1919() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-11-11", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Remembrance Day before 1919. Remembrance Day was established in 1919 on November 11. + * @throws ReflectionException + */ + public function testVeteransDayBefore1919() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1954), + [self::LOCALE => 'Remembrance 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_OFFICIAL + ); + } +} diff --git a/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php b/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php new file mode 100644 index 000000000..e47f84c16 --- /dev/null +++ b/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Saskatchewan; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Saskatchewan holiday provider. + */ +abstract class SaskatchewanBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Saskatchewan'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Regina'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php new file mode 100644 index 000000000..c6ca3cacd --- /dev/null +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\Canada\Saskatchewan; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Saskatchewan. + */ +class SaskatchewanTest extends SaskatchewanBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Saskatchewan are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'victoriaDay', + 'saskatchewanDay', + 'familyDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Saskatchewan 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 Saskatchewan 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 Saskatchewan 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 Saskatchewan 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/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php new file mode 100644 index 000000000..5ec7c8317 --- /dev/null +++ b/tests/Canada/ThanksgivingDayTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Thanksgiving Day in Canada. + */ +class ThanksgivingDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'thanksgivingDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1879; + + /** + * Tests Thanksgiving Day on or after 1879. Thanksgiving Day is celebrated since 1879 on the second Monday + * of October. + * @throws Exception + * @throws ReflectionException + */ + public function testThanksgivingDayOnAfter1879() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("second monday of october $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Thanksgiving Day before 1879. ThanksgivingDay Day is celebrated since 1879 on the second Monday + * of October. + * @throws ReflectionException + */ + public function testThanksgivingDayBefore1879() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests 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 => 'Thanksgiving'] + ); + } + + /** + * 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/Canada/Yukon/YukonBaseTestCase.php b/tests/Canada/Yukon/YukonBaseTestCase.php new file mode 100644 index 000000000..1db4d570b --- /dev/null +++ b/tests/Canada/Yukon/YukonBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\Canada\Yukon; + +use Yasumi\tests\Canada\CanadaBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Yukon holiday provider. + */ +abstract class YukonBaseTestCase extends CanadaBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'Canada\Yukon'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'America/Whitehorse'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_CA'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php new file mode 100644 index 000000000..c4bd2040e --- /dev/null +++ b/tests/Canada/Yukon/YukonTest.php @@ -0,0 +1,87 @@ + + */ + +namespace Yasumi\tests\Canada\Yukon; + +use ReflectionException; +use Yasumi\Holiday; + +/** + * Class for testing holidays in Yukon. + */ +class YukonTest extends YukonBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Yukon are defined by the provider class + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + 'discoveryDay', + 'victoriaDay', + 'yukonHeritageDay', + 'nationalIndigenousPeoplesDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Yukon 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 Yukon 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 Yukon 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 Yukon 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 3489e86c2804f71b79c55fd39b1542787a9eef8d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 10 May 2020 09:37:20 +0900 Subject: [PATCH 071/687] Reformatting and cleanup. --- tests/Base/SubstituteHolidayTest.php | 36 +++---- tests/TypographyTest.php | 7 +- tests/Ukraine/SubstitutedHolidayTest.php | 96 +++++++++---------- tests/UnitedKingdom/England/BoxingDayTest.php | 2 +- .../England/ChristmasDayTest.php | 2 +- .../England/EasterMondayTest.php | 2 +- .../UnitedKingdom/England/NewYearsDayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 6 +- .../NorthernIreland/BoxingDayTest.php | 2 +- .../NorthernIreland/ChristmasDayTest.php | 2 +- .../NorthernIreland/EasterMondayTest.php | 2 +- .../NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 6 +- .../UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- .../Scotland/ChristmasDayTest.php | 2 +- .../Scotland/NewYearsDayTest.php | 6 +- .../Scotland/SecondNewYearsDayTest.php | 6 +- .../Scotland/StAndrewsDayTest.php | 6 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 2 +- .../UnitedKingdom/Wales/ChristmasDayTest.php | 2 +- .../UnitedKingdom/Wales/EasterMondayTest.php | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/YasumiBase.php | 50 +++++----- 23 files changed, 123 insertions(+), 124 deletions(-) diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index bd44442b0..a9e1f34f8 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -79,9 +79,9 @@ public function testConstructor(): void */ public function testSubstituteHolidayIsJsonSerializable(): void { - $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01'), 'en_US'); + $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); + $json = \json_encode($substitute); $instance = \json_decode($json, true); $this->assertIsArray($instance); @@ -129,11 +129,11 @@ public function testSubstituteHolidayGetNameWithNoTranslations(): void */ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): void { - $name = 'testHoliday'; + $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); + $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']); @@ -152,11 +152,11 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v */ public function testSubstituteHolidayGetNameWithPatternFallback(): void { - $name = 'testHoliday'; + $name = 'testHoliday'; $translation = 'My Holiday'; - $locale = 'en_US'; - $holiday = new Holiday($name, [], new DateTime('2019-01-01'), $locale); - $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), $locale); + $locale = 'en_US'; + $holiday = new Holiday($name, [], 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(['en' => '{0} obs']); @@ -175,11 +175,11 @@ public function testSubstituteHolidayGetNameWithPatternFallback(): void */ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): void { - $name = 'testHoliday'; + $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); + $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']); @@ -198,11 +198,11 @@ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): v */ public function testSubstituteHolidayGetNameWithSubstitutedTranslation(): void { - $name = 'testHoliday'; + $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); + $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']); diff --git a/tests/TypographyTest.php b/tests/TypographyTest.php index f59c52867..ed767494c 100644 --- a/tests/TypographyTest.php +++ b/tests/TypographyTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests; use PHPUnit\Framework\TestCase; -use Yasumi\Translations; use Yasumi\Yasumi; /** @@ -33,10 +32,10 @@ class TypographyTest extends TestCase /** * @dataProvider translationProvider * - * @param string $name The localized holiday name - * @param string $class The provider + * @param string $name The localized holiday name + * @param string $class The provider * @param string $shortName The short name (internal name) of the holiday - * @param string $locale The locale + * @param string $locale The locale */ public function testTranslations($name, $class, $shortName, $locale): void { diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index b8e8db952..18b7b000f 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -50,6 +50,54 @@ public function testSaturdaySubstitution() unset($year, $holiday); } + /** + * 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 official date to be checked against + * @param DateTime $expected the substituted date to be checked against + * + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws AssertionFailedError + * @throws ReflectionException + */ + public function assertHolidayWithSubstitution( + string $provider, + string $shortName, + int $year, + DateTime $expectedOfficial, + DateTime $expectedSubstitution = null + ): void { + $holidays = Yasumi::create($provider, $year); + + $holidayOfficial = $holidays->getHoliday($shortName); + $this->assertInstanceOf(Holiday::class, $holidayOfficial); + $this->assertNotNull($holidayOfficial); + $this->assertEquals($expectedOfficial, $holidayOfficial); + $this->assertTrue($holidays->isHoliday($holidayOfficial)); + $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); + + $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->shortName); + if ($expectedSubstitution === null) { + // without substitution + $this->assertNull($holidaySubstitution); + } else { + // with substitution + $this->assertNotNull($holidaySubstitution); + $this->assertInstanceOf(SubstituteHoliday::class, $holidaySubstitution); + $this->assertEquals($expectedSubstitution, $holidaySubstitution); + $this->assertTrue($holidays->isHoliday($holidaySubstitution)); + $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidaySubstitution->getType()); + } + + unset($holidayOfficial, $holidaySubstitution, $holidays); + } + /** * Tests the substitution of holidays on sunday (weekend). * @throws Exception @@ -133,52 +181,4 @@ public function testHolidayType(): void { $this->assertTrue(true); } - - /** - * 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 official date to be checked against - * @param DateTime $expected the substituted date to be checked against - * - * @throws UnknownLocaleException - * @throws InvalidDateException - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws AssertionFailedError - * @throws ReflectionException - */ - public function assertHolidayWithSubstitution( - string $provider, - string $shortName, - int $year, - DateTime $expectedOfficial, - DateTime $expectedSubstitution = null - ): void { - $holidays = Yasumi::create($provider, $year); - - $holidayOfficial = $holidays->getHoliday($shortName); - $this->assertInstanceOf(Holiday::class, $holidayOfficial); - $this->assertNotNull($holidayOfficial); - $this->assertEquals($expectedOfficial, $holidayOfficial); - $this->assertTrue($holidays->isHoliday($holidayOfficial)); - $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); - - $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->shortName); - if ($expectedSubstitution === null) { - // without substitution - $this->assertNull($holidaySubstitution); - } else { - // with substitution - $this->assertNotNull($holidaySubstitution); - $this->assertInstanceOf(SubstituteHoliday::class, $holidaySubstitution); - $this->assertEquals($expectedSubstitution, $holidaySubstitution); - $this->assertTrue($holidays->isHoliday($holidaySubstitution)); - $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidaySubstitution->getType()); - } - - unset($holidayOfficial, $holidaySubstitution, $holidays); - } } diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index c9cc00fd3..fbdca605c 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -35,7 +35,7 @@ class BoxingDayTest extends EnglandBaseTestCase 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/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index cd5057633..883bf3d31 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -35,7 +35,7 @@ class ChristmasDayTest extends EnglandBaseTestCase 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/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 1b399aa00..56a78fe36 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -35,7 +35,7 @@ class EasterMondayTest extends EnglandBaseTestCase 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/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 0693204bc..6b70c42ec 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -44,7 +44,7 @@ class NewYearsDayTest extends EnglandBaseTestCase 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/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index a32bc7ca0..f8616044e 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -39,7 +39,7 @@ class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase 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 @@ -80,8 +80,8 @@ 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)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-7-12", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 699ba84dd..46943a1db 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -35,7 +35,7 @@ class BoxingDayTest extends NorthernIrelandBaseTestCase 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/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index 48f61604c..a5479b8e6 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -35,7 +35,7 @@ class ChristmasDayTest extends NorthernIrelandBaseTestCase 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 string $expected the expected date * * @throws ReflectionException diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index d0f47fdcc..bd12f03e5 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -35,7 +35,7 @@ class EasterMondayTest extends NorthernIrelandBaseTestCase 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 string $expected the expected date * * @throws ReflectionException diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index afa47f9ec..e73c24fd5 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -44,7 +44,7 @@ class NewYearsDayTest extends NorthernIrelandBaseTestCase 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 string $expected the expected date * * @throws ReflectionException diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 6872c0f6a..0f76150ab 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -39,7 +39,7 @@ class StPatricksDayTest extends NorthernIrelandBaseTestCase 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 @@ -80,8 +80,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/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index ece15eb40..741ea6a9b 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -35,7 +35,7 @@ class BoxingDayTest extends ScotlandBaseTestCase 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/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 03536aad5..9ba0c4605 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -35,7 +35,7 @@ class ChristmasDayTest extends ScotlandBaseTestCase 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/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index bceaab964..bc5faea1c 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -45,7 +45,7 @@ class NewYearsDayTest extends ScotlandBaseTestCase 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 @@ -100,8 +100,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/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index 710088b6c..c218feb4c 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -45,7 +45,7 @@ class SecondNewYearsDayTest extends ScotlandBaseTestCase 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 @@ -100,8 +100,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-2", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-1-2", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 93d3e9871..693416ca9 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -39,7 +39,7 @@ class StAndrewsDayTest extends ScotlandBaseTestCase 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 @@ -67,8 +67,8 @@ 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)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-11-30", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index bd8c286ad..950700c2c 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -35,7 +35,7 @@ class BoxingDayTest extends WalesBaseTestCase 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/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 2166bd554..893d8d39c 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -35,7 +35,7 @@ class ChristmasDayTest extends WalesBaseTestCase 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/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index a653438aa..ff34e9149 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -35,7 +35,7 @@ class EasterMondayTest extends WalesBaseTestCase 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/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index a0eaa04de..66ff7ee26 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -44,7 +44,7 @@ class NewYearsDayTest extends WalesBaseTestCase 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/YasumiBase.php b/tests/YasumiBase.php index c6847b837..c4bbf4278 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -116,31 +116,6 @@ public function assertHoliday( $this->assertTrue($holidays->isHoliday($holiday)); } - /** - * 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 $shortName the short name of the holiday to be checked against - * @param int $year holiday calendar year - * - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws UnknownLocaleException - * @throws InvalidDateException - * @throws AssertionFailedError - * @throws ReflectionException - */ - public function assertNotHoliday( - string $provider, - string $shortName, - int $year - ): void { - $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); - - $this->assertNull($holiday); - } - /** * Asserts that the expected date is indeed a substitute holiday for that given year and name * @@ -196,6 +171,31 @@ public function assertNotSubstituteHoliday( ); } + /** + * 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 $shortName the short name of the holiday to be checked against + * @param int $year holiday calendar year + * + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws AssertionFailedError + * @throws ReflectionException + */ + public function assertNotHoliday( + string $provider, + string $shortName, + int $year + ): void { + $holidays = Yasumi::create($provider, $year); + $holiday = $holidays->getHoliday($shortName); + + $this->assertNull($holiday); + } + /** * Asserts that the expected name is indeed provided as a translated holiday name for that given year and name * From 45b873a8abbe3379afec206b095e47d6bd321583 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 10 May 2020 09:40:07 +0900 Subject: [PATCH 072/687] Reformatting and cleanup. --- .../Exception/MissingTranslationException.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 50 +++++++++---------- src/Yasumi/Provider/Ukraine.php | 26 +++++----- src/Yasumi/Yasumi.php | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/Yasumi/Exception/MissingTranslationException.php b/src/Yasumi/Exception/MissingTranslationException.php index eac6f75ab..a967d18eb 100644 --- a/src/Yasumi/Exception/MissingTranslationException.php +++ b/src/Yasumi/Exception/MissingTranslationException.php @@ -23,7 +23,7 @@ class MissingTranslationException extends BaseException implements Exception * Initializes the Exception instance * * @param string $shortName The short name (internal name) of the holiday - * @param array $locales The locales that was searched + * @param array $locales The locales that was searched */ public function __construct(string $shortName, array $locales) { diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 618c0009c..5cddd4e42 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -196,31 +196,6 @@ public function isWorkingDay(\DateTimeInterface $date): bool return !$this->isHoliday($date) && !$this->isWeekendDay($date); } - /** - * Determines whether a date represents a weekend day or not. - * - * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, - * \DateTime) - * - * @return bool true if date represents a weekend day, otherwise false - * @throws InvalidDateException - * - */ - public function isWeekendDay(\DateTimeInterface $date): bool - { - // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. - if (\in_array( - (int)$date->format('w'), - self::WEEKEND_DATA[$this::ID] ?? [0, 6], - true - ) - ) { - return true; - } - - return false; - } - /** * Determines whether a date represents a holiday or not. * @@ -253,6 +228,31 @@ public function getHolidayDates(): array }, $this->holidays); } + /** + * Determines whether a date represents a weekend day or not. + * + * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, + * \DateTime) + * + * @return bool true if date represents a weekend day, otherwise false + * @throws InvalidDateException + * + */ + public function isWeekendDay(\DateTimeInterface $date): bool + { + // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. + if (\in_array( + (int)$date->format('w'), + self::WEEKEND_DATA[$this::ID] ?? [0, 6], + true + ) + ) { + return true; + } + + return false; + } + /** * On what date is the given holiday? * diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 61b5bd2b6..4f31a96dd 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -254,19 +254,6 @@ private function calculateDefenderOfUkraineDay(): void )); } - /** - * @param int $year - * @param string $timezone - * - * @return \DateTime - * - * @throws \Exception - */ - public function calculateEaster(int $year, string $timezone): \DateTime - { - return $this->calculateOrthodoxEaster($year, $timezone); - } - /** * Catholic Christmas Day. * (since 2017 instead of International Workers' Day 2. May) @@ -297,4 +284,17 @@ private function calculateCatholicChristmasDay(): void false // Catholic Christmas Day will not be substituted to an monday if it's on a weekend! ); } + + /** + * @param int $year + * @param string $timezone + * + * @return \DateTime + * + * @throws \Exception + */ + public function calculateEaster(int $year, string $timezone): \DateTime + { + return $this->calculateOrthodoxEaster($year, $timezone); + } } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 019c73133..a6982f865 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -92,7 +92,7 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (! $provider instanceof ProviderInterface || $provider->getYear() !== (int)$date->format('Y')) { + if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int)$date->format('Y')) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { From cc262d07bbd0e5ac87e09f373ca219fdf0615410 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 10 May 2020 09:49:03 +0900 Subject: [PATCH 073/687] Moved Typography Test to Base folder (as part of all base tests). --- tests/{ => Base}/TypographyTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename tests/{ => Base}/TypographyTest.php (97%) diff --git a/tests/TypographyTest.php b/tests/Base/TypographyTest.php similarity index 97% rename from tests/TypographyTest.php rename to tests/Base/TypographyTest.php index ed767494c..5b8460ae1 100644 --- a/tests/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -11,9 +11,10 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests; +namespace Yasumi\tests\Base; use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; /** From fd72a4b957e456a5aa8fa635d1eb0d7e0a23337c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 18 May 2020 22:18:55 +0900 Subject: [PATCH 074/687] Added news about new docs website --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d44a9af57..d64f32a1a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Logo](https://github.com/azuyalabs/yasumi/blob/gh-pages/images/yasumi_logo_wb.png) +![Logo](https://www.yasumi.dev/assets/img/yasumi_logo.svg) [![GitHub Release](https://img.shields.io/github/release/azuyalabs/yasumi.svg?style=flat-square)](https://github.com/azuyalabs/yasumi/releases) [![Total Downloads](https://img.shields.io/packagist/dt/azuyalabs/yasumi.svg?style=flat-square)](https://packagist.org/packages/azuyalabs/yasumi) @@ -7,6 +7,11 @@ [![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) +Update! +------- +Yasumi has now its own domain https://yasumi.dev and a brand-new documentation website! +Thanks to the [Jigsaw](http://jigsaw.tighten.co) documentation template created by the amazing [TightenCo](https://tighten.co) and [TailwindCSS](http://tailwindcss.com) brothers. Read more about it in this blog post: https://yasumi.dev/blog/new_docs_site… + Introduction ------------ Yasumi (Japanese for 'Holiday'「休み」) is an easy PHP library to help you calculate the dates and names of holidays and other From 0a786cb58219b777ca35f731c95d898d1bcb6d79 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 18 May 2020 22:30:57 +0900 Subject: [PATCH 075/687] Corrections --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d64f32a1a..e17ac39a0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Update! ------- Yasumi has now its own domain https://yasumi.dev and a brand-new documentation website! -Thanks to the [Jigsaw](http://jigsaw.tighten.co) documentation template created by the amazing [TightenCo](https://tighten.co) and [TailwindCSS](http://tailwindcss.com) brothers. Read more about it in this blog post: https://yasumi.dev/blog/new_docs_site… +Thanks to the [Jigsaw](http://jigsaw.tighten.co) documentation template created by the amazing [TightenCo](https://tighten.co) and [TailwindCSS](http://tailwindcss.com) brothers. Read more about it in this blog post: https://www.yasumi.dev/blog/new_docs_site + +Please don't forget to update your bookmarks! The documentation site at https://azuyalabs.github.io/yasumi/ will be removed soon. Introduction ------------ @@ -28,11 +30,11 @@ holidays. The methods of Yasumi can be used to get a holiday's date and name in Documentation ------------- -Yasumi’s documentation is available on [https://azuyalabs.github.io/yasumi/](https://azuyalabs.github.io/yasumi/). You will find all the necessary information how to install Yasumi and also recipes how you can use Yasumi in your project. +Yasumi’s documentation is available on [https://www.yasumi.dev](https://www.yasumi.dev). You will find all the necessary information how to install Yasumi and also recipes how you can use Yasumi in your project. 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! +Checkout the [blog](https://www.yasumi.dev/blog/) section on documentation site regularly for latest updates. Keeping you informed about any news, releases, etc. in a handy blog post format! ## Contributing From 07ae77156878fc2403a8102ef5fcfec4b87ae99f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 18 May 2020 22:43:27 +0900 Subject: [PATCH 076/687] Updated links to proper Markdown ones. Signed-off-by: Sacha Telgenhof --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e17ac39a0..fc5d51840 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Update! ------- -Yasumi has now its own domain https://yasumi.dev and a brand-new documentation website! -Thanks to the [Jigsaw](http://jigsaw.tighten.co) documentation template created by the amazing [TightenCo](https://tighten.co) and [TailwindCSS](http://tailwindcss.com) brothers. Read more about it in this blog post: https://www.yasumi.dev/blog/new_docs_site +Yasumi has now its own domain [https://www.yasumi.dev](https://www.yasumi.dev) and a brand-new documentation website! +Thanks to the [Jigsaw](https://jigsaw.tighten.co) documentation template created by the amazing [TightenCo](https://tighten.co) and [TailwindCSS](https://tailwindcss.com) brothers. Read more about it in this blog post: [https://www.yasumi.dev/blog/new_docs_site](https://www.yasumi.dev/blog/new_docs_site) -Please don't forget to update your bookmarks! The documentation site at https://azuyalabs.github.io/yasumi/ will be removed soon. +Please don't forget to update your bookmarks! The documentation site at [https://azuyalabs.github.io/yasumi/](https://azuyalabs.github.io/yasumi/) will be removed soon. Introduction ------------ @@ -24,7 +24,7 @@ are either not free or offer only limited information. In addition, no complete that covers a wide range of holidays and countries, except maybe [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) which unfortunately hasn't been updated for a long time. The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. -Yasumi's calculation is provider-based (i.e. by country/state) so it's easy to add new holiday providers that calculate +Yasumi's calculation is provider-based (i.e. by country/state), so it's easy to add new holiday providers that calculate holidays. The methods of Yasumi can be used to get a holiday's date and name in various languages. Documentation From 89d762450f09f7982cc5f089a3522a144cac6dea Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 24 May 2020 11:31:01 +0900 Subject: [PATCH 077/687] Updated the composer config with more information, including the new documentation website. --- composer.json | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 5d82961cc..6411c39da 100755 --- a/composer.json +++ b/composer.json @@ -1,6 +1,16 @@ { "name": "azuyalabs/yasumi", - "description": "Yasumi is an easy PHP Library for calculating national holidays.", + "description": "The easy PHP Library for calculating holidays.", + "type": "library", + "authors": [ + { + "name": "Sacha Telgenhof", + "email": "me@sachatelgenhof.com", + "role": "Maintainer" + } + ], + "homepage": "https://www.yasumi.dev", + "license": "MIT", "keywords": [ "holiday", "holidays", @@ -12,11 +22,16 @@ "bank", "national" ], - "license": "MIT", - "authors": [ + "readme": "README.md", + "support": { + "issues": "https://github.com/azuyalabs/yasumi/issues", + "source": "https://github.com/azuyalabs/yasumi", + "docs": "https://www.yasumi.dev" + }, + "funding": [ { - "name": "Sacha Telgenhof", - "email": "me@sachatelgenhof.com" + "type": "other", + "url": "https://www.buymeacoffee.com/sachatelgenhof" } ], "require": { From a266fd7f80de9847839eab5abe993f766e954b63 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 31 May 2020 21:41:43 +0900 Subject: [PATCH 078/687] Removed new documentation website notification --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index fc5d51840..1e4a90016 100644 --- a/README.md +++ b/README.md @@ -7,13 +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) -Update! -------- -Yasumi has now its own domain [https://www.yasumi.dev](https://www.yasumi.dev) and a brand-new documentation website! -Thanks to the [Jigsaw](https://jigsaw.tighten.co) documentation template created by the amazing [TightenCo](https://tighten.co) and [TailwindCSS](https://tailwindcss.com) brothers. Read more about it in this blog post: [https://www.yasumi.dev/blog/new_docs_site](https://www.yasumi.dev/blog/new_docs_site) - -Please don't forget to update your bookmarks! The documentation site at [https://azuyalabs.github.io/yasumi/](https://azuyalabs.github.io/yasumi/) will be removed soon. - Introduction ------------ Yasumi (Japanese for 'Holiday'「休み」) is an easy PHP library to help you calculate the dates and names of holidays and other From fed7f280856598553e09b927d8629f33c134daad Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 31 May 2020 21:46:39 +0900 Subject: [PATCH 079/687] Reworded introduction and added highlights --- README.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1e4a90016..d1cec8ec9 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,27 @@ Introduction ------------ -Yasumi (Japanese for 'Holiday'「休み」) is an easy PHP library to help you calculate the dates and names of holidays and other -special celebrations from various countries/states. +Yasumi (Japanese for 'Holiday'「休み」) is the easy PHP library that helps you retrieve the dates and names of holidays and other special celebrations from various countries/states. It is calculation and rule driven avoiding the need of a comprehensive database. + +Many services exist that can provide holiday information, however are either not entirely free or only offer limited information. In addition, no exhaustive PHP library exists today covering a wide range of holidays and countries. [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) library was a similar attempt, however it hasn't been updated for a long time. + +Highlights +---------- +The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. Yasumi's calculation is provider-based (i.e. by country/state), making it easy to add new holiday providers that calculate holidays. + +- Straightforward API +- Framework-agnostic +- Use of Providers to easily extend and expand new Holidays +- Common Holiday Providers +- Accounts for the date/time when holidays have been officially established and/or abolished +- Filters enabling to easily select certain holiday types (Official, Observed, Bank, Seasonal or Other) +- Global Translations +- Timezone aware +- Implements [ArrayIterator](https://www.php.net/manual/en/class.arrayiterator.php) to easily process a provider's holidays +- Fully documented +- Fully unit tested +- [Composer](https://getcomposer.org) ready, [PSR-2](https://www.php-fig.org/psr/psr-2/) and [PSR-4](https://www.php-fig.org/psr/psr-4/) compliant -Many services exist on the internet that provide holidays, however -are either not free or offer only limited information. In addition, no complete PHP library seems to exist today -that covers a wide range of holidays and countries, except maybe [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) which unfortunately hasn't been updated for a long time. - -The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. -Yasumi's calculation is provider-based (i.e. by country/state), so it's easy to add new holiday providers that calculate -holidays. The methods of Yasumi can be used to get a holiday's date and name in various languages. Documentation ------------- From a24d9f039b99a3958a259446d0f8ff62eef178d8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 3 Jun 2020 09:07:38 +0900 Subject: [PATCH 080/687] Added American English spelling for Labour Day. --- CHANGELOG.md | 1 + src/Yasumi/data/translations/labourDay.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 315c2909d..4cca027ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) +- Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) - Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 53dea8d78..435745008 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -14,6 +14,7 @@ // Translations for Labour Day return [ 'en' => 'Labour Day', + 'en_US' => 'Labor Day', 'ja' => '労働の日', 'ko' => '노동절', 'nl' => 'Dag van de arbeid', From d1e2d6f40582a26b4cffdbd5fe9db9e52b2ba3a8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 3 Jun 2020 09:13:42 +0900 Subject: [PATCH 081/687] Reordered the items to group similar subjects. --- CHANGELOG.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cca027ca..58692b633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,25 +9,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) +- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) +- Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) +- Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) - Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) -- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) -- Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) -- Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). + - Added missing return (correct) and parameter types in various methods. -- Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) ### Changed -- Renamed the Australian states to be full names in stead of abbreviations to be in line with other Holiday Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) +- Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) - Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Second International Workers Day was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Second International Workers Day in Ukraine was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) -- Changed the fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) +- Changed the fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) - Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated DateTimezone, thus saving resources. [\#213](https://github.com/azuyalabs/yasumi/pull/213) ([pvgnd](https://github.com/pvgn)) - Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) - Explicitly set nullable parameters as such. From 8b41f8a105d9a8e44f3056e3cd97fcb4ba3cd145 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 08:53:05 +0900 Subject: [PATCH 082/687] Fixed translation test for Labour Day (since new spelling was added). --- tests/USA/LabourDayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 45b4b8234..022c980b0 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -73,7 +73,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Labour Day'] + [self::LOCALE => 'Labor Day'] ); } From 57fd1c4c22daf2c8b7e1473c89f84bdf7b24675b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 08:55:14 +0900 Subject: [PATCH 083/687] Added missing return types and exceptions. --- tests/USA/ChristmasDayTest.php | 6 +++--- tests/USA/ColumbusDayTest.php | 6 +++--- tests/USA/IndependenceDayTest.php | 8 ++++---- tests/USA/LabourDayTest.php | 4 ++-- tests/USA/MartinLutherKingDayTest.php | 4 ++-- tests/USA/MemorialDayTest.php | 6 +++--- tests/USA/NewYearsDayTest.php | 6 +++--- tests/USA/ThanksgivingDayTest.php | 4 ++-- tests/USA/VeteransDayTest.php | 15 +++++++++------ tests/USA/WashingtonsBirthdayTest.php | 6 +++--- 10 files changed, 34 insertions(+), 31 deletions(-) diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index eb1ee27cc..955dcb297 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -34,7 +34,7 @@ class ChristmasDayTest extends USABaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testChristmasDay() + public function testChristmasDay(): void { $year = 2001; $this->assertHoliday( @@ -50,7 +50,7 @@ public function testChristmasDay() * @throws Exception * @throws ReflectionException */ - public function testChristmasDaySubstitutedMonday() + public function testChristmasDaySubstitutedMonday(): void { // Substituted Holiday on Monday (Christmas Day falls on Sunday) $year = 6101; @@ -67,7 +67,7 @@ public function testChristmasDaySubstitutedMonday() * @throws Exception * @throws ReflectionException */ - public function testChristmasDaySubstitutedFriday() + public function testChristmasDaySubstitutedFriday(): void { // Substituted Holiday on Friday (Christmas Day falls on Saturday) $year = 2060; diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index 54ecd54e5..e02eb3934 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -40,7 +40,7 @@ class ColumbusDayTest extends USABaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testColumbusDayOnAfter1970() + public function testColumbusDayOnAfter1970(): void { $year = $this->generateRandomYear(1970); $this->assertHoliday( @@ -57,7 +57,7 @@ public function testColumbusDayOnAfter1970() * @throws Exception * @throws ReflectionException */ - public function testColumbusBetween1937And1969() + public function testColumbusBetween1937And1969(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1969); $this->assertHoliday( @@ -73,7 +73,7 @@ public function testColumbusBetween1937And1969() * the second Monday in October since 1970. * @throws ReflectionException */ - public function testColumbusDayBefore1937() + public function testColumbusDayBefore1937(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index 018e75335..a65697346 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -39,7 +39,7 @@ class IndependenceDayTest extends USABaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testIndependenceDayOnAfter1776() + public function testIndependenceDayOnAfter1776(): void { $year = 1955; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testIndependenceDayOnAfter1776() * @throws Exception * @throws ReflectionException */ - public function testIndependenceDayOnAfter1776SubstitutedMonday() + public function testIndependenceDayOnAfter1776SubstitutedMonday(): void { $year = 3362; $this->assertHoliday( @@ -71,7 +71,7 @@ public function testIndependenceDayOnAfter1776SubstitutedMonday() * @throws Exception * @throws ReflectionException */ - public function testIndependenceDayOnAfter1776SubstitutedFriday() + public function testIndependenceDayOnAfter1776SubstitutedFriday(): void { $year = 8291; $this->assertHoliday( @@ -86,7 +86,7 @@ public function testIndependenceDayOnAfter1776SubstitutedFriday() * Tests Independence Day before 1776. Independence Day is celebrated since 1776 on July 4th. * @throws ReflectionException */ - public function testIndependenceDayBefore1776() + public function testIndependenceDayBefore1776(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 022c980b0..623f4bd75 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -39,7 +39,7 @@ class LabourDayTest extends USABaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testLabourDayOnAfter1887() + public function testLabourDayOnAfter1887(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testLabourDayOnAfter1887() * Tests Labour Day before 1887. Labour Day was established since 1887 on the first Monday of September. * @throws ReflectionException */ - public function testLabourDayBefore1887() + public function testLabourDayBefore1887(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index 46c93d2f2..d9427ba07 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -40,7 +40,7 @@ class MartinLutherKingDayTest extends USABaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testMartinLutherKingDayOnAfter1986() + public function testMartinLutherKingDayOnAfter1986(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -56,7 +56,7 @@ public function testMartinLutherKingDayOnAfter1986() * Monday of January. * @throws ReflectionException */ - public function testMartinLutherKingDayBefore1986() + public function testMartinLutherKingDayBefore1986(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index 17a95fde4..bc8b83963 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -40,7 +40,7 @@ class MemorialDayTest extends USABaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testMemorialDayOnAfter1968() + public function testMemorialDayOnAfter1968(): void { $year = $this->generateRandomYear(1968); $this->assertHoliday( @@ -57,7 +57,7 @@ public function testMemorialDayOnAfter1968() * @throws Exception * @throws ReflectionException */ - public function testMemorialDayBetween1865And1967() + public function testMemorialDayBetween1865And1967(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); $this->assertHoliday( @@ -73,7 +73,7 @@ public function testMemorialDayBetween1865And1967() * last Monday in May. * @throws ReflectionException */ - public function testMemorialDayBefore1865() + public function testMemorialDayBefore1865(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 78f54ca45..90f9aa071 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -34,7 +34,7 @@ class NewYearsDayTest extends USABaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testNewYearsDay() + public function testNewYearsDay(): void { $year = 1997; $this->assertHoliday( @@ -50,7 +50,7 @@ public function testNewYearsDay() * @throws Exception * @throws ReflectionException */ - public function testNewYearsDaySubstitutedMonday() + public function testNewYearsDaySubstitutedMonday(): void { $year = 2445; $this->assertHoliday( @@ -66,7 +66,7 @@ public function testNewYearsDaySubstitutedMonday() * @throws Exception * @throws ReflectionException */ - public function testNewYearsDaySubstitutedFriday() + public function testNewYearsDaySubstitutedFriday(): void { $year = 1938; $subYear = $year - 1; diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index b49a23af1..5581dc216 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -40,7 +40,7 @@ class ThanksgivingDayTest extends USABaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testThanksgivingDayOnAfter1863() + public function testThanksgivingDayOnAfter1863(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -56,7 +56,7 @@ public function testThanksgivingDayOnAfter1863() * of November. * @throws ReflectionException */ - public function testThanksgivingDayBefore1863() + public function testThanksgivingDayBefore1863(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index 1e20de9d2..eaf072736 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -16,6 +16,7 @@ use DateTimeZone; use Exception; use ReflectionException; +use Yasumi\Exception\MissingTranslationException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; use Yasumi\Yasumi; @@ -40,7 +41,7 @@ class VeteransDayTest extends USABaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testVeteransDayOnAfter1919() + public function testVeteransDayOnAfter1919(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -56,7 +57,7 @@ public function testVeteransDayOnAfter1919() * @throws Exception * @throws ReflectionException */ - public function testVeteransDayOnAfter1919SubstitutedMonday() + public function testVeteransDayOnAfter1919SubstitutedMonday(): void { $year = 2018; $this->assertHoliday( @@ -72,7 +73,7 @@ public function testVeteransDayOnAfter1919SubstitutedMonday() * @throws Exception * @throws ReflectionException */ - public function testVeteransDayOnAfter1919SubstitutedFriday() + public function testVeteransDayOnAfter1919SubstitutedFriday(): void { $year = 2017; $this->assertHoliday( @@ -87,7 +88,7 @@ public function testVeteransDayOnAfter1919SubstitutedFriday() * Tests Veterans Day before 1919. Veterans Day was established in 1919 on November 11. * @throws ReflectionException */ - public function testVeteransDayBefore1919() + public function testVeteransDayBefore1919(): void { $this->assertNotHoliday( self::REGION, @@ -99,8 +100,9 @@ public function testVeteransDayBefore1919() /** * Tests name of Veterans Day before 1954. Veterans Day was named 'Armistice Day' before 1954. * @throws ReflectionException + * @throws MissingTranslationException */ - public function testVeteransDayNameBefore1954() + public function testVeteransDayNameBefore1954(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); @@ -112,8 +114,9 @@ public function testVeteransDayNameBefore1954() /** * Tests name of Veterans Day after 1954. Veterans Day was named 'Armistice Day' before 1954. * @throws ReflectionException + * @throws MissingTranslationException */ - public function testVeteransDayNameAfter1954() + public function testVeteransDayNameAfter1954(): void { $year = $this->generateRandomYear(1954); diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index 1001502fa..17c677870 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -40,7 +40,7 @@ class WashingtonsBirthdayTest extends USABaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testWashingtonsBirthdayOnAfter1968() + public function testWashingtonsBirthdayOnAfter1968(): void { $year = $this->generateRandomYear(1968); $this->assertHoliday( @@ -57,7 +57,7 @@ public function testWashingtonsBirthdayOnAfter1968() * @throws Exception * @throws ReflectionException */ - public function testWashingtonsBirthdayBetween1879And1967() + public function testWashingtonsBirthdayBetween1879And1967(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); $this->assertHoliday( @@ -73,7 +73,7 @@ public function testWashingtonsBirthdayBetween1879And1967() * changed in 1968 to the third Monday in February. * @throws ReflectionException */ - public function testWashingtonsBirthdayBefore1879() + public function testWashingtonsBirthdayBefore1879(): void { $this->assertNotHoliday( self::REGION, From 8031c1b180dc8b345309e1e3a6ac9c4181497b2d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 09:05:10 +0900 Subject: [PATCH 084/687] Added missing return types and corrected docblock comments (exceptions, signature). --- tests/Ukraine/CatholicChristmasDayTest.php | 4 ++-- 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 | 6 +++--- tests/Ukraine/SubstitutedHolidayTest.php | 13 ++++++++----- tests/Ukraine/VictoryDayTest.php | 2 +- tests/UnitedKingdom/BoxingDayTest.php | 2 +- tests/UnitedKingdom/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/EasterMondayTest.php | 2 +- tests/UnitedKingdom/England/BoxingDayTest.php | 2 +- tests/UnitedKingdom/England/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/England/EasterMondayTest.php | 2 +- tests/UnitedKingdom/England/GoodFridayTest.php | 2 +- .../UnitedKingdom/England/MayDayBankHolidayTest.php | 6 +++--- tests/UnitedKingdom/England/NewYearsDayTest.php | 6 +++--- .../UnitedKingdom/England/SpringBankHolidayTest.php | 6 +++--- .../UnitedKingdom/England/SummerBankHolidayTest.php | 8 ++++---- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 6 +++--- tests/UnitedKingdom/NewYearsDayTest.php | 6 +++--- .../NorthernIreland/BattleOfTheBoyneTest.php | 4 ++-- .../UnitedKingdom/NorthernIreland/BoxingDayTest.php | 2 +- .../NorthernIreland/ChristmasDayTest.php | 2 +- .../NorthernIreland/EasterMondayTest.php | 2 +- .../NorthernIreland/GoodFridayTest.php | 2 +- .../NorthernIreland/MayDayBankHolidayTest.php | 6 +++--- .../NorthernIreland/NewYearsDayTest.php | 6 +++--- .../NorthernIreland/SpringBankHolidayTest.php | 4 ++-- .../NorthernIreland/StPatricksDayTest.php | 4 ++-- .../NorthernIreland/SummerBankHolidayTest.php | 8 ++++---- tests/UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- tests/UnitedKingdom/Scotland/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/Scotland/GoodFridayTest.php | 2 +- .../Scotland/MayDayBankHolidayTest.php | 6 +++--- tests/UnitedKingdom/Scotland/NewYearsDayTest.php | 6 +++--- .../Scotland/SecondNewYearsDayTest.php | 6 +++--- .../Scotland/SpringBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/StAndrewsDayTest.php | 2 +- .../Scotland/SummerBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 6 +++--- tests/UnitedKingdom/SummerBankHolidayTest.php | 8 ++++---- 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 | 6 +++--- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 6 +++--- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 6 +++--- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 8 ++++---- 56 files changed, 111 insertions(+), 108 deletions(-) diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 6f2018a1e..71a4860ca 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -41,7 +41,7 @@ class CatholicChristmasDayTest extends UkraineBaseTestCase implements YasumiTest * * @throws ReflectionException */ - public function testCatholicChristmasDay($year, $expected) + public function testCatholicChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -50,7 +50,7 @@ public function testCatholicChristmasDay($year, $expected) * Tests Catholic Christmas Day before 2017. * @throws ReflectionException */ - public function testNoCatholicChristmasDayBefore2017() + public function testNoCatholicChristmasDayBefore2017(): void { $year = $this->generateRandomYear(null, 2016); $holidays = Yasumi::create(self::REGION, $year); diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 1962c2507..8173acf4c 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends UkraineBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index 6d1f4d726..15fa4ce84 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -34,7 +34,7 @@ class ConstitutionDayTest extends UkraineBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index c64d9fc71..e0001bb5f 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -34,7 +34,7 @@ class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements YasumiTest * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index 4109ad262..f2cb6da60 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -35,7 +35,7 @@ class EasterTest extends UkraineBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index 5fb14830b..5b026c9a3 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -34,7 +34,7 @@ class IndependenceDayTest extends UkraineBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index f836bf78d..74bd14da1 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -37,7 +37,7 @@ class InternationalWomensDayTest extends UkraineBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 9ca189e68..39d9bd4a6 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -39,7 +39,7 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index a85b80411..b865911d3 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -39,7 +39,7 @@ class NewYearsDayTest extends UkraineBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 2f92be712..b53bfde9e 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -35,7 +35,7 @@ class PentecostTest extends UkraineBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 9fff35ba3..0afac4b53 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -40,7 +40,7 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements Y * * @throws ReflectionException */ - public function testSecondInternationalWorkersDay($year, $expected) + public function testSecondInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -49,7 +49,7 @@ public function testSecondInternationalWorkersDay($year, $expected) * Tests International Workers' Day since 2018. * @throws ReflectionException */ - public function testNoSecondInternationalWorkersDaySince2018() + public function testNoSecondInternationalWorkersDaySince2018(): void { $year = $this->generateRandomYear(2018); $holidays = Yasumi::create(self::REGION, $year); @@ -92,7 +92,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/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 18b7b000f..582825e82 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -16,7 +16,12 @@ use DateTime; use DateTimeZone; use Exception; +use InvalidArgumentException; +use PHPUnit\Framework\AssertionFailedError; use ReflectionException; +use RuntimeException; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\SubstituteHoliday; use Yasumi\tests\YasumiTestCaseInterface; @@ -33,7 +38,7 @@ class SubstitutedHolidayTest extends UkraineBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testSaturdaySubstitution() + public function testSaturdaySubstitution(): void { // 2020-05-09 victoryDay (День перемоги) $year = 2020; @@ -56,8 +61,8 @@ public function testSaturdaySubstitution() * @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 official date to be checked against - * @param DateTime $expected the substituted date to be checked against + * @param DateTime $expectedOfficial the official date to be checked against + * @param DateTime $expectedSubstitution the substituted date to be checked against * * @throws UnknownLocaleException * @throws InvalidDateException @@ -166,7 +171,6 @@ public function testCatholicChristmasDayNoSubstitution(): void /** * Dummy: Tests the translated name of the holiday defined in this test. - * @throws ReflectionException */ public function testTranslation(): void { @@ -175,7 +179,6 @@ public function testTranslation(): void /** * Dummy: Tests type of the holiday defined in this test. - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index b62469e18..16b16af92 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -37,7 +37,7 @@ class VictoryDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 8dccbdb76..181b0404d 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -41,7 +41,7 @@ class BoxingDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index cc4e5a6d8..9ec2e039c 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 29cc843d6..1354746b7 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends UnitedKingdomBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index fbdca605c..7290b330c 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -41,7 +41,7 @@ class BoxingDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterfa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 883bf3d31..09972d34c 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends EnglandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 56a78fe36..4dbe2ba9f 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends EnglandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index 83bd3361b..445ab79f5 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends EnglandBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1866; $this->assertHoliday( diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index 9742333e6..97c3ef79e 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -40,7 +40,7 @@ class MayDayBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2101; $this->assertHoliday( @@ -57,7 +57,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayExceptions() + public function testHolidayExceptions(): void { $this->assertHoliday( self::REGION, @@ -78,7 +78,7 @@ public function testHolidayExceptions() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 6b70c42ec..f79c09f02 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -50,7 +50,7 @@ class NewYearsDayTest extends EnglandBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment($year, $expected) + public function testHolidayOnAfterEstablishment($year, $expected): void { $this->assertHoliday( self::REGION, @@ -64,7 +64,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -77,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 */ - public function testHolidayIsObservedTypeBeforeChange() + public function testHolidayIsObservedTypeBeforeChange(): void { $this->assertHolidayType( self::REGION, diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index ca5438621..92eae3a00 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -40,7 +40,7 @@ class SpringBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1988; $this->assertHoliday( @@ -57,7 +57,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayException() + public function testHolidayException(): void { $this->assertHoliday( self::REGION, @@ -78,7 +78,7 @@ public function testHolidayException() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index 2a8261317..702f5ff0b 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -42,7 +42,7 @@ class SummerBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas * @throws \Exception * @throws \ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(1970); $this->assertHoliday( @@ -59,7 +59,7 @@ public function testHoliday() * @throws \Exception * @throws \ReflectionException */ - public function testHolidayBefore1965() + public function testHolidayBefore1965(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( @@ -76,7 +76,7 @@ public function testHolidayBefore1965() * @throws \ReflectionException * @throws \Exception */ - public function testHolidayTrialPeriod() + public function testHolidayTrialPeriod(): void { $this->assertHoliday( self::REGION, @@ -120,7 +120,7 @@ public function testHolidayTrialPeriod() * Tests the holiday defined in this test before establishment. * @throws \ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index 4373f02a7..1559199ad 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends UnitedKingdomBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1866; $this->assertHoliday( diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 40011dfcf..5702b6728 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -39,7 +39,7 @@ class MayDayBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2101; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayExceptions() + public function testHolidayExceptions(): void { $this->assertHoliday( self::REGION, @@ -76,7 +76,7 @@ public function testHolidayExceptions() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index e8760c6d2..6218005d2 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -50,7 +50,7 @@ class NewYearsDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCas * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment($year, $expected) + public function testHolidayOnAfterEstablishment($year, $expected): void { $this->assertHoliday( self::REGION, @@ -64,7 +64,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -77,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 */ - public function testHolidayIsObservedTypeBeforeChange() + public function testHolidayIsObservedTypeBeforeChange(): void { $this->assertHolidayType( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index f8616044e..1c47c9c09 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -45,7 +45,7 @@ class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements Yasumi * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -60,7 +60,7 @@ public function testHoliday($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 46943a1db..7312e57fb 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -41,7 +41,7 @@ class BoxingDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCas * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index a5479b8e6..c9921a3e7 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends NorthernIrelandBaseTestCase implements YasumiTest * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index bd12f03e5..97b3da14c 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends NorthernIrelandBaseTestCase implements YasumiTest * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index 4c9c59c62..21f94e0da 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends NorthernIrelandBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1866; $this->assertHoliday( diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index 8062b2713..c95392da9 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -39,7 +39,7 @@ class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2101; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayExceptions() + public function testHolidayExceptions(): void { $this->assertHoliday( self::REGION, @@ -77,7 +77,7 @@ public function testHolidayExceptions() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index e73c24fd5..4e3a27bbe 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -50,7 +50,7 @@ class NewYearsDayTest extends NorthernIrelandBaseTestCase implements YasumiTestC * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment($year, $expected) + public function testHolidayOnAfterEstablishment($year, $expected): void { $this->assertHoliday( self::REGION, @@ -64,7 +64,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -77,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 */ - public function testHolidayIsObservedTypeBeforeChange() + public function testHolidayIsObservedTypeBeforeChange(): void { $this->assertHolidayType( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index 13114a3be..03216cfa8 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -39,7 +39,7 @@ class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1988; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 0f76150ab..7fb29f2cd 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -45,7 +45,7 @@ class StPatricksDayTest extends NorthernIrelandBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -60,7 +60,7 @@ public function testHoliday($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index b87101907..8a1ad96d1 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -44,7 +44,7 @@ class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(1970); $this->assertHoliday( @@ -61,7 +61,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayBefore1965() + public function testHolidayBefore1965(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( @@ -77,7 +77,7 @@ public function testHolidayBefore1965() * @throws ReflectionException * @throws Exception */ - public function testHolidayTrialPeriod() + public function testHolidayTrialPeriod(): void { $this->assertHoliday( self::REGION, @@ -121,7 +121,7 @@ public function testHolidayTrialPeriod() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index 741ea6a9b..96b4fac23 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -41,7 +41,7 @@ class BoxingDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 9ba0c4605..6e2d3b63e 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index 50764e76d..d6c99d868 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends ScotlandBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1866; $this->assertHoliday( diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index b3a11a575..7abf4728e 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -40,7 +40,7 @@ class MayDayBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2101; $this->assertHoliday( @@ -57,7 +57,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayExceptions() + public function testHolidayExceptions(): void { $this->assertHoliday( self::REGION, @@ -78,7 +78,7 @@ public function testHolidayExceptions() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index bc5faea1c..3e0543df9 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -51,7 +51,7 @@ class NewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment($year, $expected) + public function testHolidayOnAfterEstablishment($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -66,7 +66,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -79,7 +79,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 */ - public function testHolidayIsObservedTypeBeforeChange() + public function testHolidayIsObservedTypeBeforeChange(): void { $this->assertHolidayType( self::REGION, diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index c218feb4c..61974046f 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -51,7 +51,7 @@ class SecondNewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment($year, $expected) + public function testHolidayOnAfterEstablishment($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -66,7 +66,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -79,7 +79,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 */ - public function testHolidayIsObservedTypeBeforeChange() + public function testHolidayIsObservedTypeBeforeChange(): void { $this->assertHolidayType( self::REGION, diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index f45771922..8c0546d3c 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -39,7 +39,7 @@ class SpringBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1988; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 693416ca9..485238170 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -45,7 +45,7 @@ class StAndrewsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index 54957ddfa..1a81e97b4 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -39,7 +39,7 @@ class SummerBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(1970); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 3235e79a1..e80a00124 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -39,7 +39,7 @@ class SpringBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1988; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayException() + public function testHolidayException(): void { $this->assertHoliday( self::REGION, @@ -76,7 +76,7 @@ public function testHolidayException() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index f016d4c6c..3932adc2d 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -44,7 +44,7 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(1970); $this->assertHoliday( @@ -60,7 +60,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayBefore1965() + public function testHolidayBefore1965(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( @@ -76,7 +76,7 @@ public function testHolidayBefore1965() * @throws ReflectionException * @throws Exception */ - public function testHolidayTrialPeriod() + public function testHolidayTrialPeriod(): void { $this->assertHoliday( self::REGION, @@ -120,7 +120,7 @@ public function testHolidayTrialPeriod() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 950700c2c..2c5fedd22 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -41,7 +41,7 @@ class BoxingDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 893d8d39c..4204a2b5a 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends WalesBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index ff34e9149..497bd6d94 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends WalesBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index 7d0c4f681..8bfb596bd 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends WalesBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1866; $this->assertHoliday( diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index d0962550c..98ca5e67b 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -40,7 +40,7 @@ class MayDayBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2101; $this->assertHoliday( @@ -57,7 +57,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayExceptions() + public function testHolidayExceptions(): void { $this->assertHoliday( self::REGION, @@ -78,7 +78,7 @@ public function testHolidayExceptions() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index 66ff7ee26..5980f2f61 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -50,7 +50,7 @@ class NewYearsDayTest extends WalesBaseTestCase implements YasumiTestCaseInterfa * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment($year, $expected) + public function testHolidayOnAfterEstablishment($year, $expected): void { $this->assertHoliday( self::REGION, @@ -64,7 +64,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -77,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 */ - public function testHolidayIsObservedTypeBeforeChange() + public function testHolidayIsObservedTypeBeforeChange(): void { $this->assertHolidayType( self::REGION, diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index b1d9e0f6b..5ee770eb8 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -39,7 +39,7 @@ class SpringBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1988; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayException() + public function testHolidayException(): void { $this->assertHoliday( self::REGION, @@ -77,7 +77,7 @@ public function testHolidayException() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index 0d5a89572..49ee0b703 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -44,7 +44,7 @@ class SummerBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(1970); $this->assertHoliday( @@ -61,7 +61,7 @@ public function testHoliday() * @throws ReflectionException * @throws Exception */ - public function testHolidayBefore1965() + public function testHolidayBefore1965(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( @@ -78,7 +78,7 @@ public function testHolidayBefore1965() * @throws ReflectionException * @throws Exception */ - public function testHolidayTrialPeriod() + public function testHolidayTrialPeriod(): void { $this->assertHoliday( self::REGION, @@ -122,7 +122,7 @@ public function testHolidayTrialPeriod() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, From ec46cb708e86ba3f84f3984824fee73d80853cce Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 09:09:40 +0900 Subject: [PATCH 085/687] Added missing return types. --- tests/Spain/AllSaintsDayTest.php | 2 +- tests/Spain/Andalusia/AndalusiaDayTest.php | 4 ++-- tests/Spain/Aragon/StGeorgesDayTest.php | 2 +- tests/Spain/AssumptionOfMaryTest.php | 2 +- tests/Spain/Asturias/AsturiasDayTest.php | 4 ++-- tests/Spain/BalearicIslands/BalearicIslandsDayTest.php | 4 ++-- tests/Spain/BasqueCountry/BasqueCountryDayTest.php | 6 +++--- tests/Spain/CanaryIslands/CanaryIslandsDayTest.php | 4 ++-- tests/Spain/Cantabria/CantabriaDayTest.php | 4 ++-- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 4 ++-- .../Spain/CastillaLaMancha/CastillaLaManchaDayTest.php | 4 ++-- tests/Spain/Catalonia/nationalCataloniaDayTest.php | 4 ++-- tests/Spain/Catalonia/stJohnsDayTest.php | 2 +- tests/Spain/Ceuta/ceutaDayTest.php | 4 ++-- tests/Spain/ChristmasTest.php | 2 +- .../CommunityOfMadrid/DosdeMayoUprisingDayTest.php | 2 +- tests/Spain/ConstitutionDayTest.php | 4 ++-- tests/Spain/EasterMondayTest.php | 2 +- tests/Spain/EpiphanyTest.php | 2 +- tests/Spain/Extremadura/ExtremaduraDayTest.php | 4 ++-- tests/Spain/Galicia/GalicianLiteratureDayTest.php | 4 ++-- tests/Spain/Galicia/stJamesDayTest.php | 4 ++-- tests/Spain/GoodFridayTest.php | 2 +- tests/Spain/ImmaculateConceptionTest.php | 2 +- tests/Spain/InternationalWorkersDayTest.php | 2 +- tests/Spain/LaRioja/LaRiojaDayTest.php | 4 ++-- tests/Spain/MaundyThursdayTest.php | 2 +- tests/Spain/NationalDayTest.php | 4 ++-- tests/Spain/NewYearsDayTest.php | 2 +- tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php | 4 ++-- .../ValencianCommunity/ValencianCommunityDayTest.php | 4 ++-- 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 | 6 +++--- 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/WalpurgisEveTest.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 +- .../AppenzellAusserrhoden/AscensionDayTest.php | 2 +- .../AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/EasterMondayTest.php | 2 +- .../AppenzellAusserrhoden/GoodFridayTest.php | 2 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhoden/PentecostMondayTest.php | 2 +- .../AppenzellAusserrhoden/StStephensDayTest.php | 2 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 2 +- .../AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- .../AppenzellInnerrhoden/CorpusChristiTest.php | 2 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 2 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- .../AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.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 +- .../BaselLandschaft/PentecostMondayTest.php | 2 +- .../Switzerland/BaselLandschaft/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/WorkersDayTest.php | 2 +- tests/Switzerland/BaselStadt/AscensionDayTest.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/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/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/GoodFridayTest.php | 2 +- tests/Switzerland/Geneva/JeuneGenevoisTest.php | 6 +++--- 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/GoodFridayTest.php | 2 +- tests/Switzerland/Glarus/NafelserFahrtTest.php | 4 ++-- 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/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/NewYearsDayTest.php | 2 +- tests/Switzerland/Jura/PentecostMondayTest.php | 2 +- tests/Switzerland/Jura/PlebisciteJurassienTest.php | 4 ++-- 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/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 | 4 ++-- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- .../Neuchatel/InstaurationRepubliqueTest.php | 4 ++-- 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 +- .../Switzerland/Nidwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Nidwalden/NewYearsDayTest.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 | 6 +++--- tests/Switzerland/Obwalden/ChristmasDayTest.php | 2 +- tests/Switzerland/Obwalden/CorpusChristiTest.php | 2 +- tests/Switzerland/Obwalden/EasterMondayTest.php | 2 +- tests/Switzerland/Obwalden/GoodFridayTest.php | 2 +- .../Switzerland/Obwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Obwalden/NewYearsDayTest.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 +- 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/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/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/StStephensDayTest.php | 2 +- tests/Switzerland/SwissNationalDayTest.php | 10 +++++----- 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/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/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/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/Vaud/AscensionDayTest.php | 2 +- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Vaud/BettagsMontagTest.php | 4 ++-- 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/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/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 +- 297 files changed, 331 insertions(+), 331 deletions(-) diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 4e567cedc..c41a35195 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index 569a3009f..d56bd7ff9 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -39,7 +39,7 @@ class AndalusiaDayTest extends AndalusiaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index 97a4ed7f6..89042cbb9 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -34,7 +34,7 @@ class StGeorgesDayTest extends AragonBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(); $this->assertHoliday( diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index f6d5c7df3..79a92edab 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index 2bd713aad..f1327ec8e 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -39,7 +39,7 @@ class AsturiasDayTest extends AsturiasBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index 2141e268f..aad4de6ed 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -39,7 +39,7 @@ class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements Yasu * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index a0710a0e6..96011e950 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -44,7 +44,7 @@ class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements YasumiTe * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR); $this->assertHoliday( @@ -59,7 +59,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -72,7 +72,7 @@ public function testHolidayBeforeEstablishment() * Tests the holiday defined in this test after abolishment. * @throws ReflectionException */ - public function testHolidayDayAfterAbolishment() + public function testHolidayDayAfterAbolishment(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ABOLISHMENT_YEAR + 1)); } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index 962b33d60..4ffd15fe8 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -39,7 +39,7 @@ class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements YasumiTe * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index c278f644a..a09e462f6 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -39,7 +39,7 @@ class CantabriaDayTest extends CantabriaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index eded19398..4bf3aba19 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -39,7 +39,7 @@ class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements Yasumi * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index d08d37f60..ab326b744 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -39,7 +39,7 @@ class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements Ya * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index 94ebfc3d2..931ffe061 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -39,7 +39,7 @@ class nationalCataloniaDayTest extends CataloniaBaseTestCase implements YasumiTe * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 5b63f65d4..bc2166538 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -38,7 +38,7 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index 63c82138d..164cbd021 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -39,7 +39,7 @@ class ceutaDayTest extends CeutaBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 9acc67748..d40f58451 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends SpainBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index 2f8b97db1..15849e67c 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -34,7 +34,7 @@ class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(); $this->assertHoliday( diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index f5e3e7cf8..3e3b37baa 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -39,7 +39,7 @@ class ConstitutionDayTest extends SpainBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index b12683ced..38afecaef 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -40,7 +40,7 @@ class EasterMondayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2216; $this->assertHoliday( diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index bf36a7c4d..95c701b84 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends SpainBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index 5ced297d8..5ab748386 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -39,7 +39,7 @@ class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index b5c1134cd..9f58c58e7 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -39,7 +39,7 @@ class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements YasumiTes * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index 29411fbd6..db0a1f3ed 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -39,7 +39,7 @@ class stJamesDayTest extends GaliciaBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index e4a57ebe7..cd0f382e3 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends SpainBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2066; $this->assertHoliday( diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index bedc5be37..38ded2251 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 42f1feac8..aa1f51843 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index 0956203c9..b4eede700 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -39,7 +39,7 @@ class LaRiojaDayTest extends LaRiojaBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index 912b447ce..4f31773ef 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -40,7 +40,7 @@ class MaundyThursdayTest extends SpainBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index cdba0bf2e..81765ce5d 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -39,7 +39,7 @@ class NationalDayTest extends SpainBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index c4cd7e631..d240ab074 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index 6e7a56aa0..7a1ce5120 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -39,7 +39,7 @@ class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements Yasumi * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index 71f62d2ca..223434095 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -39,7 +39,7 @@ class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implement * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 0a2e14a0d..37150429d 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -38,7 +38,7 @@ class ValentinesDayTest extends SpainBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index 396bd09a8..52f636945 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -44,7 +44,7 @@ class stJosephsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 5086e2e71..524636504 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -40,7 +40,7 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index 1c4f7b0e0..ab9056cfc 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -40,7 +40,7 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 4a8ab1ffa..1e908ce46 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1588; $this->assertHoliday( diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 9530f4b93..426250943 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index 8603ebeb9..f1e4a7098 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -38,7 +38,7 @@ class ChristmasEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index 470ba62ce..921827a8f 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index ca164fe1a..7983489f6 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends SwedenBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1847; $this->assertHoliday( diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index fe51778d7..add4012ec 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -38,7 +38,7 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index 09457326a..2238c9983 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends SwedenBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index d7addd08b..8062647bd 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends SwedenBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2005; $this->assertHoliday( diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index f91d5069e..8af659bab 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index f3a86793b..ef3a3dd72 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -39,7 +39,7 @@ class NationalDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2022; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -95,7 +95,7 @@ public function testHolidayType(): void * Tests the translated name of the holiday defined in this test on or after establishment. * @throws ReflectionException */ - public function testTranslationOnAfterNameChange() + public function testTranslationOnAfterNameChange(): void { $this->assertTranslatedHolidayName( self::REGION, diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index 50a8c2343..5d4825f1e 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index 4295ae58c..5354dbac9 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -38,7 +38,7 @@ class NewYearsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index aaa2bab71..bd4907ab4 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends SwedenBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 4009; $this->assertHoliday( diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 64099d8bd..6667f4f01 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index 623910e83..f15072bd0 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -31,7 +31,7 @@ class StJohnsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterfa * Tests the holiday defined in this test. * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(); diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index ff3f47bb4..22abd0c0c 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -31,7 +31,7 @@ class StJohnsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterfa * Tests the holiday defined in this test. * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(); diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index bdb7c6850..b1783c9b6 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -38,7 +38,7 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index b01803759..e53d7bd40 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends AargauBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 98eaf9cfc..a581d0944 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends AargauBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index cd0b75249..b5e073829 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends AargauBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index d36166533..5d8726379 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends AargauBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index 385509021..480fc9693 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index 1cb0fd60d..4f8fe1e27 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index bf24ea890..ccbb37b3d 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 09963ce87..e17338c47 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends AppenzellAusserrhodenBaseTestCase implements Yasumi * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 115df0915..bdd714ab2 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasum * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index bb797bde6..9eba5caf8 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends AppenzellAusserrhodenBaseTestCase implements Y * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index d4880a5ed..c446f0e9c 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Yas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index 7332ba7fa..e0d593bf0 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index b6cab9a68..f20704b10 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index e2bd328a5..b1ad82e85 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements Y * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index b848cc314..bef98b4ef 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index e75b56fae..0f34ea058 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends AppenzellInnerrhodenBaseTestCase implements Yasu * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index 4c620831a..905af5ef5 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index 182251ede..85be3c537 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index 6c50739b7..f0d0013b4 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends AppenzellInnerrhodenBaseTestCase implemen * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index f413c2d03..70bfe418c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index b698c912f..ef1028f18 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends AppenzellInnerrhodenBaseTestCase implements Ya * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 6a44c264b..88e9d6aee 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasu * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 8e62e45b3..37c57941f 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends BaselLandschaftBaseTestCase implements YasumiTest * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 00159ea9a..4f8f07ec2 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements YasumiTest * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index 48ff0a482..7eac83258 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends BaselLandschaftBaseTestCase implements YasumiTest * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index f42b7039d..85dc616f5 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends BaselLandschaftBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 55a355c84..5c7f0ba40 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index 1a968d44b..57addd29a 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends BaselLandschaftBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index 0b4d0cde2..fd20b6207 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index b24fc0e8d..d2e35d790 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index aaf4b2839..78a212302 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index 3f1eb63db..8bef08ab5 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index 40b3bc221..c4facbaa0 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index 210c5f0a5..0f93e3090 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index cba386f4d..669808bee 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index fe914a6a9..2c62b9d45 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends BaselStadtBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 18bb8d411..9a0440285 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index 849e79d64..684056945 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index c63d174a7..62934c036 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends BernBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index fa4a9da52..85f54f421 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends BernBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index e970e5390..ba6022df1 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends BernBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 898e057a8..12a64d1ed 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends BernBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index d696b6660..27d6af82e 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends BernBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 2f42ae433..72449201c 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends BernBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index 4a72c37e4..07e0d18fc 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends BernBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index b415afc55..b2aca97d8 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends BernBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index f7c5b93db..a589a9def 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends FribourgBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index cf2d27243..a61bf92de 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends FribourgBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index f8d8d7382..efae65b93 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends FribourgBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index 0e27cb829..6edfc908d 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends FribourgBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index d1f90bc50..ee3214b3b 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends FribourgBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index 95bb84f40..edf97a9d5 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends FribourgBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index f15e320b3..df23f9bd4 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends GenevaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index dab140110..fa4c62ac7 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends GenevaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index fcb3470ea..4dcea3f5c 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends GenevaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index b935cd1f6..b0c89c869 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends GenevaBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 6e874c839..452c28187 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -37,7 +37,7 @@ class JeuneGenevoisTest extends GenevaBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testJeuneGenevoisBetween1870And1965() + public function testJeuneGenevoisBetween1870And1965(): void { $year = $this->generateRandomYear(1870, 1965); // Find first Sunday of September @@ -55,7 +55,7 @@ public function testJeuneGenevoisBetween1870And1965() * @throws ReflectionException * @throws Exception */ - public function testJeuneGenevoisBetween1840And1869() + public function testJeuneGenevoisBetween1840And1869(): void { $year = $this->generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); // Find first Sunday of September @@ -71,7 +71,7 @@ public function testJeuneGenevoisBetween1840And1869() * Tests Jeune Genevois before 1840 * @throws ReflectionException */ - public function testJeuneGenevoisBefore1840() + public function testJeuneGenevoisBefore1840(): void { $year = $this->generateRandomYear(1000, Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index f7af44741..417c966c2 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends GenevaBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index a3d74d6a7..04cd35873 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends GenevaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index f6a6942a2..27156ba8d 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -34,7 +34,7 @@ class RestaurationGenevoiseTest extends GenevaBaseTestCase implements YasumiTest * @throws Exception * @throws ReflectionException */ - public function testRestaurationGenevoiseAfter1813() + public function testRestaurationGenevoiseAfter1813(): void { $year = $this->generateRandomYear(1814); diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index c620c4f10..d00562382 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index 2ed0cbd91..64657f9de 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index 72457efe2..45190c3b5 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends GlarusBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index 030e65436..485a48c8c 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index ac2ff5412..2a1a7386d 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index c1270beab..4efe8e8e6 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends GlarusBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index a609740dc..a428dec8e 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -39,7 +39,7 @@ class NafelserFahrtTest extends GlarusBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testNafelserFahrtOnAfter1389() + public function testNafelserFahrtOnAfter1389(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new DateTime('First Thursday of ' . $year . '-04', new DateTimeZone(self::TIMEZONE)); @@ -51,7 +51,7 @@ public function testNafelserFahrtOnAfter1389() * Tests Näfelser Fahrt before 1389 * @throws ReflectionException */ - public function testNafelserFahrtBefore1389() + public function testNafelserFahrtBefore1389(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 310c7a22b..4b34d50a8 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index cea53e82c..1c794d275 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends GlarusBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 2d56b8b09..2bc9c08a4 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends GlarusBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index 6d3b6fa5f..17553fb59 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 59b27220b..9707e6320 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index 575bc3900..3b1e83261 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index 9df2b15eb..77498474d 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index f812616c4..672d14cdc 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index 576932ee2..b926dba9d 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends GrisonsBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index 949547bee..1fb961729 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index 805a96900..72fc49414 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index c99dff731..ffa307f99 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index c7935df78..f1ca4d1cd 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/BerchtoldsTagTest.php b/tests/Switzerland/Jura/BerchtoldsTagTest.php index de6de0d71..33e604800 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends JuraBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index 2a060b2a2..e26c7d8fd 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index 0ef1690e5..f0390e1a0 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends JuraBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index 1129394cf..328a5e044 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index 44a55a8ec..369d83334 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends JuraBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index e46010045..9c4b05505 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index 1414d4949..d57c45c87 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends JuraBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index 82eb56b4f..9116ab876 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -39,7 +39,7 @@ class PlebisciteJurassienTest extends JuraBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testInstaurationRepubliqueOnAfter1975() + public function testInstaurationRepubliqueOnAfter1975(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testInstaurationRepubliqueOnAfter1975() * Tests Plébiscite jurassien before 1975. * @throws ReflectionException */ - public function testInstaurationRepubliqueBefore1975() + public function testInstaurationRepubliqueBefore1975(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index ac374fa95..0377d7e64 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index 75c095706..3596cdaae 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index c873db564..486a750ba 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index 43f14d9f5..eb23521be 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php index 0c19c9acc..fde0f772b 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends LucerneBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 3f6e9a5a9..3164ef9b8 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index 99bb81dfe..14dace6d3 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends LucerneBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index 164d85b32..3a8f1060b 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index b973be671..c6895d640 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends LucerneBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 1fb3ba57d..a8b129b69 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements YasumiTest * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index 4400d5a46..1975a72ea 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index 174e5e552..850eb768a 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends LucerneBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index e55b1b1f9..3c461bbbd 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends LucerneBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index e3da6de96..6bbdbb652 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php b/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php index 8c3db3377..26335be18 100644 --- a/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php +++ b/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends NeuchatelBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index 2f817bc9a..f32d7f289 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -36,7 +36,7 @@ class BettagsMontagTest extends NeuchatelBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testBettagsMontagOnAfter1832() + public function testBettagsMontagOnAfter1832(): void { $year = $this->generateRandomYear(1832); @@ -52,7 +52,7 @@ public function testBettagsMontagOnAfter1832() * Tests Bettags Montag before 1832 * @throws ReflectionException */ - public function testBettagsMontagBefore1832() + public function testBettagsMontagBefore1832(): void { $year = $this->generateRandomYear(1000, 1831); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 72a6405de..002849a41 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index b2d80b33a..572a09f3a 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 8541431f5..2b347ff68 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 6a5f5b845..3caf0e4e3 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -39,7 +39,7 @@ class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements Yasumi * @throws Exception * @throws ReflectionException */ - public function testInstaurationRepubliqueOnAfter1849() + public function testInstaurationRepubliqueOnAfter1849(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testInstaurationRepubliqueOnAfter1849() * Tests Instauration de la République before 1849. * @throws ReflectionException */ - public function testInstaurationRepubliqueBefore1849() + public function testInstaurationRepubliqueBefore1849(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index 96feaa908..679eb4dea 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index 353eadbf6..0a9175bc5 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends NeuchatelBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index ba697b001..863caf8c1 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index 9ae0656de..f6e95bdad 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index e2d18cddf..3a1417aa6 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index 4c1fb130e..a9afcb21c 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 8dad841db..eb8388985 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index a1851b36b..5c268986a 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends NidwaldenBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index 18a79bb70..23062099a 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index 868fc70d8..e9fa7b191 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index 687cb3046..a50b49731 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 4cc7db69c..af96cec89 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index 18b6685a3..3e4fdedea 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends NidwaldenBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 06bdeee7b..c4a668fcd 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -41,7 +41,7 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testStJosephDay($year, $expected) + public function testStJosephDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 2537d130d..0e3db994c 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index ed729f031..b2ed838e6 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index 7d38c2265..d1acae328 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index d8bbacef8..c81a6bddf 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php index 44db78d5d..625981079 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index bf1a5b315..645c9142e 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -35,7 +35,7 @@ class BruderKlausenFestTest extends ObwaldenBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testBruderKlausenFestOnAfter1947() + public function testBruderKlausenFestOnAfter1947(): void { $year = $this->generateRandomYear(1947); $date = new DateTime($year . '-09-25', new DateTimeZone(self::TIMEZONE)); @@ -50,7 +50,7 @@ public function testBruderKlausenFestOnAfter1947() * @throws ReflectionException * @throws Exception */ - public function testBruderKlausenFestBetween1649And1946() + public function testBruderKlausenFestBetween1649And1946(): void { $year = $this->generateRandomYear(1649, 1946); $date = new DateTime($year . '-09-21', new DateTimeZone(self::TIMEZONE)); @@ -63,7 +63,7 @@ public function testBruderKlausenFestBetween1649And1946() * Tests Bruder-Klausen-Fest before 1648 * @throws ReflectionException */ - public function testBruderKlausenFestBefore1648() + public function testBruderKlausenFestBefore1648(): void { $year = $this->generateRandomYear(1000, 1648); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 59bd5581b..f137263bf 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index 2f5b58e7b..47af4cf33 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -36,7 +36,7 @@ class CorpusChristiTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index 9013287c5..956eba82a 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index 203b52b8f..35e14d64d 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 3c1965aa5..0139efebf 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index ca078c188..6c59d5543 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index b40019aa9..75550db23 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends ObwaldenBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index e5fb18009..551e26fc0 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index f0815f36b..646efe8cd 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends SchaffhausenBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index 8dc7243d8..38a3ccb6d 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index b0a64a436..ae4f0caca 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 133a3183b..a649063c0 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends SchaffhausenBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index 501c09416..184e7679d 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 17bae79b2..eb60ab48c 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index 6530521cf..3c7f0d7b1 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends SchaffhausenBaseTestCase implements YasumiTest * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index e1cb276f9..46613f967 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index 565aacce6..6f3e3dbe6 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index b2e20eb09..98032db3d 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index 0af3fdc09..bbb5b5605 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index d41825b4b..55c54bf01 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index dc349e6bc..1f8c98c5d 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index 63843b56b..b7bbf580d 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends SchwyzBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index b687fd774..e5fd0bc6a 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 5377937b7..e454edf79 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -39,7 +39,7 @@ class EpiphanyTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index bcbca4f9d..d540994ae 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index 41ddf6d2f..769c402de 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index d45cc11b2..ce51a7045 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index 0ec97e95b..8300aa8ec 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends SchwyzBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index bd0d8189e..fc087ac20 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -41,7 +41,7 @@ class StJosephDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testStJosephDay($year, $expected) + public function testStJosephDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 35d85917e..d47fa0183 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index e2e6a9eb1..c2cc90223 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends SolothurnBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index dacb8597e..ed96799c1 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends SolothurnBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 56da040bc..2d0f5cbc7 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 9bd24167d..1a3650e1a 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends SolothurnBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index f86aa54ee..3d4a978fb 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index 3fbda14bf..f2efc188f 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index c8f9fc958..5f590e3b0 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 4d1d9e35f..76e234274 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index 1fd424b95..ed8cf3891 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index 45e3a4cfe..76cb1a88a 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends StGallenBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index bc4d9b140..60c52a716 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index ad4ae1272..51ef4ba0d 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends StGallenBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 8bc7de509..6f17acda4 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends StGallenBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index 8a84a3a53..d0170b649 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -49,7 +49,7 @@ class SwissNationalDayTest extends SwitzerlandBaseTestCase implements YasumiTest * @throws Exception * @throws ReflectionException */ - public function testNationalDayOnAfter1994() + public function testNationalDayOnAfter1994(): void { $year = $this->generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -66,7 +66,7 @@ public function testNationalDayOnAfter1994() * @throws Exception * @throws ReflectionException */ - public function testNationalDayOnAfter1899() + public function testNationalDayOnAfter1899(): void { $year = $this->generateRandomYear(self::FIRST_ESTABLISHMENT_YEAR, self::NATIONAL_ESTABLISHMENT_YEAR - 1); $this->assertHoliday( @@ -84,7 +84,7 @@ public function testNationalDayOnAfter1899() * @throws Exception * @throws ReflectionException */ - public function testNationalDayOn1891() + public function testNationalDayOn1891(): void { $year = self::FIRST_OBSERVANCE_YEAR; $this->assertHoliday( @@ -100,7 +100,7 @@ public function testNationalDayOn1891() * Tests National Day before 1891. * @throws ReflectionException */ - public function testNationalDayBefore1891() + public function testNationalDayBefore1891(): void { $this->assertNotHoliday( self::REGION, @@ -113,7 +113,7 @@ public function testNationalDayBefore1891() * Tests National Day between 1891 and 1899. * @throws ReflectionException */ - public function testNationalDayBetween1891And1899() + public function testNationalDayBetween1891And1899(): void { $year = $this->generateRandomYear(self::FIRST_OBSERVANCE_YEAR + 1, self::FIRST_ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index 620f1477f..f196bc1ef 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index dc1e0f96a..1db73effa 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends ThurgauBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index a4dfece0e..0983673a3 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index d50eeb177..e54b88d65 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index ac0e6e3a5..deb6fa858 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index 30641f7c4..a6e8fc604 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index e00d1d592..8a990153e 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends ThurgauBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index f0e5cf021..5ae1053f1 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index f547472cc..df6e46715 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 28025bede..1d2bca5ed 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index cf69df96b..e537bb3d0 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index ac3160a19..092068a13 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index cd972d0c1..78d00c2e2 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index f4a827f4e..5ada6d17a 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends TicinoBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index 89a7b5ac1..8424bb109 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index e80e29b33..35d628b9b 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -39,7 +39,7 @@ class EpiphanyTest extends TicinoBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index 9c1e702c1..c386b0e5b 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index ef6cfb559..9c049616a 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index 1abd4e2d7..92cabd8dd 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends TicinoBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 8a0f01ea5..6b745b59f 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -41,7 +41,7 @@ class StJosephDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testStJosephDay($year, $expected) + public function testStJosephDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index 3313aff8f..e7f98abf2 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -39,7 +39,7 @@ class StPeterPaulTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testStPeterPaul($year, $expected) + public function testStPeterPaul($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index 52434518e..97696fb73 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends TicinoBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index 1b6008e73..d45bae3ec 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterfa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index d5e9555ff..98d94efdd 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 235a8e48a..5f617494e 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 04341fb0b..5eee7fde4 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index 89cf00200..736c36b5c 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index 3327e4297..a26834d1d 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends UriBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index abc55ee1e..f69e47075 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 7f349aff3..bf4d78355 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -39,7 +39,7 @@ class EpiphanyTest extends UriBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index a2f96202e..37477b48e 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends UriBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index bbede4ec9..ca6117e13 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 1d4c626d0..1b1dc390c 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends UriBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index 40f91843a..4dbb946f7 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends UriBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 075036be5..75860374a 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -41,7 +41,7 @@ class StJosephDayTest extends UriBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testStJosephDay($year, $expected) + public function testStJosephDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 35cbf6ba0..abd2f7d82 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends UriBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index bf4b3c6bb..1ddd8468a 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index a15d202c9..4983af7fb 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 87bf0b2d8..dda652662 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index 05f62636f..17d17b2c5 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index 39c9886d9..d8786ee2c 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends ValaisBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index ce21de4a3..a9ac0bacd 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 5fbbfc865..e94f05f65 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index e6e123fdb..7f777c894 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -41,7 +41,7 @@ class StJosephDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testStJosephDay($year, $expected) + public function testStJosephDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index bc809c43b..54716ceea 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index 144c04f6c..0f67ae9ce 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends VaudBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index abbae4bb1..9eed9620d 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -36,7 +36,7 @@ class BettagsMontagTest extends VaudBaseTestCase implements YasumiTestCaseInterf * * @throws Exception */ - public function testBettagsMontagOnAfter1832() + public function testBettagsMontagOnAfter1832(): void { $year = $this->generateRandomYear(1832); @@ -52,7 +52,7 @@ public function testBettagsMontagOnAfter1832() * Tests Bettags Montag before 1832 * @throws ReflectionException */ - public function testBettagsMontagBefore1832() + public function testBettagsMontagBefore1832(): void { $year = $this->generateRandomYear(1000, 1831); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 31d12abc7..ccc10f75f 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index b80da1047..f143740c3 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index d783fd9fe..5f755ab83 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends VaudBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index d37522d69..f225e749c 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index c2e5fe501..ab99495e6 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends VaudBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 18fe331f7..3d2b5de88 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index 6c19a6ba8..b663660a9 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 147bdf6b7..77fbc08e2 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/BerchtoldsTagTest.php b/tests/Switzerland/Zug/BerchtoldsTagTest.php index 7ad270a28..af14b1a15 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends ZugBaseTestCase implements YasumiTestCaseInterfa * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index f5f070979..fc2afccac 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index 1177d9fff..c3711166d 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends ZugBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 79adf5377..d52e0b4f9 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index 6923b9890..717f04826 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends ZugBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 676860c77..c6d6dbc46 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index be22a7af5..d19138216 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index 278942c5d..7e6da5c80 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends ZugBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 0452a7ba3..bf97119f5 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index 8c5734575..4a3ad4392 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends ZurichBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Switzerland/Zurich/BerchtoldsTagTest.php b/tests/Switzerland/Zurich/BerchtoldsTagTest.php index ad2600d06..b8d0ceeb0 100644 --- a/tests/Switzerland/Zurich/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zurich/BerchtoldsTagTest.php @@ -35,7 +35,7 @@ class BerchtoldsTagTest extends ZurichBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testBerchtoldsTag() + public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 5b540fb3d..bba32dd58 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends ZurichBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index db7dbfba9..d288337ea 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends ZurichBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index 0de1c1407..b37fb29da 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends ZurichBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index d754329fc..69317142e 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index 0e89ecb54..d7966a09d 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends ZurichBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index aa517d71a..745e3b169 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends ZurichBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index 361d2cfda..a1afaea21 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -40,7 +40,7 @@ class WorkersDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterfa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); From 93808bf132abc04ba1de7bd1bce0a347312057a4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 21:49:17 +0900 Subject: [PATCH 086/687] Corrected namespace. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiWorkdayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index 58842ca8d..25e57e5eb 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests; +namespace Yasumi\tests\Base; use DateTime; use DateTimeImmutable; From 18260ebd4c3df4a3e25f3f37b15b6b25ed265f66 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 21:52:06 +0900 Subject: [PATCH 087/687] Added throws tag for error handling. Signed-off-by: Sacha Telgenhof --- tests/Base/HolidayTest.php | 4 ++++ tests/Base/TypographyTest.php | 1 + 2 files changed, 5 insertions(+) diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index c4839c9a6..c1a4eec75 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -91,6 +91,7 @@ public function testHolidayWithDateTimeInterface(): void /** * Tests the getLocales function of the Holiday object. + * @throws Exception */ public function testHolidayGetLocales(): void { @@ -105,6 +106,7 @@ public function testHolidayGetLocales(): void /** * Tests the getName function of the Holiday object without any arguments provided. + * @throws Exception */ public function testHolidayGetNameWithoutArgument(): void { @@ -155,6 +157,8 @@ public function testHolidayGetNameWithoutArgument(): void /** * Tests the getName function of the Holiday object with an explicit list of locales. + * @throws MissingTranslationException + * @throws Exception */ public function testHolidayGetNameWithArgument(): void { diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 5b8460ae1..6944fcd49 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -46,6 +46,7 @@ public function testTranslations($name, $class, $shortName, $locale): void /** * Provides test data for testProvider(). + * @throws \ReflectionException */ public function translationProvider(): array { From 862ca761a7549c10e9f5c5388712144754096f0b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 21:55:24 +0900 Subject: [PATCH 088/687] Added missing return type. Signed-off-by: Sacha Telgenhof --- tests/Australia/AnzacDayTest.php | 4 ++-- tests/Australia/AustraliaDayTest.php | 4 ++-- .../AustralianCapitalTerritory/CanberraDayTest.php | 2 +- .../EasterSaturdayTest.php | 2 +- .../EasterSundayTest.php | 2 +- .../AustralianCapitalTerritory/LabourDayTest.php | 2 +- .../QueensBirthdayTest.php | 2 +- .../ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 4 ++-- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/BankHolidayTest.php | 2 +- .../Australia/NewSouthWales/EasterSaturdayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSundayTest.php | 2 +- tests/Australia/NewSouthWales/LabourDayTest.php | 2 +- .../Australia/NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- .../NorthernTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/NorthernTerritory/MayDayTest.php | 2 +- .../Australia/NorthernTerritory/PicnicDayTest.php | 2 +- .../NorthernTerritory/QueensBirthdayTest.php | 2 +- .../Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/Australia/Queensland/LabourDayTest.php | 2 +- tests/Australia/Queensland/QueensBirthdayTest.php | 2 +- .../SouthAustralia/AdelaideCupDayTest.php | 2 +- .../Australia/SouthAustralia/ChristmasDayTest.php | 2 +- .../SouthAustralia/EasterSaturdayTest.php | 2 +- tests/Australia/SouthAustralia/LabourDayTest.php | 2 +- .../SouthAustralia/ProclamationDayTest.php | 2 +- .../SouthAustralia/QueensBirthdayTest.php | 2 +- .../Tasmania/CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/EightHourDayTest.php | 2 +- .../FlindersIsland/FlindersIslandShowTest.php | 2 +- .../Tasmania/KingIsland/KingIslandShowTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AGFESTTest.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 +- .../Australia/Victoria/AFLGrandFinalFridayTest.php | 4 ++-- tests/Australia/Victoria/EasterSaturdayTest.php | 2 +- tests/Australia/Victoria/EasterSundayTest.php | 2 +- tests/Australia/Victoria/LabourDayTest.php | 2 +- tests/Australia/Victoria/MelbourneCupDayTest.php | 2 +- tests/Australia/Victoria/QueensBirthdayTest.php | 2 +- tests/Australia/WesternAustralia/LabourDayTest.php | 2 +- .../WesternAustralia/QueensBirthdayTest.php | 2 +- .../WesternAustralia/WesternAustraliaDayTest.php | 2 +- tests/Austria/AllSaintsDayTest.php | 2 +- tests/Austria/AscensionDayTest.php | 2 +- tests/Austria/AssumptionOfMaryTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 4 ++-- tests/Austria/Carinthia/StJosephsDayTest.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/LowerAustria/StLeopoldsDayTest.php | 4 ++-- tests/Austria/NationalDayTest.php | 4 ++-- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 4 ++-- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Belgium/AllSaintsDayTest.php | 2 +- tests/Belgium/ArmisticeDayTest.php | 2 +- tests/Belgium/AscensionDayTest.php | 2 +- tests/Belgium/AssumptionOfMaryTest.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/ChristmasDayTest.php | 2 +- tests/Bosnia/DayAfterNewYearsDay.php | 2 +- tests/Bosnia/EasterTest.php | 2 +- tests/Bosnia/IndependenceDayTest.php | 4 ++-- tests/Bosnia/InternationalWorkersDayTest.php | 2 +- tests/Bosnia/NewYearsDayTest.php | 2 +- tests/Bosnia/OrthodoxChristmasDay.php | 2 +- tests/Bosnia/SecondLabourDay.php | 2 +- tests/Bosnia/StatehoodDayTest.php | 4 ++-- tests/Brazil/AllSoulsDayTest.php | 4 ++-- tests/Brazil/AshWednesdayTest.php | 2 +- tests/Brazil/CarnavalMondayTest.php | 4 ++-- tests/Brazil/CarnavalTuesdayTest.php | 4 ++-- tests/Brazil/ChristmasDayTest.php | 2 +- tests/Brazil/CorpusChristiTest.php | 2 +- tests/Brazil/EasterTest.php | 2 +- tests/Brazil/GoodFridayTest.php | 2 +- tests/Brazil/IndependenceDayTest.php | 4 ++-- tests/Brazil/InternationalWorkersDayTest.php | 2 +- tests/Brazil/NewYearsDayTest.php | 2 +- tests/Brazil/OurLadyOfAparecidaDayTest.php | 4 ++-- tests/Brazil/ProclamationOfRepublicDayTest.php | 4 ++-- tests/Brazil/TiradentesDayTest.php | 4 ++-- tests/Canada/CanadaDayTest.php | 4 ++-- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 4 ++-- tests/Canada/NewYearsDayTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 4 ++-- tests/Canada/ThanksgivingDayTest.php | 4 ++-- tests/Croatia/AllSaintsDayTest.php | 2 +- tests/Croatia/AntifascistStruggleDayTest.php | 4 ++-- tests/Croatia/AssumptionOfMaryTest.php | 2 +- tests/Croatia/ChristmasDayTest.php | 2 +- tests/Croatia/CorpusChristiTest.php | 2 +- tests/Croatia/EasterMondayTest.php | 2 +- tests/Croatia/EasterTest.php | 2 +- tests/Croatia/EpiphanyTest.php | 2 +- tests/Croatia/HomelandThanksgivingDayTest.php | 4 ++-- tests/Croatia/IndependenceDayTest.php | 6 +++--- tests/Croatia/InternationalWorkersDayTest.php | 2 +- tests/Croatia/NewYearsDayTest.php | 2 +- tests/Croatia/RemembranceDayTest.php | 4 ++-- tests/Croatia/StStephensDayTest.php | 2 +- tests/Croatia/StatehoodDayTest.php | 4 ++-- tests/CzechRepublic/ChristmasDayTest.php | 2 +- tests/CzechRepublic/ChristmasEveTest.php | 2 +- tests/CzechRepublic/CzechStateHoodDayTest.php | 2 +- tests/CzechRepublic/EasterMondayTest.php | 2 +- tests/CzechRepublic/GoodFridayTest.php | 2 +- .../IndependentCzechoslovakStateDayTest.php | 2 +- .../CzechRepublic/InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- .../RenewalOfIndependentCzechStateDayTest.php | 2 +- .../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 | 4 ++-- tests/Denmark/EasterMondayTest.php | 2 +- tests/Denmark/EasterTest.php | 2 +- tests/Denmark/GoodFridayTest.php | 2 +- tests/Denmark/GreatPrayerDayTest.php | 4 ++-- 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/GoodFridayDayTest.php | 2 +- tests/Estonia/IndependenceDayTest.php | 4 ++-- tests/Estonia/InternationalWorkersDayTest.php | 2 +- tests/Estonia/NewYearsDayTest.php | 2 +- tests/Estonia/PentecostTest.php | 2 +- tests/Estonia/RestorationOfIndependenceDayTest.php | 4 ++-- tests/Estonia/SecondChristmasDayTest.php | 2 +- tests/Estonia/StJohnsDayTest.php | 2 +- tests/Estonia/VictoryDayTest.php | 4 ++-- 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/GoodFridayTest.php | 2 +- tests/Finland/IndependenceDayTest.php | 4 ++-- tests/Finland/InternationalWorkersDayTest.php | 2 +- tests/Finland/NewYearsDayTest.php | 2 +- tests/Finland/PentecostTest.php | 2 +- tests/Finland/SecondChristmasDayTest.php | 2 +- tests/Finland/stJohnsDayTest.php | 4 ++-- tests/France/AllSaintsDayTest.php | 2 +- tests/France/ArmisticeDayTest.php | 4 ++-- tests/France/AscensionDayTest.php | 2 +- tests/France/AssumptionOfMaryTest.php | 2 +- tests/France/BasRhin/GoodFridayTest.php | 2 +- tests/France/BasRhin/stStephensDayTest.php | 2 +- tests/France/BastilleDayTest.php | 4 ++-- tests/France/ChristmasDayTest.php | 2 +- tests/France/EasterMondayTest.php | 2 +- tests/France/HautRhin/GoodFridayTest.php | 2 +- tests/France/HautRhin/stStephensDayTest.php | 2 +- tests/France/InternationalWorkersDayTest.php | 2 +- tests/France/Moselle/GoodFridayTest.php | 2 +- tests/France/Moselle/stStephensDayTest.php | 2 +- tests/France/NewYearsDayTest.php | 2 +- tests/France/PentecostMondayTest.php | 2 +- tests/France/VictoryInEuropeDayTest.php | 4 ++-- tests/Germany/AscensionDayTest.php | 2 +- .../Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- .../Germany/BadenWurttemberg/CorpusChristiTest.php | 2 +- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/CorpusChristiTest.php | 2 +- tests/Germany/Bavaria/EpiphanyTest.php | 2 +- tests/Germany/Berlin/DayOfLiberation2020Test.php | 6 +++--- .../Berlin/InternationalWomensDay2019Test.php | 6 +++--- tests/Germany/Brandenburg/ReformationDayTest.php | 4 ++-- tests/Germany/Bremen/ReformationDayTest.php | 4 ++-- tests/Germany/ChristmasTest.php | 2 +- tests/Germany/EasterMondayTest.php | 2 +- tests/Germany/GermanUnityDayTest.php | 4 ++-- tests/Germany/GoodFridayTest.php | 2 +- tests/Germany/Hamburg/DayOfReformationTest.php | 4 ++-- tests/Germany/Hesse/CorpusChristiTest.php | 2 +- tests/Germany/InternationalWorkersDayTest.php | 2 +- tests/Germany/LowerSaxony/ReformationDayTest.php | 4 ++-- .../ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../NorthRhineWestphalia/CorpusChristiTest.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/ReformationDay2017Test.php | 6 +++--- .../RhinelandPalatinate/AllSaintsDayTest.php | 2 +- .../RhinelandPalatinate/CorpusChristiTest.php | 2 +- tests/Germany/Saarland/AllSaintsDayTest.php | 2 +- tests/Germany/Saarland/AssumptionOfMaryTest.php | 2 +- tests/Germany/Saarland/CorpusChristiTest.php | 2 +- tests/Germany/Saxony/ReformationDayTest.php | 4 ++-- .../Germany/Saxony/RepentanceAndPrayerDayTest.php | 4 ++-- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 2 +- tests/Germany/SaxonyAnhalt/ReformationDayTest.php | 4 ++-- .../SchleswigHolstein/ReformationDayTest.php | 4 ++-- tests/Germany/SecondChristmasDayTest.php | 2 +- tests/Germany/Thuringia/ReformationDayTest.php | 4 ++-- 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/IndepencenceDayTest.php | 4 ++-- tests/Greece/InternationalWorkersDayTest.php | 2 +- tests/Greece/NewYearsDayTest.php | 2 +- tests/Greece/OhiDayTest.php | 4 ++-- tests/Greece/PentecostMondayTest.php | 2 +- tests/Greece/PentecostTest.php | 2 +- tests/Greece/PolytechnioTest.php | 4 ++-- 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/InternationalWorkersDayTest.php | 2 +- tests/Hungary/MemorialDay1848Test.php | 4 ++-- tests/Hungary/MemorialDay1956Test.php | 4 ++-- tests/Hungary/NewYearsDayTest.php | 2 +- tests/Hungary/PentecostMondayTest.php | 2 +- tests/Hungary/PentecostTest.php | 2 +- tests/Hungary/SecondChristmasDayTest.php | 2 +- tests/Hungary/StateFoundationDayTest.php | 4 ++-- 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/JuneHolidayTest.php | 4 ++-- tests/Ireland/MayDayTest.php | 4 ++-- tests/Ireland/NewYearsDayTest.php | 4 ++-- tests/Ireland/OctoberHolidayTest.php | 4 ++-- tests/Ireland/PentecostTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 4 ++-- tests/Ireland/StStephensDayTest.php | 2 +- tests/Ireland/pentecostMondayTest.php | 4 ++-- 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/LiberationDayTest.php | 4 ++-- tests/Italy/NewYearsDayTest.php | 2 +- tests/Italy/RepublicDayTest.php | 4 ++-- tests/Italy/stStephensDayTest.php | 2 +- tests/Japan/AutumnalEquinoxDayTest.php | 6 +++--- tests/Japan/ChildrensDayTest.php | 6 +++--- tests/Japan/ComingOfAgeDayTest.php | 6 +++--- tests/Japan/ConstitutionMemorialDayTest.php | 6 +++--- tests/Japan/CoronationDayTest.php | 6 +++--- tests/Japan/CultureDayTest.php | 6 +++--- tests/Japan/EmperorsBirthdayTest.php | 12 ++++++------ .../Japan/EnthronementProclamationCeremonyTest.php | 6 +++--- tests/Japan/GreeneryDayTest.php | 10 +++++----- tests/Japan/LabourThanksgivingDayTest.php | 6 +++--- tests/Japan/MarineDayTest.php | 10 +++++----- tests/Japan/MountainDayTest.php | 8 ++++---- tests/Japan/NationalFoundationDayTest.php | 6 +++--- tests/Japan/NewYearsDayTest.php | 6 +++--- tests/Japan/PublicBridgeDayTest.php | 2 +- tests/Japan/RespectForTheAgedDayTest.php | 8 ++++---- tests/Japan/ShowaDayTest.php | 6 +++--- tests/Japan/SportsDayTest.php | 10 +++++----- tests/Japan/VernalEquinoxDayTest.php | 6 +++--- 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 +- .../ProclamationOfTheRepublicOfLatviaDayTest.php | 4 ++-- tests/Latvia/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 +- tests/Lithuania/InternationalWorkersDayTest.php | 2 +- tests/Lithuania/NewYearsDayTest.php | 2 +- ...RestorationOfIndependenceOfLithuaniaDayTest.php | 4 ++-- .../RestorationOfTheStateOfLithuaniaDayTest.php | 4 ++-- tests/Lithuania/SecondChristmasDayTest.php | 2 +- tests/Lithuania/StJohnsDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 4 ++-- tests/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 4 ++-- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 4 ++-- 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 | 6 +++--- tests/Netherlands/LiberationDayTest.php | 4 ++-- tests/Netherlands/MothersDayTest.php | 2 +- tests/Netherlands/NewYearsDayTest.php | 2 +- tests/Netherlands/PentecostTest.php | 2 +- tests/Netherlands/QueensDayTest.php | 14 +++++++------- tests/Netherlands/SummertimeTest.php | 2 +- tests/Netherlands/ValentinesDayTest.php | 2 +- tests/Netherlands/WintertimeTest.php | 2 +- tests/Netherlands/WorldAnimalDayTest.php | 4 ++-- 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 | 4 ++-- 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/QueensBirthdayTest.php | 4 ++-- tests/NewZealand/WaitangiDayTest.php | 4 ++-- tests/Norway/AscensionDayTest.php | 2 +- tests/Norway/ChristmasDayTest.php | 2 +- tests/Norway/ConstitutionDayTest.php | 4 ++-- 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/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 | 4 ++-- tests/Poland/CorpusChristiTest.php | 2 +- tests/Poland/EasterMondayTest.php | 2 +- tests/Poland/EasterTest.php | 2 +- tests/Poland/EpiphanyTest.php | 2 +- tests/Poland/IndependenceDayTest.php | 4 ++-- tests/Poland/InternationalWorkersDayTest.php | 2 +- tests/Poland/NewYearsDayTest.php | 2 +- tests/Poland/PentecostTest.php | 2 +- tests/Poland/SecondChristmasDayTest.php | 2 +- tests/Portugal/AllSaintsDayTest.php | 4 ++-- tests/Portugal/AssumptionOfMaryTest.php | 2 +- tests/Portugal/CarnationRevolutionDayTest.php | 4 ++-- tests/Portugal/ChristmasTest.php | 2 +- tests/Portugal/CorpusChristiTest.php | 4 ++-- 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/PortugalDayTest.php | 6 +++--- tests/Portugal/PortugueseRepublicDayTest.php | 8 ++++---- tests/Portugal/RestorationOfIndependenceTest.php | 8 ++++---- tests/Romania/AssumptionOfMaryTest.php | 4 ++-- tests/Romania/ChildrensDayTest.php | 4 ++-- tests/Romania/ChristmasDayTest.php | 2 +- tests/Romania/ConstantinBrancusiDayTest.php | 4 ++-- tests/Romania/DayAfterNewYearsDayTest.php | 2 +- tests/Romania/EasterMondayTest.php | 2 +- tests/Romania/EasterTest.php | 2 +- tests/Romania/InternationalWorkersDayTest.php | 2 +- tests/Romania/NationalDayTest.php | 8 ++++---- tests/Romania/NewYearsDayTest.php | 2 +- tests/Romania/PentecostMondayTest.php | 4 ++-- tests/Romania/PentecostTest.php | 4 ++-- tests/Romania/SecondChristmasDayTest.php | 2 +- tests/Romania/StAndrewsDayTest.php | 4 ++-- tests/Romania/UnitedPrincipalitiesDayTest.php | 4 ++-- tests/Russia/DefenceOfTheFatherlandDayTest.php | 4 ++-- 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/RussiaDayTest.php | 4 ++-- tests/Russia/SpringAndLabourDayTest.php | 2 +- tests/Russia/UnityDayTest.php | 4 ++-- 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 +- .../StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/Slovakia/VictoryInEuropeDayTest.php | 2 +- tests/SouthAfrica/ChristmasDayTest.php | 4 ++-- tests/SouthAfrica/FamilyDayTest.php | 4 ++-- tests/SouthAfrica/FreedomDayTest.php | 4 ++-- tests/SouthAfrica/GoodFridayTest.php | 4 ++-- tests/SouthAfrica/HeritageDayTest.php | 4 ++-- tests/SouthAfrica/HumanRightsDayTest.php | 4 ++-- .../SouthAfrica/MunicipalElections2016DayTest.php | 6 +++--- tests/SouthAfrica/NationalWomensDayTest.php | 4 ++-- tests/SouthAfrica/NewYearsDayTest.php | 4 ++-- tests/SouthAfrica/ReconciliationDayTest.php | 4 ++-- tests/SouthAfrica/SecondChristmasDayTest.php | 4 ++-- tests/SouthAfrica/SubstituteDayOfGoodwillTest.php | 6 +++--- tests/SouthAfrica/WorkersDayTest.php | 4 ++-- tests/SouthAfrica/YouthDayTest.php | 4 ++-- tests/SouthKorea/ArborDayTest.php | 6 +++--- tests/SouthKorea/ArmedForcesDayTest.php | 6 +++--- tests/SouthKorea/BuddhasBirthdayTest.php | 4 ++-- tests/SouthKorea/ChildrensDayTest.php | 10 +++++----- tests/SouthKorea/ChristmasDayTest.php | 4 ++-- tests/SouthKorea/ChuseokTest.php | 8 ++++---- tests/SouthKorea/ConstitutionDayTest.php | 6 +++--- tests/SouthKorea/GaecheonjeolTest.php | 4 ++-- tests/SouthKorea/HangulDayTest.php | 4 ++-- tests/SouthKorea/IndependenceMovementDayTest.php | 4 ++-- tests/SouthKorea/LiberationDayTest.php | 4 ++-- tests/SouthKorea/MemorialDayTest.php | 4 ++-- tests/SouthKorea/NewYearsDayTest.php | 6 +++--- tests/SouthKorea/SeollalTest.php | 6 +++--- 501 files changed, 703 insertions(+), 703 deletions(-) diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 2151f5183..1d6028727 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -45,7 +45,7 @@ class AnzacDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, @@ -59,7 +59,7 @@ public function testHoliday($year, $expected) * Tests that ANZAC Day is not present before 1921 * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday($this->region, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); } diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 158df0e3d..d679e20e7 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -39,7 +39,7 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday($this->region, self::HOLIDAY, $year, $expected); } @@ -55,7 +55,7 @@ public function testHoliday($year, $expected) * @throws ReflectionException * @throws Exception */ - public function testSubstituteHoliday($year, $expected) + public function testSubstituteHoliday($year, $expected): void { if ($expected) { $this->assertSubstituteHoliday( diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index 377f67504..57deb0bec 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -45,7 +45,7 @@ class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index d57ebbbe4..6233703e8 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -41,7 +41,7 @@ class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implemen * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index 6c3654565..16b6a7dfd 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -40,7 +40,7 @@ class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index b68c1a054..17ce5ace6 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -40,7 +40,7 @@ class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements Ya * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index 4620b957d..6e045cca9 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implemen * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index 47d93e5de..cddb95459 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -45,7 +45,7 @@ class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase imple * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 5c6c4a8ef..9c712707b 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -42,7 +42,7 @@ class BoxingDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected, $expectedExtra) + public function testHoliday($year, $expected, $expectedExtra): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 5fab37045..84545d485 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -42,7 +42,7 @@ class ChristmasDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected, $expectedExtra) + public function testHoliday($year, $expected, $expectedExtra): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index be695b2db..2c2a341eb 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -42,7 +42,7 @@ class EasterMondayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, @@ -63,7 +63,7 @@ public function testHoliday($year, $expected) * @throws ReflectionException * @throws Exception */ - public function testHoliday2($year, $expected) + public function testHoliday2($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index 1219158ca..66ed26624 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -41,7 +41,7 @@ class GoodFridayTest extends AustraliaBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index 64e8fa137..1d42a93c2 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -40,7 +40,7 @@ class BankHolidayTest extends NewSouthWalesBaseTestCase implements YasumiTestCas * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index c6b63a312..770163fe0 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -41,7 +41,7 @@ class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements YasumiTest * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index 84dcb3e61..bb37936f8 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -40,7 +40,7 @@ class EasterSundayTest extends NewSouthWalesBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index b29e86d83..c7e1df61d 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -40,7 +40,7 @@ class LabourDayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index 905f26eb5..c428fb196 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements YasumiTest * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index e493721d3..03c3257d5 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -42,7 +42,7 @@ class NewYearsDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected, $expectedExtra) + public function testHoliday($year, $expected, $expectedExtra): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 35796632f..430cb8b2f 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -41,7 +41,7 @@ class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements Yasumi * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index 6c68c361f..9b9fcfe2d 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -40,7 +40,7 @@ class MayDayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCase * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index 88ba1a5f0..c7ac6dfab 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -40,7 +40,7 @@ class PicnicDayTest extends NorthernTerritoryBaseTestCase implements YasumiTestC * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index 4eccecce9..3d9edaaec 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements Yasumi * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index add610548..06820b3fb 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -40,7 +40,7 @@ class PeoplesDayTest extends BrisbaneBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 825f3febe..f6148f2f0 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -40,7 +40,7 @@ class LabourDayTest extends QueenslandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index 57d8f34af..4faae13b9 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends QueenslandBaseTestCase implements YasumiTestCas * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index baa61cdaf..eef37da5f 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -45,7 +45,7 @@ class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 09702618e..5b13d96e1 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -42,7 +42,7 @@ class ChristmasDayTest extends SouthAustraliaBaseTestCase implements YasumiTestC * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected, $expectedExtra) + public function testHoliday($year, $expected, $expectedExtra): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index ee047a322..9da9a09bc 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -41,7 +41,7 @@ class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index d569e16a6..8071448bf 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -40,7 +40,7 @@ class LabourDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCase * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index 7cd08be1c..9a8b98daa 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -40,7 +40,7 @@ class ProclamationDayTest extends SouthAustraliaBaseTestCase implements YasumiTe * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index 05499bbf2..151a8949b 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index a5a9dce8c..1510cdc9e 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -40,7 +40,7 @@ class DevonportShowTest extends CentralNorthBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index a3346339a..57d89f506 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -40,7 +40,7 @@ class EightHourDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index 15017f18d..3b9eed222 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -40,7 +40,7 @@ class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements Yasum * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 328ae2aef..b72daeecb 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -40,7 +40,7 @@ class KingIslandShowTest extends KingIslandBaseTestCase implements YasumiTestCas * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 696d54bf0..31c2c861c 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -40,7 +40,7 @@ class LauncestonShowTest extends NortheastBaseTestCase implements YasumiTestCase * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index ecec82595..2e817ee72 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -40,7 +40,7 @@ class BurnieShowTest extends NorthwestBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 3ded129af..af2f381ba 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -40,7 +40,7 @@ class AGFESTTest extends CircularHeadBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 4b6455ddf..00fcceece 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends TasmaniaBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index e98d0c251..af856f055 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -40,7 +40,7 @@ class RecreationDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 943839f83..c82c0852c 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -40,7 +40,7 @@ class HobartShowTest extends SouthBaseTestCase implements YasumiTestCaseInterfac * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 40e187b8d..980cc272d 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -40,7 +40,7 @@ class HobartRegattaTest extends SoutheastBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 841d9bad3..1389a7a2c 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -43,7 +43,7 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements YasumiTest * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, @@ -86,7 +86,7 @@ public function testHolidayType(): void * Tests that Holiday is not present before establishment year * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday($this->region, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); } diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index ba54910d3..23cd4ceeb 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -41,7 +41,7 @@ class EasterSaturdayTest extends VictoriaBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index 0c5636614..68c967256 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -40,7 +40,7 @@ class EasterSundayTest extends VictoriaBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 4d1afdbea..f12beed5d 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -40,7 +40,7 @@ class LabourDayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 9ead58882..f7caa1230 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -45,7 +45,7 @@ class MelbourneCupDayTest extends VictoriaBaseTestCase implements YasumiTestCase * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 5410cdd2e..da2361f4d 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends VictoriaBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index fc9c2b0ff..5f59764c8 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -40,7 +40,7 @@ class LabourDayTest extends WesternAustraliaBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index 23e396bb5..d20c9b4d6 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -45,7 +45,7 @@ class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements YasumiT * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index 27f05e9cf..8a5fbe72a 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -40,7 +40,7 @@ class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements Ya * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( $this->region, diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index a20c45cdd..1ea05aaa6 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index 5321e9ffc..de9c13459 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends AustriaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1754; $this->assertHoliday( diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 88ecdf401..ccea93e8b 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index ef4f670bb..73d4d5437 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -38,7 +38,7 @@ class stMartinsDayTest extends BurgenlandBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function teststMartinsDay($year, $expected) + public function teststMartinsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 221035803..a7c1d104b 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -44,7 +44,7 @@ class PlebisciteDayTest extends CarinthiaBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testPlebisciteDay($year, $expected) + public function testPlebisciteDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function PlebisciteDayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index 47f5df2be..2efa59d39 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -38,7 +38,7 @@ class StJosephsDayTest extends CarinthiaBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testStJosephsDay($year, $expected) + public function testStJosephsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index a64e26032..7a1e43818 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends AustriaBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index 7c0ff557b..110eea967 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends AustriaBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1988; $this->assertHoliday( diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index be62e95dc..a9e1068b1 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends AustriaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index fe1122a9d..62d3470c4 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends AustriaBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2009; $this->assertHoliday( diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index fd8c64c0f..78620d38e 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends AustriaBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index d85847583..6add293dd 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements YasumiTest * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index f20fb2f48..166181edf 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 75db36585..b02b72b9e 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -44,7 +44,7 @@ class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testStLeopoldsDay($year, $expected) + public function testStLeopoldsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function StLeopoldsDayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 392334625..82b866855 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -39,7 +39,7 @@ class NationalDayTest extends AustriaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index f5f9430fe..a9778cd10 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index 33613593e..bb047467a 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends AustriaBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index 0260bb56c..7248c91d4 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends AustriaBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1344; $this->assertHoliday( diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index 801f00f71..aa2a09a97 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -38,7 +38,7 @@ class StRupertsDayTest extends SalzburgBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testStRupertsDay($year, $expected) + public function testStRupertsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index f134724c2..1a7c68e03 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index 98dcf9ede..6f703a9ea 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -38,7 +38,7 @@ class StJosephsDayTest extends StyriaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testStJosephsDay($year, $expected) + public function testStJosephsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index dbac3b47b..7ad40af6c 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -38,7 +38,7 @@ class StJosephsDayTest extends TyrolBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testStJosephsDay($year, $expected) + public function testStJosephsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index f89b82cb2..f1bf526ba 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -38,7 +38,7 @@ class StFloriansDayTest extends UpperAustriaBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testStFloriansDay($year, $expected) + public function testStFloriansDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index c9552e293..83a1e243c 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -44,7 +44,7 @@ class StLeopoldsDayTest extends ViennaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testStLeopoldsDay($year, $expected) + public function testStLeopoldsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function StLeopoldsDayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index 089db079f..516ae4bfb 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -38,7 +38,7 @@ class StJosephsDayTest extends VorarlbergBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testStJosephsDay($year, $expected) + public function testStJosephsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 329b7ae8c..afb837e71 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index 495a0862e..f904232f8 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -38,7 +38,7 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index 33192d86d..fe99c2651 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1818; $this->assertHoliday( diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index f03f54db4..67ad8062d 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index eff406319..7482326b0 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends BelgiumBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index abc78c847..1ae235b0e 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 0556eeca2..3c0623596 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testEaster() + public function testEaster(): void { $year = 2010; $this->assertHoliday( diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index d48e6844a..5b061612c 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index ae6eb3004..ebe818c5e 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -38,7 +38,7 @@ class NationalDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index 298cce780..cc9378bb7 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 441c8c140..e53755a6c 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends BelgiumBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2025; $this->assertHoliday( diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 7975fedaa..7ac40585d 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -34,7 +34,7 @@ class pentecostMondayTest extends BelgiumBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index 076e2da0f..6d897967f 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends BosniaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index 75646e1ce..c66b3c7a3 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -38,7 +38,7 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index d31ed3ced..3afb99f1a 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends BosniaBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1677; $this->assertHoliday( diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index 9ce7d31fd..38db56253 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -39,7 +39,7 @@ class IndependenceDayTest extends BosniaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testIndependenceDayOnAfter1992() + public function testIndependenceDayOnAfter1992(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testIndependenceDayOnAfter1992() * Tests Independence Day before 1992. * @throws ReflectionException */ - public function testIndependenceDayBefore1992() + public function testIndependenceDayBefore1992(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 00b931f1a..4176c1b05 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index 2235cdaea..c1a970cb2 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index ed34191ea..9ba9e6880 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -46,7 +46,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index bc18f68d9..a37f8c380 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -38,7 +38,7 @@ class SecondLabourDay extends BosniaBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index 6e5bdeb81..84bed2334 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -39,7 +39,7 @@ class StatehoodDayTest extends BosniaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testStatehoodDayOnAfter1943() + public function testStatehoodDayOnAfter1943(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testStatehoodDayOnAfter1943() * Tests Statehood Day before 1943. * @throws ReflectionException */ - public function testStatehoodDayBefore1943() + public function testStatehoodDayBefore1943(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index 048084d63..cd91307d2 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -39,7 +39,7 @@ class AllSoulsDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testDiaDosFinadosAfter1300() + public function testDiaDosFinadosAfter1300(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testDiaDosFinadosAfter1300() * Tests Dia dos Finados on or before 1300. * @throws ReflectionException */ - public function testDiaDosFinadosBefore1300() + public function testDiaDosFinadosBefore1300(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 11b8cdd16..2665f76a2 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -34,7 +34,7 @@ class AshWednesdayTest extends BrazilBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1999; $this->assertHoliday( diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index 414074270..56f2acdcb 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -42,7 +42,7 @@ class CarnavalMondayTest extends BrazilBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testCarnavalMondayAfter1700() + public function testCarnavalMondayAfter1700(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -57,7 +57,7 @@ public function testCarnavalMondayAfter1700() * Tests Carnaval Monday on or before 1700. * @throws ReflectionException */ - public function testCarnavalMondayBefore1700() + public function testCarnavalMondayBefore1700(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index 02e5e0651..e96850fa6 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -42,7 +42,7 @@ class CarnavalTuesdayTest extends BrazilBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testCarnavalTuesdayAfter1700() + public function testCarnavalTuesdayAfter1700(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -57,7 +57,7 @@ public function testCarnavalTuesdayAfter1700() * Tests Carnaval Tuesday on or before 1700. * @throws ReflectionException */ - public function testCarnavalTuesdayBefore1700() + public function testCarnavalTuesdayBefore1700(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index 96430d358..387240ebb 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -34,7 +34,7 @@ class ChristmasDayTest extends BrazilBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testChristmasDay() + public function testChristmasDay(): void { $year = 1897; $this->assertHoliday( diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index d823cc9c7..46243df79 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends BrazilBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 1997; $this->assertHoliday( diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index 8b0f75dbd..f67917fd2 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -35,7 +35,7 @@ class EasterTest extends BrazilBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testEaster() + public function testEaster(): void { $year = 1948; $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $this->calculateEaster($year, self::TIMEZONE)); diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 24a0a1d20..a398a6c4b 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -37,7 +37,7 @@ class GoodFridayTest extends BrazilBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testGoodFriday() + public function testGoodFriday(): void { $year = 1997; $this->assertHoliday( diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index 6d891bace..9704b59e6 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -39,7 +39,7 @@ class IndependenceDayTest extends BrazilBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testDiaDaIndependenciaDoBrasilAfter1822() + public function testDiaDaIndependenciaDoBrasilAfter1822(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testDiaDaIndependenciaDoBrasilAfter1822() * Tests Dia da independência do Brasil on or before 1822. * @throws ReflectionException */ - public function testDiaDaIndependenciaDoBrasilBefore1822() + public function testDiaDaIndependenciaDoBrasilBefore1822(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index 439a2ffe4..48b84d939 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -34,7 +34,7 @@ class InternationalWorkersDayTest extends BrazilBaseTestCase implements YasumiTe * @throws Exception * @throws ReflectionException */ - public function testInternationalWorkersDay() + public function testInternationalWorkersDay(): void { $year = 1927; $this->assertHoliday( diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index 69e66dde3..26e36c6ce 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -34,7 +34,7 @@ class NewYearsDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testNewYearsDay() + public function testNewYearsDay(): void { $year = 1997; $this->assertHoliday( diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index 3be429cc0..fcb50dca0 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -39,7 +39,7 @@ class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements YasumiTest * @throws Exception * @throws ReflectionException */ - public function testNossaSenhoraAparecidaAfter1980() + public function testNossaSenhoraAparecidaAfter1980(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testNossaSenhoraAparecidaAfter1980() * Tests Nossa Senhora Aparecida on or before 1980. * @throws ReflectionException */ - public function testNossaSenhoraAparecidaBefore1980() + public function testNossaSenhoraAparecidaBefore1980(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index 57fa79ba8..b5927faae 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -39,7 +39,7 @@ class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements Yasumi * @throws Exception * @throws ReflectionException */ - public function testProclamacaoDaRepublicaAfter1889() + public function testProclamacaoDaRepublicaAfter1889(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testProclamacaoDaRepublicaAfter1889() * Tests Proclamação da República on or before 1889. * @throws ReflectionException */ - public function testProclamacaoDaRepublicaBefore1889() + public function testProclamacaoDaRepublicaBefore1889(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index 2520dfa2b..5fea88365 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -39,7 +39,7 @@ class TiradentesDayTest extends BrazilBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testDiaDeTiradentesAfter1792() + public function testDiaDeTiradentesAfter1792(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testDiaDeTiradentesAfter1792() * Tests Dia de Tiradentes on or before 1792. * @throws ReflectionException */ - public function testDiaDeTiradentesBefore1792() + public function testDiaDeTiradentesBefore1792(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index e49293f70..71a111818 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -39,7 +39,7 @@ class CanadaDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testCanadaDayOnAfter1983() + public function testCanadaDayOnAfter1983(): void { $year = $this->generateRandomYear(1983); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testCanadaDayOnAfter1983() * Tests Canada Day before 1879. Canada Day was established as Dominion Day in 1879 on July 1st. * @throws ReflectionException */ - public function testCanadaDayBefore1879() + public function testCanadaDayBefore1879(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index 7b21f9708..93016dd2d 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -34,7 +34,7 @@ class ChristmasDayTest extends CanadaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testChristmasDay() + public function testChristmasDay(): void { $year = 2001; $this->assertHoliday( diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index abb9303d5..a2980d907 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -39,7 +39,7 @@ class LabourDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testLabourDayOnAfter1894() + public function testLabourDayOnAfter1894(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testLabourDayOnAfter1894() * Tests Labour Day before 1894. Labour Day was established since 1894 on the first Monday of September. * @throws ReflectionException */ - public function testLabourDayBefore1894() + public function testLabourDayBefore1894(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 867512312..cd161c5b3 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -34,7 +34,7 @@ class NewYearsDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testNewYearsDay() + public function testNewYearsDay(): void { $year = 1997; $this->assertHoliday( diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index 1efc8bb91..df621108e 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -39,7 +39,7 @@ class RemembranceDayTest extends CanadaBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testRemembranceDayOnAfter1919() + public function testRemembranceDayOnAfter1919(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testRemembranceDayOnAfter1919() * Tests Remembrance Day before 1919. Remembrance Day was established in 1919 on November 11. * @throws ReflectionException */ - public function testVeteransDayBefore1919() + public function testVeteransDayBefore1919(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index 5ec7c8317..2b3d1f74c 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -40,7 +40,7 @@ class ThanksgivingDayTest extends CanadaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testThanksgivingDayOnAfter1879() + public function testThanksgivingDayOnAfter1879(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -56,7 +56,7 @@ public function testThanksgivingDayOnAfter1879() * of October. * @throws ReflectionException */ - public function testThanksgivingDayBefore1879() + public function testThanksgivingDayBefore1879(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 39e4b40ea..56c8f7f72 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index 1e83e60d6..c736e336f 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -39,7 +39,7 @@ class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements YasumiTe * @throws Exception * @throws ReflectionException */ - public function testAntifascistStruggleDayOnAfter1941() + public function testAntifascistStruggleDayOnAfter1941(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testAntifascistStruggleDayOnAfter1941() * Tests Day of Antifascist Struggle before 1941. * @throws ReflectionException */ - public function testAntifascistStruggleDayBefore1941() + public function testAntifascistStruggleDayBefore1941(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index c1a2f5ac1..d0f8699d9 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 0bf6371dd..14133006b 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index 1762e8bed..6133fef74 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends CroatiaBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 1997; $this->assertHoliday( diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 4739f6112..ef63715ea 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1677; $this->assertHoliday( diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index a86b12949..417fdadba 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1677; $this->assertHoliday( diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 71a7aece0..23c610cda 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends CroatiaBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 24ee36efd..468595a90 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -44,7 +44,7 @@ class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testHomelandThanksgivingDayOnAfter1995() + public function testHomelandThanksgivingDayOnAfter1995(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -59,7 +59,7 @@ public function testHomelandThanksgivingDayOnAfter1995() * Tests Homeland Thanksgiving Day before 1995. * @throws ReflectionException */ - public function testHomelandThanksgivingDayBefore1995() + public function testHomelandThanksgivingDayBefore1995(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 95a40d791..dc24085fc 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -44,7 +44,7 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testIndependenceDayOnAfter1991() + public function testIndependenceDayOnAfter1991(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1); $this->assertHoliday( @@ -59,7 +59,7 @@ public function testIndependenceDayOnAfter1991() * Tests Independence Day before 1991. * @throws ReflectionException */ - public function testIndependenceDayBefore1991() + public function testIndependenceDayBefore1991(): void { $this->assertNotHoliday( self::REGION, @@ -72,7 +72,7 @@ public function testIndependenceDayBefore1991() * Tests Independence Day before 1991. * @throws ReflectionException */ - public function testIndependenceDayAfterDisbandment() + public function testIndependenceDayAfterDisbandment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index ced8d7f81..86cf71145 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index e9fa0311b..6a4b566e6 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index 3d58faa0d..da041ac03 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -39,7 +39,7 @@ class RemembranceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testRemembranceDayAfterItWasEstablished() + public function testRemembranceDayAfterItWasEstablished(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testRemembranceDayAfterItWasEstablished() * @throws Exception * @throws ReflectionException */ - public function testRemembranceDayBeforeItWasEstablished() + public function testRemembranceDayBeforeItWasEstablished(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index b4ceed92d..a07da50f5 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -38,7 +38,7 @@ class StStephensDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function teststStephensDay($year, $expected) + public function teststStephensDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index a8d1100d2..327b9698d 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -44,7 +44,7 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testStatehoodDay() + public function testStatehoodDay(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DATE_CHANGE_YEAR - 1); $expectedDate = "$year-6-25"; @@ -69,7 +69,7 @@ public function testStatehoodDay() * Tests Statehood Day before 1991. * @throws ReflectionException */ - public function testStatehoodDayBefore1991() + public function testStatehoodDayBefore1991(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index d24bef721..c8d5029f0 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -42,7 +42,7 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 5194713a7..88e98a754 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -42,7 +42,7 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 7c231dbdc..bd59834d1 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -42,7 +42,7 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index 571b4194a..eb63bc91f 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -38,7 +38,7 @@ class EasterMondayTest extends CzechRepublicBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2000; $this->assertHoliday( diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 14fafbc6a..626ba5c96 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -38,7 +38,7 @@ class GoodFridayTest extends CzechRepublicBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testGoodFriday() + public function testGoodFriday(): void { $year = 1876; $this->assertHoliday( diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 51cf6a7d4..0f38fce79 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -38,7 +38,7 @@ class IndependentCzechoslovakStateDayTest extends CzechRepublicBaseTestCase impl * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index b355ad4ad..0bbf4f97a 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -42,7 +42,7 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements Y * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index a6c321642..2f3f46a91 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -38,7 +38,7 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 01c4945f2..019d78917 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -42,7 +42,7 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index a2b3bd59f..b57f28bad 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -43,7 +43,7 @@ class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase im * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index 35b194924..5e66ce7d9 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -42,7 +42,7 @@ class SaintsCyrilAndMethodiusDayTest extends CzechRepublicBaseTestCase implement * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 44afffea0..783f9e41a 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -42,7 +42,7 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index 9987e49ab..1fe0aaf81 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -38,7 +38,7 @@ class StruggleForFreedomAndDemocracyDayTest extends CzechRepublicBaseTestCase im * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index 9b12a1d88..e582854cf 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -42,7 +42,7 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index d91878da3..3d5ee2fb2 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 2806; $this->assertHoliday( diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 4ba42438a..9fabd5517 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 18d414e6a..53b0ac90a 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -38,7 +38,7 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index 9863a0ad5..6f9bc8683 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -39,7 +39,7 @@ class ConstitutionDayTest extends DenmarkBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2077; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index b987febfd..3e13c7f53 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2000; $this->assertHoliday( diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index e519373f1..94be28454 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2654; $this->assertHoliday( diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 4151d7e19..507ebbcc8 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2178; $this->assertHoliday( diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index e46c5ef93..8a86d5eb3 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -39,7 +39,7 @@ class GreatPrayerDayTest extends DenmarkBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2022; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 37b4cb111..f69162edf 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index 0a6b206f3..f88bbbd30 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -34,7 +34,7 @@ class MaundyThursdayTest extends DenmarkBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1866; $this->assertHoliday( diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index 546465012..5e738ec15 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index afa36d192..51a7e2f04 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -38,7 +38,7 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 74c9d8141..d4881687e 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends DenmarkBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index af0e18bf0..77f81a56c 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends DenmarkBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index 927eddc83..17ccbd161 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 36c766686..93b881f9a 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -35,7 +35,7 @@ class SummerTimeTest extends DenmarkBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testSummerTime() + public function testSummerTime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1949, 1979)); diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 5b3cd1283..3309e88c4 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -35,7 +35,7 @@ class WinterTimeTest extends DenmarkBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testWinterTime() + public function testWinterTime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1949, 1979)); diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 5b9054a72..31fa72058 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index 484312708..1705ab8ac 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index f7a6b8dc2..83c19176e 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -52,7 +52,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index 0353a3368..0d0a7b6b3 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -53,7 +53,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index dc997b461..1ad9a2764 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -37,7 +37,7 @@ class IndependenceDayTest extends EstoniaBaseTestCase implements YasumiTestCaseI * Test if holiday is not defined before * @throws ReflectionException */ - public function testHolidayBefore() + public function testHolidayBefore(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBefore() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfter() + public function testHolidayAfter(): void { $year = $this->generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR); diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index d8debaab8..cacf2b4cd 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index 9f477c912..2f8bba77f 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 313c5700f..1655b2401 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -53,7 +53,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index 9ced8e369..ff66d3fac 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -37,7 +37,7 @@ class RestorationOfIndependenceDayTest extends EstoniaBaseTestCase implements Ya * Test if holiday is not defined before * @throws ReflectionException */ - public function testHolidayBefore() + public function testHolidayBefore(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBefore() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfter() + public function testHolidayAfter(): void { $year = $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR); diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 0dd791b37..2c6def0b2 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index 63dea6ce4..8caa93331 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 1fab6a99b..41f83d3e7 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -37,7 +37,7 @@ class VictoryDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterf * Test if holiday is not defined before * @throws ReflectionException */ - public function testHolidayBefore() + public function testHolidayBefore(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBefore() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfter() + public function testHolidayAfter(): void { $year = $this->generateRandomYear(Estonia::VICTORY_DAY_START_YEAR); diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 76d0ce2ec..2fb7e3076 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -40,7 +40,7 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index 01e0dcf8c..4ecd5321a 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2005; $this->assertHoliday( diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 4f2de594b..a307d415c 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index e9244749b..ac750b10f 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1677; $this->assertHoliday( diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 53fbc47a8..5b4522438 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends FinlandBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1677; $this->assertHoliday( diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index 6460b0f60..3134a72b7 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends FinlandBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index 66f4ad090..c3508d22d 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends FinlandBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1788; $this->assertHoliday( diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 010738de4..f25af7ea1 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -39,7 +39,7 @@ class IndependenceDayTest extends FinlandBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2018; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 6eaad7477..ebf91dcb5 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index f92976b48..0f82836bf 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index 7b93b367d..071b631ae 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends FinlandBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1344; $this->assertHoliday( diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 0cef0a142..d83d753dc 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index b99feba50..9a943b0e2 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -44,7 +44,7 @@ class stJohnsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHolidayBeforeAdjustment() + public function testHolidayBeforeAdjustment(): void { $year = 1944; $this->assertHoliday( @@ -59,7 +59,7 @@ public function testHolidayBeforeAdjustment() * Tests the holiday before it was adjusted. * @throws ReflectionException */ - public function testHolidayAfterAdjustment() + public function testHolidayAfterAdjustment(): void { $year = $this->generateRandomYear(self::ADJUSTMENT_YEAR); diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index 74a93a772..ec10c05a5 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index 9f88cc82b..8e3cab720 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -39,7 +39,7 @@ class ArmisticeDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testArmisticeDayOnAfter1919() + public function testArmisticeDayOnAfter1919(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testArmisticeDayOnAfter1919() * Tests Armistice Day before 1919. * @throws ReflectionException */ - public function testArmisticeDayBefore1919() + public function testArmisticeDayBefore1919(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index cdcaad39b..1f8c522c8 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index b8b1080c2..626e7d890 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index a342e8607..3bd94af4d 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends BasRhinBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index 7237fb781..b4813b717 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -38,7 +38,7 @@ class stStephensDayTest extends BasRhinBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index 84666aeba..d64fd4f71 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -39,7 +39,7 @@ class BastilleDayTest extends FranceBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testBastilleDayOnAfter1790() + public function testBastilleDayOnAfter1790(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testBastilleDayOnAfter1790() * Tests Bastille Day before 1790. * @throws ReflectionException */ - public function testBastilleDayBefore1790() + public function testBastilleDayBefore1790(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index 9fd1349de..c6801d578 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index a9d44d164..9b58b06dd 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends FranceBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index f69829dfd..e492c72c9 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends HautRhinBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 78a2af06b..6d21b370b 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -38,7 +38,7 @@ class stStephensDayTest extends HautRhinBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 4438c42c4..d39721249 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index a4d29af08..6929c7198 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends MoselleBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2008; $this->assertHoliday( diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 8a2ccd15d..7ba34cf6e 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -38,7 +38,7 @@ class stStephensDayTest extends MoselleBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index dc9f267ca..e7c76d48e 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends FranceBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index 271bff083..36337c501 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends FranceBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 1353b1c22..a8bd081e8 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -39,7 +39,7 @@ class VictoryInEuropeDayTest extends FranceBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testVictoryInEuropeDayOnAfter1945() + public function testVictoryInEuropeDayOnAfter1945(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testVictoryInEuropeDayOnAfter1945() * Tests Victory In Europe Day before 1945. * @throws ReflectionException */ - public function testVictoryInEuropeDayBefore1945() + public function testVictoryInEuropeDayBefore1945(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index b2a39aaa7..57b5115d9 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends GermanyBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1754; $this->assertHoliday( diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 72aacae24..57cd0e052 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index f664386b7..f95af4df6 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends BadenWurttembergBaseTestCase implements YasumiTe * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 37980946b..f84b11b14 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index 5e25b4c3a..83ec98a96 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index 74f05a6ea..804734054 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends BavariaBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index 51b8aaa61..60821c075 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -39,7 +39,7 @@ class EpiphanyTest extends BavariaBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberation2020Test.php index 84842284e..1b651c059 100644 --- a/tests/Germany/Berlin/DayOfLiberation2020Test.php +++ b/tests/Germany/Berlin/DayOfLiberation2020Test.php @@ -39,7 +39,7 @@ class DayOfLiberation2020Test extends BerlinBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHolidayInYear() + public function testHolidayInYear(): void { $this->assertHoliday( self::REGION, @@ -53,7 +53,7 @@ public function testHolidayInYear() * Test the holiday defined in this test in the years before * @throws ReflectionException */ - public function testHolidayBeforeYear() + public function testHolidayBeforeYear(): void { $this->assertNotHoliday( self::REGION, @@ -66,7 +66,7 @@ public function testHolidayBeforeYear() * Test the holiday defined in this test in the years after * @throws ReflectionException */ - public function testHolidayAfterYear() + public function testHolidayAfterYear(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index 30dc950d1..8a3b106e5 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -39,7 +39,7 @@ class InternationalWomensDay2019Test extends BerlinBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testHolidayOnEstablishment() + public function testHolidayOnEstablishment(): void { $this->assertHoliday( self::REGION, @@ -53,7 +53,7 @@ public function testHolidayOnEstablishment() * Test the holiday defined in this test before establishment * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -66,7 +66,7 @@ public function testHolidayBeforeEstablishment() * Test the holiday defined in this test after completion * @throws ReflectionException */ - public function testHolidayAfterCompletion() + public function testHolidayAfterCompletion(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900, self::ESTABLISHMENT_YEAR - 1)); } diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 5c6e53122..253a03ac5 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 7079c367d..060951cd3 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends BremenBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index e324877ca..6d3b42e63 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends GermanyBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 0a0648672..61ec54947 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends GermanyBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2000; $this->assertHoliday( diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index 77834ac27..454452b11 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -39,7 +39,7 @@ class GermanUnityDayTest extends GermanyBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2022; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index 3a97559f0..fea89c2f0 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends GermanyBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testGoodFriday() + public function testGoodFriday(): void { $year = 1876; $this->assertHoliday( diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 7fb12468a..d66aca17f 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -44,7 +44,7 @@ class DayOfReformationTest extends HamburgBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index 5f3da8a6a..8f850e67f 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends HesseBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index cced81b8f..9734882e2 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 956e6daec..80d66476e 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index 77db10c7e..081323e20 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index 2b2a98fe1..a97217a01 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends GermanyBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index c1247e08c..6cbcf84c3 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Yasum * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index 089f7c75f..572deea18 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements Yasu * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 6a1b1e95e..9961520e0 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends GermanyBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index dc7262843..ac2ce4505 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -39,7 +39,7 @@ class ReformationDay2017Test extends GermanyBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHolidayOnEstablishment() + public function testHolidayOnEstablishment(): void { $this->assertHoliday( self::REGION, @@ -53,7 +53,7 @@ public function testHolidayOnEstablishment() * Test the holiday defined in this test before establishment * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -66,7 +66,7 @@ public function testHolidayBeforeEstablishment() * Test the holiday defined in this test after completion * @throws ReflectionException */ - public function testHolidayAfterCompletion() + public function testHolidayAfterCompletion(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); } diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index ad2e5e44f..1fde91f3f 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index 58e53faba..1eafd5990 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements Yasum * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index b3e44923b..f38e5b9f8 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 49d10e607..93b2c451b 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index 509681466..79ded6cd7 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -37,7 +37,7 @@ class CorpusChristiTest extends SaarlandBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi() + public function testCorpusChristi(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 362e91582..a8cdef935 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends SaxonyBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index 9ddab993f..2180faef0 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -44,7 +44,7 @@ class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { // Check between the 16th and 22nd day the one that is a Wednesday $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); @@ -62,7 +62,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index 67adc9b72..eab278ea7 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -39,7 +39,7 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index cde4e3b29..5390d2093 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 02444a4fa..50bced15a 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index 37f8c7245..d30428858 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 1361a558c..d6d11aaaf 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -44,7 +44,7 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 28bd2d713..85957e901 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -38,7 +38,7 @@ class AnnunciationTest extends GreeceBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index ba6b1c709..db2bdc4ca 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends GreeceBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index 5fb5ee76d..e84af598d 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index c14cc8283..6b7ba067d 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends GreeceBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index eaed94b14..89a1f0500 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -34,7 +34,7 @@ class CleanMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 8bc949d01..acbc628aa 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 41f7b112f..07eb84fb8 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends GreeceBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index b23b8cda5..fb46fe99d 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends GreeceBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index 1768bfa97..a44e54ae8 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -39,7 +39,7 @@ class IndepencenceDayTest extends GreeceBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2018; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index 0017d4d2a..406561f4c 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index 66bb2287f..b09a0d041 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index 291bba19d..ae5f91192 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -39,7 +39,7 @@ class OhiDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2018; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index 00a7a494e..a7c9e2672 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends GreeceBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index 8e65df9d0..911bc7a3c 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends GreeceBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index ffaee7e6d..5c1b0089b 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -39,7 +39,7 @@ class PolytechnioTest extends GreeceBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2018; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 8e556d567..e9ee6ba80 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -38,7 +38,7 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index f45a3e514..ea5f5c8b8 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -34,7 +34,7 @@ class goodFridayTest extends GreeceBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 958921a1d..be4a52224 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index 80e74adfa..3655763d0 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends HungaryBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index 03d7b1c94..f329fb8e5 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends HungaryBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index 90c4c2948..caced26cb 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends HungaryBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2009; $this->assertHoliday( diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index 7098fbd1d..d8a696899 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 6d816e1bd..d2ed08338 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -39,7 +39,7 @@ class MemorialDay1848Test extends HungaryBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index 344a44959..f800db0b4 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -39,7 +39,7 @@ class MemorialDay1956Test extends HungaryBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 617810bcf..603167e9b 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index 66dfb673c..297b2965a 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends HungaryBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index bb2e00b87..dfe1ed90c 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends HungaryBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1344; $this->assertHoliday( diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index 23cfd4658..b88e8d935 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 0cf6a656b..b89f0cd4f 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -39,7 +39,7 @@ class StateFoundationDayTest extends HungaryBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index 80d3c633b..40c6ddc0b 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -40,7 +40,7 @@ class AugustHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index a82ef5688..b0463dae6 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -40,7 +40,7 @@ class ChristmasDayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index 93f71b6fb..c39b84cd2 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index c72f94762..b2d949d45 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -40,7 +40,7 @@ class EasterTest extends IrelandBaseTestCase implements YasumiTestCaseInterface * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index 8a2032017..1295307bf 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -41,7 +41,7 @@ class GoodFridayTest extends IrelandBaseTestCase implements YasumiTestCaseInterf * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 7a1459b58..600a33f17 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -45,7 +45,7 @@ class JuneHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -80,7 +80,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index fc4b6946c..3011c46a0 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -45,7 +45,7 @@ class MayDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -81,7 +81,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 4e3799a37..69f74536b 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -45,7 +45,7 @@ class NewYearsDayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -79,7 +79,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index 438cdb1f8..78547a72c 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -45,7 +45,7 @@ class OctoberHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -81,7 +81,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 6f58258a3..2dfe67fbf 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -41,7 +41,7 @@ class PentecostTest extends IrelandBaseTestCase implements YasumiTestCaseInterfa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index fa6723959..1b89ec018 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -45,7 +45,7 @@ class StPatricksDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -79,7 +79,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index 05c956c1d..a60b134f8 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -40,7 +40,7 @@ class StStephensDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index 82e0074aa..e3a4892ec 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -46,7 +46,7 @@ class pentecostMondayTest extends IrelandBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -80,7 +80,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test after abolishment. * @throws ReflectionException */ - public function testHolidayDayAfterAbolishment() + public function testHolidayDayAfterAbolishment(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ABOLISHMENT_YEAR + 1)); } diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index a357dc1b8..a358ba5db 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index bb57525c7..8fd8e841a 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testAssumptionOfMary($year, $expected) + public function testAssumptionOfMary($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index ca28e5936..c76f5bf15 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 7542ac0ab..782be72a7 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends ItalyBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 11523e0b7..466a9fa45 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testEaster() + public function testEaster(): void { $year = 2009; $this->assertHoliday( diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 0f0558b21..5912830b5 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testEpiphany($year, $expected) + public function testEpiphany($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index f2a6636f7..18c057dc1 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testImmaculateConception($year, $expected) + public function testImmaculateConception($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 32aa43794..bdb18e9d7 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 27ed0e2d0..93572a6dd 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -46,7 +46,7 @@ class LiberationDayTest extends ItalyBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testLiberationDayOnAfter1949() + public function testLiberationDayOnAfter1949(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -61,7 +61,7 @@ public function testLiberationDayOnAfter1949() * Tests Liberation Day before 1949. * @throws ReflectionException */ - public function testLiberationDayBefore1949() + public function testLiberationDayBefore1949(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index eef08c753..42a4246ec 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index d5db86519..463f50b65 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -46,7 +46,7 @@ class RepublicDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testRepublicDayOnAfter1946() + public function testRepublicDayOnAfter1946(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -61,7 +61,7 @@ public function testRepublicDayOnAfter1946() * Tests Republic Day before 1946. * @throws ReflectionException */ - public function testRepublicDayBefore1946() + public function testRepublicDayBefore1946(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 9d6a99014..03aaceaff 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -38,7 +38,7 @@ class stStephensDayTest extends ItalyBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function teststStephensDay($year, $expected) + public function teststStephensDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 21d7c1c50..bf2b5da6a 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -42,7 +42,7 @@ class AutumnalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCase * After 2150 no calculations are available yet. * @throws ReflectionException */ - public function testAutumnalEquinoxDayOnAfter2150() + public function testAutumnalEquinoxDayOnAfter2150(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(2151)); } @@ -63,7 +63,7 @@ public function testAutumnalEquinoxDayOnAfter2150() * @throws ReflectionException * @throws Exception */ - public function testAutumnalEquinoxDayBetween1948And2150($year, $month, $day) + public function testAutumnalEquinoxDayBetween1948And2150($year, $month, $day): void { $this->assertHoliday( self::REGION, @@ -95,7 +95,7 @@ public function autumnalEquinoxHolidaysProvider(): array * festival called Shūki kōrei-sai (秋季皇霊祭). * @throws ReflectionException */ - public function testAutumnalEquinoxDayBefore1948() + public function testAutumnalEquinoxDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index e89d64f3f..627ce3a84 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -39,7 +39,7 @@ class ChildrensDayTest extends JapanBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testChildrensDayOnAfter1948() + public function testChildrensDayOnAfter1948(): void { $year = 1955; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testChildrensDayOnAfter1948() * @throws Exception * @throws ReflectionException */ - public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay() + public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay(): void { $year = 2120; $this->assertHoliday( @@ -72,7 +72,7 @@ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay() * * @throws ReflectionException */ - public function testChildrensDayBefore1948() + public function testChildrensDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index 3fcd5a3d0..ef9054f7b 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -40,7 +40,7 @@ class ComingOfAgeDayTest extends JapanBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testComingOfAgeDayOnAfter2000() + public function testComingOfAgeDayOnAfter2000(): void { $year = $this->generateRandomYear(2001); $this->assertHoliday( @@ -58,7 +58,7 @@ public function testComingOfAgeDayOnAfter2000() * @throws Exception * @throws ReflectionException */ - public function testComingOfAgeDayBetween1948And2000() + public function testComingOfAgeDayBetween1948And2000(): void { $year = 1991; $this->assertHoliday( @@ -74,7 +74,7 @@ public function testComingOfAgeDayBetween1948And2000() * was changed to be the second monday of January. * @throws ReflectionException */ - public function testConstitutionMemorialDayBefore1948() + public function testConstitutionMemorialDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index 7f17e929a..37bab5b78 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -39,7 +39,7 @@ class ConstitutionMemorialDayTest extends JapanBaseTestCase implements YasumiTes * @throws Exception * @throws ReflectionException */ - public function testConstitutionMemorialDayOnAfter1948() + public function testConstitutionMemorialDayOnAfter1948(): void { $year = 1967; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testConstitutionMemorialDayOnAfter1948() * @throws Exception * @throws ReflectionException */ - public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay() + public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay(): void { $year = 2009; $this->assertHoliday( @@ -71,7 +71,7 @@ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay( * Tests Constitution Memorial Day before 1948. Constitution Memorial Day was established after 1948 * @throws ReflectionException */ - public function testConstitutionMemorialDayBefore1948() + public function testConstitutionMemorialDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 58ca94344..fb5ba2dfe 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -41,7 +41,7 @@ class CoronationDayTest extends JapanBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testEmperorsCoronationDay() + public function testEmperorsCoronationDay(): void { $this->assertHoliday( self::REGION, @@ -55,7 +55,7 @@ public function testEmperorsCoronationDay() /** * @throws ReflectionException */ - public function testEmperorsBirthdayBefore2019() + public function testEmperorsBirthdayBefore2019(): void { $this->assertNotHoliday( self::REGION, @@ -67,7 +67,7 @@ public function testEmperorsBirthdayBefore2019() /** * @throws ReflectionException */ - public function testEmperorsBirthdayAfter2020() + public function testEmperorsBirthdayAfter2020(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index 412059fba..f3e41e98b 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -39,7 +39,7 @@ class CultureDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testCultureDayOnAfter1948() + public function testCultureDayOnAfter1948(): void { $year = 1973; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testCultureDayOnAfter1948() * @throws Exception * @throws ReflectionException */ - public function testCultureDayOnAfter1948SubstitutedNextWorkingDay() + public function testCultureDayOnAfter1948SubstitutedNextWorkingDay(): void { $year = 2661; $this->assertHoliday( @@ -70,7 +70,7 @@ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay() * Tests Culture Day before 1948. Culture Day was established after 1948 * @throws ReflectionException */ - public function testCultureDayBefore1948() + public function testCultureDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index 58793a2f1..9865a3bf7 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -41,7 +41,7 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testEmperorsBirthdayOnAfter1949() + public function testEmperorsBirthdayOnAfter1949(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1987); $this->assertHoliday( @@ -59,7 +59,7 @@ public function testEmperorsBirthdayOnAfter1949() * @throws Exception * @throws ReflectionException */ - public function testEmperorsBirthdayOnAfter1989() + public function testEmperorsBirthdayOnAfter1989(): void { $year = $this->generateRandomYear(1989, 2018); $this->assertHoliday( @@ -76,7 +76,7 @@ public function testEmperorsBirthdayOnAfter1989() * @throws Exception * @throws ReflectionException */ - public function testEmperorsBirthdayOnAfter2020() + public function testEmperorsBirthdayOnAfter2020(): void { $year = $this->generateRandomYear(2020); $this->assertHoliday( @@ -93,7 +93,7 @@ public function testEmperorsBirthdayOnAfter2020() * @throws Exception * @throws ReflectionException */ - public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay() + public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void { $year = 2001; $this->assertHoliday( @@ -110,7 +110,7 @@ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay() * Day"/"Greenery Day" * @throws ReflectionException */ - public function testEmperorsBirthdayBefore1989() + public function testEmperorsBirthdayBefore1989(): void { $this->assertNotHoliday( self::REGION, @@ -124,7 +124,7 @@ public function testEmperorsBirthdayBefore1989() * * @throws ReflectionException */ - public function testEmperorsBirthdayAt2019() + public function testEmperorsBirthdayAt2019(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index 44d52529f..cd6790175 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -41,7 +41,7 @@ class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements * @throws Exception * @throws ReflectionException */ - public function testEmperorsCoronationDay() + public function testEmperorsCoronationDay(): void { $this->assertHoliday( self::REGION, @@ -55,7 +55,7 @@ public function testEmperorsCoronationDay() /** * @throws ReflectionException */ - public function testEmperorsBirthdayBefore2019() + public function testEmperorsBirthdayBefore2019(): void { $this->assertNotHoliday( self::REGION, @@ -67,7 +67,7 @@ public function testEmperorsBirthdayBefore2019() /** * @throws ReflectionException */ - public function testEmperorsBirthdayAfter2020() + public function testEmperorsBirthdayAfter2020(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index 59dfe0f6c..e6c840f5e 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -40,7 +40,7 @@ class GreeneryDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfter2007() + public function testHolidayOnAfter2007(): void { $year = 2112; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testHolidayOnAfter2007() * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfter2007SubstitutedNextWorkingDay() + public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void { $year = 2014; $this->assertHoliday( @@ -73,7 +73,7 @@ public function testHolidayOnAfter2007SubstitutedNextWorkingDay() * @throws Exception * @throws ReflectionException */ - public function testHolidayBetween1989And2007() + public function testHolidayBetween1989And2007(): void { $year = 1997; $this->assertHoliday( @@ -89,7 +89,7 @@ public function testHolidayBetween1989And2007() * @throws Exception * @throws ReflectionException */ - public function testHolidayBetween1989And2007SubstitutedNextWorkingDay() + public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void { $year = 2001; $this->assertHoliday( @@ -105,7 +105,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay() * it was changed to be May 4th. * @throws ReflectionException */ - public function testHolidayBefore1989() + public function testHolidayBefore1989(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 989e1563e..cc75a903b 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -40,7 +40,7 @@ class LabourThanksgivingDayTest extends JapanBaseTestCase implements YasumiTestC * @throws Exception * @throws ReflectionException */ - public function testLabourThanksgivingDayOnAfter1948() + public function testLabourThanksgivingDayOnAfter1948(): void { $year = 4884; $this->assertHoliday( @@ -57,7 +57,7 @@ public function testLabourThanksgivingDayOnAfter1948() * @throws Exception * @throws ReflectionException */ - public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay() + public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay(): void { $year = 1986; $this->assertHoliday( @@ -73,7 +73,7 @@ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay() * 1948. * @throws ReflectionException */ - public function testLabourThanksgivingDayBefore1948() + public function testLabourThanksgivingDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index db25cecbd..2ab8fc334 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -39,7 +39,7 @@ class MarineDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testMarineDayIn2020() + public function testMarineDayIn2020(): void { $year = 2020; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testMarineDayIn2020() * @throws Exception * @throws ReflectionException */ - public function testMarineDayOnAfter2003() + public function testMarineDayOnAfter2003(): void { $year = $this->generateRandomYear(2004); $this->assertHoliday( @@ -73,7 +73,7 @@ public function testMarineDayOnAfter2003() * @throws Exception * @throws ReflectionException */ - public function testMarineDayBetween1996And2003() + public function testMarineDayBetween1996And2003(): void { $year = 2001; $this->assertHoliday( @@ -89,7 +89,7 @@ public function testMarineDayBetween1996And2003() * @throws Exception * @throws ReflectionException */ - public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay() + public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void { $year = 1997; $this->assertHoliday( @@ -105,7 +105,7 @@ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay() * to be the third monday of July. * @throws ReflectionException */ - public function testMarineDayBefore1996() + public function testMarineDayBefore1996(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 159ec8704..ceb74d490 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -39,7 +39,7 @@ class MountainDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testMountainDayIn2020() + public function testMountainDayIn2020(): void { $year = 2020; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testMountainDayIn2020() * @throws Exception * @throws ReflectionException */ - public function testMountainDayOnAfter2016() + public function testMountainDayOnAfter2016(): void { $year = 2016; $this->assertHoliday( @@ -71,7 +71,7 @@ public function testMountainDayOnAfter2016() * @throws Exception * @throws ReflectionException */ - public function testMountainDayOnAfter2016SubstitutedNextWorkingDay() + public function testMountainDayOnAfter2016SubstitutedNextWorkingDay(): void { $year = 2019; $this->assertHoliday( @@ -86,7 +86,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 */ - public function testMountainDayBefore2016() + public function testMountainDayBefore2016(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 2a4c35444..052caacc6 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -39,7 +39,7 @@ class NationalFoundationDayTest extends JapanBaseTestCase implements YasumiTestC * @throws Exception * @throws ReflectionException */ - public function testNationalFoundationDayOnAfter1966() + public function testNationalFoundationDayOnAfter1966(): void { $year = 1972; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testNationalFoundationDayOnAfter1966() * @throws Exception * @throws ReflectionException */ - public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay() + public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay(): void { $year = 2046; $this->assertHoliday( @@ -71,7 +71,7 @@ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay() * Tests National Foundation Day before 1966. National Foundation day was established after 1966 * @throws ReflectionException */ - public function testNationalFoundationDayBefore1966() + public function testNationalFoundationDayBefore1966(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 245aac99f..260563346 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -39,7 +39,7 @@ class NewYearsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testNewYearsDayOnAfter1948() + public function testNewYearsDayOnAfter1948(): void { $year = 1997; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testNewYearsDayOnAfter1948() * @throws Exception * @throws ReflectionException */ - public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay() + public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay(): void { $year = 4473; $this->assertHoliday( @@ -70,7 +70,7 @@ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay() * Tests New Years Day before 1948. New Years Day was established after 1948 * @throws ReflectionException */ - public function testNewYearsDayBefore1948() + public function testNewYearsDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index ddc00f647..4b52f71ff 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -38,7 +38,7 @@ class PublicBridgeDayTest extends JapanBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testPublicBridgeDay() + public function testPublicBridgeDay(): void { $this->assertHoliday( self::REGION, diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 26c0258ba..806bbaa85 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -40,7 +40,7 @@ class RespectForTheAgedDayTest extends JapanBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testRespectForTheAgedDayOnAfter2003() + public function testRespectForTheAgedDayOnAfter2003(): void { $year = $this->generateRandomYear(2004); $this->assertHoliday( @@ -57,7 +57,7 @@ public function testRespectForTheAgedDayOnAfter2003() * @throws Exception * @throws ReflectionException */ - public function testRespectForTheAgedDayBetween1996And2003() + public function testRespectForTheAgedDayBetween1996And2003(): void { $year = 1998; $this->assertHoliday( @@ -74,7 +74,7 @@ public function testRespectForTheAgedDayBetween1996And2003() * @throws Exception * @throws ReflectionException */ - public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorkingDay() + public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorkingDay(): void { $year = 2002; $this->assertHoliday( @@ -90,7 +90,7 @@ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorking * 15th. After 2003 it was changed to be the third monday of September. * @throws ReflectionException */ - public function testRespectForTheAgedDayBefore1996() + public function testRespectForTheAgedDayBefore1996(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index 4c160b277..42ab42e33 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -39,7 +39,7 @@ class ShowaDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfter2007() + public function testHolidayOnAfter2007(): void { $year = 2110; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHolidayOnAfter2007() * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay() + public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay(): void { $year = 2210; $this->assertHoliday( @@ -70,7 +70,7 @@ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay() * Tests the holiday defined in the test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index ba48a5504..6448df9c4 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -39,7 +39,7 @@ class SportsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testSportsDayIn2020() + public function testSportsDayIn2020(): void { $year = 2020; $this->assertHoliday( @@ -56,7 +56,7 @@ public function testSportsDayIn2020() * @throws Exception * @throws ReflectionException */ - public function testSportsDayOnAfter2000() + public function testSportsDayOnAfter2000(): void { $year = $this->generateRandomYear(2001); $this->assertHoliday( @@ -73,7 +73,7 @@ public function testSportsDayOnAfter2000() * @throws Exception * @throws ReflectionException */ - public function testSportsDayBetween1996And2000() + public function testSportsDayBetween1996And2000(): void { $year = 1997; $this->assertHoliday( @@ -90,7 +90,7 @@ public function testSportsDayBetween1996And2000() * @throws Exception * @throws ReflectionException */ - public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay() + public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void { $year = 1999; $this->assertHoliday( @@ -106,7 +106,7 @@ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay() * 2000 it was changed to be the second monday of October. * @throws ReflectionException */ - public function testSportsDayBefore1996() + public function testSportsDayBefore1996(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index bc6d20402..c27476fe3 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -42,7 +42,7 @@ class VernalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCaseIn * After 2150 no calculations are available yet. * @throws ReflectionException */ - public function testVernalEquinoxDayOnAfter2150() + public function testVernalEquinoxDayOnAfter2150(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(2151)); } @@ -63,7 +63,7 @@ public function testVernalEquinoxDayOnAfter2150() * @throws ReflectionException * @throws Exception */ - public function testVernalEquinoxDayBetween1948And2150($year, $month, $day) + public function testVernalEquinoxDayBetween1948And2150($year, $month, $day): void { $this->assertHoliday( self::REGION, @@ -96,7 +96,7 @@ public function vernalEquinoxHolidaysProvider(): array * festival called Shunki kōrei-sai (春季皇霊祭). * @throws ReflectionException */ - public function testVernalEquinoxDayBefore1948() + public function testVernalEquinoxDayBefore1948(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 3a2a349f0..32595fca3 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index a85eb171a..403cfb17a 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index f7b564a44..e2f6281d3 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -52,7 +52,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 4c341856b..09afe3de7 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -52,7 +52,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index a062db731..16e55d84b 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -52,7 +52,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index 8cc2baf35..0ecf91007 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 547813fcc..4c109df85 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index fbe371bd4..18ea3dc9d 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index 3d51fb1b4..ee5f5790d 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 1e275c4f3..8c831cd3f 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -37,7 +37,7 @@ class ProclamationOfTheRepublicOfLatviaDayTest extends LatviaBaseTestCase implem * Test if holiday is not defined before proclamation * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday( self::REGION, @@ -72,7 +72,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index a2116bee8..c832b8550 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -37,7 +37,7 @@ class RestorationOfIndependenceDayTest extends LatviaBaseTestCase implements Yas * Test if holiday is not defined before restoration * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday( self::REGION, @@ -72,7 +72,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index b23afebf0..68472f76f 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index 2b197d75c..390e4e8b0 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index 6be787d01..fcce02e2e 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index a80e02b2d..0502a155b 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index cd58f9b38..7b351e127 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 101716bb7..7bbcc3867 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index 2c05723fc..b3d03cfcf 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -52,7 +52,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index bb69c75db..dc5114710 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -52,7 +52,7 @@ public function holidayDataProvider(): array * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index ebd32d758..6bd53d4e2 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 19289c48f..02f32da91 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 7d738f2c6..3b47fa6b6 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -37,7 +37,7 @@ class RestorationOfIndependenceOfLithuaniaDayTest extends LithuaniaBaseTestCase * Test if holiday is not defined before restoration * @throws ReflectionException */ - public function testHolidayBeforeRestoration() + public function testHolidayBeforeRestoration(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBeforeRestoration() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfterRestoration() + public function testHolidayAfterRestoration(): void { $year = $this->generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR); diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 3e6d8f226..93eb5540c 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -37,7 +37,7 @@ class RestorationOfTheStateOfLithuaniaDayTest extends LithuaniaBaseTestCase impl * Test if holiday is not defined before restoration * @throws ReflectionException */ - public function testHolidayBeforeRestoration() + public function testHolidayBeforeRestoration(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBeforeRestoration() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfterRestoration() + public function testHolidayAfterRestoration(): void { $year = $this->generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR); diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 63584bfbd..db62ec914 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index fc174c8a0..0e0f99700 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index bf084d00f..8c9a52ff7 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -37,7 +37,7 @@ class StatehoodDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseIn * Test if holiday is not defined before restoration * @throws ReflectionException */ - public function testHolidayBeforeRestoration() + public function testHolidayBeforeRestoration(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBeforeRestoration() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfterRestoration() + public function testHolidayAfterRestoration(): void { $year = $this->generateRandomYear(Lithuania::STATEHOOD_YEAR); diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index 719868284..31729d6c5 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testAllSaintsDay($year, $expected) + public function testAllSaintsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index 8fdbf386e..01e6cae39 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1901; $this->assertHoliday( diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index 277483f6e..92ebf4c09 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index 1b242dca9..a9bece00c 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index a9e5b3bb8..4c8cb7f9e 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends LuxembourgBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testEasterMonday() + public function testEasterMonday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index 0a3fdfe83..5518da0d2 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -39,7 +39,7 @@ class EuropeDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testEuropeDayOnAfter2019() + public function testEuropeDayOnAfter2019(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testEuropeDayOnAfter2019() * Tests Europe Day before 2019. * @throws ReflectionException */ - public function testEuropeDayBefore2019() + public function testEuropeDayBefore2019(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index 735de22c2..ca919d983 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements Yasu * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index 4103f8787..e2321ebc7 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -38,7 +38,7 @@ class NationalDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index 1ecbf48de..20ff49197 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseIn * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index 7a86a32a2..bef9a653e 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends LuxembourgBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 1977; $this->assertHoliday( diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index 5981a4549..318daa15c 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends LuxembourgBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 2f5c5cbba..5a24849dc 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1754; $this->assertHoliday( diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index 14ac02cc8..45e97cfdd 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -34,7 +34,7 @@ class AshWednesdayTest extends NetherlandsBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1999; $this->assertHoliday( diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 5c53753c5..52d9a0098 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index fb6cf28bf..d28b33001 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -38,7 +38,7 @@ class CommemorationDayTest extends NetherlandsBaseTestCase implements YasumiTest * Tests Commemoration Day before 1947. Commemoration Day was established after WWII in 1947. * @throws ReflectionException */ - public function testCommemorationDayBefore1947() + public function testCommemorationDayBefore1947(): void { $this->assertNotHoliday( self::REGION, @@ -52,7 +52,7 @@ public function testCommemorationDayBefore1947() * @throws Exception * @throws ReflectionException */ - public function testCommemorationDayOnAfter1947() + public function testCommemorationDayOnAfter1947(): void { $year = 2105; $this->assertHoliday( diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index 096859df8..58bb5fed3 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends NetherlandsBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 014fd0645..2220de67a 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testEaster() + public function testEaster(): void { $year = 2010; $this->assertHoliday( diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index 3d8c2c759..7840bad8d 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testEpiphany($year, $expected) + public function testEpiphany($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index 4b86f17d2..07731c263 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -34,7 +34,7 @@ class FathersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(); $this->assertHoliday( diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index 3d0906350..f9fde89d5 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testGoodFriday() + public function testGoodFriday(): void { $year = 1876; $this->assertHoliday( diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index 6e1d29b53..757138959 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -38,7 +38,7 @@ class HalloweenTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index cbc836496..fbcf33ecf 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Yas * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index c2a9f7f05..7c962b7cc 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -39,7 +39,7 @@ class KingsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testKingsDayOnAfter2014() + public function testKingsDayOnAfter2014(): void { $year = 2015; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testKingsDayOnAfter2014() * @throws Exception * @throws ReflectionException */ - public function testKingsDayOnAfter2014SubstitutedDay() + public function testKingsDayOnAfter2014SubstitutedDay(): void { $year = 2188; $this->assertHoliday( @@ -70,7 +70,7 @@ public function testKingsDayOnAfter2014SubstitutedDay() * Tests Kings Day before 2014. King's Day is celebrated from 2014 onwards on April 27th. * @throws ReflectionException */ - public function testKingsDayBefore2014() + public function testKingsDayBefore2014(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 7ea4b564d..494057827 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -38,7 +38,7 @@ class LiberationDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * Tests Liberation Day before 1947. Liberation Day was established after WWII in 1947. * @throws ReflectionException */ - public function testLiberationDayBefore1947() + public function testLiberationDayBefore1947(): void { $this->assertNotHoliday( self::REGION, @@ -52,7 +52,7 @@ public function testLiberationDayBefore1947() * @throws Exception * @throws ReflectionException */ - public function testLiberationDayOnAfter1947() + public function testLiberationDayOnAfter1947(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index 823743ce2..9aec75313 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -34,7 +34,7 @@ class MothersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testMothersDay() + public function testMothersDay(): void { $year = $this->generateRandomYear(); $this->assertHoliday( diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 960ed7b41..0459efdc4 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testNewYearsDay($year, $expected) + public function testNewYearsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index 3c76c9bf2..ce8ce86d4 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 48d8ac19c..c8c10d8ef 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -34,7 +34,7 @@ class QueensDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testQueensBetween1891and1948() + public function testQueensBetween1891and1948(): void { $year = 1901; $this->assertHoliday( @@ -50,7 +50,7 @@ public function testQueensBetween1891and1948() * @throws Exception * @throws ReflectionException */ - public function testQueensBetween1891and1948SubstitutedLater() + public function testQueensBetween1891and1948SubstitutedLater(): void { $year = 1947; $this->assertHoliday( @@ -66,7 +66,7 @@ public function testQueensBetween1891and1948SubstitutedLater() * @throws Exception * @throws ReflectionException */ - public function testQueensBetween1949and2013() + public function testQueensBetween1949and2013(): void { $year = 1965; $this->assertHoliday( @@ -82,7 +82,7 @@ public function testQueensBetween1949and2013() * @throws Exception * @throws ReflectionException */ - public function testQueensBetween1949and2013SubstitutedLater() + public function testQueensBetween1949and2013SubstitutedLater(): void { $year = 1967; $this->assertHoliday( @@ -98,7 +98,7 @@ public function testQueensBetween1949and2013SubstitutedLater() * @throws Exception * @throws ReflectionException */ - public function testQueensBetween1949and2013SubstitutedEarlier() + public function testQueensBetween1949and2013SubstitutedEarlier(): void { $year = 2006; $this->assertHoliday( @@ -113,7 +113,7 @@ public function testQueensBetween1949and2013SubstitutedEarlier() * Tests Queen's Day before 1891. * @throws ReflectionException */ - public function testQueensDayBefore1891() + public function testQueensDayBefore1891(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1000, 1890)); } @@ -122,7 +122,7 @@ public function testQueensDayBefore1891() * Tests Queen's Day after 2013. * @throws ReflectionException */ - public function testQueensDayAfter2013() + public function testQueensDayAfter2013(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(2014)); } diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index f0d4df135..d78b212c6 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -35,7 +35,7 @@ class SummertimeTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testSummertime() + public function testSummertime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1946, 1976)); diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index fc6cf824f..da7ff30c4 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -38,7 +38,7 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testValentinesDay($year, $expected) + public function testValentinesDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index 6c3c702cc..472f7f29b 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -34,7 +34,7 @@ class WintertimeTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testWintertime() + public function testWintertime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1946, 1976)); diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index 983282631..352eac226 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -39,7 +39,7 @@ class WorldAnimalDayTest extends NetherlandsBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testWorldAnimalDayOnAfter1931() + public function testWorldAnimalDayOnAfter1931(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testWorldAnimalDayOnAfter1931() * Tests World Animal Day before 1931. * @throws ReflectionException */ - public function testWorldAnimalBefore1931() + public function testWorldAnimalBefore1931(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index 2ad71fec8..a38c6a1f8 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -35,7 +35,7 @@ class carnivalDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2015; $this->assertHoliday( diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 424543120..c6b9c9602 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -34,7 +34,7 @@ class pentecostMondayTest extends NetherlandsBaseTestCase implements YasumiTestC * @throws Exception * @throws ReflectionException */ - public function testPentecostMonday() + public function testPentecostMonday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index 22e850a50..276384225 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -34,7 +34,7 @@ class princesDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testPrincesDay() + public function testPrincesDay(): void { $year = $this->generateRandomYear(); $this->assertHoliday( diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index 17beb7808..225a81e83 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -44,7 +44,7 @@ class secondCarnivalDay extends NetherlandsBaseTestCase implements YasumiTestCas * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2015; $this->assertHoliday( diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index d9b950968..badb0caac 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -38,7 +38,7 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 0f7d16c41..d30fe68f9 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -38,7 +38,7 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * * @throws ReflectionException */ - public function teststMartinsDay($year, $expected) + public function teststMartinsDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index 7d52d4dea..8dd31379a 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -39,7 +39,7 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function teststNicholasDay($year, $expected) + public function teststNicholasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index b15a6a043..46f919a5a 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -44,7 +44,7 @@ class thirdCarnivalDay extends NetherlandsBaseTestCase implements YasumiTestCase * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2015; $this->assertHoliday( diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index eaf065fa7..b55eda54a 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -45,7 +45,7 @@ class AnzacDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInter * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -59,7 +59,7 @@ public function testHoliday($year, $expected) * Tests that Labour Day is not present before 1921 * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); } diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 186b1cc82..7686c6aa0 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -41,7 +41,7 @@ class BoxingDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 200f1b7e6..2bfe04668 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends NewZealandBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index 7cbe3334e..504440ab0 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -41,7 +41,7 @@ class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements YasumiTe * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index 3b7fcf48d..e3fa8d2b7 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends NewZealandBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index ca328ea44..594a1edfd 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -41,7 +41,7 @@ class GoodFridayTest extends NewZealandBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index 00c9102ee..793ee53fc 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -45,7 +45,7 @@ class LabourDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -59,7 +59,7 @@ public function testHoliday($year, $expected) * Tests that Labour Day is not present before 1900 * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); } diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 7145a1883..21b265161 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -41,7 +41,7 @@ class NewYearsDayTest extends NewZealandBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index fa09a5895..b6d633179 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -44,7 +44,7 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -53,7 +53,7 @@ public function testHoliday($year, $expected) * Tests that Holiday is not present before 1952 * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); } diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 8a3bbec74..f9f0c3b39 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -45,7 +45,7 @@ class WaitangiDayTest extends NewZealandBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -59,7 +59,7 @@ public function testHoliday($year, $expected) * Tests that Holiday is not present before 1974 * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); } diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index ddb8010b6..c0ee5cacf 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -34,7 +34,7 @@ class AscensionDayTest extends NorwayBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testAscensionDay() + public function testAscensionDay(): void { $year = 1877; $this->assertHoliday( diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 19653e5e9..73b0cbe89 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index 2319eb44c..0214c6485 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -39,7 +39,7 @@ class ConstitutionDayTest extends NorwayBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2077; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 4040703dc..3b98def37 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends NorwayBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2355; $this->assertHoliday( diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index dd6631990..f97c2e8c5 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends NorwayBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2355; $this->assertHoliday( diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index c587c3812..1bd74c6b5 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends NorwayBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1908; $this->assertHoliday( diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 4d29de7d1..e93200c3b 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index d340960a2..513efef37 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -34,7 +34,7 @@ class MaundyThursdayTest extends NorwayBaseTestCase implements YasumiTestCaseInt * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 1655; $this->assertHoliday( diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index 75a187e3e..da89b327b 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 9c6b5991f..daa3cbabb 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -34,7 +34,7 @@ class PentecostMondayTest extends NorwayBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index f3f0dcc1f..3c5da8922 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends NorwayBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index 9b52a44ef..d7e72bfa4 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index cfd5f8eb6..bb82fa47f 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends PolandBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 0d800e64a..d3a09d5d8 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements YasumiTestCaseI * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 40a20c1cb..769450f1b 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends PolandBaseTestCase implements YasumiTestCaseInterfac * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index 6245edfd7..4c2a44e58 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -39,7 +39,7 @@ class ConstitutionDayTest extends PolandBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2077; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index 90fecef8b..3785381d8 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -34,7 +34,7 @@ class CorpusChristiTest extends PolandBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2017; $this->assertHoliday( diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 3b6277075..c2663eca0 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends PolandBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2017; $this->assertHoliday( diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 2352df04e..cd1b59723 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends PolandBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index 9ebea89c2..5f82c94b1 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends PolandBaseTestCase implements YasumiTestCaseInterface * * @throws ReflectionException */ - public function testEpiphany($year, $expected) + public function testEpiphany($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index e12f288bd..5687f57a8 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -39,7 +39,7 @@ class IndependenceDayTest extends PolandBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = 2018; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index b47bc39ec..5d43d49c0 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index 0f941771a..970ac7bb9 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends PolandBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index 8422539d2..c98f9f49a 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -34,7 +34,7 @@ class PentecostTest extends PolandBaseTestCase implements YasumiTestCaseInterfac * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2019; $this->assertHoliday( diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index 4b513e616..b44dd6f69 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 03485692b..ca8507a2c 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -46,7 +46,7 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); @@ -61,7 +61,7 @@ public function testHoliday() * Test that the holiday did not happen in 2013-2015. * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index e9b6be368..c4559e14a 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -38,7 +38,7 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements YasumiTestCas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index 326f008c7..a8477dbf6 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -39,7 +39,7 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements YasumiT * @throws ReflectionException * @throws Exception */ - public function testHolidayAfterEstablishment() + public function testHolidayAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new DateTime("$year-04-25", new DateTimeZone(self::TIMEZONE)); @@ -50,7 +50,7 @@ public function testHolidayAfterEstablishment() * Tests that the holiday is not a holiday before the year of establishment * @throws ReflectionException */ - public function testNotHolidayBeforeEstablishment() + public function testNotHolidayBeforeEstablishment(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index e3fbac378..edaddaf7f 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -38,7 +38,7 @@ class ChristmasTest extends PortugalBaseTestCase implements YasumiTestCaseInterf * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index e62596085..28db97c28 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -44,7 +44,7 @@ class CorpusChristiTest extends PortugalBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $expected = new DateTime("$year-5-26", new DateTimeZone(self::TIMEZONE)); @@ -55,7 +55,7 @@ public function testHoliday() * Test that the holiday did not happen in 2013-2015. * @throws ReflectionException */ - public function testNotHoliday() + public function testNotHoliday(): void { $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index 69acda6ad..ea0a4847d 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -34,7 +34,7 @@ class EasterTest extends PortugalBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index 316290284..012a91b08 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -34,7 +34,7 @@ class GoodFridayTest extends PortugalBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2016; $this->assertHoliday( diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index fde9ffc31..3e50b2f9c 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -38,7 +38,7 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 35607256a..5136a512a 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index 8da3ffa2e..d7f5db8b7 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 967ad76a7..d9aa03341 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -46,7 +46,7 @@ class PortugalDayTest extends PortugalBaseTestCase implements YasumiTestCaseInte * @throws Exception * @see Portugal::calculatePortugalDay() */ - public function testHolidayBeforeAbolishment() + public function testHolidayBeforeAbolishment(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); $expected = new DateTime("$year-06-10", new DateTimeZone(self::TIMEZONE)); @@ -59,7 +59,7 @@ public function testHolidayBeforeAbolishment() * @throws Exception * @see Portugal::calculatePortugalDay() */ - public function testHolidayAfterRestoration() + public function testHolidayAfterRestoration(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); $expected = new DateTime("$year-06-10", new DateTimeZone(self::TIMEZONE)); @@ -72,7 +72,7 @@ public function testHolidayAfterRestoration() * @see Portugal::calculatePortugalDay() * */ - public function testNotHolidayDuringAbolishment() + public function testNotHolidayDuringAbolishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_BEFORE + 1, self::ESTABLISHMENT_YEAR_AFTER - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 62b572091..6b736a246 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -46,7 +46,7 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements YasumiTe * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterRestoration() + public function testHolidayOnAfterRestoration(): void { $year = self::HOLIDAY_YEAR_RESTORED; @@ -63,7 +63,7 @@ public function testHolidayOnAfterRestoration() * Test that the holiday did not happen in 2013-2015. * @throws ReflectionException */ - public function testNotHolidayDuringAbolishment() + public function testNotHolidayDuringAbolishment(): void { $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); @@ -76,7 +76,7 @@ public function testNotHolidayDuringAbolishment() * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); @@ -93,7 +93,7 @@ public function testHolidayOnAfterEstablishment() * * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 6e8a64e2c..ccb86a21d 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -51,7 +51,7 @@ class RestorationOfIndependenceTest extends PortugalBaseTestCase implements Yasu * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); @@ -70,7 +70,7 @@ public function testHolidayOnAfterEstablishment() * @throws ReflectionException * @throws Exception */ - public function testHolidayOnAfterRestoration() + public function testHolidayOnAfterRestoration(): void { $year = 2016; @@ -87,7 +87,7 @@ public function testHolidayOnAfterRestoration() * Test that the holiday did not happen in 2013-2015. * @throws ReflectionException */ - public function testNotHolidayDuringAbolishment() + public function testNotHolidayDuringAbolishment(): void { $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); @@ -98,7 +98,7 @@ public function testNotHolidayDuringAbolishment() * * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index f45e0ee3f..e8292578f 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -39,7 +39,7 @@ class AssumptionOfMaryTest extends RomaniaBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testAssumptionOfMaryDayOnAfter2008() + public function testAssumptionOfMaryDayOnAfter2008(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testAssumptionOfMaryDayOnAfter2008() * Tests Assumption of Mary Day before 2008. * @throws ReflectionException */ - public function testAssumptionOfMaryDayBefore2008() + public function testAssumptionOfMaryDayBefore2008(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index 2c02635ee..0681446aa 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -39,7 +39,7 @@ class ChildrensDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testChildrensDayOnAfter1950() + public function testChildrensDayOnAfter1950(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testChildrensDayOnAfter1950() * Tests Children's Day before 1950. * @throws ReflectionException */ - public function testChildrensDayBefore1950() + public function testChildrensDayBefore1950(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 6cf4eeeda..680c17012 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index 5ba2d2aac..c2857d96a 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -39,7 +39,7 @@ class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements YasumiTes * @throws Exception * @throws ReflectionException */ - public function testConstantinBrancusiDayOnAfter2016() + public function testConstantinBrancusiDayOnAfter2016(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testConstantinBrancusiDayOnAfter2016() * Tests Constantin Brancusi Day before 2016. * @throws ReflectionException */ - public function testConstantinBrancusiDayBefore2016() + public function testConstantinBrancusiDayBefore2016(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index e271815a0..cfaf05a9e 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -38,7 +38,7 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index 441c0b157..fd4f5b047 100755 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -35,7 +35,7 @@ class EasterMondayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index bc32f7fb3..cce04f4f0 100755 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -35,7 +35,7 @@ class EasterTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = 2020; $this->assertHoliday( diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 17d53e2ad..d2039854a 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -39,7 +39,7 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements YasumiT * * @throws ReflectionException */ - public function testInternationalWorkersDay($year, $expected) + public function testInternationalWorkersDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index 4bd5e017e..3c060c901 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -39,7 +39,7 @@ class NationalDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testNationalDayOnAfter1990() + public function testNationalDayOnAfter1990(): void { $year = $this->generateRandomYear(1990); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testNationalDayOnAfter1990() * @throws Exception * @throws ReflectionException */ - public function testNationalDayBetween1948_1989() + public function testNationalDayBetween1948_1989(): void { $year = $this->generateRandomYear(1948, 1989); $this->assertHoliday( @@ -71,7 +71,7 @@ public function testNationalDayBetween1948_1989() * @throws Exception * @throws ReflectionException */ - public function testNationalDayBetween1866_1947() + public function testNationalDayBetween1866_1947(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1947); $this->assertHoliday( @@ -86,7 +86,7 @@ public function testNationalDayBetween1866_1947() * Tests National Day before 1865. * @throws ReflectionException */ - public function testNationalDayBefore1865() + public function testNationalDayBefore1865(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 841e3a7b3..7accc8741 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -38,7 +38,7 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index c0fef5290..4a626434d 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -40,7 +40,7 @@ class PentecostMondayTest extends RomaniaBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testPentecostMondayOnAfter2008() + public function testPentecostMondayOnAfter2008(): void { $year = 2020; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testPentecostMondayOnAfter2008() * Tests the Pentecost Day before 2008. * @throws ReflectionException */ - public function testPentecostMondayBefore2008() + public function testPentecostMondayBefore2008(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index eaf84c3b5..9768e7bf6 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -40,7 +40,7 @@ class PentecostTest extends RomaniaBaseTestCase implements YasumiTestCaseInterfa * @throws Exception * @throws ReflectionException */ - public function testPentecostDayOnAfter2008() + public function testPentecostDayOnAfter2008(): void { $year = 2020; $this->assertHoliday( @@ -55,7 +55,7 @@ public function testPentecostDayOnAfter2008() * Tests the Pentecost Day before 2008. * @throws ReflectionException */ - public function testPentecostDayBefore2008() + public function testPentecostDayBefore2008(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index b4251b1b0..fe62a4578 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index d51f6406c..8f3d5dfab 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -39,7 +39,7 @@ class StAndrewsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testStAndrewDayOnAfter2012() + public function testStAndrewDayOnAfter2012(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testStAndrewDayOnAfter2012() * Tests Saint Andrew before 2012. * @throws ReflectionException */ - public function testStAndrewDayBefore2012() + public function testStAndrewDayBefore2012(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index 293093836..d809af878 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -39,7 +39,7 @@ class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements YasumiT * @throws Exception * @throws ReflectionException */ - public function testUnitedPrincipalitiesDayOnAfter2015() + public function testUnitedPrincipalitiesDayOnAfter2015(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -54,7 +54,7 @@ public function testUnitedPrincipalitiesDayOnAfter2015() * Tests unitedPrincipalitiesDay before 2015. * @throws ReflectionException */ - public function testUnitedPrincipalitiesDayBefore2015() + public function testUnitedPrincipalitiesDayBefore2015(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index 02172c14c..03cab06dc 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -36,7 +36,7 @@ class DefenceOfTheFatherlandDayTest extends RussiaBaseTestCase implements Yasumi * Test if holiday is not defined before * @throws ReflectionException */ - public function testHolidayBefore() + public function testHolidayBefore(): void { $this->assertNotHoliday( self::REGION, @@ -50,7 +50,7 @@ public function testHolidayBefore() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfter() + public function testHolidayAfter(): void { $year = $this->generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR); diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index d7bb93ace..4b08cda98 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index 6acc833ee..dfd81d236 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 7297424cd..47e8ee43f 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index 37a6621b1..05219a6bc 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -47,7 +47,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index 464097db3..98ca363cd 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index c9397311e..35aa13c47 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index 2bacd0e66..e09cc5c6b 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -47,7 +47,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 62f3e3604..224106b19 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index db67d4b63..661b9b421 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index 7c9604e56..0517e32d2 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -37,7 +37,7 @@ class RussiaDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterfac * Test if holiday is not defined before * @throws ReflectionException */ - public function testHolidayBefore() + public function testHolidayBefore(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBefore() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfter() + public function testHolidayAfter(): void { $year = $this->generateRandomYear(Russia::RUSSIA_DAY_START_YEAR); diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 6ee100efa..b0c2aa9ed 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index 2c3095b12..9f9be645d 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -37,7 +37,7 @@ class UnityDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface * Test if holiday is not defined before * @throws ReflectionException */ - public function testHolidayBefore() + public function testHolidayBefore(): void { $this->assertNotHoliday( self::REGION, @@ -51,7 +51,7 @@ public function testHolidayBefore() * @throws Exception * @throws ReflectionException */ - public function testHolidayAfter() + public function testHolidayAfter(): void { $year = $this->generateRandomYear(Russia::UNITY_DAY_START_YEAR); diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index 771cde438..f88623eb9 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -48,7 +48,7 @@ public function holidayDataProvider(): array * * @throws ReflectionException */ - public function testHoliday($year, DateTime $expected) + public function testHoliday($year, DateTime $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index bcce081e6..73f784d7a 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -45,7 +45,7 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index d79c35dc3..d9c45b0b6 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -45,7 +45,7 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testChristmasDay($year, $expected) + public function testChristmasDay($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index 0b2ffc99c..f4ab60083 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -45,7 +45,7 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testChristmasEve($year, $expected) + public function testChristmasEve($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index 96fb366e2..30ac9ffb4 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -46,7 +46,7 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 73a20fee0..050471c47 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -45,7 +45,7 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterfa * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index b6e4754a2..67623b0ee 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -46,7 +46,7 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index b382a11d5..bcebe53e5 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -45,7 +45,7 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Yasumi * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 2503772a2..6603b9e68 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -45,7 +45,7 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements YasumiTest * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index 242f644cb..82dad0992 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -45,7 +45,7 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Yas * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index ba938bf3e..5942009e1 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -45,7 +45,7 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 52721efcd..0aac83907 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -44,7 +44,7 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements YasumiTe * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index b59001eae..fd4ad8ccd 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -46,7 +46,7 @@ class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements YasumiTes * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index b25247b50..7b5144e00 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -45,7 +45,7 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Yasu * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 322297eca..403727f4a 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -45,7 +45,7 @@ class StruggleForFreedomAndDemocracyDayTest extends SlovakiaBaseTestCase impleme * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 2b1169aaf..645d7412e 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -45,7 +45,7 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements YasumiTestC * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 970c072cf..4efdf9040 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -50,7 +50,7 @@ class ChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTestCase * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index df08c9a29..aaa9c11e8 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -50,7 +50,7 @@ class FamilyDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInt * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index f8f0c3914..60723f57b 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -50,7 +50,7 @@ class FreedomDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index c5da6b058..a3d1ad71d 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -50,7 +50,7 @@ class GoodFridayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday( self::REGION, @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 955048873..1cfbd76a8 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -50,7 +50,7 @@ class HeritageDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index ba8cd550e..c579ed9cb 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -50,7 +50,7 @@ class HumanRightsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCa * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 2bf417aaa..823436a9a 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -43,7 +43,7 @@ class MunicipalElections2016DayTest extends SouthAfricaBaseTestCase implements Y * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $this->assertHoliday( self::REGION, @@ -57,7 +57,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -70,7 +70,7 @@ public function testHolidayBeforeEstablishment() * Tests the holiday defined in this test after completion. * @throws ReflectionException */ - public function testHolidayDayAfterCompletion() + public function testHolidayDayAfterCompletion(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); } diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 1950ed25f..e676944a9 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -50,7 +50,7 @@ class NationalWomensDayTest extends SouthAfricaBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index ec51c43e2..f94c7eeba 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -50,7 +50,7 @@ class NewYearsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseI * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 8cd155391..83d877aab 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -50,7 +50,7 @@ class ReconciliationDayTest extends SouthAfricaBaseTestCase implements YasumiTes * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index d2c64689b..4cfa6cc21 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -50,7 +50,7 @@ class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTe * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index f9facaa1b..5aa75ca0a 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -43,7 +43,7 @@ class SubstituteDayOfGoodwillTest extends SouthAfricaBaseTestCase implements Yas * @throws Exception * @throws ReflectionException */ - public function testHolidayOnAfterEstablishment() + public function testHolidayOnAfterEstablishment(): void { $this->assertHoliday( self::REGION, @@ -57,7 +57,7 @@ public function testHolidayOnAfterEstablishment() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, @@ -70,7 +70,7 @@ public function testHolidayBeforeEstablishment() * Tests the holiday defined in this test after completion. * @throws ReflectionException */ - public function testHolidayDayAfterCompletion() + public function testHolidayDayAfterCompletion(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); } diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index d1799d08e..87ec8ea27 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -50,7 +50,7 @@ class WorkersDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index 2ef4b5c3c..48e602479 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -50,7 +50,7 @@ class YouthDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInte * @throws ReflectionException * @throws Exception */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 830fe2938..62643280a 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -51,7 +51,7 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInter * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); if (self::YEAR_NOT_CELEBRATED === $year) { @@ -75,7 +75,7 @@ public function testHoliday() * * @throws ReflectionException */ - public function testHolidayAfterRemoval() + public function testHolidayAfterRemoval(): void { $this->assertNotHoliday( self::REGION, @@ -89,7 +89,7 @@ public function testHolidayAfterRemoval() * * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index eaf95fa4b..1713bcadd 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -45,7 +45,7 @@ class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements YasumiTestCas * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $this->assertHoliday( @@ -60,7 +60,7 @@ public function testHoliday() * Tests the holiday defined in this test after removal. * @throws ReflectionException */ - public function testHolidayAfterRemoval() + public function testHolidayAfterRemoval(): void { $this->assertNotHoliday( self::REGION, @@ -73,7 +73,7 @@ public function testHolidayAfterRemoval() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index c211d0429..f5a15199f 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -41,7 +41,7 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { @@ -58,7 +58,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index b973e35f4..57b82e8e5 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -40,7 +40,7 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testMainHoliday() + public function testMainHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -56,7 +56,7 @@ public function testMainHoliday() * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayByBuddhasBirthday() + public function testSubstituteHolidayByBuddhasBirthday(): void { foreach ([2025, 2044] as $year) { $this->assertHoliday( @@ -73,7 +73,7 @@ public function testSubstituteHolidayByBuddhasBirthday() * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySaturday() + public function testSubstituteHolidayBySaturday(): void { $year = 2029; $this->assertHoliday( @@ -89,7 +89,7 @@ public function testSubstituteHolidayBySaturday() * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySunday() + public function testSubstituteHolidayBySunday(): void { $year = 2019; $this->assertHoliday( @@ -104,7 +104,7 @@ public function testSubstituteHolidayBySunday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index bd482c0b6..97d5b1bc3 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -40,7 +40,7 @@ class ChristmasDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index b4ec88510..4f67e7b2f 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -42,7 +42,7 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { @@ -78,7 +78,7 @@ public function testHoliday() * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayByGaecheonjeol() + public function testSubstituteHolidayByGaecheonjeol(): void { $this->assertHoliday( self::REGION, @@ -105,7 +105,7 @@ public function testSubstituteHolidayByGaecheonjeol() * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySunday() + public function testSubstituteHolidayBySunday(): void { $this->assertHoliday( self::REGION, @@ -132,7 +132,7 @@ public function testSubstituteHolidayBySunday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 6106acc8a..b4ce908b2 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -45,7 +45,7 @@ class ConstitutionDayTest extends SouthKoreaBaseTestCase implements YasumiTestCa * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $this->assertHoliday( @@ -60,7 +60,7 @@ public function testHoliday() * Tests the holiday defined in this test after removal. * @throws ReflectionException */ - public function testHolidayAfterRemoval() + public function testHolidayAfterRemoval(): void { $this->assertNotHoliday( self::REGION, @@ -73,7 +73,7 @@ public function testHolidayAfterRemoval() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index a9644841c..17c2600dc 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -40,7 +40,7 @@ class GaecheonjeolTest extends SouthKoreaBaseTestCase implements YasumiTestCaseI * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index a09c04ab1..364648341 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -40,7 +40,7 @@ class HangulDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInte * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); if ($year > 1990 && $year <= 2012) { @@ -63,7 +63,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 2136bf8b0..7cfea930d 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -40,7 +40,7 @@ class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements Yasu * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index 328e9c646..b7a178656 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -40,7 +40,7 @@ class LiberationDayTest extends SouthKoreaBaseTestCase implements YasumiTestCase * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 925b1928a..841df6962 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -40,7 +40,7 @@ class MemorialDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -55,7 +55,7 @@ public function testHoliday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index de70d6377..c750a7edf 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -41,7 +41,7 @@ class NewYearsDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseIn * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); @@ -74,7 +74,7 @@ public function testHoliday() * Tests the holiday defined in this test after removal. * @throws ReflectionException */ - public function testHolidayAfterRemoval() + public function testHolidayAfterRemoval(): void { $this->assertNotHoliday( self::REGION, @@ -92,7 +92,7 @@ public function testHolidayAfterRemoval() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 4cfb02007..f03e99db2 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -42,7 +42,7 @@ class SeollalTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterf * @throws Exception * @throws ReflectionException */ - public function testHoliday() + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { @@ -76,7 +76,7 @@ public function testHoliday() * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySunday() + public function testSubstituteHolidayBySunday(): void { $this->assertHoliday( self::REGION, @@ -102,7 +102,7 @@ public function testSubstituteHolidayBySunday() * Tests the holiday defined in this test before establishment. * @throws ReflectionException */ - public function testHolidayBeforeEstablishment() + public function testHolidayBeforeEstablishment(): void { $this->assertNotHoliday( self::REGION, From 9ce956146495e10d09e477ef2b3456a7568785d9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 21:58:08 +0900 Subject: [PATCH 089/687] Added throws tag for error handling. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Croatia.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 033ff9e4d..a050e0998 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -77,6 +77,7 @@ public function initialize(): void /** * Starting from the year 2020. statehood day is celebrated at a new date * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + * @throws \Exception */ private function calculateStatehoodDay(): void { @@ -99,6 +100,7 @@ private function calculateStatehoodDay(): void /** * Starting from the year 2020. Homeland Thanksgiving Day name is slightly changed * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + * @throws \Exception */ private function calculateHomelandThanksgivingDay(): void { @@ -125,6 +127,7 @@ private function calculateHomelandThanksgivingDay(): void * Starting from the year 2020. Independence Day is no longer an official holiday, * but is still remembered under a different name as Croatian Parliament Day (Dan Hrvatskog sabora) * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + * @throws \Exception */ private function calculateIndependenceDay(): void { @@ -139,6 +142,7 @@ private function calculateIndependenceDay(): void /** * Starting from the year 2020. a new holiday was added * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html + * @throws \Exception */ private function calculateRemembranceDayForHomelandWarVictims(): void { From a6a1ee00fe408f5965bd3f1c2d2c7d990a39b2ed Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 21:58:50 +0900 Subject: [PATCH 090/687] Added missing return tag in docblock. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 1696e1284..284374a6e 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -168,6 +168,7 @@ public function jsonSerialize(): self * * @param array $locales The locales to search for translations * + * @return string * @throws MissingTranslationException * * @see Holiday::DEFAULT_LOCALE From 7a51f26dbcc8ec14f8fc55850d7a95a578ef1c29 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 22:00:44 +0900 Subject: [PATCH 091/687] Removed redundant assignment. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 284374a6e..af3a846f7 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -211,7 +211,6 @@ protected function getLocales(?array $locales): array { if ($locales) { $expanded = []; - $locales = $locales; } else { $locales = [$this->displayLocale]; // DEFAULT_LOCALE is 'en_US', and its parent is 'en'. From 5ce242ca6fa1ef2af59f13dcd24df3896901634c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jun 2020 22:01:20 +0900 Subject: [PATCH 092/687] Removed unused imports. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Canada/BritishColumbia.php | 1 - src/Yasumi/Provider/Canada/NewBrunswick.php | 1 - src/Yasumi/Provider/Canada/NorthwestTerritories.php | 1 - src/Yasumi/Provider/Canada/Ontario.php | 1 - 4 files changed, 4 deletions(-) diff --git a/src/Yasumi/Provider/Canada/BritishColumbia.php b/src/Yasumi/Provider/Canada/BritishColumbia.php index 2227be6bf..a510485aa 100644 --- a/src/Yasumi/Provider/Canada/BritishColumbia.php +++ b/src/Yasumi/Provider/Canada/BritishColumbia.php @@ -14,7 +14,6 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; -use Yasumi\Holiday; use Yasumi\Provider\Canada; /** diff --git a/src/Yasumi/Provider/Canada/NewBrunswick.php b/src/Yasumi/Provider/Canada/NewBrunswick.php index 1ecbe7191..42931fc45 100644 --- a/src/Yasumi/Provider/Canada/NewBrunswick.php +++ b/src/Yasumi/Provider/Canada/NewBrunswick.php @@ -14,7 +14,6 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; -use Yasumi\Holiday; use Yasumi\Provider\Canada; /** diff --git a/src/Yasumi/Provider/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php index 301e8b1db..9d70d5cfd 100644 --- a/src/Yasumi/Provider/Canada/NorthwestTerritories.php +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -14,7 +14,6 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; -use Yasumi\Holiday; use Yasumi\Provider\Canada; /** diff --git a/src/Yasumi/Provider/Canada/Ontario.php b/src/Yasumi/Provider/Canada/Ontario.php index d7bff7b50..26b21133d 100644 --- a/src/Yasumi/Provider/Canada/Ontario.php +++ b/src/Yasumi/Provider/Canada/Ontario.php @@ -14,7 +14,6 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; -use Yasumi\Holiday; use Yasumi\Provider\Canada; /** From 066e1795dd641262eed96217e81270d2276fb6e1 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 8 Jun 2020 14:26:12 +0200 Subject: [PATCH 093/687] Add accessors for shortName and substitutedHoliday (#220) --- CHANGELOG.md | 4 ++++ src/Yasumi/Filters/AbstractFilter.php | 4 ++-- src/Yasumi/Holiday.php | 12 ++++++++++++ src/Yasumi/Provider/AbstractProvider.php | 6 +++--- src/Yasumi/Provider/SouthKorea.php | 2 +- src/Yasumi/SubstituteHoliday.php | 16 ++++++++++++++-- tests/Base/SubstituteHolidayTest.php | 4 ++-- tests/Base/TypographyTest.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 2 +- 9 files changed, 40 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58692b633..dc76ebb99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) - Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) +- Added accessor methods Holiday::getShortName() and SubstituteHoliday::getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) - Added missing return (correct) and parameter types in various methods. ### Changed @@ -44,6 +45,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Fixed compound conditions that are always true by simplifying the condition steps. +### Deprecated +- Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor of accessor methods [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) + ### Removed - PHP 7.1 Support, as it has reached its end of life. - Removed the assertion of the instance type in some functions as it is already defined by the return type. diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 747913458..6d9979a49 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -35,10 +35,10 @@ public function count(): int { $names = \array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { - return $holiday->substitutedHoliday->shortName; + return $holiday->getSubstitutedHoliday()->getShortName(); } - return $holiday->shortName; + return $holiday->getShortName(); }, \iterator_to_array($this)); return \count(\array_unique($names)); diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index af3a846f7..9f082dc49 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -67,6 +67,8 @@ class Holiday extends DateTime implements JsonSerializable /** * @var string short name (internal name) of this holiday + * @deprecated public access to this property is deprecated in favor of getShortName() + * @see getShortName() */ public $shortName; @@ -138,6 +140,16 @@ public function __construct( parent::__construct($date->format('Y-m-d'), $date->getTimezone()); } + /** + * Returns the short name for this holiday. + * + * @return string the short name, e.g. "newYearsDay". + */ + public function getShortName(): string + { + return $this->shortName; + } + /** * Returns what type this holiday is. * diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 5cddd4e42..f7a57a8eb 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -158,7 +158,7 @@ public function addHoliday(Holiday $holiday): void $holiday->mergeGlobalTranslations($this->globalTranslations); } - $this->holidays[$holiday->shortName] = $holiday; + $this->holidays[$holiday->getShortName()] = $holiday; \uasort($this->holidays, [__CLASS__, 'compareDates']); } @@ -315,10 +315,10 @@ public function count(): int { $names = \array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { - return $holiday->substitutedHoliday->shortName; + return $holiday->getSubstitutedHoliday()->getShortName(); } - return $holiday->shortName; + return $holiday->getShortName(); }, $this->getHolidays()); return \count(\array_unique($names)); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 161a6be26..e10faa33b 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -484,7 +484,7 @@ public function calculateSubstituteHolidays(): void 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; + return $holiday->getShortName() === $shortName ? false : (string)$holiday; }, $holidays); // Only process accepted holidays and conditions diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 9321c8493..fb7427525 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -28,6 +28,8 @@ class SubstituteHoliday extends Holiday { /** * @var Holiday + * @deprecated public access to this property is deprecated in favor of getSubstitutedHoliday() + * @see getSubstitutedHoliday() */ public $substitutedHoliday; @@ -66,7 +68,7 @@ public function __construct( ) { $this->substitutedHoliday = $substitutedHoliday; - $shortName = 'substituteHoliday:' . $substitutedHoliday->shortName; + $shortName = 'substituteHoliday:' . $substitutedHoliday->getShortName(); if ($date == $substitutedHoliday) { throw new \InvalidArgumentException('Date must differ from the substituted holiday'); @@ -76,6 +78,16 @@ public function __construct( parent::__construct($shortName, $names, $date, $displayLocale, $type); } + /** + * Returns the holiday being substituted. + * + * @return Holiday the holiday being substituted. + */ + public function getSubstitutedHoliday(): Holiday + { + return $this->substitutedHoliday; + } + /** * Returns the localized name of this holiday * @@ -95,7 +107,7 @@ public function getName($locales = null): string { $name = parent::getName(); - if ($name === $this->shortName) { + if ($name === $this->getShortName()) { foreach ($this->getLocales($locales) as $locales) { $pattern = $this->substituteHolidayTranslations[$locales] ?? null; if ($pattern) { diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index a9e1f34f8..cd1003503 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -67,8 +67,8 @@ 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->assertSame($holiday, $substitute->getSubstitutedHoliday()); + $this->assertEquals('substituteHoliday:testHoliday', $substitute->getShortName()); $this->assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); $this->assertEquals(new DateTime('2019-01-02'), $substitute); } diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 6944fcd49..6472363f9 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -59,7 +59,7 @@ public function translationProvider(): array foreach ($provider->getHolidays() as $holiday) { foreach ($holiday->translations as $locale => $name) { - $tests[$name] = [$name, $class, $holiday->shortName, $locale]; + $tests[$name] = [$name, $class, $holiday->getShortName(), $locale]; } } } diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 582825e82..5fa7c5f94 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -87,7 +87,7 @@ public function assertHolidayWithSubstitution( $this->assertTrue($holidays->isHoliday($holidayOfficial)); $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); - $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->shortName); + $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->getShortName()); if ($expectedSubstitution === null) { // without substitution $this->assertNull($holidaySubstitution); From 55ffb27fc29b30c9bf2f1efc10c9240acd9d0b1e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 8 Jun 2020 21:44:33 +0900 Subject: [PATCH 094/687] Better to use an array. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Croatia.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index a050e0998..66b047080 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -104,7 +104,7 @@ private function calculateStatehoodDay(): void */ private function calculateHomelandThanksgivingDay(): void { - $names = null; + $names = []; if ($this->year >= 1995 && $this->year < 2020) { $names['en'] = 'Homeland Thanksgiving Day'; $names['hr'] = 'Dan domovinske zahvalnosti'; @@ -113,7 +113,7 @@ private function calculateHomelandThanksgivingDay(): void $names['hr'] = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; } - if (null !== $names) { + if (! empty($names)) { $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, From 530700164f0e913d94d320caa081fb14c6cad134 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 8 Jun 2020 21:48:06 +0900 Subject: [PATCH 095/687] Better to use empty function as the $locales (array) expression is implicitly converted to a boolean. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 9f082dc49..050eb64d5 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -221,7 +221,7 @@ public function getName(array $locales = null): string */ protected function getLocales(?array $locales): array { - if ($locales) { + if (! empty($locales)) { $expanded = []; } else { $locales = [$this->displayLocale]; From 53c1f5897b9627f896e8a708df4165759fd3add7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 10 Jun 2020 22:26:45 +0900 Subject: [PATCH 096/687] Corrected tests as familyDay only became an official holiday since 2009. If the random generated year was before 2009, the unit test failed. Signed-off-by: Sacha Telgenhof --- tests/Canada/Alberta/AlbertaTest.php | 11 ++++++++--- tests/Canada/BritishColumbia/BritishColumbiaTest.php | 11 ++++++++--- tests/Canada/NewBrunswick/NewBrunswickTest.php | 11 ++++++++--- tests/Canada/Ontario/OntarioTest.php | 11 ++++++++--- tests/Canada/Saskatchewan/SaskatchewanTest.php | 11 ++++++++--- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index d4a3e313d..015693648 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -31,13 +31,18 @@ class AlbertaTest extends AlbertaBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'heritageDay', - 'familyDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2009) { + $holidays[] = 'familyDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index b29541e60..a9be1ec83 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -31,13 +31,18 @@ class BritishColumbiaTest extends BritishColumbiaBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'civicHoliday', - 'familyDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2009) { + $holidays[] = 'familyDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index 7952bb723..88800728d 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -31,13 +31,18 @@ class NewBrunswickTest extends NewBrunswickBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'civicHoliday', - 'familyDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2009) { + $holidays[] = 'familyDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index 97d6bfb3d..79bd56480 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -31,13 +31,18 @@ class OntarioTest extends OntarioBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'civicHoliday', - 'familyDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2009) { + $holidays[] = 'familyDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index c6ca3cacd..18f2b9116 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -31,13 +31,18 @@ class SaskatchewanTest extends SaskatchewanBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'saskatchewanDay', - 'familyDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2009) { + $holidays[] = 'familyDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From 81fc0f375b12e032fc1679e9d6e64ea5b2e608df Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 10 Jun 2020 22:41:15 +0900 Subject: [PATCH 097/687] Comment cleanup; removed redundant/duplicate lines. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/ChristianHolidays.php | 2 -- src/Yasumi/Provider/Netherlands.php | 2 -- src/Yasumi/Provider/Switzerland.php | 1 - src/Yasumi/Translations.php | 1 - 4 files changed, 6 deletions(-) diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 67897824f..05720e759 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -22,7 +22,6 @@ * Trait ChristianHolidays. * * Trait containing base Christian Western churches calendar based holidays. - * */ trait ChristianHolidays { @@ -79,7 +78,6 @@ public function easter( * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c * @link http://www.gmarts.org/index.php?go=415#EasterMallen * @link https://www.tondering.dk/claus/cal/easter.php - * */ protected function calculateEaster(int $year, string $timezone): DateTime { diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 0035d99ec..6842488b2 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -139,7 +139,6 @@ private function calculateCarnival(): void * * @throws \Exception * @see \Yasumi\Provider\CommonHolidays::winterTime() - * */ private function calculateWinterTime(): void { @@ -156,7 +155,6 @@ private function calculateWinterTime(): void * * @throws \Exception * @see \Yasumi\Provider\CommonHolidays::summerTime() - * */ private function calculateSummerTime(): void { diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index 3ee6d4e3b..29c719583 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -59,7 +59,6 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws UnknownLocaleException * @throws \Exception - * @throws \Exception */ private function calculateNationalDay(): void { diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index f125a1ec7..47e6aa5ed 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -92,7 +92,6 @@ public function loadTranslations(string $directoryPath): void * * @throws UnknownLocaleException An UnknownLocaleException is thrown if the given locale is not * valid/available. - * */ protected function isValidLocale(string $locale): bool { From 4a81f15b276a5e30572b3dcbb9efe90636231fb4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 10 Jun 2020 22:54:40 +0900 Subject: [PATCH 098/687] Changed code styling to use a space after cast operator and enforcing strict types. Signed-off-by: Sacha Telgenhof --- .php_cs | 4 +++- src/Yasumi/Exception/InvalidDateException.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 8 ++++---- src/Yasumi/Provider/Australia.php | 2 +- .../Australia/AustralianCapitalTerritory.php | 2 +- .../Canada/NewfoundlandAndLabrador.php | 4 ++-- src/Yasumi/Provider/ChristianHolidays.php | 8 ++++---- src/Yasumi/Provider/Ireland.php | 8 ++++---- src/Yasumi/Provider/Japan.php | 4 ++-- src/Yasumi/Provider/Netherlands.php | 4 ++-- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 10 +++++----- src/Yasumi/Provider/USA.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom.php | 6 +++--- .../Provider/UnitedKingdom/NorthernIreland.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 6 +++--- src/Yasumi/Yasumi.php | 8 ++++---- tests/Base/WeekendTest.php | 4 ++-- tests/Ireland/ChristmasDayTest.php | 2 +- tests/Ireland/NewYearsDayTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 2 +- tests/Ireland/StStephensDayTest.php | 2 +- tests/NewZealand/BoxingDayTest.php | 2 +- tests/NewZealand/ChristmasDayTest.php | 2 +- tests/SouthAfrica/ChristmasDayTest.php | 2 +- tests/SouthAfrica/FreedomDayTest.php | 2 +- tests/SouthAfrica/HeritageDayTest.php | 2 +- tests/SouthAfrica/HumanRightsDayTest.php | 2 +- tests/SouthAfrica/NationalWomensDayTest.php | 2 +- tests/SouthAfrica/NewYearsDayTest.php | 2 +- tests/SouthAfrica/ReconciliationDayTest.php | 2 +- tests/SouthAfrica/SecondChristmasDayTest.php | 2 +- tests/SouthAfrica/WorkersDayTest.php | 2 +- tests/SouthAfrica/YouthDayTest.php | 2 +- tests/UnitedKingdom/BoxingDayTest.php | 2 +- tests/UnitedKingdom/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/England/BoxingDayTest.php | 2 +- .../UnitedKingdom/England/ChristmasDayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 2 +- .../NorthernIreland/BoxingDayTest.php | 2 +- .../NorthernIreland/ChristmasDayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- tests/UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- .../Scotland/ChristmasDayTest.php | 2 +- .../UnitedKingdom/Scotland/NewYearsDayTest.php | 2 +- .../Scotland/SecondNewYearsDayTest.php | 2 +- .../Scotland/StAndrewsDayTest.php | 2 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 2 +- tests/UnitedKingdom/Wales/ChristmasDayTest.php | 2 +- tests/YasumiBase.php | 18 +++++++++--------- 50 files changed, 86 insertions(+), 84 deletions(-) diff --git a/.php_cs b/.php_cs index 81169b11a..0852abcc4 100644 --- a/.php_cs +++ b/.php_cs @@ -20,5 +20,7 @@ return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([ 'no_unused_imports' => true, 'single_quote' => true, 'space_after_semicolon' => true, - 'trailing_comma_in_multiline_array' => true + 'trailing_comma_in_multiline_array' => true, + 'cast_spaces' => ['space' => 'single'], + 'declare_strict_types' => true, ])->setLineEnding("\n")->setFinder($finder); \ No newline at end of file diff --git a/src/Yasumi/Exception/InvalidDateException.php b/src/Yasumi/Exception/InvalidDateException.php index da09ba49c..8a08db503 100644 --- a/src/Yasumi/Exception/InvalidDateException.php +++ b/src/Yasumi/Exception/InvalidDateException.php @@ -34,7 +34,7 @@ public function __construct($argumentValue) break; case 'integer': case 'double': - $displayName = (string)$argumentValue; + $displayName = (string) $argumentValue; break; case 'string': $displayName = $argumentValue; diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index f7a57a8eb..cb5d9bde1 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -224,7 +224,7 @@ public function isHoliday(\DateTimeInterface $date): bool public function getHolidayDates(): array { return \array_map(static function ($holiday) { - return (string)$holiday; + return (string) $holiday; }, $this->holidays); } @@ -242,7 +242,7 @@ public function isWeekendDay(\DateTimeInterface $date): bool { // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. if (\in_array( - (int)$date->format('w'), + (int) $date->format('w'), self::WEEKEND_DATA[$this::ID] ?? [0, 6], true ) @@ -266,7 +266,7 @@ public function whenIs(string $shortName): string { $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty - return (string)$this->holidays[$shortName]; + return (string) $this->holidays[$shortName]; } /** @@ -302,7 +302,7 @@ public function whatWeekDayIs(string $shortName): int { $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty - return (int)$this->holidays[$shortName]->format('w'); + return (int) $this->holidays[$shortName]->format('w'); } /** diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 2c7b0119d..bd3c0bede 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -132,7 +132,7 @@ private function calculateAustraliaDay(): void ); $this->addHoliday($holiday); - $day = (int)$date->format('w'); + $day = (int) $date->format('w'); if (0 === $day || 6 === $day) { $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P2D')); diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 677f15d33..f5c7dbdcd 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -193,7 +193,7 @@ private function calculateReconciliationDay(): void } $date = new DateTime($this->year . '-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $day = (int)$date->format('w'); + $day = (int) $date->format('w'); if (1 !== $day) { $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); } diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index a484827c2..fba2e276b 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -88,7 +88,7 @@ private function calculateStPatricksDay(): void $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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); @@ -134,7 +134,7 @@ private function calculateOrangemensDay(): void $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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 05720e759..172a4b77e 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -91,7 +91,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime // 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 + $dom = ($year + (int) ($year / 4) + 5) % 7; // The 'Dominical number' - finding a Sunday if ($dom < 0) { $dom += 7; } @@ -101,13 +101,13 @@ protected function calculateEaster(int $year, string $timezone): DateTime $pfm += 30; } } else { - $dom = ($year + (int)($year / 4) - (int)($year / 100) + (int)($year / 400)) % 7; // The 'Dominical number' - finding a Sunday + $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 + $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) { diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 74dfb009f..c5add167e 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -103,7 +103,7 @@ private function calculateNewYearsDay(): void $this->addHoliday($holiday); // Substitute holiday is on the next available weekday if a holiday falls on a Sunday. - if (0 === (int)$holiday->format('w')) { + if (0 === (int) $holiday->format('w')) { $date = clone $holiday; $date->modify('next monday'); @@ -164,7 +164,7 @@ private function calculateChristmasDay(): void $this->addHoliday($holiday); // 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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next tuesday'); @@ -204,7 +204,7 @@ private function calculateStStephensDay(): void $this->addHoliday($holiday); // 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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); @@ -249,7 +249,7 @@ private function calculateStPatricksDay(): void $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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 9d65991df..026450a54 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -544,7 +544,7 @@ private function calculateSubstituteHolidays(): void $date = clone $holiday; // If holidays falls on a Sunday - if (0 === (int)$holiday->format('w')) { + if (0 === (int) $holiday->format('w')) { if ($this->year >= 2007) { // Find next week day (not being another holiday) while (\in_array($date, $dates, false)) { @@ -636,7 +636,7 @@ private function calculateBridgeHolidays(): void } // Determine if gap between holidays is one day and create bridge holiday - if (2 === (int)$previous->diff($datesIterator->current())->format('%a')) { + if (2 === (int) $previous->diff($datesIterator->current())->format('%a')) { $bridgeDate = clone $previous; $bridgeDate->add(new DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 6842488b2..7812bcc5b 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -250,7 +250,7 @@ private function calculateQueensday(): void } // Determine substitution day - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $this->year < 1980 ? $date->add(new DateInterval('P1D')) : $date->sub(new DateInterval('P1D')); } @@ -276,7 +276,7 @@ private function calculateKingsday(): void if ($this->year >= 2014) { $date = new DateTime("$this->year-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->sub(new DateInterval('P1D')); } diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 6ffd17863..f4dcf9c4e 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -326,7 +326,7 @@ private function calculateSubstituteHolidays(): void // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { // Substitute holiday is on a Monday in case the holiday falls on a Sunday - if (0 === (int)$holiday->format('w')) { + if (0 === (int) $holiday->format('w')) { $date = clone $holiday; $date->add(new DateInterval('P1D')); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index e10faa33b..1a1d51654 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -484,22 +484,22 @@ public function calculateSubstituteHolidays(): void foreach ($holidays as $shortName => $holiday) { // Get list of holiday dates except this $holidayDates = \array_map(static function ($holiday) use ($shortName) { - return $holiday->getShortName() === $shortName ? false : (string)$holiday; + return $holiday->getShortName() === $shortName ? false : (string) $holiday; }, $holidays); // Only process accepted holidays and conditions if (\in_array($shortName, $acceptedHolidays, true) && ( - 0 === (int)$holiday->format('w') + 0 === (int) $holiday->format('w') || \in_array($holiday, $holidayDates, false) - || (6 === (int)$holiday->format('w') && 'childrensDay' === $shortName) + || (6 === (int) $holiday->format('w') && 'childrensDay' === $shortName) ) ) { $date = clone $holiday; // Find next week day (not being another holiday) - while (0 === (int)$date->format('w') - || (6 === (int)$date->format('w') && 'childrensDay' === $shortName) + while (0 === (int) $date->format('w') + || (6 === (int) $date->format('w') && 'childrensDay' === $shortName) || \in_array($date, $holidayDates, false)) { $date->add(new DateInterval('P1D')); continue; diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 3cf5d4a88..0f0ee0a35 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -272,13 +272,13 @@ private function calculateSubstituteHolidays(): void $date = null; // Substitute holiday is on a Monday in case the holiday falls on a Sunday - if (0 === (int)$holiday->format('w')) { + 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)$holiday->format('w')) { + if (6 === (int) $holiday->format('w')) { $date = clone $holiday; $date->sub(new DateInterval('P1D')); } diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 0c89fd675..ff7890fe3 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -89,7 +89,7 @@ protected function calculateNewYearsDay(): void $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); // If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) - if (\in_array((int)$newYearsDay->format('w'), [0, 6], true)) { + if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { $newYearsDay->modify('next monday'); } @@ -275,7 +275,7 @@ protected function calculateChristmasHolidays(?string $type = null): void $this->addHoliday($christmasDay); $this->addHoliday($secondChristmasDay); - if (\in_array((int)$christmasDay->format('w'), [0, 6], true)) { + if (\in_array((int) $christmasDay->format('w'), [0, 6], true)) { $date = clone $christmasDay; $date->add(new DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( @@ -287,7 +287,7 @@ protected function calculateChristmasHolidays(?string $type = null): void )); } - if (\in_array((int)$secondChristmasDay->format('w'), [0, 6], true)) { + if (\in_array((int) $secondChristmasDay->format('w'), [0, 6], true)) { $date = clone $secondChristmasDay; $date->add(new DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index 43f35b7e4..c1a5fc6f3 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -87,7 +87,7 @@ private function calculateStPatricksDay(): void $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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); @@ -133,7 +133,7 @@ private function calculateBattleOfTheBoyne(): void $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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index ebcb5435e..1b3a00944 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -107,7 +107,7 @@ protected function calculateNewYearsHolidays(): void $this->addHoliday($newYearsDay); $this->addHoliday($secondNewYearsDay); - if (\in_array((int)$newYearsDay->format('w'), [0, 6], true)) { + if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { $date = clone $newYearsDay; $date->add(new DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( @@ -119,7 +119,7 @@ protected function calculateNewYearsHolidays(): void )); } - if (\in_array((int)$secondNewYearsDay->format('w'), [0, 6], true)) { + if (\in_array((int) $secondNewYearsDay->format('w'), [0, 6], true)) { $date = clone $secondNewYearsDay; $date->add(new DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( @@ -188,7 +188,7 @@ private function calculateStAndrewsDay(): void $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)) { + if (\in_array((int) $holiday->format('w'), [0, 6], true)) { $date = clone $holiday; $date->modify('next monday'); diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index a6982f865..93f85feb1 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -92,8 +92,8 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int)$date->format('Y')) { - $provider = self::create($class, (int)$date->format('Y')); + if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int) $date->format('Y')) { + $provider = self::create($class, (int) $date->format('Y')); } if ($provider->isWorkingDay($date)) { $workingDays--; @@ -286,8 +286,8 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int)$date->format('Y')) { - $provider = self::create($class, (int)$date->format('Y')); + if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int) $date->format('Y')) { + $provider = self::create($class, (int) $date->format('Y')); } if ($provider->isWorkingDay($date)) { $workingDays--; diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index ef4c3cfbc..08ba0a03c 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -39,7 +39,7 @@ class WeekendTest extends TestCase */ public function testWeekendDay(\DateTimeImmutable $date): void { - $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int)$date->format('Y')); + $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int) $date->format('Y')); $isWeekendDay = $yasumiProvider->isWeekendDay($date); $this->assertIsBool($isWeekendDay); @@ -83,7 +83,7 @@ public function dataProviderWeekendDays(): array */ public function testNonWeekendDay(\DateTimeImmutable $date): void { - $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int)$date->format('Y')); + $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int) $date->format('Y')); $isWeekendDay = $yasumiProvider->isWeekendDay($date); $this->assertIsBool($isWeekendDay); diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index b0463dae6..85cb3d878 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -45,7 +45,7 @@ public function testHoliday($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->modify('next tuesday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 69f74536b..263081011 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected): void $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->modify('next monday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 1b89ec018..f8af5f1df 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->modify('next monday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index a60b134f8..ea7f9c1d4 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -45,7 +45,7 @@ public function testHoliday($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->modify('next monday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 7686c6aa0..faa690169 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -65,7 +65,7 @@ public function HolidayDataProvider(): array $year = $this->generateRandomYear(); $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); - if (\in_array((int)$date->format('w'), [0, 6], true)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->add(new DateInterval('P2D')); } diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 2bfe04668..8442b7875 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -65,7 +65,7 @@ public function HolidayDataProvider(): array $year = $this->generateRandomYear(); $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); - if (\in_array((int)$date->format('w'), [0, 6], true)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->add(new DateInterval('P2D')); } diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 4efdf9040..236410560 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 60723f57b..2a79186b9 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 1cfbd76a8..be7da93b5 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index c579ed9cb..07b271a26 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index e676944a9..a1f0348a6 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index f94c7eeba..dd36fe4ca 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 83d877aab..5838c02ca 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 4cfa6cc21..6ab873b2d 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index 87ec8ea27..8632a4809 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index 48e602479..5c5327fa5 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -56,7 +56,7 @@ public function testHoliday($year, $expected): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. - if (0 === (int)$date->format('w')) { + if (0 === (int) $date->format('w')) { $date->add(new DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 181b0404d..7632b9ac3 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 9ec2e039c..1327008aa 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index 7290b330c..0bb4e0577 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 09972d34c..f3ed044d3 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index 1c47c9c09..de574edb3 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->modify('next monday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 7312e57fb..e86e3ca4d 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index c9921a3e7..641ead0f8 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 7fb29f2cd..c0bb56dd8 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->modify('next monday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index 96b4fac23..ddffac419 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 6e2d3b63e..cf5177982 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index 3e0543df9..9693b6c73 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -56,7 +56,7 @@ public function testHolidayOnAfterEstablishment($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->add(new DateInterval('P2D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index 61974046f..249348556 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -56,7 +56,7 @@ public function testHolidayOnAfterEstablishment($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->add(new DateInterval('P2D')); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 485238170..413407872 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected): void $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)) { + if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->modify('next monday'); $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 2c5fedd22..94ee3b5f2 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 4204a2b5a..7ab7fbb88 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -46,7 +46,7 @@ public function testHoliday($year, $expected): void $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)) { + 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); diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index c4bbf4278..3ecfc9993 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -322,7 +322,7 @@ public function generateRandomDates( $data = []; $range = $range ?? 1000; for ($y = 1; $y <= ($iterations ?? 10); $y++) { - $year = (int)Faker::create()->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 ?? 'UTC'))]; } @@ -348,7 +348,7 @@ public function generateRandomEasterDates( $range = $range ?? 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int)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 ?? 'UTC'); $data[] = [$year, $date->format('Y-m-d')]; @@ -393,7 +393,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime // 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 + $dom = ($year + (int) ($year / 4) + 5) % 7; // The 'Dominical number' - finding a Sunday if ($dom < 0) { $dom += 7; } @@ -403,13 +403,13 @@ protected function calculateEaster(int $year, string $timezone): DateTime $pfm += 30; } } else { - $dom = ($year + (int)($year / 4) - (int)($year / 100) + (int)($year / 400)) % 7; // The 'Dominical number' - finding a Sunday + $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 + $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) { @@ -478,7 +478,7 @@ public function generateRandomModifiedEasterDates( $data = []; $range = $range ?? 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int)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 ?? 'UTC'); $cb($date); @@ -610,7 +610,7 @@ public function generateRandomYear( int $lowerLimit = null, int $upperLimit = null ): int { - return (int)Faker::create()->numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); + return (int) Faker::create()->numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } /** @@ -625,6 +625,6 @@ public function isWeekend( DateTimeInterface $dateTime, array $weekendDays = [0, 6] ): bool { - return \in_array((int)$dateTime->format('w'), $weekendDays, true); + return \in_array((int) $dateTime->format('w'), $weekendDays, true); } } From 94cca6b446a1ab1952b5be458436cb6ec02cf5f7 Mon Sep 17 00:00:00 2001 From: Patrick-Root <65601273+Patrick-Root@users.noreply.github.com> Date: Wed, 10 Jun 2020 18:27:20 +0200 Subject: [PATCH 099/687] Feature/new years eve germany (#226) * add german translation * add New Years Eve to Germany.php Set it to other * add test for New Years Eve in Germany * add entry to CHANGELOG.md Co-authored-by: Patrick Kalweit --- CHANGELOG.md | 1 + src/Yasumi/Provider/Germany.php | 1 + src/Yasumi/data/translations/newYearsEve.php | 1 + tests/Germany/NewYearsEveTest.php | 79 ++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 tests/Germany/NewYearsEveTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index dc76ebb99..62d681ff9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added +- Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index a96d9bd3d..22e0b2119 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -45,6 +45,7 @@ public function initialize(): void // Add common holidays $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); // Add common Christian holidays (common in Germany) $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale)); diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 20433b385..f50fda9e7 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -14,6 +14,7 @@ // Translations for New Year's Eve return [ 'da' => 'nytårsaften', + 'de' => 'Silvester', 'en' => 'New Year’s Eve', 'ko' => '신년전야', 'lv' => 'Vecgada vakars', diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php new file mode 100644 index 000000000..02806514e --- /dev/null +++ b/tests/Germany/NewYearsEveTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Germany; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Eve in Germany. + */ +class NewYearsEveTest extends GermanyBaseTestCase 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 => 'Silvester'] + ); + } + + /** + * 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_OTHER); + } +} From 21655eb2b317bb6496b7f557b7e283c69feb118c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20Nork=C5=ABnas?= Date: Tue, 16 Jun 2020 18:07:37 +0300 Subject: [PATCH 100/687] Feature/all souls day Lithuania (#227) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Lithuania.php | 24 ++++++ src/Yasumi/data/translations/allSoulsDay.php | 19 +++++ tests/Lithuania/AllSoulsDayTest.php | 87 ++++++++++++++++++++ 5 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 src/Yasumi/data/translations/allSoulsDay.php create mode 100644 tests/Lithuania/AllSoulsDayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d681ff9..c532cc0d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added +- Added All Souls Day to Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) - Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 849691df7..cf673bc90 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -149,7 +149,7 @@ public function initialize(): void if ($this->year >= 1300) { $this->addHoliday(new Holiday( 'allSoulsDay', - ['pt' => 'Dia de Finados'], + [], new DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 5e22074d5..50d9ab11e 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -45,6 +45,11 @@ class Lithuania extends AbstractProvider */ public const STATEHOOD_YEAR = 1253; + /** + * The year when All Souls Day became a holiday + */ + public const ALL_SOULS_DAY = 2020; + /** * Initialize holidays for Lithuania. * @@ -66,6 +71,7 @@ public function initialize(): void $this->addStatehoodDay(); $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); + $this->addAllSoulsDay(); $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); @@ -119,4 +125,22 @@ private function addStatehoodDay(): void ], new \DateTime("{$this->year}-07-06", new \DateTimeZone($this->timezone)), $this->locale)); } } + + /** + * All Souls Day, also known as the Commemoration of All the Faithful Departed and the Day of the Dead. + * + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addAllSoulsDay(): void + { + if ($this->year >= self::ALL_SOULS_DAY) { + $this->addHoliday(new Holiday( + 'allSoulsDay', + [], + new \DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } } diff --git a/src/Yasumi/data/translations/allSoulsDay.php b/src/Yasumi/data/translations/allSoulsDay.php new file mode 100644 index 000000000..ea4d511c2 --- /dev/null +++ b/src/Yasumi/data/translations/allSoulsDay.php @@ -0,0 +1,19 @@ + + */ + +// Translations for All Souls' Day +return [ + 'en' => 'All Souls’ Day', + 'lt' => 'Vėlinės', + 'pt' => 'Dia de Finados', +]; diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php new file mode 100644 index 000000000..900cec508 --- /dev/null +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -0,0 +1,87 @@ + + */ + +namespace Yasumi\tests\Lithuania; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\Lithuania; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for All Souls' Day in Lithuania. + * + * @author Tomas Norkūnas + */ +class AllSoulsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'allSoulsDay'; + + /** + * @throws ReflectionException + */ + public function testHolidayBeforeAnnounce(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, Lithuania::ALL_SOULS_DAY - 1) + ); + } + + /** + * Test if holiday is defined after restoration + * @throws Exception + * @throws ReflectionException + */ + public function testHolidayAfterAnnounce(): void + { + $year = $this->generateRandomYear(Lithuania::ALL_SOULS_DAY); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("{$year}-11-02", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * {@inheritdoc} + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Vėlinės'] + ); + } + + /** + * {@inheritdoc} + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} From 829abcd971290a06c97a2c5e93e3bf1091cd713d Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Wed, 17 Jun 2020 01:49:35 +0200 Subject: [PATCH 101/687] Rename "short name" to "key" (#221) --- CHANGELOG.md | 2 +- .../Exception/MissingTranslationException.php | 6 +- src/Yasumi/Filters/AbstractFilter.php | 4 +- src/Yasumi/Holiday.php | 38 ++--- src/Yasumi/Provider/AbstractProvider.php | 81 ++++++----- src/Yasumi/Provider/SouthKorea.php | 12 +- src/Yasumi/SubstituteHoliday.php | 10 +- src/Yasumi/Translations.php | 40 +++--- src/Yasumi/TranslationsInterface.php | 8 +- tests/Base/HolidayTest.php | 12 +- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 136 +++++++++--------- tests/Base/TypographyTest.php | 6 +- tests/Base/YasumiTest.php | 12 +- tests/Japan/JapanBaseTestCase.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 8 +- tests/YasumiBase.php | 42 +++--- 17 files changed, 221 insertions(+), 200 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c532cc0d4..b78399612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) - Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) -- Added accessor methods Holiday::getShortName() and SubstituteHoliday::getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) +- Added accessor methods Holiday::getKey() and SubstituteHoliday::getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220)+[\#221](https://github.com/azuyalabs/yasumi/pull/221) ([c960657](https://github.com/c960657)) - Added missing return (correct) and parameter types in various methods. ### Changed diff --git a/src/Yasumi/Exception/MissingTranslationException.php b/src/Yasumi/Exception/MissingTranslationException.php index a967d18eb..9710f29e4 100644 --- a/src/Yasumi/Exception/MissingTranslationException.php +++ b/src/Yasumi/Exception/MissingTranslationException.php @@ -22,11 +22,11 @@ class MissingTranslationException extends BaseException implements Exception /** * Initializes the Exception instance * - * @param string $shortName The short name (internal name) of the holiday + * @param string $key The holiday key * @param array $locales The locales that was searched */ - public function __construct(string $shortName, array $locales) + public function __construct(string $key, array $locales) { - parent::__construct(\sprintf("Translation for '%s' not found for any locale: '%s'", $shortName, \implode("', '", $locales))); + parent::__construct(\sprintf("Translation for '%s' not found for any locale: '%s'", $key, \implode("', '", $locales))); } } diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 6d9979a49..7e8ef08d5 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -35,10 +35,10 @@ public function count(): int { $names = \array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { - return $holiday->getSubstitutedHoliday()->getShortName(); + return $holiday->getSubstitutedHoliday()->getKey(); } - return $holiday->getShortName(); + return $holiday->getKey(); }, \iterator_to_array($this)); return \count(\array_unique($names)); diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 050eb64d5..5c1cd3b53 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -56,9 +56,9 @@ class Holiday extends DateTime implements JsonSerializable public const DEFAULT_LOCALE = 'en_US'; /** - * Pseudo-locale representing the short name (internal name) of the holiday. + * Pseudo-locale representing the holiday key. */ - public const LOCALE_SHORT_NAME = 'shortName'; + public const LOCALE_KEY = '_key'; /** * @var array list of all defined locales @@ -66,9 +66,9 @@ class Holiday extends DateTime implements JsonSerializable private static $locales = []; /** - * @var string short name (internal name) of this holiday - * @deprecated public access to this property is deprecated in favor of getShortName() - * @see getShortName() + * @var string holiday key + * @deprecated Public access to this property is deprecated in favor of getKey() + * @see getKey() */ public $shortName; @@ -93,7 +93,7 @@ class Holiday extends DateTime implements JsonSerializable * 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 string $shortName The short name (internal name) of this holiday + * @param string $key Holiday key * @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 @@ -109,14 +109,14 @@ class Holiday extends DateTime implements JsonSerializable * @throws \Exception */ public function __construct( - string $shortName, + string $key, array $names, \DateTimeInterface $date, string $displayLocale = self::DEFAULT_LOCALE, string $type = self::TYPE_OFFICIAL ) { - // Validate if short name is not empty - if (empty($shortName)) { + // Validate if key is not empty + if (empty($key)) { throw new InvalidArgumentException('Holiday name can not be blank.'); } @@ -131,7 +131,7 @@ public function __construct( } // Set additional attributes - $this->shortName = $shortName; + $this->shortName = $key; $this->translations = $names; $this->displayLocale = $displayLocale; $this->type = $type; @@ -141,11 +141,11 @@ public function __construct( } /** - * Returns the short name for this holiday. + * Returns the key for this holiday. * - * @return string the short name, e.g. "newYearsDay". + * @return string the key, e.g. "newYearsDay". */ - public function getShortName(): string + public function getKey(): string { return $this->shortName; } @@ -176,7 +176,7 @@ public function jsonSerialize(): self * The provided locales are searched for a translation. The first locale containing a translation will be used. * * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and - * Holiday::LOCALE_SHORT_NAME (the short name (internal name) of this holiday) was provided. + * Holiday::LOCALE_KEY (the holiday key) was provided. * * @param array $locales The locales to search for translations * @@ -184,13 +184,13 @@ public function jsonSerialize(): self * @throws MissingTranslationException * * @see Holiday::DEFAULT_LOCALE - * @see Holiday::LOCALE_SHORT_NAME + * @see Holiday::LOCALE_KEY */ public function getName(array $locales = null): string { $locales = $this->getLocales($locales); foreach ($locales as $locale) { - if ($locale === self::LOCALE_SHORT_NAME) { + if ($locale === self::LOCALE_KEY) { return $this->shortName; } if (isset($this->translations[$locale])) { @@ -208,7 +208,7 @@ public function getName(array $locales = null): string * ['ca_ES_VALENCIA', 'es_ES'] is expanded into ['ca_ES_VALENCIA', 'ca_ES', 'ca', 'es_ES', 'es']. * * If a string is provided, return as if this string, Holiday::DEFAULT_LOCALE, and Holiday::LOCALE_SHORT_NAM - * was provided. E.g. 'de_DE' is expanded into ['de_DE', 'de', 'en_US', 'en', Holiday::LOCALE_SHORT_NAME]. + * was provided. E.g. 'de_DE' is expanded into ['de_DE', 'de', 'en_US', 'en', Holiday::LOCALE_KEY]. * * If null is provided, return as if the display locale was provided as a string. * @@ -217,7 +217,7 @@ public function getName(array $locales = null): string * @return array * * @see Holiday::DEFAULT_LOCALE - * @see Holiday::LOCALE_SHORT_NAME + * @see Holiday::LOCALE_KEY */ protected function getLocales(?array $locales): array { @@ -226,7 +226,7 @@ protected function getLocales(?array $locales): array } else { $locales = [$this->displayLocale]; // DEFAULT_LOCALE is 'en_US', and its parent is 'en'. - $expanded = [self::LOCALE_SHORT_NAME, 'en', 'en_US']; + $expanded = [self::LOCALE_KEY, 'en', 'en_US']; } // Expand e.g. ['de_DE', 'en_GB'] into ['de_DE', 'de', 'en_GB', 'en']. diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index cb5d9bde1..462accda5 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -158,7 +158,7 @@ public function addHoliday(Holiday $holiday): void $holiday->mergeGlobalTranslations($this->globalTranslations); } - $this->holidays[$holiday->getShortName()] = $holiday; + $this->holidays[$holiday->getKey()] = $holiday; \uasort($this->holidays, [__CLASS__, 'compareDates']); } @@ -169,13 +169,13 @@ public function addHoliday(Holiday $holiday): void * This function can be helpful in cases where an existing holiday provider class can be extended but some holidays * are not part of the original (extended) provider. * - * @param string $shortName short name of the holiday + * @param string $key holiday key * * @return void */ - public function removeHoliday(string $shortName): void + public function removeHoliday(string $key): void { - unset($this->holidays[$shortName]); + unset($this->holidays[$key]); } /** @@ -256,53 +256,68 @@ public function isWeekendDay(\DateTimeInterface $date): bool /** * On what date is the given holiday? * - * @param string $shortName short name of the holiday + * @param string $key holiday key * * @return string the date of the requested holiday * @throws InvalidArgumentException when the given name is blank or empty. * */ - public function whenIs(string $shortName): string + public function whenIs(string $key): string { - $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty + $this->isHolidayNameNotEmpty($key); // Validate if key is not empty - return (string) $this->holidays[$shortName]; + return (string) $this->holidays[$key]; } /** - * Checks whether the given holiday (short name) is not empty. + * Checks whether the given holiday is not empty. * - * @param string $shortName the name of the holiday to be checked. + * @param string $key key 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. */ - protected function isHolidayNameNotEmpty(string $shortName): bool + protected function isHolidayKeyNotEmpty(string $key): bool { - if (empty($shortName)) { - throw new InvalidArgumentException('Holiday name can not be blank.'); + if (empty($key)) { + throw new InvalidArgumentException('Holiday key can not be blank.'); } return true; } + /** + * Checks whether the given holiday is not empty. + * + * @param string $key key 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. + * @deprecated deprecated in favor of isHolidayKeyNotEmpty() + * @deprecated see isHolidayKeyNotEmpty() + */ + protected function isHolidayNameNotEmpty(string $key): bool + { + return $this->isHolidayKeyNotEmpty($key); + } + /** * On what day of the week is the given holiday? * * This function returns the index number for the day of the week on which the given holiday falls. * The index number is an integer starting with 0 being Sunday, 1 = Monday, etc. * - * @param string $shortName short name of the holiday + * @param string $key key 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. * */ - public function whatWeekDayIs(string $shortName): int + public function whatWeekDayIs(string $key): int { - $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty + $this->isHolidayNameNotEmpty($key); // Validate if key is not empty - return (int) $this->holidays[$shortName]->format('w'); + return (int) $this->holidays[$key]->format('w'); } /** @@ -315,10 +330,10 @@ public function count(): int { $names = \array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { - return $holiday->getSubstitutedHoliday()->getShortName(); + return $holiday->getSubstitutedHoliday()->getKey(); } - return $holiday->getShortName(); + return $holiday->getKey(); }, $this->getHolidays()); return \count(\array_unique($names)); @@ -357,7 +372,7 @@ public function getYear(): int /** * Retrieves the next date (year) the given holiday is going to take place. * - * @param string $shortName the name of the holiday for which the next occurrence need to be retrieved. + * @param string $key key of the holiday for which the next occurrence need to be retrieved. * * @return Holiday|null a Holiday instance for the given holiday * @@ -368,16 +383,16 @@ public function getYear(): int * * @covers AbstractProvider::anotherTime */ - public function next(string $shortName): ?Holiday + public function next(string $key): ?Holiday { - return $this->anotherTime($this->year + 1, $shortName); + return $this->anotherTime($this->year + 1, $key); } /** * Determines the date of the given holiday for another year. * * @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 + * @param string $key key of the holiday for which the date needs to be fetched * * @return Holiday|null a Holiday instance for the given holiday and year * @@ -386,38 +401,38 @@ public function next(string $shortName): ?Holiday * @throws UnknownLocaleException * @throws \RuntimeException */ - private function anotherTime(int $year, string $shortName): ?Holiday + private function anotherTime(int $year, string $key): ?Holiday { - $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty + $this->isHolidayNameNotEmpty($key); // Validate if key is not empty // Get calling class name $hReflectionClass = new \ReflectionClass(\get_class($this)); - return Yasumi::create($hReflectionClass->getShortName(), $year, $this->locale)->getHoliday($shortName); + return Yasumi::create($hReflectionClass->getShortName(), $year, $this->locale)->getHoliday($key); } /** * Retrieves the holiday object for the given holiday. * - * @param string $shortName the name of the holiday. + * @param string $key 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. * */ - public function getHoliday(string $shortName): ?Holiday + public function getHoliday(string $key): ?Holiday { - $this->isHolidayNameNotEmpty($shortName); // Validate if short name is not empty + $this->isHolidayNameNotEmpty($key); // Validate if key is not empty $holidays = $this->getHolidays(); - return $holidays[$shortName] ?? null; + return $holidays[$key] ?? null; } /** * Retrieves the previous date (year) the given holiday took place. * - * @param string $shortName the name of the holiday for which the previous occurrence need to be retrieved. + * @param string $key key of the holiday for which the previous occurrence need to be retrieved. * * @return Holiday|null a Holiday instance for the given holiday * @@ -428,9 +443,9 @@ public function getHoliday(string $shortName): ?Holiday * * @covers AbstractProvider::anotherTime */ - public function previous(string $shortName): ?Holiday + public function previous(string $key): ?Holiday { - return $this->anotherTime($this->year - 1, $shortName); + return $this->anotherTime($this->year - 1, $key); } /** diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 1a1d51654..4362f25ba 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -481,25 +481,25 @@ public function calculateSubstituteHolidays(): void ]; // Loop through all holidays - foreach ($holidays as $shortName => $holiday) { + foreach ($holidays as $key => $holiday) { // Get list of holiday dates except this - $holidayDates = \array_map(static function ($holiday) use ($shortName) { - return $holiday->getShortName() === $shortName ? false : (string) $holiday; + $holidayDates = \array_map(static function ($holiday) use ($key) { + return $holiday->getKey() === $key ? false : (string) $holiday; }, $holidays); // Only process accepted holidays and conditions - if (\in_array($shortName, $acceptedHolidays, true) + if (\in_array($key, $acceptedHolidays, true) && ( 0 === (int) $holiday->format('w') || \in_array($holiday, $holidayDates, false) - || (6 === (int) $holiday->format('w') && 'childrensDay' === $shortName) + || (6 === (int) $holiday->format('w') && 'childrensDay' === $key) ) ) { $date = clone $holiday; // 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' === $key) || \in_array($date, $holidayDates, false)) { $date->add(new DateInterval('P1D')); continue; diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index fb7427525..660e2fc20 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -68,14 +68,14 @@ public function __construct( ) { $this->substitutedHoliday = $substitutedHoliday; - $shortName = 'substituteHoliday:' . $substitutedHoliday->getShortName(); + $key = 'substituteHoliday:' . $substitutedHoliday->getKey(); if ($date == $substitutedHoliday) { throw new \InvalidArgumentException('Date must differ from the substituted holiday'); } // Construct instance - parent::__construct($shortName, $names, $date, $displayLocale, $type); + parent::__construct($key, $names, $date, $displayLocale, $type); } /** @@ -94,20 +94,20 @@ public function getSubstitutedHoliday(): Holiday * The provided locales are searched for a translation. The first locale containing a translation will be used. * * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and - * Holiday::LOCALE_SHORT_NAME (the short name (internal name) of this holiday) was provided. + * Holiday::LOCALE_KEY (the holiday key) was provided. * * @param array $locales The locales to search for translations * * @throws MissingTranslationException * * @see Holiday::DEFAULT_LOCALE - * @see Holiday::LOCALE_SHORT_NAME + * @see Holiday::LOCALE_KEY */ public function getName($locales = null): string { $name = parent::getName(); - if ($name === $this->getShortName()) { + if ($name === $this->getKey()) { foreach ($this->getLocales($locales) as $locales) { $pattern = $this->substituteHolidayTranslations[$locales] ?? null; if ($pattern) { diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 47e6aa5ed..998306e43 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -23,7 +23,7 @@ class Translations implements TranslationsInterface { /** - * @var array translations array: ['' => ['' => 'translation', ...], ... ] + * @var array translations array: ['' => ['' => 'translation', ...], ... ] */ public $translations = []; @@ -69,7 +69,7 @@ public function loadTranslations(string $directoryPath): void } $filename = $file->getFilename(); - $shortName = $file->getBasename('.' . $extension); + $key = $file->getBasename('.' . $extension); $translations = require $directoryPath . $filename; @@ -78,7 +78,7 @@ public function loadTranslations(string $directoryPath): void $this->isValidLocale($locale); // Validate the given locale } - $this->translations[$shortName] = $translations; + $this->translations[$key] = $translations; } } } @@ -105,54 +105,60 @@ protected function isValidLocale(string $locale): bool /** * Adds translation for holiday in specific locale. * - * @param string $shortName holiday short name + * @param string $key holiday key + + * @param string $locale locale * @param string $translation translation * * @throws UnknownLocaleException */ - public function addTranslation(string $shortName, string $locale, string $translation): void + public function addTranslation(string $key, string $locale, string $translation): void { $this->isValidLocale($locale); // Validate the given locale - if (!\array_key_exists($shortName, $this->translations)) { - $this->translations[$shortName] = []; + if (!\array_key_exists($key, $this->translations)) { + $this->translations[$key] = []; } - $this->translations[$shortName][$locale] = $translation; + $this->translations[$key][$locale] = $translation; } /** * Returns translation for holiday in specific locale. * - * @param string $shortName holiday short name + * @param string $key holiday key + + * @param string $locale locale * * @return string|null translated holiday name */ - public function getTranslation(string $shortName, string $locale): ?string + public function getTranslation(string $key, string $locale): ?string { - if (!\array_key_exists($shortName, $this->translations) - || !\array_key_exists($locale, $this->translations[$shortName])) { + if (!\array_key_exists($key, $this->translations) + || !\array_key_exists($locale, $this->translations[$key])) { return null; } - return $this->translations[$shortName][$locale]; + return $this->translations[$key][$locale]; } /** * Returns all available translations for holiday. * - * @param string $shortName holiday short name + * @param string $key holiday key + + * * @return array holiday name translations ['' => '', ...] */ - public function getTranslations(string $shortName): array + public function getTranslations(string $key): array { - if (!\array_key_exists($shortName, $this->translations)) { + if (!\array_key_exists($key, $this->translations)) { return []; } - return $this->translations[$shortName]; + return $this->translations[$key]; } } diff --git a/src/Yasumi/TranslationsInterface.php b/src/Yasumi/TranslationsInterface.php index 250a7cc48..9675efd84 100644 --- a/src/Yasumi/TranslationsInterface.php +++ b/src/Yasumi/TranslationsInterface.php @@ -20,19 +20,19 @@ interface TranslationsInterface /** * Returns translation for holiday in specific locale. * - * @param string $shortName holiday short name + * @param string $key holiday key * @param string $locale locale * * @return string|null translated holiday name */ - public function getTranslation(string $shortName, string $locale): ?string; + public function getTranslation(string $key, string $locale): ?string; /** * Returns all available translations for holiday. * - * @param string $shortName holiday short name + * @param string $key holiday key * * @return array holiday name translations ['' => '', ...] */ - public function getTranslations(string $shortName): array; + public function getTranslations(string $key): array; } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index c1a4eec75..4e0953488 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -33,11 +33,11 @@ class HolidayTest extends TestCase use YasumiBase; /** - * Tests that an InvalidArgumentException is thrown in case an blank short name is given. + * Tests that an InvalidArgumentException is thrown in case a blank key is given. * * @throws Exception */ - public function testHolidayBlankNameInvalidArgumentException(): void + public function testHolidayBlankKeyInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -99,9 +99,9 @@ public function testHolidayGetLocales(): void $method = new \ReflectionMethod(Holiday::class, 'getLocales'); $method->setAccessible(true); - $this->assertEquals(['ca_ES_VALENCIA', 'ca_ES', 'ca', 'en_US', 'en', Holiday::LOCALE_SHORT_NAME], $method->invoke($holiday, null)); + $this->assertEquals(['ca_ES_VALENCIA', 'ca_ES', 'ca', 'en_US', 'en', Holiday::LOCALE_KEY], $method->invoke($holiday, null)); $this->assertEquals(['de_DE', 'de', 'es_ES', 'es'], $method->invoke($holiday, ['de_DE', 'es_ES'])); - $this->assertEquals(['de_DE', 'de', Holiday::LOCALE_SHORT_NAME], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_SHORT_NAME])); + $this->assertEquals(['de_DE', 'de', Holiday::LOCALE_KEY], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_KEY])); } /** @@ -181,8 +181,8 @@ public function testHolidayGetNameWithArgument(): void $this->assertEquals('Holiday NL', $holiday->getName(['nl'])); $this->assertEquals('Holiday NL', $holiday->getName(['nl_NL'])); $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT'])); - $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT', Holiday::LOCALE_SHORT_NAME])); - $this->assertEquals('testHoliday', $holiday->getName([Holiday::LOCALE_SHORT_NAME])); + $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT', Holiday::LOCALE_KEY])); + $this->assertEquals('testHoliday', $holiday->getName([Holiday::LOCALE_KEY])); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); $this->assertEquals('Holiday EN-US', $holiday->getName()); diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index cd1003503..3cb7922bb 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -68,7 +68,7 @@ public function testConstructor(): void $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), 'en_US', Holiday::TYPE_SEASON); $this->assertSame($holiday, $substitute->getSubstitutedHoliday()); - $this->assertEquals('substituteHoliday:testHoliday', $substitute->getShortName()); + $this->assertEquals('substituteHoliday:testHoliday', $substitute->getKey()); $this->assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); $this->assertEquals(new DateTime('2019-01-02'), $substitute); } diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 22715ce14..71f679230 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -39,21 +39,21 @@ public function testAddTranslation(): void $translations = new Translations(self::LOCALES); $locale = 'en_US'; - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $translation = 'New Year’s Day'; - $this->assertNull($translations->getTranslation($shortName, $locale)); - $this->assertEmpty($translations->getTranslations($shortName)); + $this->assertNull($translations->getTranslation($key, $locale)); + $this->assertEmpty($translations->getTranslations($key)); - $translations->addTranslation($shortName, $locale, $translation); + $translations->addTranslation($key, $locale, $translation); - $this->assertNotNull($translations->getTranslations($shortName)); - $this->assertNotEmpty($translations->getTranslations($shortName)); - $this->assertEquals([$locale => $translation], $translations->getTranslations($shortName)); + $this->assertNotNull($translations->getTranslations($key)); + $this->assertNotEmpty($translations->getTranslations($key)); + $this->assertEquals([$locale => $translation], $translations->getTranslations($key)); - $this->assertNotNull($translations->getTranslation($shortName, $locale)); - $this->assertIsString($translations->getTranslation($shortName, $locale)); - $this->assertEquals($translation, $translations->getTranslation($shortName, $locale)); + $this->assertNotNull($translations->getTranslation($key, $locale)); + $this->assertIsString($translations->getTranslation($key, $locale)); + $this->assertEquals($translation, $translations->getTranslation($key, $locale)); } /** @@ -64,49 +64,49 @@ public function testAddMultipleTranslations(): void $translations = new Translations(self::LOCALES); $firstLocale = 'en_US'; - $firstShortName = 'newYearsDay'; + $firstIdentifier = 'newYearsDay'; $firstTranslation = 'New Year’s Day'; - $translations->addTranslation($firstShortName, $firstLocale, $firstTranslation); + $translations->addTranslation($firstIdentifier, $firstLocale, $firstTranslation); - $this->assertNotNull($translations->getTranslations($firstShortName)); - $this->assertNotEmpty($translations->getTranslations($firstShortName)); - $this->assertEquals([$firstLocale => $firstTranslation], $translations->getTranslations($firstShortName)); + $this->assertNotNull($translations->getTranslations($firstIdentifier)); + $this->assertNotEmpty($translations->getTranslations($firstIdentifier)); + $this->assertEquals([$firstLocale => $firstTranslation], $translations->getTranslations($firstIdentifier)); - $this->assertNotNull($translations->getTranslation($firstShortName, $firstLocale)); - $this->assertIsString($translations->getTranslation($firstShortName, $firstLocale)); - $this->assertEquals($firstTranslation, $translations->getTranslation($firstShortName, $firstLocale)); + $this->assertNotNull($translations->getTranslation($firstIdentifier, $firstLocale)); + $this->assertIsString($translations->getTranslation($firstIdentifier, $firstLocale)); + $this->assertEquals($firstTranslation, $translations->getTranslation($firstIdentifier, $firstLocale)); $secondLocale = 'nl_NL'; - $secondShortName = 'easter'; + $secondIdentifier = 'easter'; $secondTranslation = 'Eerste paasdag'; - $translations->addTranslation($secondShortName, $secondLocale, $secondTranslation); + $translations->addTranslation($secondIdentifier, $secondLocale, $secondTranslation); - $this->assertNotNull($translations->getTranslations($secondShortName)); - $this->assertNotEmpty($translations->getTranslations($secondShortName)); - $this->assertEquals([$secondLocale => $secondTranslation], $translations->getTranslations($secondShortName)); + $this->assertNotNull($translations->getTranslations($secondIdentifier)); + $this->assertNotEmpty($translations->getTranslations($secondIdentifier)); + $this->assertEquals([$secondLocale => $secondTranslation], $translations->getTranslations($secondIdentifier)); - $this->assertNotNull($translations->getTranslation($secondShortName, $secondLocale)); - $this->assertIsString($translations->getTranslation($secondShortName, $secondLocale)); - $this->assertEquals($secondTranslation, $translations->getTranslation($secondShortName, $secondLocale)); + $this->assertNotNull($translations->getTranslation($secondIdentifier, $secondLocale)); + $this->assertIsString($translations->getTranslation($secondIdentifier, $secondLocale)); + $this->assertEquals($secondTranslation, $translations->getTranslation($secondIdentifier, $secondLocale)); $thirdLocale = 'en_US'; - $thirdShortName = 'easter'; + $thirdIdentifier = 'easter'; $thirdTranslation = 'Easter Sunday'; - $translations->addTranslation($thirdShortName, $thirdLocale, $thirdTranslation); + $translations->addTranslation($thirdIdentifier, $thirdLocale, $thirdTranslation); - $this->assertNotNull($translations->getTranslations($thirdShortName)); - $this->assertNotEmpty($translations->getTranslations($thirdShortName)); + $this->assertNotNull($translations->getTranslations($thirdIdentifier)); + $this->assertNotEmpty($translations->getTranslations($thirdIdentifier)); $this->assertEquals( [$thirdLocale => $thirdTranslation, $secondLocale => $secondTranslation], - $translations->getTranslations($thirdShortName) + $translations->getTranslations($thirdIdentifier) ); - $this->assertNotNull($translations->getTranslation($thirdShortName, $thirdLocale)); - $this->assertIsString($translations->getTranslation($thirdShortName, $thirdLocale)); - $this->assertEquals($thirdTranslation, $translations->getTranslation($thirdShortName, $thirdLocale)); + $this->assertNotNull($translations->getTranslation($thirdIdentifier, $thirdLocale)); + $this->assertIsString($translations->getTranslation($thirdIdentifier, $thirdLocale)); + $this->assertEquals($thirdTranslation, $translations->getTranslation($thirdIdentifier, $thirdLocale)); } /** @@ -120,10 +120,10 @@ public function testAddTranslationUnknownLocaleException(): void $translations = new Translations(self::LOCALES); $unknownLocale = 'en_XY'; - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $translation = 'New Year’s Day'; - $translations->addTranslation($shortName, $unknownLocale, $translation); + $translations->addTranslation($key, $unknownLocale, $translation); } /** @@ -134,15 +134,15 @@ public function testNoTranslationForUnknownHoliday(): void $translations = new Translations(self::LOCALES); $locale = 'en_US'; - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $translation = 'New Year’s Day'; - $unknownShortName = 'unknownHoliday'; + $unknownIdentifier = 'unknownHoliday'; - $translations->addTranslation($shortName, $locale, $translation); + $translations->addTranslation($key, $locale, $translation); - $this->assertNull($translations->getTranslation($unknownShortName, $locale)); - $this->assertEmpty($translations->getTranslations($unknownShortName)); + $this->assertNull($translations->getTranslation($unknownIdentifier, $locale)); + $this->assertEmpty($translations->getTranslations($unknownIdentifier)); } /** @@ -153,14 +153,14 @@ public function testNoTranslationForNotTranslatedLocale(): void $translations = new Translations(self::LOCALES); $locale = 'en_US'; - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $translation = 'New Year’s Day'; $unknownLocale = 'pl_PL'; - $translations->addTranslation($shortName, $locale, $translation); + $translations->addTranslation($key, $locale, $translation); - $this->assertNull($translations->getTranslation($shortName, $unknownLocale)); + $this->assertNull($translations->getTranslation($key, $unknownLocale)); } /** @@ -168,7 +168,7 @@ public function testNoTranslationForNotTranslatedLocale(): void */ public function testLoadingTranslationsFromDirectory(): void { - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $fileContents = <<<'FILE' [$shortName . '.php' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.php' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -186,10 +186,10 @@ public function testLoadingTranslationsFromDirectory(): void $locale = 'en_US'; $translation = 'New Year’s Day'; - $this->assertNotNull($translations->getTranslations($shortName)); - $this->assertNotEmpty($translations->getTranslations($shortName)); - $this->assertIsString($translations->getTranslation($shortName, $locale)); - $this->assertEquals($translation, $translations->getTranslation($shortName, $locale)); + $this->assertNotNull($translations->getTranslations($key)); + $this->assertNotEmpty($translations->getTranslations($key)); + $this->assertIsString($translations->getTranslation($key, $locale)); + $this->assertEquals($translation, $translations->getTranslation($key, $locale)); } /** @@ -197,7 +197,7 @@ public function testLoadingTranslationsFromDirectory(): void */ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void { - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $fileContents = <<<'FILE' [$shortName . '.translation' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.translation' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); - $this->assertNotNull($translations->getTranslations($shortName)); - $this->assertEmpty($translations->getTranslations($shortName)); + $this->assertNotNull($translations->getTranslations($key)); + $this->assertEmpty($translations->getTranslations($key)); } /** @@ -224,7 +224,7 @@ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException() { $this->expectException(UnknownLocaleException::class); - $shortName = 'newYearsDay'; + $key = 'newYearsDay'; $fileContents = <<<'FILE' [$shortName . '.php' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.php' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -258,7 +258,7 @@ public function testLoadingTranslationsFromInexistentDirectory(): void */ public function testLoadingMultipleTranslationsFromDirectory(): void { - $firstShortName = 'newYearsDay'; + $firstIdentifier = 'newYearsDay'; $firstFileContents = <<<'FILE' [ - $firstShortName . '.php' => $firstFileContents, - $secondShortName . '.php' => $secondFileContents, + $firstIdentifier . '.php' => $firstFileContents, + $secondIdentifier . '.php' => $secondFileContents, ], ]); @@ -291,17 +291,17 @@ public function testLoadingMultipleTranslationsFromDirectory(): void $locale = 'en_US'; $translation = 'New Year’s Day'; - $this->assertNotNull($translations->getTranslations($firstShortName)); - $this->assertNotEmpty($translations->getTranslations($firstShortName)); - $this->assertIsString($translations->getTranslation($firstShortName, $locale)); - $this->assertEquals($translation, $translations->getTranslation($firstShortName, $locale)); + $this->assertNotNull($translations->getTranslations($firstIdentifier)); + $this->assertNotEmpty($translations->getTranslations($firstIdentifier)); + $this->assertIsString($translations->getTranslation($firstIdentifier, $locale)); + $this->assertEquals($translation, $translations->getTranslation($firstIdentifier, $locale)); $locale = 'nl_NL'; $translation = 'Eerste Paasdag'; - $this->assertNotNull($translations->getTranslations($secondShortName)); - $this->assertNotEmpty($translations->getTranslations($secondShortName)); - $this->assertIsString($translations->getTranslation($secondShortName, $locale)); - $this->assertEquals($translation, $translations->getTranslation($secondShortName, $locale)); + $this->assertNotNull($translations->getTranslations($secondIdentifier)); + $this->assertNotEmpty($translations->getTranslations($secondIdentifier)); + $this->assertIsString($translations->getTranslation($secondIdentifier, $locale)); + $this->assertEquals($translation, $translations->getTranslation($secondIdentifier, $locale)); } } diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 6472363f9..223901661 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -35,10 +35,10 @@ class TypographyTest extends TestCase * * @param string $name The localized holiday name * @param string $class The provider - * @param string $shortName The short name (internal name) of the holiday + * @param string $key The holiday key * @param string $locale The locale */ - public function testTranslations($name, $class, $shortName, $locale): void + public function testTranslations($name, $class, $key, $locale): void { $this->assertStringNotContainsString("'", $name, 'Translation contains typewriter apostrophe'); $this->assertStringNotContainsString('"', $name, 'Translation contains typewriter quote'); @@ -59,7 +59,7 @@ public function translationProvider(): array foreach ($provider->getHolidays() as $holiday) { foreach ($holiday->translations as $locale => $name) { - $tests[$name] = [$name, $class, $holiday->getShortName(), $locale]; + $tests[$name] = [$name, $class, $holiday->getKey(), $locale]; } } } diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 68225d0a0..07a340132 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -185,7 +185,7 @@ public function testNext(): void * * @throws ReflectionException */ - public function testNextWithBlankName(): void + public function testNextWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -223,7 +223,7 @@ public function testPrevious(): void * * @throws ReflectionException */ - public function testPreviousWithBlankName(): void + public function testPreviousWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -263,11 +263,11 @@ public function testWhenIs(): void } /** - * Tests that the WhenIs function throws an InvalidArgumentException when a blank name is given. + * Tests that the WhenIs function throws an InvalidArgumentException when a blank key is given. * * @throws ReflectionException */ - public function testWhenIsWithBlankName(): void + public function testWhenIsWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -280,7 +280,7 @@ public function testWhenIsWithBlankName(): void * * @throws ReflectionException */ - public function testGetHolidayWithBlankName(): void + public function testGetHolidayWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -307,7 +307,7 @@ public function testWhatWeekDayIs(): void * * @throws ReflectionException */ - public function testWhatWeekDayIsWithBlankName(): void + public function testWhatWeekDayIsWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Japan/JapanBaseTestCase.php b/tests/Japan/JapanBaseTestCase.php index d3049aacf..0b444c771 100644 --- a/tests/Japan/JapanBaseTestCase.php +++ b/tests/Japan/JapanBaseTestCase.php @@ -33,7 +33,7 @@ abstract class JapanBaseTestCase extends TestCase public const TIMEZONE = 'Asia/Tokyo'; /** - * Prefix for short name used when holiday is substituted + * Prefix for holiday key used when holiday is substituted */ public const SUBSTITUTE_PREFIX = 'substituteHoliday:'; diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 5fa7c5f94..768b7c70a 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -59,7 +59,7 @@ public function testSaturdaySubstitution(): void * 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 string $key string the key of the holiday to be checked against * @param int $year holiday calendar year * @param DateTime $expectedOfficial the official date to be checked against * @param DateTime $expectedSubstitution the substituted date to be checked against @@ -73,21 +73,21 @@ public function testSaturdaySubstitution(): void */ public function assertHolidayWithSubstitution( string $provider, - string $shortName, + string $key, int $year, DateTime $expectedOfficial, DateTime $expectedSubstitution = null ): void { $holidays = Yasumi::create($provider, $year); - $holidayOfficial = $holidays->getHoliday($shortName); + $holidayOfficial = $holidays->getHoliday($key); $this->assertInstanceOf(Holiday::class, $holidayOfficial); $this->assertNotNull($holidayOfficial); $this->assertEquals($expectedOfficial, $holidayOfficial); $this->assertTrue($holidays->isHoliday($holidayOfficial)); $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); - $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->getShortName()); + $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->getKey()); if ($expectedSubstitution === null) { // without substitution $this->assertNull($holidaySubstitution); diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 3ecfc9993..65f5ad634 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -91,7 +91,7 @@ public function assertDefinedHolidays( * 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 string $key string the key of the holiday to be checked against * @param int $year holiday calendar year * @param DateTime $expected the date to be checked against * @@ -104,12 +104,12 @@ public function assertDefinedHolidays( */ public function assertHoliday( string $provider, - string $shortName, + string $key, int $year, DateTime $expected ): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($key); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertEquals($expected, $holiday); @@ -120,7 +120,7 @@ public function assertHoliday( * Asserts that the expected date is indeed a substitute 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 substituted holiday to be checked against + * @param string $key string the key of the substituted holiday to be checked against * @param int $year holiday calendar year * @param DateTime $expected the date to be checked against * @@ -133,12 +133,12 @@ public function assertHoliday( */ public function assertSubstituteHoliday( string $provider, - string $shortName, + string $key, int $year, DateTime $expected ): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday('substituteHoliday:' . $shortName); + $holiday = $holidays->getHoliday('substituteHoliday:' . $key); $this->assertInstanceOf(SubstituteHoliday::class, $holiday); $this->assertEquals($expected, $holiday); @@ -149,7 +149,7 @@ public function assertSubstituteHoliday( * Asserts that the given substitute 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 $shortName the short name of the substituted holiday to be checked against + * @param string $key the key of the substituted holiday to be checked against * @param int $year holiday calendar year * * @throws InvalidArgumentException @@ -161,12 +161,12 @@ public function assertSubstituteHoliday( */ public function assertNotSubstituteHoliday( string $provider, - string $shortName, + string $key, int $year ): void { $this->assertNotHoliday( $provider, - 'substituteHoliday:' . $shortName, + 'substituteHoliday:' . $key, $year ); } @@ -175,7 +175,7 @@ public function assertNotSubstituteHoliday( * 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 $shortName the short name of the holiday to be checked against + * @param string $key the key of the holiday to be checked against * @param int $year holiday calendar year * * @throws InvalidArgumentException @@ -187,11 +187,11 @@ public function assertNotSubstituteHoliday( */ public function assertNotHoliday( string $provider, - string $shortName, + string $key, int $year ): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($key); $this->assertNull($holiday); } @@ -200,7 +200,7 @@ public function assertNotHoliday( * 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 string $key string the key of the holiday to be checked against * @param int $year holiday calendar year * @param array $translations the translations to be checked against * @@ -212,12 +212,12 @@ public function assertNotHoliday( */ public function assertTranslatedHolidayName( string $provider, - string $shortName, + string $key, int $year, array $translations ): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($key); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertTrue($holidays->isHoliday($holiday)); @@ -248,7 +248,7 @@ public function assertTranslatedHolidayName( * 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 $shortName string the short name of the holiday to be checked against + * @param string $key string the key of the holiday to be checked against * @param int $year holiday calendar year * @param string $type the type to be checked against * @@ -260,12 +260,12 @@ public function assertTranslatedHolidayName( */ public function assertHolidayType( string $provider, - string $shortName, + string $key, int $year, string $type ): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($key); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertEquals($type, $holiday->getType()); @@ -276,7 +276,7 @@ public function assertHolidayType( * * @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 string $key string the key 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.) * @@ -288,12 +288,12 @@ public function assertHolidayType( */ public function assertDayOfWeek( string $provider, - string $shortName, + string $key, int $year, string $expectedDayOfWeek ): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($key); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertTrue($holidays->isHoliday($holiday)); From 5fe86cd4f97ee7175eef6a77f61fc5b3d06c7a99 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:43:39 +0900 Subject: [PATCH 102/687] Make method compatible with its super. Signed-off-by: Sacha Telgenhof --- src/Yasumi/SubstituteHoliday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 660e2fc20..f7abfc1a1 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -103,7 +103,7 @@ public function getSubstitutedHoliday(): Holiday * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY */ - public function getName($locales = null): string + public function getName(array $locales = null): string { $name = parent::getName(); From 6f34594fa3744b4907e3fa056a0f714e40843685 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:44:58 +0900 Subject: [PATCH 103/687] Added missing return tag. Signed-off-by: Sacha Telgenhof --- src/Yasumi/SubstituteHoliday.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index f7abfc1a1..9646086f2 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -98,6 +98,7 @@ public function getSubstitutedHoliday(): Holiday * * @param array $locales The locales to search for translations * + * @return string * @throws MissingTranslationException * * @see Holiday::DEFAULT_LOCALE From 90c92e1ba9cfaf1bec5229c2c10b67bea24935c6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:47:39 +0900 Subject: [PATCH 104/687] Removed unnecessary method (is same as the parent). Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Canada/Nunavut.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/Yasumi/Provider/Canada/Nunavut.php b/src/Yasumi/Provider/Canada/Nunavut.php index 9c5177774..2163e4fb4 100644 --- a/src/Yasumi/Provider/Canada/Nunavut.php +++ b/src/Yasumi/Provider/Canada/Nunavut.php @@ -52,27 +52,4 @@ public function initialize(): void $this->calculateVictoriaDay(); } - /** - * Civic Holiday. - * - * @link https://en.wikipedia.org/wiki/Civic_Holiday - * - * @throws InvalidDateException - * @throws \InvalidArgumentException - * @throws UnknownLocaleException - * @throws \Exception - */ - protected function calculateCivicHoliday(): void - { - if ($this->year < 1879) { - return; - } - - $this->addHoliday(new Holiday( - 'civicHoliday', - [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); - } } From 8d06d92086b8a11ebe77d17645e48d8eba0136b6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:48:12 +0900 Subject: [PATCH 105/687] CS Fixes. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Canada/Nunavut.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Yasumi/Provider/Canada/Nunavut.php b/src/Yasumi/Provider/Canada/Nunavut.php index 2163e4fb4..2ee1c70b4 100644 --- a/src/Yasumi/Provider/Canada/Nunavut.php +++ b/src/Yasumi/Provider/Canada/Nunavut.php @@ -12,12 +12,10 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Canada; -use Yasumi\Provider\DateTimeZoneFactory; /** * Provider for all holidays in Nunavut (Canada). @@ -51,5 +49,4 @@ public function initialize(): void $this->calculateCivicHoliday(); $this->calculateVictoriaDay(); } - } From 55e220651b0127ce6dde453897acdda344fbb7cc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:51:22 +0900 Subject: [PATCH 106/687] Fixed the test to ensure the type isn't tested before the establishment year. Signed-off-by: Sacha Telgenhof --- tests/Lithuania/AllSoulsDayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index 900cec508..548ff74a2 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -82,6 +82,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(Lithuania::ALL_SOULS_DAY), Holiday::TYPE_OFFICIAL); } } From 7c2839eb4af9d126569b42371269cde6e07c4329 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:54:10 +0900 Subject: [PATCH 107/687] Fixed the test to ensure National Patriots Day isn't tested before the establishment year. Signed-off-by: Sacha Telgenhof --- tests/Canada/Quebec/QuebecTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index f97f3d1f0..6a616485d 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -31,12 +31,17 @@ class QuebecTest extends QuebecBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'saintJeanBaptisteDay', - 'nationalPatriotsDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2003) { + $holidays[] = 'nationalPatriotsDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From b950aab0c44f40397b6669911ed1054c6d7971da Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 20:58:36 +0900 Subject: [PATCH 108/687] Fixed the test to ensure the translation isn't tested before the establishment year. Signed-off-by: Sacha Telgenhof --- tests/Lithuania/AllSoulsDayTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index 548ff74a2..c4bd08e86 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -71,7 +71,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $this->generateRandomYear(Lithuania::ALL_SOULS_DAY), [self::LOCALE => 'Vėlinės'] ); } @@ -82,6 +82,11 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(Lithuania::ALL_SOULS_DAY), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Lithuania::ALL_SOULS_DAY), + Holiday::TYPE_OFFICIAL + ); } } From d867c554fc4d37bc018f44361128f134b5c8de43 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 21:01:52 +0900 Subject: [PATCH 109/687] Fixed the test to ensure Yukon Heritage Day isn't tested before the establishment year. Signed-off-by: Sacha Telgenhof --- tests/Canada/Yukon/YukonTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index c4bd2040e..86649146c 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -31,14 +31,19 @@ class YukonTest extends YukonBaseTestCase */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'discoveryDay', 'victoriaDay', - 'yukonHeritageDay', 'nationalIndigenousPeoplesDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2009 < $this->year) { + $holidays[] = 'yukonHeritageDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From c52d5d6d4594fae0c3acbfe16a4dfb77f8636871 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 21:07:33 +0900 Subject: [PATCH 110/687] Added missing return type. Signed-off-by: Sacha Telgenhof --- tests/Germany/NewYearsEveTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index 02806514e..27e12ce92 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -38,7 +38,7 @@ class NewYearsEveTest extends GermanyBaseTestCase implements YasumiTestCaseInter * * @throws ReflectionException */ - public function testHoliday($year, $expected) + public function testHoliday($year, $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } From 911fb1cfa34cc604564cfa12a416f37086fe0948 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 17 Jun 2020 22:27:00 +0900 Subject: [PATCH 111/687] Grouped some related changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b78399612..e58fab8bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added -- Added All Souls Day to Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) -- Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) -- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) +- Added All Souls Day to Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) +- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) +- Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) - Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) From 5159e096eaa3982f662a2f1e40f0f35e2f260c08 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 22 Jun 2020 21:16:21 +0900 Subject: [PATCH 112/687] Added contributor Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e58fab8bf..11b76b1ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) -- Added All Souls Day to Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) +- Added All Souls Day to Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) ([norkunas](https://github.com/norkunas)) - Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) From 15a9fc929ad474fa07609dc41f6970d05e92ab8e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 22 Jun 2020 21:27:52 +0900 Subject: [PATCH 113/687] Fixed the test to ensure Discovery Day, Victoria Day and National Indigenous Peoples Day aren't tested before their establishment year. Signed-off-by: Sacha Telgenhof --- tests/Canada/Yukon/YukonTest.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index 86649146c..38087b833 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -34,15 +34,24 @@ public function testOfficialHolidays(): void $holidays = [ 'goodFriday', 'christmasDay', - 'discoveryDay', - 'victoriaDay', - 'nationalIndigenousPeoplesDay', ]; if (2009 < $this->year) { $holidays[] = 'yukonHeritageDay'; } + if (1996 >= $this->year) { + $holidays[] = 'nationalIndigenousPeoplesDay'; + } + + if (1897 >= $this->year) { + $holidays[] = 'discoveryDay'; + } + + if (1845 >= $this->year) { + $holidays[] = 'victoriaDay'; + } + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } From c65129447db7d4affb6c07d3b15aa99bf063fccb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 22 Jun 2020 21:39:47 +0900 Subject: [PATCH 114/687] Added test suites for Canada and Luxembourg Signed-off-by: Sacha Telgenhof --- phpunit.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpunit.xml b/phpunit.xml index aa3aca34c..32b98f5f3 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -58,6 +58,11 @@ ./tests/Brazil + + + ./tests/Canada + + ./tests/Croatia @@ -128,6 +133,11 @@ ./tests/Lithuania + + + ./tests/Luxembourg + + ./tests/Netherlands From ca6bf0b022f8bbc120dd7d728c9db8f1446afe6c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 22 Jun 2020 21:42:40 +0900 Subject: [PATCH 115/687] Updated Changelog: 2.3.0 Release Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b76b1ef..81669631d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] +### Added + +### Changed + +### Fixed + +### Deprecated + +### Removed + + +## [2.3.0] - 2020-06-22 + ### Added - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) @@ -13,7 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) - Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) -- Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) +- Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) ([Patrick-Root](https://github.com/Patrick-Root)) - Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). - Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) From 61ce4d89a792d8fb8f23c834373310c6c6cd720a Mon Sep 17 00:00:00 2001 From: reijovosu Date: Tue, 23 Jun 2020 02:33:47 +0300 Subject: [PATCH 116/687] Fixing typo for Estonian Day of Restoration of Independence (#228) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Source: https://et.wikipedia.org/wiki/Taasiseseisvumispäev --- src/Yasumi/Provider/Estonia.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index b375144b3..6809cd7dd 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -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' => 'Taasiseseisvumispäev', ], new \DateTime("{$this->year}-08-20", new \DateTimeZone($this->timezone)))); } } From 1d129ec66eb67b0e4d5123b6d48d9e49a4ecdc5a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 10 Sep 2020 09:10:44 +0900 Subject: [PATCH 117/687] Static functions should not be called as if they are object functions. Signed-off-by: Sacha Telgenhof --- tests/Base/HolidayBetweenFilterTest.php | 438 +++++++++--------- tests/Base/HolidayFiltersTest.php | 230 ++++----- tests/Base/HolidayOnFilterTest.php | 10 +- tests/Base/HolidayTest.php | 94 ++-- tests/Base/SubstituteHolidayTest.php | 68 +-- tests/Base/TranslationsTest.php | 86 ++-- tests/Base/TypographyTest.php | 4 +- tests/Base/WeekendTest.php | 8 +- tests/Base/YasumiTest.php | 158 +++---- tests/Base/YasumiWorkdayTest.php | 28 +- tests/Finland/stJohnsDayTest.php | 10 +- .../Saxony/RepentanceAndPrayerDayTest.php | 6 +- tests/Sweden/StJohnsDayTest.php | 10 +- tests/Sweden/StJohnsEveTest.php | 10 +- tests/USA/VeteransDayTest.php | 4 +- tests/Ukraine/CatholicChristmasDayTest.php | 2 +- .../SecondInternationalWorkersDayTest.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 26 +- tests/YasumiBase.php | 34 +- 19 files changed, 614 insertions(+), 614 deletions(-) diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index 7a9b0b02b..02035d349 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -49,41 +49,41 @@ public function testHolidaysBetweenDateRange(): void $betweenHolidays = \iterator_to_array($between); - $this->assertArrayHasKey('goodFriday', $betweenHolidays); - $this->assertArrayHasKey('easter', $betweenHolidays); - $this->assertArrayHasKey('summerTime', $betweenHolidays); - $this->assertArrayHasKey('easterMonday', $betweenHolidays); - $this->assertArrayHasKey('kingsDay', $betweenHolidays); - $this->assertArrayHasKey('internationalWorkersDay', $betweenHolidays); - $this->assertArrayHasKey('commemorationDay', $betweenHolidays); - $this->assertArrayHasKey('ascensionDay', $betweenHolidays); - $this->assertArrayHasKey('liberationDay', $betweenHolidays); - $this->assertArrayHasKey('mothersDay', $betweenHolidays); - $this->assertArrayHasKey('pentecost', $betweenHolidays); - $this->assertArrayHasKey('pentecostMonday', $betweenHolidays); - $this->assertArrayHasKey('fathersDay', $betweenHolidays); - - $this->assertArrayNotHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayNotHasKey('epiphany', $betweenHolidays); - $this->assertArrayNotHasKey('carnivalDay', $betweenHolidays); - $this->assertArrayNotHasKey('secondCarnivalDay', $betweenHolidays); - $this->assertArrayNotHasKey('thirdCarnivalDay', $betweenHolidays); - $this->assertArrayNotHasKey('ashWednesday', $betweenHolidays); - $this->assertArrayNotHasKey('valentinesDay', $betweenHolidays); - $this->assertArrayNotHasKey('princesDay', $betweenHolidays); - $this->assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); - $this->assertArrayNotHasKey('winterTime', $betweenHolidays); - $this->assertArrayNotHasKey('halloween', $betweenHolidays); - $this->assertArrayNotHasKey('stMartinsDay', $betweenHolidays); - $this->assertArrayNotHasKey('stNicholasDay', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - - $this->assertCount(13, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(13, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('goodFriday', $betweenHolidays); + self::assertArrayHasKey('easter', $betweenHolidays); + self::assertArrayHasKey('summerTime', $betweenHolidays); + self::assertArrayHasKey('easterMonday', $betweenHolidays); + self::assertArrayHasKey('kingsDay', $betweenHolidays); + self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); + self::assertArrayHasKey('commemorationDay', $betweenHolidays); + self::assertArrayHasKey('ascensionDay', $betweenHolidays); + self::assertArrayHasKey('liberationDay', $betweenHolidays); + self::assertArrayHasKey('mothersDay', $betweenHolidays); + self::assertArrayHasKey('pentecost', $betweenHolidays); + self::assertArrayHasKey('pentecostMonday', $betweenHolidays); + self::assertArrayHasKey('fathersDay', $betweenHolidays); + + self::assertArrayNotHasKey('newYearsDay', $betweenHolidays); + self::assertArrayNotHasKey('epiphany', $betweenHolidays); + self::assertArrayNotHasKey('carnivalDay', $betweenHolidays); + self::assertArrayNotHasKey('secondCarnivalDay', $betweenHolidays); + self::assertArrayNotHasKey('thirdCarnivalDay', $betweenHolidays); + self::assertArrayNotHasKey('ashWednesday', $betweenHolidays); + self::assertArrayNotHasKey('valentinesDay', $betweenHolidays); + self::assertArrayNotHasKey('princesDay', $betweenHolidays); + self::assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); + self::assertArrayNotHasKey('winterTime', $betweenHolidays); + self::assertArrayNotHasKey('halloween', $betweenHolidays); + self::assertArrayNotHasKey('stMartinsDay', $betweenHolidays); + self::assertArrayNotHasKey('stNicholasDay', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); + + self::assertCount(13, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(13, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -104,41 +104,41 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void $betweenHolidays = \iterator_to_array($between); - $this->assertArrayHasKey('goodFriday', $betweenHolidays); - $this->assertArrayHasKey('easter', $betweenHolidays); - $this->assertArrayHasKey('summerTime', $betweenHolidays); - $this->assertArrayHasKey('easterMonday', $betweenHolidays); - $this->assertArrayHasKey('kingsDay', $betweenHolidays); - $this->assertArrayHasKey('internationalWorkersDay', $betweenHolidays); - $this->assertArrayHasKey('commemorationDay', $betweenHolidays); - $this->assertArrayHasKey('ascensionDay', $betweenHolidays); - $this->assertArrayHasKey('liberationDay', $betweenHolidays); - $this->assertArrayHasKey('mothersDay', $betweenHolidays); - $this->assertArrayHasKey('pentecost', $betweenHolidays); - $this->assertArrayHasKey('pentecostMonday', $betweenHolidays); - $this->assertArrayHasKey('fathersDay', $betweenHolidays); - - $this->assertArrayNotHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayNotHasKey('epiphany', $betweenHolidays); - $this->assertArrayNotHasKey('carnivalDay', $betweenHolidays); - $this->assertArrayNotHasKey('secondCarnivalDay', $betweenHolidays); - $this->assertArrayNotHasKey('thirdCarnivalDay', $betweenHolidays); - $this->assertArrayNotHasKey('ashWednesday', $betweenHolidays); - $this->assertArrayNotHasKey('valentinesDay', $betweenHolidays); - $this->assertArrayNotHasKey('princesDay', $betweenHolidays); - $this->assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); - $this->assertArrayNotHasKey('winterTime', $betweenHolidays); - $this->assertArrayNotHasKey('halloween', $betweenHolidays); - $this->assertArrayNotHasKey('stMartinsDay', $betweenHolidays); - $this->assertArrayNotHasKey('stNicholasDay', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - - $this->assertCount(13, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(13, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('goodFriday', $betweenHolidays); + self::assertArrayHasKey('easter', $betweenHolidays); + self::assertArrayHasKey('summerTime', $betweenHolidays); + self::assertArrayHasKey('easterMonday', $betweenHolidays); + self::assertArrayHasKey('kingsDay', $betweenHolidays); + self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); + self::assertArrayHasKey('commemorationDay', $betweenHolidays); + self::assertArrayHasKey('ascensionDay', $betweenHolidays); + self::assertArrayHasKey('liberationDay', $betweenHolidays); + self::assertArrayHasKey('mothersDay', $betweenHolidays); + self::assertArrayHasKey('pentecost', $betweenHolidays); + self::assertArrayHasKey('pentecostMonday', $betweenHolidays); + self::assertArrayHasKey('fathersDay', $betweenHolidays); + + self::assertArrayNotHasKey('newYearsDay', $betweenHolidays); + self::assertArrayNotHasKey('epiphany', $betweenHolidays); + self::assertArrayNotHasKey('carnivalDay', $betweenHolidays); + self::assertArrayNotHasKey('secondCarnivalDay', $betweenHolidays); + self::assertArrayNotHasKey('thirdCarnivalDay', $betweenHolidays); + self::assertArrayNotHasKey('ashWednesday', $betweenHolidays); + self::assertArrayNotHasKey('valentinesDay', $betweenHolidays); + self::assertArrayNotHasKey('princesDay', $betweenHolidays); + self::assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); + self::assertArrayNotHasKey('winterTime', $betweenHolidays); + self::assertArrayNotHasKey('halloween', $betweenHolidays); + self::assertArrayNotHasKey('stMartinsDay', $betweenHolidays); + self::assertArrayNotHasKey('stNicholasDay', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); + + self::assertCount(13, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(13, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -158,13 +158,13 @@ public function testHolidaysBetweenDateRangeDifferentTimezone(): void new DateTime('01/01/2016', new DateTimeZone($timezone)), new DateTime('01/01/2016', new DateTimeZone($timezone)) ); - $this->assertCount(1, $between); + self::assertCount(1, $between); $between = $holidays->between( new DateTime('01/01/2016 23:59:59', new DateTimeZone($timezone)), new DateTime('01/01/2016 23:59:59', new DateTimeZone($timezone)) ); - $this->assertCount(1, $between); + self::assertCount(1, $between); } } @@ -187,41 +187,41 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void $betweenHolidays = \iterator_to_array($between); - $this->assertArrayHasKey('epiphany', $betweenHolidays); - $this->assertArrayHasKey('carnivalDay', $betweenHolidays); - $this->assertArrayHasKey('secondCarnivalDay', $betweenHolidays); - $this->assertArrayHasKey('thirdCarnivalDay', $betweenHolidays); - $this->assertArrayHasKey('ashWednesday', $betweenHolidays); - $this->assertArrayHasKey('valentinesDay', $betweenHolidays); - $this->assertArrayHasKey('goodFriday', $betweenHolidays); - $this->assertArrayHasKey('easter', $betweenHolidays); - $this->assertArrayHasKey('summerTime', $betweenHolidays); - $this->assertArrayHasKey('easterMonday', $betweenHolidays); - $this->assertArrayHasKey('kingsDay', $betweenHolidays); - $this->assertArrayHasKey('internationalWorkersDay', $betweenHolidays); - $this->assertArrayHasKey('commemorationDay', $betweenHolidays); - $this->assertArrayHasKey('ascensionDay', $betweenHolidays); - $this->assertArrayHasKey('liberationDay', $betweenHolidays); - $this->assertArrayHasKey('mothersDay', $betweenHolidays); - $this->assertArrayHasKey('pentecost', $betweenHolidays); - $this->assertArrayHasKey('pentecostMonday', $betweenHolidays); - $this->assertArrayHasKey('fathersDay', $betweenHolidays); - - $this->assertArrayNotHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayNotHasKey('princesDay', $betweenHolidays); - $this->assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); - $this->assertArrayNotHasKey('winterTime', $betweenHolidays); - $this->assertArrayNotHasKey('halloween', $betweenHolidays); - $this->assertArrayNotHasKey('stMartinsDay', $betweenHolidays); - $this->assertArrayNotHasKey('stNicholasDay', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - - $this->assertCount(19, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(19, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('epiphany', $betweenHolidays); + self::assertArrayHasKey('carnivalDay', $betweenHolidays); + self::assertArrayHasKey('secondCarnivalDay', $betweenHolidays); + self::assertArrayHasKey('thirdCarnivalDay', $betweenHolidays); + self::assertArrayHasKey('ashWednesday', $betweenHolidays); + self::assertArrayHasKey('valentinesDay', $betweenHolidays); + self::assertArrayHasKey('goodFriday', $betweenHolidays); + self::assertArrayHasKey('easter', $betweenHolidays); + self::assertArrayHasKey('summerTime', $betweenHolidays); + self::assertArrayHasKey('easterMonday', $betweenHolidays); + self::assertArrayHasKey('kingsDay', $betweenHolidays); + self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); + self::assertArrayHasKey('commemorationDay', $betweenHolidays); + self::assertArrayHasKey('ascensionDay', $betweenHolidays); + self::assertArrayHasKey('liberationDay', $betweenHolidays); + self::assertArrayHasKey('mothersDay', $betweenHolidays); + self::assertArrayHasKey('pentecost', $betweenHolidays); + self::assertArrayHasKey('pentecostMonday', $betweenHolidays); + self::assertArrayHasKey('fathersDay', $betweenHolidays); + + self::assertArrayNotHasKey('newYearsDay', $betweenHolidays); + self::assertArrayNotHasKey('princesDay', $betweenHolidays); + self::assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); + self::assertArrayNotHasKey('winterTime', $betweenHolidays); + self::assertArrayNotHasKey('halloween', $betweenHolidays); + self::assertArrayNotHasKey('stMartinsDay', $betweenHolidays); + self::assertArrayNotHasKey('stNicholasDay', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); + + self::assertCount(19, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(19, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -243,25 +243,25 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void $betweenHolidays = \iterator_to_array($between); - $this->assertArrayHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayHasKey('maundyThursday', $betweenHolidays); - $this->assertArrayHasKey('goodFriday', $betweenHolidays); - $this->assertArrayHasKey('easter', $betweenHolidays); - $this->assertArrayHasKey('easterMonday', $betweenHolidays); - $this->assertArrayHasKey('internationalWorkersDay', $betweenHolidays); - $this->assertArrayHasKey('ascensionDay', $betweenHolidays); - $this->assertArrayHasKey('constitutionDay', $betweenHolidays); - - $this->assertArrayNotHasKey('pentecost', $betweenHolidays); - $this->assertArrayNotHasKey('pentecostMonday', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - - $this->assertCount(8, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(8, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('newYearsDay', $betweenHolidays); + self::assertArrayHasKey('maundyThursday', $betweenHolidays); + self::assertArrayHasKey('goodFriday', $betweenHolidays); + self::assertArrayHasKey('easter', $betweenHolidays); + self::assertArrayHasKey('easterMonday', $betweenHolidays); + self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); + self::assertArrayHasKey('ascensionDay', $betweenHolidays); + self::assertArrayHasKey('constitutionDay', $betweenHolidays); + + self::assertArrayNotHasKey('pentecost', $betweenHolidays); + self::assertArrayNotHasKey('pentecostMonday', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); + + self::assertCount(8, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(8, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -283,25 +283,25 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void $betweenHolidays = \iterator_to_array($between); - $this->assertArrayNotHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayNotHasKey('epiphany', $betweenHolidays); - - $this->assertArrayHasKey('easter', $betweenHolidays); - $this->assertArrayHasKey('easterMonday', $betweenHolidays); - $this->assertArrayHasKey('liberationDay', $betweenHolidays); - $this->assertArrayHasKey('internationalWorkersDay', $betweenHolidays); - $this->assertArrayHasKey('republicDay', $betweenHolidays); - $this->assertArrayHasKey('assumptionOfMary', $betweenHolidays); - $this->assertArrayHasKey('allSaintsDay', $betweenHolidays); - $this->assertArrayHasKey('immaculateConception', $betweenHolidays); - $this->assertArrayHasKey('christmasDay', $betweenHolidays); - $this->assertArrayHasKey('stStephensDay', $betweenHolidays); - - $this->assertCount(10, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(10, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayNotHasKey('newYearsDay', $betweenHolidays); + self::assertArrayNotHasKey('epiphany', $betweenHolidays); + + self::assertArrayHasKey('easter', $betweenHolidays); + self::assertArrayHasKey('easterMonday', $betweenHolidays); + self::assertArrayHasKey('liberationDay', $betweenHolidays); + self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); + self::assertArrayHasKey('republicDay', $betweenHolidays); + self::assertArrayHasKey('assumptionOfMary', $betweenHolidays); + self::assertArrayHasKey('allSaintsDay', $betweenHolidays); + self::assertArrayHasKey('immaculateConception', $betweenHolidays); + self::assertArrayHasKey('christmasDay', $betweenHolidays); + self::assertArrayHasKey('stStephensDay', $betweenHolidays); + + self::assertCount(10, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(10, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -347,22 +347,22 @@ public function testCountBetweenWithSubstitutes(): void $betweenHolidays = \iterator_to_array($between); // Assert array definitions - $this->assertArrayHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayHasKey('stPatricksDay', $betweenHolidays); - $this->assertArrayHasKey('easter', $betweenHolidays); - $this->assertArrayHasKey('easterMonday', $betweenHolidays); - $this->assertArrayHasKey('mayDay', $betweenHolidays); - $this->assertArrayHasKey('juneHoliday', $betweenHolidays); - $this->assertArrayHasKey('augustHoliday', $betweenHolidays); - $this->assertArrayHasKey('octoberHoliday', $betweenHolidays); - $this->assertArrayHasKey('christmasDay', $betweenHolidays); - $this->assertArrayHasKey('stStephensDay', $betweenHolidays); - $this->assertArrayHasKey('pentecost', $betweenHolidays); - $this->assertArrayHasKey('goodFriday', $betweenHolidays); - $this->assertArrayNotHasKey('pentecostMonday', $betweenHolidays); - - $this->assertCount(12, $between); - $this->assertEquals(12, $between->count()); + self::assertArrayHasKey('newYearsDay', $betweenHolidays); + self::assertArrayHasKey('stPatricksDay', $betweenHolidays); + self::assertArrayHasKey('easter', $betweenHolidays); + self::assertArrayHasKey('easterMonday', $betweenHolidays); + self::assertArrayHasKey('mayDay', $betweenHolidays); + self::assertArrayHasKey('juneHoliday', $betweenHolidays); + self::assertArrayHasKey('augustHoliday', $betweenHolidays); + self::assertArrayHasKey('octoberHoliday', $betweenHolidays); + self::assertArrayHasKey('christmasDay', $betweenHolidays); + self::assertArrayHasKey('stStephensDay', $betweenHolidays); + self::assertArrayHasKey('pentecost', $betweenHolidays); + self::assertArrayHasKey('goodFriday', $betweenHolidays); + self::assertArrayNotHasKey('pentecostMonday', $betweenHolidays); + + self::assertCount(12, $between); + self::assertEquals(12, $between->count()); } /** @@ -388,25 +388,25 @@ public function testCountBetweenExcludingSubstituteHoliday(): void $betweenHolidays = \iterator_to_array($between); // Assert array definitions - $this->assertArrayHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayHasKey('stPatricksDay', $betweenHolidays); - $this->assertArrayNotHasKey('mayDay', $betweenHolidays); - $this->assertArrayNotHasKey('juneHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('augustHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('octoberHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('stStephensDay', $betweenHolidays); - $this->assertArrayNotHasKey('pentecost', $betweenHolidays); - $this->assertArrayNotHasKey('goodFriday', $betweenHolidays); - $this->assertArrayNotHasKey('easter', $betweenHolidays); - $this->assertArrayNotHasKey('easterMonday', $betweenHolidays); - $this->assertArrayNotHasKey('pentecostMonday', $betweenHolidays); - - $this->assertCount(2, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(2, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('newYearsDay', $betweenHolidays); + self::assertArrayHasKey('stPatricksDay', $betweenHolidays); + self::assertArrayNotHasKey('mayDay', $betweenHolidays); + self::assertArrayNotHasKey('juneHoliday', $betweenHolidays); + self::assertArrayNotHasKey('augustHoliday', $betweenHolidays); + self::assertArrayNotHasKey('octoberHoliday', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('stStephensDay', $betweenHolidays); + self::assertArrayNotHasKey('pentecost', $betweenHolidays); + self::assertArrayNotHasKey('goodFriday', $betweenHolidays); + self::assertArrayNotHasKey('easter', $betweenHolidays); + self::assertArrayNotHasKey('easterMonday', $betweenHolidays); + self::assertArrayNotHasKey('pentecostMonday', $betweenHolidays); + + self::assertCount(2, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(2, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -433,26 +433,26 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid $betweenHolidays = \iterator_to_array($between); // Assert array definitions - $this->assertArrayHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayHasKey('stPatricksDay', $betweenHolidays); - $this->assertArrayNotHasKey('easterMonday', $betweenHolidays); - $this->assertArrayNotHasKey('mayDay', $betweenHolidays); - $this->assertArrayNotHasKey('juneHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('augustHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('octoberHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('stStephensDay', $betweenHolidays); - $this->assertArrayNotHasKey('pentecost', $betweenHolidays); - $this->assertArrayNotHasKey('goodFriday', $betweenHolidays); - $this->assertArrayNotHasKey('easter', $betweenHolidays); - $this->assertArrayNotHasKey('easterMonday', $betweenHolidays); - $this->assertArrayNotHasKey('pentecostMonday', $betweenHolidays); - - $this->assertCount(2, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(2, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('newYearsDay', $betweenHolidays); + self::assertArrayHasKey('stPatricksDay', $betweenHolidays); + self::assertArrayNotHasKey('easterMonday', $betweenHolidays); + self::assertArrayNotHasKey('mayDay', $betweenHolidays); + self::assertArrayNotHasKey('juneHoliday', $betweenHolidays); + self::assertArrayNotHasKey('augustHoliday', $betweenHolidays); + self::assertArrayNotHasKey('octoberHoliday', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('stStephensDay', $betweenHolidays); + self::assertArrayNotHasKey('pentecost', $betweenHolidays); + self::assertArrayNotHasKey('goodFriday', $betweenHolidays); + self::assertArrayNotHasKey('easter', $betweenHolidays); + self::assertArrayNotHasKey('easterMonday', $betweenHolidays); + self::assertArrayNotHasKey('pentecostMonday', $betweenHolidays); + + self::assertCount(2, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(2, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } /** @@ -479,24 +479,24 @@ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): $betweenHolidays = \iterator_to_array($between); // Assert array definitions - $this->assertArrayHasKey('newYearsDay', $betweenHolidays); - $this->assertArrayNotHasKey('stPatricksDay', $betweenHolidays); - $this->assertArrayNotHasKey('mayDay', $betweenHolidays); - $this->assertArrayNotHasKey('juneHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('augustHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('octoberHoliday', $betweenHolidays); - $this->assertArrayNotHasKey('christmasDay', $betweenHolidays); - $this->assertArrayNotHasKey('stStephensDay', $betweenHolidays); - $this->assertArrayNotHasKey('pentecost', $betweenHolidays); - $this->assertArrayNotHasKey('goodFriday', $betweenHolidays); - $this->assertArrayNotHasKey('easter', $betweenHolidays); - $this->assertArrayNotHasKey('easterMonday', $betweenHolidays); - $this->assertArrayNotHasKey('pentecostMonday', $betweenHolidays); - - $this->assertCount(1, $between); - $this->assertNotCount(\count($holidays), $between); - - $this->assertEquals(1, $between->count()); - $this->assertNotEquals(\count($holidays), $between->count()); + self::assertArrayHasKey('newYearsDay', $betweenHolidays); + self::assertArrayNotHasKey('stPatricksDay', $betweenHolidays); + self::assertArrayNotHasKey('mayDay', $betweenHolidays); + self::assertArrayNotHasKey('juneHoliday', $betweenHolidays); + self::assertArrayNotHasKey('augustHoliday', $betweenHolidays); + self::assertArrayNotHasKey('octoberHoliday', $betweenHolidays); + self::assertArrayNotHasKey('christmasDay', $betweenHolidays); + self::assertArrayNotHasKey('stStephensDay', $betweenHolidays); + self::assertArrayNotHasKey('pentecost', $betweenHolidays); + self::assertArrayNotHasKey('goodFriday', $betweenHolidays); + self::assertArrayNotHasKey('easter', $betweenHolidays); + self::assertArrayNotHasKey('easterMonday', $betweenHolidays); + self::assertArrayNotHasKey('pentecostMonday', $betweenHolidays); + + self::assertCount(1, $between); + self::assertNotCount(\count($holidays), $between); + + self::assertEquals(1, $between->count()); + self::assertNotEquals(\count($holidays), $between->count()); } } diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index c4bbd6532..bd01432bc 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -44,25 +44,25 @@ public function testOfficialHolidaysFilter(): void $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions - $this->assertArrayHasKey('newYearsDay', $filteredHolidaysArray); - $this->assertArrayHasKey('stPatricksDay', $filteredHolidaysArray); - $this->assertArrayHasKey('easter', $filteredHolidaysArray); - $this->assertArrayHasKey('easterMonday', $filteredHolidaysArray); - $this->assertArrayHasKey('mayDay', $filteredHolidaysArray); - $this->assertArrayHasKey('juneHoliday', $filteredHolidaysArray); - $this->assertArrayHasKey('augustHoliday', $filteredHolidaysArray); - $this->assertArrayHasKey('octoberHoliday', $filteredHolidaysArray); - $this->assertArrayHasKey('christmasDay', $filteredHolidaysArray); - $this->assertArrayHasKey('stStephensDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecost', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); + self::assertArrayHasKey('newYearsDay', $filteredHolidaysArray); + self::assertArrayHasKey('stPatricksDay', $filteredHolidaysArray); + self::assertArrayHasKey('easter', $filteredHolidaysArray); + self::assertArrayHasKey('easterMonday', $filteredHolidaysArray); + self::assertArrayHasKey('mayDay', $filteredHolidaysArray); + self::assertArrayHasKey('juneHoliday', $filteredHolidaysArray); + self::assertArrayHasKey('augustHoliday', $filteredHolidaysArray); + self::assertArrayHasKey('octoberHoliday', $filteredHolidaysArray); + self::assertArrayHasKey('christmasDay', $filteredHolidaysArray); + self::assertArrayHasKey('stStephensDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecost', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); // Assert number of results returned - $this->assertCount(10, $filteredHolidays); - $this->assertNotCount(\count($holidays), $filteredHolidays); - $this->assertEquals(10, $filteredHolidays->count()); - $this->assertNotEquals(\count($holidays), $filteredHolidays->count()); + self::assertCount(10, $filteredHolidays); + self::assertNotCount(\count($holidays), $filteredHolidays); + self::assertEquals(10, $filteredHolidays->count()); + self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } /** @@ -78,25 +78,25 @@ public function testObservedHolidaysFilter(): void $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions - $this->assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stPatricksDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easter', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('mayDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('juneHoliday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('augustHoliday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('octoberHoliday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stStephensDay', $filteredHolidaysArray); - $this->assertArrayHasKey('pentecost', $filteredHolidaysArray); - $this->assertArrayHasKey('goodFriday', $filteredHolidaysArray); + self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('stPatricksDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('easter', $filteredHolidaysArray); + self::assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('mayDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('juneHoliday', $filteredHolidaysArray); + self::assertArrayNotHasKey('augustHoliday', $filteredHolidaysArray); + self::assertArrayNotHasKey('octoberHoliday', $filteredHolidaysArray); + self::assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('stStephensDay', $filteredHolidaysArray); + self::assertArrayHasKey('pentecost', $filteredHolidaysArray); + self::assertArrayHasKey('goodFriday', $filteredHolidaysArray); // Assert number of results returned - $this->assertCount(2, $filteredHolidays); - $this->assertNotCount(\count($holidays), $filteredHolidays); - $this->assertEquals(2, $filteredHolidays->count()); - $this->assertNotEquals(\count($holidays), $filteredHolidays->count()); + self::assertCount(2, $filteredHolidays); + self::assertNotCount(\count($holidays), $filteredHolidays); + self::assertEquals(2, $filteredHolidays->count()); + self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } /** @@ -112,25 +112,25 @@ public function testBankHolidaysFilter(): void $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions - $this->assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stPatricksDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easter', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('mayDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('juneHoliday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('augustHoliday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('octoberHoliday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stStephensDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecost', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); + self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('stPatricksDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('easter', $filteredHolidaysArray); + self::assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('mayDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('juneHoliday', $filteredHolidaysArray); + self::assertArrayNotHasKey('augustHoliday', $filteredHolidaysArray); + self::assertArrayNotHasKey('octoberHoliday', $filteredHolidaysArray); + self::assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('stStephensDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecost', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); // Assert number of results returned - $this->assertCount(0, $filteredHolidays); - $this->assertNotCount(\count($holidays), $filteredHolidays); - $this->assertEquals(0, $filteredHolidays->count()); - $this->assertNotEquals(\count($holidays), $filteredHolidays->count()); + self::assertCount(0, $filteredHolidays); + self::assertNotCount(\count($holidays), $filteredHolidays); + self::assertEquals(0, $filteredHolidays->count()); + self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } /** @@ -145,40 +145,40 @@ public function testSeasonalHolidaysFilter(): void $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions - $this->assertArrayHasKey('summerTime', $filteredHolidaysArray); - $this->assertArrayHasKey('winterTime', $filteredHolidaysArray); - $this->assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easter', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('kingsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('ascensionDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecost', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('secondChristmasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stMartinsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('ashWednesday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('commemorationDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('liberationDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('halloween', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stNicholasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('carnivalDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('secondCarnivalDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('thirdCarnivalDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('internationalWorkersDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('valentinesDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('worldAnimalDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('fathersDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('mothersDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('epiphany', $filteredHolidaysArray); - $this->assertArrayNotHasKey('princesDay', $filteredHolidaysArray); + self::assertArrayHasKey('summerTime', $filteredHolidaysArray); + self::assertArrayHasKey('winterTime', $filteredHolidaysArray); + self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('easter', $filteredHolidaysArray); + self::assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('kingsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('ascensionDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecost', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('secondChristmasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('stMartinsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); + self::assertArrayNotHasKey('ashWednesday', $filteredHolidaysArray); + self::assertArrayNotHasKey('commemorationDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('liberationDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('halloween', $filteredHolidaysArray); + self::assertArrayNotHasKey('stNicholasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('carnivalDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('secondCarnivalDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('thirdCarnivalDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('internationalWorkersDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('valentinesDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('worldAnimalDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('fathersDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('mothersDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('epiphany', $filteredHolidaysArray); + self::assertArrayNotHasKey('princesDay', $filteredHolidaysArray); // Assert number of results returned - $this->assertCount(2, $filteredHolidays); - $this->assertNotCount(\count($holidays), $filteredHolidays); - $this->assertEquals(2, $filteredHolidays->count()); - $this->assertNotEquals(\count($holidays), $filteredHolidays->count()); + self::assertCount(2, $filteredHolidays); + self::assertNotCount(\count($holidays), $filteredHolidays); + self::assertEquals(2, $filteredHolidays->count()); + self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } /** @@ -193,39 +193,39 @@ public function testOtherHolidaysFilter(): void $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions - $this->assertArrayHasKey('internationalWorkersDay', $filteredHolidaysArray); - $this->assertArrayHasKey('valentinesDay', $filteredHolidaysArray); - $this->assertArrayHasKey('worldAnimalDay', $filteredHolidaysArray); - $this->assertArrayHasKey('fathersDay', $filteredHolidaysArray); - $this->assertArrayHasKey('mothersDay', $filteredHolidaysArray); - $this->assertArrayHasKey('epiphany', $filteredHolidaysArray); - $this->assertArrayHasKey('princesDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('summerTime', $filteredHolidaysArray); - $this->assertArrayNotHasKey('winterTime', $filteredHolidaysArray); - $this->assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easter', $filteredHolidaysArray); - $this->assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('kingsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('ascensionDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecost', $filteredHolidaysArray); - $this->assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('secondChristmasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stMartinsDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('ashWednesday', $filteredHolidaysArray); - $this->assertArrayNotHasKey('commemorationDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('liberationDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('halloween', $filteredHolidaysArray); - $this->assertArrayNotHasKey('stNicholasDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('carnivalDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('secondCarnivalDay', $filteredHolidaysArray); - $this->assertArrayNotHasKey('thirdCarnivalDay', $filteredHolidaysArray); + self::assertArrayHasKey('internationalWorkersDay', $filteredHolidaysArray); + self::assertArrayHasKey('valentinesDay', $filteredHolidaysArray); + self::assertArrayHasKey('worldAnimalDay', $filteredHolidaysArray); + self::assertArrayHasKey('fathersDay', $filteredHolidaysArray); + self::assertArrayHasKey('mothersDay', $filteredHolidaysArray); + self::assertArrayHasKey('epiphany', $filteredHolidaysArray); + self::assertArrayHasKey('princesDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('summerTime', $filteredHolidaysArray); + self::assertArrayNotHasKey('winterTime', $filteredHolidaysArray); + self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('easter', $filteredHolidaysArray); + self::assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('kingsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('ascensionDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecost', $filteredHolidaysArray); + self::assertArrayNotHasKey('pentecostMonday', $filteredHolidaysArray); + self::assertArrayNotHasKey('christmasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('secondChristmasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('stMartinsDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('goodFriday', $filteredHolidaysArray); + self::assertArrayNotHasKey('ashWednesday', $filteredHolidaysArray); + self::assertArrayNotHasKey('commemorationDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('liberationDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('halloween', $filteredHolidaysArray); + self::assertArrayNotHasKey('stNicholasDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('carnivalDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('secondCarnivalDay', $filteredHolidaysArray); + self::assertArrayNotHasKey('thirdCarnivalDay', $filteredHolidaysArray); // Assert number of results returned - $this->assertCount(7, $filteredHolidays); - $this->assertNotCount(\count($holidays), $filteredHolidays); - $this->assertEquals(7, $filteredHolidays->count()); - $this->assertNotEquals(\count($holidays), $filteredHolidays->count()); + self::assertCount(7, $filteredHolidays); + self::assertNotCount(\count($holidays), $filteredHolidays); + self::assertEquals(7, $filteredHolidays->count()); + self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } } diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index c4af8c48c..66fe91f4c 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -51,7 +51,7 @@ public function testHolidaysOnDate(): void $date ); - $this->assertArrayHasKey($name, \iterator_to_array($holidaysOnDate)); + self::assertArrayHasKey($name, \iterator_to_array($holidaysOnDate)); } } @@ -75,7 +75,7 @@ public function testHolidaysNotOnDate(): void $date ); - $this->assertArrayNotHasKey($name, \iterator_to_array($holidaysOnDate)); + self::assertArrayNotHasKey($name, \iterator_to_array($holidaysOnDate)); } } @@ -90,14 +90,14 @@ public function testCorrectNumberOfHolidaysOnDate(): void // No holidays $holidaysOnDate = $holidays->on(new DateTime('11/19/2016', new DateTimeZone($timezone))); - $this->assertEquals(0, $holidaysOnDate->count()); + self::assertEquals(0, $holidaysOnDate->count()); // One holiday $holidaysOnDate = $holidays->on(new DateTime('12/25/2016', new DateTimeZone($timezone))); - $this->assertEquals(1, $holidaysOnDate->count()); + self::assertEquals(1, $holidaysOnDate->count()); // Multiple holidays $holidaysOnDate = $holidays->on(new DateTime('03/27/2016', new DateTimeZone($timezone))); - $this->assertGreaterThan(1, $holidaysOnDate->count()); + self::assertGreaterThan(1, $holidaysOnDate->count()); } } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 4e0953488..e90b63796 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -66,9 +66,9 @@ public function testHolidayIsJsonSerializable(): void $json = \json_encode($holiday); $instance = \json_decode($json, true); - $this->assertIsArray($instance); - $this->assertNotNull($instance); - $this->assertArrayHasKey('shortName', $instance); + self::assertIsArray($instance); + self::assertNotNull($instance); + self::assertArrayHasKey('shortName', $instance); } /** @@ -80,13 +80,13 @@ public function testHolidayWithDateTimeInterface(): void { // Assert with DateTime instance $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); - $this->assertNotNull($holiday); - $this->assertInstanceOf(Holiday::class, $holiday); + self::assertNotNull($holiday); + self::assertInstanceOf(Holiday::class, $holiday); // Assert with DateTimeImmutable instance $holiday = new Holiday('testHoliday', [], new DateTimeImmutable(), 'en_US'); - $this->assertNotNull($holiday); - $this->assertInstanceOf(Holiday::class, $holiday); + self::assertNotNull($holiday); + self::assertInstanceOf(Holiday::class, $holiday); } /** @@ -99,9 +99,9 @@ public function testHolidayGetLocales(): void $method = new \ReflectionMethod(Holiday::class, 'getLocales'); $method->setAccessible(true); - $this->assertEquals(['ca_ES_VALENCIA', 'ca_ES', 'ca', 'en_US', 'en', Holiday::LOCALE_KEY], $method->invoke($holiday, null)); - $this->assertEquals(['de_DE', 'de', 'es_ES', 'es'], $method->invoke($holiday, ['de_DE', 'es_ES'])); - $this->assertEquals(['de_DE', 'de', Holiday::LOCALE_KEY], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_KEY])); + self::assertEquals(['ca_ES_VALENCIA', 'ca_ES', 'ca', 'en_US', 'en', Holiday::LOCALE_KEY], $method->invoke($holiday, null)); + self::assertEquals(['de_DE', 'de', 'es_ES', 'es'], $method->invoke($holiday, ['de_DE', 'es_ES'])); + self::assertEquals(['de_DE', 'de', Holiday::LOCALE_KEY], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_KEY])); } /** @@ -119,16 +119,16 @@ public function testHolidayGetNameWithoutArgument(): void ]; $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_AT'); - $this->assertEquals('Holiday DE-AT', $holiday->getName()); + self::assertEquals('Holiday DE-AT', $holiday->getName()); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de'); - $this->assertEquals('Holiday DE', $holiday->getName()); + self::assertEquals('Holiday DE', $holiday->getName()); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); - $this->assertEquals('Holiday DE', $holiday->getName()); + self::assertEquals('Holiday DE', $holiday->getName()); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); - $this->assertEquals('Holiday EN-US', $holiday->getName()); + self::assertEquals('Holiday EN-US', $holiday->getName()); // 'en' fallback $translations = [ @@ -137,10 +137,10 @@ public function testHolidayGetNameWithoutArgument(): void ]; $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); - $this->assertEquals('Holiday DE', $holiday->getName()); + self::assertEquals('Holiday DE', $holiday->getName()); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); - $this->assertEquals('Holiday EN', $holiday->getName()); + self::assertEquals('Holiday EN', $holiday->getName()); // No 'en' or 'en_US' fallback @@ -149,10 +149,10 @@ public function testHolidayGetNameWithoutArgument(): void ]; $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); - $this->assertEquals('Holiday DE', $holiday->getName()); + self::assertEquals('Holiday DE', $holiday->getName()); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); - $this->assertEquals('testHoliday', $holiday->getName()); + self::assertEquals('testHoliday', $holiday->getName()); } /** @@ -171,21 +171,21 @@ public function testHolidayGetNameWithArgument(): void ]; $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); - $this->assertEquals('Holiday DE', $holiday->getName(['de'])); - $this->assertEquals('Holiday DE', $holiday->getName(['ja', 'de', 'nl', 'it_IT'])); - $this->assertEquals('Holiday DE', $holiday->getName(['de_DE'])); - $this->assertEquals('Holiday DE', $holiday->getName(['de_DE_berlin'])); - $this->assertEquals('Holiday DE', $holiday->getName(['de_DE_berlin', 'nl', 'it_IT'])); - $this->assertEquals('Holiday DE-AT', $holiday->getName(['de_AT'])); - $this->assertEquals('Holiday DE-AT', $holiday->getName(['de_AT_vienna'])); - $this->assertEquals('Holiday NL', $holiday->getName(['nl'])); - $this->assertEquals('Holiday NL', $holiday->getName(['nl_NL'])); - $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT'])); - $this->assertEquals('Holiday IT-IT', $holiday->getName(['it_IT', Holiday::LOCALE_KEY])); - $this->assertEquals('testHoliday', $holiday->getName([Holiday::LOCALE_KEY])); + self::assertEquals('Holiday DE', $holiday->getName(['de'])); + self::assertEquals('Holiday DE', $holiday->getName(['ja', 'de', 'nl', 'it_IT'])); + self::assertEquals('Holiday DE', $holiday->getName(['de_DE'])); + self::assertEquals('Holiday DE', $holiday->getName(['de_DE_berlin'])); + self::assertEquals('Holiday DE', $holiday->getName(['de_DE_berlin', 'nl', 'it_IT'])); + self::assertEquals('Holiday DE-AT', $holiday->getName(['de_AT'])); + self::assertEquals('Holiday DE-AT', $holiday->getName(['de_AT_vienna'])); + self::assertEquals('Holiday NL', $holiday->getName(['nl'])); + self::assertEquals('Holiday NL', $holiday->getName(['nl_NL'])); + self::assertEquals('Holiday IT-IT', $holiday->getName(['it_IT'])); + self::assertEquals('Holiday IT-IT', $holiday->getName(['it_IT', Holiday::LOCALE_KEY])); + self::assertEquals('testHoliday', $holiday->getName([Holiday::LOCALE_KEY])); $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); - $this->assertEquals('Holiday EN-US', $holiday->getName()); + self::assertEquals('Holiday EN-US', $holiday->getName()); $this->expectException(MissingTranslationException::class); $holiday->getName(['it']); @@ -205,16 +205,16 @@ public function testHolidayGetNameWithGlobalTranslations(): void 'pl_PL' => 'Nowy Rok', ]; - $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); + $translationsStub->expects(self::once())->method('getTranslations')->with(self::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[$locale], $holiday->getName()); + self::assertNotNull($holiday->getName()); + self::assertIsString($holiday->getName()); + self::assertEquals($translations[$locale], $holiday->getName()); } /** @@ -231,16 +231,16 @@ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void 'pl' => 'Nowy Rok', ]; - $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); + $translationsStub->expects(self::once())->method('getTranslations')->with(self::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()); + self::assertNotNull($holiday->getName()); + self::assertIsString($holiday->getName()); + self::assertEquals($translations['pl'], $holiday->getName()); } /** @@ -257,7 +257,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void 'pl_PL' => 'Nowy Rok', ]; - $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); + $translationsStub->expects(self::once())->method('getTranslations')->with(self::equalTo('newYearsDay'))->willReturn($translations); $customLocale = 'nl_NL'; $customTranslation = 'Nieuwjaar'; @@ -270,9 +270,9 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void ); $holiday->mergeGlobalTranslations($translationsStub); - $this->assertNotNull($holiday->getName()); - $this->assertIsString($holiday->getName()); - $this->assertEquals($customTranslation, $holiday->getName()); + self::assertNotNull($holiday->getName()); + self::assertIsString($holiday->getName()); + self::assertEquals($customTranslation, $holiday->getName()); } /** @@ -289,7 +289,7 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void 'pl_PL' => 'Nowy Rok', ]; - $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); + $translationsStub->expects(self::once())->method('getTranslations')->with(self::equalTo('newYearsDay'))->willReturn($translations); $customLocale = 'pl_PL'; $customTranslation = 'Bardzo Nowy Rok'; @@ -302,8 +302,8 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void ); $holiday->mergeGlobalTranslations($translationsStub); - $this->assertNotNull($holiday->getName()); - $this->assertIsString($holiday->getName()); - $this->assertEquals($customTranslation, $holiday->getName()); + self::assertNotNull($holiday->getName()); + self::assertIsString($holiday->getName()); + self::assertEquals($customTranslation, $holiday->getName()); } } diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 3cb7922bb..03ef565c2 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -67,10 +67,10 @@ 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->getSubstitutedHoliday()); - $this->assertEquals('substituteHoliday:testHoliday', $substitute->getKey()); - $this->assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); - $this->assertEquals(new DateTime('2019-01-02'), $substitute); + self::assertSame($holiday, $substitute->getSubstitutedHoliday()); + self::assertEquals('substituteHoliday:testHoliday', $substitute->getKey()); + self::assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); + self::assertEquals(new DateTime('2019-01-02'), $substitute); } /** @@ -84,10 +84,10 @@ public function testSubstituteHolidayIsJsonSerializable(): void $json = \json_encode($substitute); $instance = \json_decode($json, true); - $this->assertIsArray($instance); - $this->assertNotNull($instance); - $this->assertArrayHasKey('shortName', $instance); - $this->assertArrayHasKey('substitutedHoliday', $instance); + self::assertIsArray($instance); + self::assertNotNull($instance); + self::assertArrayHasKey('shortName', $instance); + self::assertArrayHasKey('substitutedHoliday', $instance); } /** @@ -100,13 +100,13 @@ 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); + self::assertNotNull($holiday); + self::assertInstanceOf(SubstituteHoliday::class, $substitute); // Assert with DateTimeImmutable instance $substitute = new SubstituteHoliday($holiday, [], new \DateTimeImmutable(), 'en_US'); - $this->assertNotNull($holiday); - $this->assertInstanceOf(SubstituteHoliday::class, $substitute); + self::assertNotNull($holiday); + self::assertInstanceOf(SubstituteHoliday::class, $substitute); } /** @@ -119,8 +119,8 @@ public function testSubstituteHolidayGetNameWithNoTranslations(): void $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()); + self::assertIsString($substitute->getName()); + self::assertEquals('substituteHoliday:' . $name, $substitute->getName()); } /** @@ -136,14 +136,14 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v $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(['en' => 'foo']); + $translationsStub->expects(self::at(0))->method('getTranslations')->with(self::equalTo('substituteHoliday'))->willReturn([$locale => 'foo']); + $translationsStub->expects(self::at(1))->method('getTranslations')->with(self::equalTo('substituteHoliday:testHoliday'))->willReturn([$locale => 'foo']); + $translationsStub->expects(self::at(2))->method('getTranslations')->with(self::equalTo('testHoliday'))->willReturn(['en' => 'foo']); $substitute->mergeGlobalTranslations($translationsStub); - $this->assertIsString($substitute->getName()); - $this->assertEquals($translation, $substitute->getName()); + self::assertIsString($substitute->getName()); + self::assertEquals($translation, $substitute->getName()); } /** @@ -159,14 +159,14 @@ public function testSubstituteHolidayGetNameWithPatternFallback(): void $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(['en' => '{0} obs']); - $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]); + $translationsStub->expects(self::at(0))->method('getTranslations')->with(self::equalTo('substituteHoliday'))->willReturn(['en' => '{0} obs']); + $translationsStub->expects(self::at(1))->method('getTranslations')->with(self::equalTo('substituteHoliday:testHoliday'))->willReturn([]); + $translationsStub->expects(self::at(2))->method('getTranslations')->with(self::equalTo('testHoliday'))->willReturn([$locale => $translation]); $substitute->mergeGlobalTranslations($translationsStub); - $this->assertIsString($substitute->getName()); - $this->assertEquals('My Holiday obs', $substitute->getName()); + self::assertIsString($substitute->getName()); + self::assertEquals('My Holiday obs', $substitute->getName()); } /** @@ -182,14 +182,14 @@ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): v $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']); + $translationsStub->expects(self::at(0))->method('getTranslations')->with(self::equalTo('substituteHoliday'))->willReturn([$locale => '{0} observed']); + $translationsStub->expects(self::at(1))->method('getTranslations')->with(self::equalTo('substituteHoliday:testHoliday'))->willReturn([$locale => $translation]); + $translationsStub->expects(self::at(2))->method('getTranslations')->with(self::equalTo('testHoliday'))->willReturn([$locale => 'foo']); $substitute->mergeGlobalTranslations($translationsStub); - $this->assertIsString($substitute->getName()); - $this->assertEquals($translation, $substitute->getName()); + self::assertIsString($substitute->getName()); + self::assertEquals($translation, $substitute->getName()); } /** @@ -205,13 +205,13 @@ public function testSubstituteHolidayGetNameWithSubstitutedTranslation(): void $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]); + $translationsStub->expects(self::at(0))->method('getTranslations')->with(self::equalTo('substituteHoliday'))->willReturn([$locale => '{0} observed']); + $translationsStub->expects(self::at(1))->method('getTranslations')->with(self::equalTo('substituteHoliday:testHoliday'))->willReturn([]); + $translationsStub->expects(self::at(2))->method('getTranslations')->with(self::equalTo('testHoliday'))->willReturn([$locale => $translation]); $substitute->mergeGlobalTranslations($translationsStub); - $this->assertIsString($substitute->getName()); - $this->assertEquals('My Holiday observed', $substitute->getName()); + self::assertIsString($substitute->getName()); + self::assertEquals('My Holiday observed', $substitute->getName()); } } diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 71f679230..cbe1a4040 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -42,18 +42,18 @@ public function testAddTranslation(): void $key = 'newYearsDay'; $translation = 'New Year’s Day'; - $this->assertNull($translations->getTranslation($key, $locale)); - $this->assertEmpty($translations->getTranslations($key)); + self::assertNull($translations->getTranslation($key, $locale)); + self::assertEmpty($translations->getTranslations($key)); $translations->addTranslation($key, $locale, $translation); - $this->assertNotNull($translations->getTranslations($key)); - $this->assertNotEmpty($translations->getTranslations($key)); - $this->assertEquals([$locale => $translation], $translations->getTranslations($key)); + self::assertNotNull($translations->getTranslations($key)); + self::assertNotEmpty($translations->getTranslations($key)); + self::assertEquals([$locale => $translation], $translations->getTranslations($key)); - $this->assertNotNull($translations->getTranslation($key, $locale)); - $this->assertIsString($translations->getTranslation($key, $locale)); - $this->assertEquals($translation, $translations->getTranslation($key, $locale)); + self::assertNotNull($translations->getTranslation($key, $locale)); + self::assertIsString($translations->getTranslation($key, $locale)); + self::assertEquals($translation, $translations->getTranslation($key, $locale)); } /** @@ -69,13 +69,13 @@ public function testAddMultipleTranslations(): void $translations->addTranslation($firstIdentifier, $firstLocale, $firstTranslation); - $this->assertNotNull($translations->getTranslations($firstIdentifier)); - $this->assertNotEmpty($translations->getTranslations($firstIdentifier)); - $this->assertEquals([$firstLocale => $firstTranslation], $translations->getTranslations($firstIdentifier)); + self::assertNotNull($translations->getTranslations($firstIdentifier)); + self::assertNotEmpty($translations->getTranslations($firstIdentifier)); + self::assertEquals([$firstLocale => $firstTranslation], $translations->getTranslations($firstIdentifier)); - $this->assertNotNull($translations->getTranslation($firstIdentifier, $firstLocale)); - $this->assertIsString($translations->getTranslation($firstIdentifier, $firstLocale)); - $this->assertEquals($firstTranslation, $translations->getTranslation($firstIdentifier, $firstLocale)); + self::assertNotNull($translations->getTranslation($firstIdentifier, $firstLocale)); + self::assertIsString($translations->getTranslation($firstIdentifier, $firstLocale)); + self::assertEquals($firstTranslation, $translations->getTranslation($firstIdentifier, $firstLocale)); $secondLocale = 'nl_NL'; $secondIdentifier = 'easter'; @@ -83,13 +83,13 @@ public function testAddMultipleTranslations(): void $translations->addTranslation($secondIdentifier, $secondLocale, $secondTranslation); - $this->assertNotNull($translations->getTranslations($secondIdentifier)); - $this->assertNotEmpty($translations->getTranslations($secondIdentifier)); - $this->assertEquals([$secondLocale => $secondTranslation], $translations->getTranslations($secondIdentifier)); + self::assertNotNull($translations->getTranslations($secondIdentifier)); + self::assertNotEmpty($translations->getTranslations($secondIdentifier)); + self::assertEquals([$secondLocale => $secondTranslation], $translations->getTranslations($secondIdentifier)); - $this->assertNotNull($translations->getTranslation($secondIdentifier, $secondLocale)); - $this->assertIsString($translations->getTranslation($secondIdentifier, $secondLocale)); - $this->assertEquals($secondTranslation, $translations->getTranslation($secondIdentifier, $secondLocale)); + self::assertNotNull($translations->getTranslation($secondIdentifier, $secondLocale)); + self::assertIsString($translations->getTranslation($secondIdentifier, $secondLocale)); + self::assertEquals($secondTranslation, $translations->getTranslation($secondIdentifier, $secondLocale)); $thirdLocale = 'en_US'; $thirdIdentifier = 'easter'; @@ -97,16 +97,16 @@ public function testAddMultipleTranslations(): void $translations->addTranslation($thirdIdentifier, $thirdLocale, $thirdTranslation); - $this->assertNotNull($translations->getTranslations($thirdIdentifier)); - $this->assertNotEmpty($translations->getTranslations($thirdIdentifier)); - $this->assertEquals( + self::assertNotNull($translations->getTranslations($thirdIdentifier)); + self::assertNotEmpty($translations->getTranslations($thirdIdentifier)); + self::assertEquals( [$thirdLocale => $thirdTranslation, $secondLocale => $secondTranslation], $translations->getTranslations($thirdIdentifier) ); - $this->assertNotNull($translations->getTranslation($thirdIdentifier, $thirdLocale)); - $this->assertIsString($translations->getTranslation($thirdIdentifier, $thirdLocale)); - $this->assertEquals($thirdTranslation, $translations->getTranslation($thirdIdentifier, $thirdLocale)); + self::assertNotNull($translations->getTranslation($thirdIdentifier, $thirdLocale)); + self::assertIsString($translations->getTranslation($thirdIdentifier, $thirdLocale)); + self::assertEquals($thirdTranslation, $translations->getTranslation($thirdIdentifier, $thirdLocale)); } /** @@ -141,8 +141,8 @@ public function testNoTranslationForUnknownHoliday(): void $translations->addTranslation($key, $locale, $translation); - $this->assertNull($translations->getTranslation($unknownIdentifier, $locale)); - $this->assertEmpty($translations->getTranslations($unknownIdentifier)); + self::assertNull($translations->getTranslation($unknownIdentifier, $locale)); + self::assertEmpty($translations->getTranslations($unknownIdentifier)); } /** @@ -160,7 +160,7 @@ public function testNoTranslationForNotTranslatedLocale(): void $translations->addTranslation($key, $locale, $translation); - $this->assertNull($translations->getTranslation($key, $unknownLocale)); + self::assertNull($translations->getTranslation($key, $unknownLocale)); } /** @@ -186,10 +186,10 @@ public function testLoadingTranslationsFromDirectory(): void $locale = 'en_US'; $translation = 'New Year’s Day'; - $this->assertNotNull($translations->getTranslations($key)); - $this->assertNotEmpty($translations->getTranslations($key)); - $this->assertIsString($translations->getTranslation($key, $locale)); - $this->assertEquals($translation, $translations->getTranslation($key, $locale)); + self::assertNotNull($translations->getTranslations($key)); + self::assertNotEmpty($translations->getTranslations($key)); + self::assertIsString($translations->getTranslation($key, $locale)); + self::assertEquals($translation, $translations->getTranslation($key, $locale)); } /** @@ -212,8 +212,8 @@ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); - $this->assertNotNull($translations->getTranslations($key)); - $this->assertEmpty($translations->getTranslations($key)); + self::assertNotNull($translations->getTranslations($key)); + self::assertEmpty($translations->getTranslations($key)); } /** @@ -291,17 +291,17 @@ public function testLoadingMultipleTranslationsFromDirectory(): void $locale = 'en_US'; $translation = 'New Year’s Day'; - $this->assertNotNull($translations->getTranslations($firstIdentifier)); - $this->assertNotEmpty($translations->getTranslations($firstIdentifier)); - $this->assertIsString($translations->getTranslation($firstIdentifier, $locale)); - $this->assertEquals($translation, $translations->getTranslation($firstIdentifier, $locale)); + self::assertNotNull($translations->getTranslations($firstIdentifier)); + self::assertNotEmpty($translations->getTranslations($firstIdentifier)); + self::assertIsString($translations->getTranslation($firstIdentifier, $locale)); + self::assertEquals($translation, $translations->getTranslation($firstIdentifier, $locale)); $locale = 'nl_NL'; $translation = 'Eerste Paasdag'; - $this->assertNotNull($translations->getTranslations($secondIdentifier)); - $this->assertNotEmpty($translations->getTranslations($secondIdentifier)); - $this->assertIsString($translations->getTranslation($secondIdentifier, $locale)); - $this->assertEquals($translation, $translations->getTranslation($secondIdentifier, $locale)); + self::assertNotNull($translations->getTranslations($secondIdentifier)); + self::assertNotEmpty($translations->getTranslations($secondIdentifier)); + self::assertIsString($translations->getTranslation($secondIdentifier, $locale)); + self::assertEquals($translation, $translations->getTranslation($secondIdentifier, $locale)); } } diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 223901661..5ab3475d4 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -40,8 +40,8 @@ class TypographyTest extends TestCase */ public function testTranslations($name, $class, $key, $locale): void { - $this->assertStringNotContainsString("'", $name, 'Translation contains typewriter apostrophe'); - $this->assertStringNotContainsString('"', $name, 'Translation contains typewriter quote'); + self::assertStringNotContainsString("'", $name, 'Translation contains typewriter apostrophe'); + self::assertStringNotContainsString('"', $name, 'Translation contains typewriter quote'); } /** diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index 08ba0a03c..f73c25096 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -42,8 +42,8 @@ public function testWeekendDay(\DateTimeImmutable $date): void $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int) $date->format('Y')); $isWeekendDay = $yasumiProvider->isWeekendDay($date); - $this->assertIsBool($isWeekendDay); - $this->assertTrue($isWeekendDay); + self::assertIsBool($isWeekendDay); + self::assertTrue($isWeekendDay); } /** @@ -86,8 +86,8 @@ public function testNonWeekendDay(\DateTimeImmutable $date): void $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int) $date->format('Y')); $isWeekendDay = $yasumiProvider->isWeekendDay($date); - $this->assertIsBool($isWeekendDay); - $this->assertFalse($isWeekendDay); + self::assertIsBool($isWeekendDay); + self::assertFalse($isWeekendDay); } /** diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 07a340132..a7fc4d9e1 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -106,7 +106,7 @@ public function testCreateWithAbstractExtension(): void $class, Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) ); - $this->assertInstanceOf(YasumiExternalProvider::class, $instance); + self::assertInstanceOf(YasumiExternalProvider::class, $instance); } /** @@ -134,9 +134,9 @@ public function testCount(): void // There are 16 holidays in Japan in the year 2015, with 1 substituted holiday. $holidays = Yasumi::create('Japan', 2015); - $this->assertIsInt($holidays->count()); - $this->assertEquals(16, $holidays->count()); - $this->assertNotEquals(17, $holidays->count()); + self::assertIsInt($holidays->count()); + self::assertEquals(16, $holidays->count()); + self::assertNotEquals(17, $holidays->count()); } /** @@ -148,7 +148,7 @@ public function testGetType(): void $holidays = Yasumi::create('Japan', Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND)); $holiday = $holidays->getHoliday('newYearsDay'); - $this->assertIsString($holiday->getType()); + self::assertIsString($holiday->getType()); } /** @@ -160,8 +160,8 @@ public function testGetYear(): void $year = Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND); $holidays = Yasumi::create('Netherlands', $year); - $this->assertIsInt($holidays->getYear()); - $this->assertEquals($year, $holidays->getYear()); + self::assertIsInt($holidays->getYear()); + self::assertEquals($year, $holidays->getYear()); } /** @@ -243,9 +243,9 @@ public function testGetHolidayNames(): void $holidays = Yasumi::create('Japan', 2015); $holidayNames = $holidays->getHolidayNames(); - $this->assertIsArray($holidayNames); - $this->assertCount(17, $holidayNames); - $this->assertContains('newYearsDay', $holidayNames); + self::assertIsArray($holidayNames); + self::assertCount(17, $holidayNames); + self::assertContains('newYearsDay', $holidayNames); } /** @@ -258,8 +258,8 @@ public function testWhenIs(): void $when = $holidays->whenIs('autumnalEquinoxDay'); - $this->assertIsString($when); - $this->assertEquals('2010-09-23', $when); + self::assertIsString($when); + self::assertEquals('2010-09-23', $when); } /** @@ -298,8 +298,8 @@ public function testWhatWeekDayIs(): void $holidays = Yasumi::create('Netherlands', 2110); $weekDay = $holidays->whatWeekDayIs('stMartinsDay'); - $this->assertIsInt($weekDay); - $this->assertEquals(2, $weekDay); + self::assertIsInt($weekDay); + self::assertEquals(2, $weekDay); } /** @@ -323,11 +323,11 @@ public function testGetProviders(): void { $providers = Yasumi::getProviders(); - $this->assertNotEmpty($providers); - $this->assertIsArray($providers); - $this->assertContains('Netherlands', $providers); - $this->assertEquals('USA', $providers['US']); - $this->assertNotContains('AbstractProvider', $providers); + self::assertNotEmpty($providers); + self::assertIsArray($providers); + self::assertContains('Netherlands', $providers); + self::assertEquals('USA', $providers['US']); + self::assertNotContains('AbstractProvider', $providers); } /** @@ -341,15 +341,15 @@ public function testGetProvidersStaticCall(): void $providers = Yasumi::getProviders(); $initial_providers = $providers; - $this->assertNotEmpty($providers); - $this->assertIsArray($providers); - $this->assertContains($provider, $providers); + self::assertNotEmpty($providers); + self::assertIsArray($providers); + self::assertContains($provider, $providers); $providers = Yasumi::getProviders(); - $this->assertNotEmpty($providers); - $this->assertIsArray($providers); - $this->assertContains($provider, $providers); - $this->assertEquals($initial_providers, $providers); + self::assertNotEmpty($providers); + self::assertIsArray($providers); + self::assertContains($provider, $providers); + self::assertEquals($initial_providers, $providers); } /** @@ -371,13 +371,13 @@ public function testIsHoliday(): void // Assertion using a DateTime instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTime($date)); - $this->assertIsBool($isHoliday); - $this->assertTrue($isHoliday); + self::assertIsBool($isHoliday); + self::assertTrue($isHoliday); // Assertion using a DateTimeImmutable instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTimeImmutable($date)); - $this->assertIsBool($isHoliday); - $this->assertTrue($isHoliday); + self::assertIsBool($isHoliday); + self::assertTrue($isHoliday); unset($isHoliday); } @@ -401,13 +401,13 @@ public function testIsNotHoliday(): void // Assertion using a DateTime instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTime($date)); - $this->assertIsBool($isHoliday); - $this->assertFalse($isHoliday); + self::assertIsBool($isHoliday); + self::assertFalse($isHoliday); // Assertion using a DateTimeImmutable instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTimeImmutable($date)); - $this->assertIsBool($isHoliday); - $this->assertFalse($isHoliday); + self::assertIsBool($isHoliday); + self::assertFalse($isHoliday); unset($isHoliday); } @@ -447,13 +447,13 @@ public function testIsWorkingDay(): void // Assertion using a DateTime instance $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTime($date)); - $this->assertIsBool($isWorkingDay); - $this->assertTrue($isWorkingDay); + self::assertIsBool($isWorkingDay); + self::assertTrue($isWorkingDay); // Assertion using a DateTimeImmutable instance $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTimeImmutable($date)); - $this->assertIsBool($isWorkingDay); - $this->assertTrue($isWorkingDay); + self::assertIsBool($isWorkingDay); + self::assertTrue($isWorkingDay); unset($isWorkingDay); } @@ -476,13 +476,13 @@ public function testIsNotWorkingDay(): void // Assertion using a DateTime instance $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTime($date)); - $this->assertIsBool($isNotWorkingDay); - $this->assertFalse($isNotWorkingDay); + self::assertIsBool($isNotWorkingDay); + self::assertFalse($isNotWorkingDay); // Assertion using a DateTimeImmutable instance $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTimeImmutable($date)); - $this->assertIsBool($isNotWorkingDay); - $this->assertFalse($isNotWorkingDay); + self::assertIsBool($isNotWorkingDay); + self::assertFalse($isNotWorkingDay); unset($isNotWorkingDay); } @@ -516,20 +516,20 @@ public function testRemoveHoliday(): void $holidays = $provider->getHolidays(); // Assert initial list of holidays - $this->assertCount(13, $holidays); - $this->assertArrayHasKey('newYearsDay', $holidays); - $this->assertArrayHasKey('stPatricksDay', $holidays); - $this->assertArrayHasKey('substituteHoliday:stPatricksDay', $holidays); - $this->assertArrayHasKey('goodFriday', $holidays); - $this->assertArrayHasKey('easter', $holidays); - $this->assertArrayHasKey('easterMonday', $holidays); - $this->assertArrayHasKey('mayDay', $holidays); - $this->assertArrayHasKey('pentecost', $holidays); - $this->assertArrayHasKey('juneHoliday', $holidays); - $this->assertArrayHasKey('augustHoliday', $holidays); - $this->assertArrayHasKey('octoberHoliday', $holidays); - $this->assertArrayHasKey('christmasDay', $holidays); - $this->assertArrayHasKey('stStephensDay', $holidays); + self::assertCount(13, $holidays); + self::assertArrayHasKey('newYearsDay', $holidays); + self::assertArrayHasKey('stPatricksDay', $holidays); + self::assertArrayHasKey('substituteHoliday:stPatricksDay', $holidays); + self::assertArrayHasKey('goodFriday', $holidays); + self::assertArrayHasKey('easter', $holidays); + self::assertArrayHasKey('easterMonday', $holidays); + self::assertArrayHasKey('mayDay', $holidays); + self::assertArrayHasKey('pentecost', $holidays); + self::assertArrayHasKey('juneHoliday', $holidays); + self::assertArrayHasKey('augustHoliday', $holidays); + self::assertArrayHasKey('octoberHoliday', $holidays); + self::assertArrayHasKey('christmasDay', $holidays); + self::assertArrayHasKey('stStephensDay', $holidays); $provider->removeHoliday('juneHoliday'); $provider->removeHoliday('augustHoliday'); @@ -538,20 +538,20 @@ public function testRemoveHoliday(): void $holidaysAfterRemoval = $provider->getHolidays(); // Assert list of holidays after removal of some holidays - $this->assertCount(10, $holidaysAfterRemoval); - $this->assertArrayHasKey('newYearsDay', $holidaysAfterRemoval); - $this->assertArrayHasKey('stPatricksDay', $holidaysAfterRemoval); - $this->assertArrayHasKey('substituteHoliday:stPatricksDay', $holidaysAfterRemoval); - $this->assertArrayHasKey('goodFriday', $holidaysAfterRemoval); - $this->assertArrayHasKey('easter', $holidaysAfterRemoval); - $this->assertArrayHasKey('easterMonday', $holidaysAfterRemoval); - $this->assertArrayHasKey('mayDay', $holidaysAfterRemoval); - $this->assertArrayHasKey('pentecost', $holidaysAfterRemoval); - $this->assertArrayHasKey('christmasDay', $holidaysAfterRemoval); - $this->assertArrayHasKey('stStephensDay', $holidaysAfterRemoval); - $this->assertArrayNotHasKey('juneHoliday', $holidaysAfterRemoval); - $this->assertArrayNotHasKey('augustHoliday', $holidaysAfterRemoval); - $this->assertArrayNotHasKey('octoberHoliday', $holidaysAfterRemoval); + self::assertCount(10, $holidaysAfterRemoval); + self::assertArrayHasKey('newYearsDay', $holidaysAfterRemoval); + self::assertArrayHasKey('stPatricksDay', $holidaysAfterRemoval); + self::assertArrayHasKey('substituteHoliday:stPatricksDay', $holidaysAfterRemoval); + self::assertArrayHasKey('goodFriday', $holidaysAfterRemoval); + self::assertArrayHasKey('easter', $holidaysAfterRemoval); + self::assertArrayHasKey('easterMonday', $holidaysAfterRemoval); + self::assertArrayHasKey('mayDay', $holidaysAfterRemoval); + self::assertArrayHasKey('pentecost', $holidaysAfterRemoval); + self::assertArrayHasKey('christmasDay', $holidaysAfterRemoval); + self::assertArrayHasKey('stStephensDay', $holidaysAfterRemoval); + self::assertArrayNotHasKey('juneHoliday', $holidaysAfterRemoval); + self::assertArrayNotHasKey('augustHoliday', $holidaysAfterRemoval); + self::assertArrayNotHasKey('octoberHoliday', $holidaysAfterRemoval); } /** @@ -572,7 +572,7 @@ public function testCreateByISO3166_2(): void $year ); - $this->assertEquals($year, $provider->getYear()); + self::assertEquals($year, $provider->getYear()); } /** @@ -606,16 +606,16 @@ public function testAddExistingHoliday(): void // Add a new holiday $provider->addHoliday($holiday); $newHolidays = $provider->getHolidayNames(); - $this->assertContains($holidayName, $provider->getHolidayNames()); - $this->assertNotSameSize($originalHolidays, $newHolidays); - $this->assertNotEquals($newHolidays, $originalHolidays); + self::assertContains($holidayName, $provider->getHolidayNames()); + self::assertNotSameSize($originalHolidays, $newHolidays); + self::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()); + self::assertContains($holidayName, $provider->getHolidayNames()); + self::assertSameSize($newHolidays, $provider->getHolidayNames()); + self::assertNotSameSize($originalHolidays, $provider->getHolidayNames()); + self::assertEquals($newHolidays, $provider->getHolidayNames()); + self::assertNotEquals($originalHolidays, $provider->getHolidayNames()); } } diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index 25e57e5eb..7be4f59f8 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -47,15 +47,15 @@ public function testNextWorkingDay(): void $startDate = new DateTime($date, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate); - $this->assertInstanceOf(DateTime::class, $result); - $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTime::class, $result); + self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate); - $this->assertInstanceOf(DateTimeImmutable::class, $result); - $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTimeImmutable::class, $result); + self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); } /** @@ -76,15 +76,15 @@ public function testPreviousWorkingDay(): void $startDate = new DateTime($date, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate); - $this->assertInstanceOf(DateTime::class, $result); - $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTime::class, $result); + self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate); - $this->assertInstanceOf(DateTimeImmutable::class, $result); - $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTimeImmutable::class, $result); + self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); } /** @@ -125,21 +125,21 @@ public function testYearBoundary(): void $startDate = new DateTime($start, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); - $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); $startDate = new DateTime($expectedNext, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); - $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); + self::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); - $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); $startDate = new DateTimeImmutable($expectedNext, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); - $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); } /** @@ -161,7 +161,7 @@ public function testWorkDayIsNextYear(string $start, int $workdays, string $expe $startDate = new DateTime($start, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate, $workdays); - $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); } /** @@ -202,7 +202,7 @@ public function testWorkDayIsPreviousYear(string $start, int $workdays, string $ $startDate = new DateTime($start, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate, $workdays); - $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); } /** diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 9a943b0e2..0c6f4170a 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -67,13 +67,13 @@ public function testHolidayAfterAdjustment(): void $holiday = $holidays->getHoliday(self::HOLIDAY); // Some basic assertions - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertNotNull($holiday); // Holiday specific assertions - $this->assertEquals('Saturday', $holiday->format('l')); - $this->assertGreaterThanOrEqual(20, $holiday->format('j')); - $this->assertLessThanOrEqual(26, $holiday->format('j')); + self::assertEquals('Saturday', $holiday->format('l')); + self::assertGreaterThanOrEqual(20, $holiday->format('j')); + self::assertLessThanOrEqual(26, $holiday->format('j')); unset($holiday, $holidays); } diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index 2180faef0..988e119b6 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -53,9 +53,9 @@ public function testHolidayOnAfterEstablishment(): void $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $holiday); // Holiday specific assertions - $this->assertEquals('Wednesday', $holiday->format('l')); - $this->assertGreaterThanOrEqual(16, $holiday->format('j')); - $this->assertLessThanOrEqual(22, $holiday->format('j')); + self::assertEquals('Wednesday', $holiday->format('l')); + self::assertGreaterThanOrEqual(16, $holiday->format('j')); + self::assertLessThanOrEqual(22, $holiday->format('j')); } /** diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index f15072bd0..3c06370d2 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -39,13 +39,13 @@ public function testHoliday(): void $holiday = $holidays->getHoliday(self::HOLIDAY); // Some basic assertions - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertNotNull($holiday); // Holiday specific assertions - $this->assertEquals('Saturday', $holiday->format('l')); - $this->assertGreaterThanOrEqual(20, $holiday->format('j')); - $this->assertLessThanOrEqual(26, $holiday->format('j')); + self::assertEquals('Saturday', $holiday->format('l')); + self::assertGreaterThanOrEqual(20, $holiday->format('j')); + self::assertLessThanOrEqual(26, $holiday->format('j')); unset($holiday, $holidays); } diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index 22abd0c0c..fa3958e89 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -39,13 +39,13 @@ public function testHoliday(): void $holiday = $holidays->getHoliday(self::HOLIDAY); // Some basic assertions - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertNotNull($holiday); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertNotNull($holiday); // Holiday specific assertions - $this->assertEquals('Friday', $holiday->format('l')); - $this->assertGreaterThanOrEqual(19, $holiday->format('j')); - $this->assertLessThanOrEqual(25, $holiday->format('j')); + self::assertEquals('Friday', $holiday->format('l')); + self::assertGreaterThanOrEqual(19, $holiday->format('j')); + self::assertLessThanOrEqual(25, $holiday->format('j')); unset($holiday, $holidays); } diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index eaf072736..0c0ab5d4f 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -108,7 +108,7 @@ public function testVeteransDayNameBefore1954(): void $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); - $this->assertEquals('Armistice Day', $holiday->getName()); + self::assertEquals('Armistice Day', $holiday->getName()); } /** @@ -122,7 +122,7 @@ public function testVeteransDayNameAfter1954(): void $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); - $this->assertEquals('Veterans Day', $holiday->getName()); + self::assertEquals('Veterans Day', $holiday->getName()); } /** diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 71a4860ca..d4e6e38cb 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -56,7 +56,7 @@ public function testNoCatholicChristmasDayBefore2017(): void $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); - $this->assertNull($holiday); + self::assertNull($holiday); unset($year, $holiday, $holidays); } diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 0afac4b53..2c22c6faa 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -55,7 +55,7 @@ public function testNoSecondInternationalWorkersDaySince2018(): void $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); - $this->assertNull($holiday); + self::assertNull($holiday); unset($year, $holiday, $holidays); } diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 768b7c70a..0b06f270b 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -81,23 +81,23 @@ public function assertHolidayWithSubstitution( $holidays = Yasumi::create($provider, $year); $holidayOfficial = $holidays->getHoliday($key); - $this->assertInstanceOf(Holiday::class, $holidayOfficial); - $this->assertNotNull($holidayOfficial); - $this->assertEquals($expectedOfficial, $holidayOfficial); - $this->assertTrue($holidays->isHoliday($holidayOfficial)); - $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); + self::assertInstanceOf(Holiday::class, $holidayOfficial); + self::assertNotNull($holidayOfficial); + self::assertEquals($expectedOfficial, $holidayOfficial); + self::assertTrue($holidays->isHoliday($holidayOfficial)); + self::assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->getKey()); if ($expectedSubstitution === null) { // without substitution - $this->assertNull($holidaySubstitution); + self::assertNull($holidaySubstitution); } else { // with substitution - $this->assertNotNull($holidaySubstitution); - $this->assertInstanceOf(SubstituteHoliday::class, $holidaySubstitution); - $this->assertEquals($expectedSubstitution, $holidaySubstitution); - $this->assertTrue($holidays->isHoliday($holidaySubstitution)); - $this->assertEquals(Holiday::TYPE_OFFICIAL, $holidaySubstitution->getType()); + self::assertNotNull($holidaySubstitution); + self::assertInstanceOf(SubstituteHoliday::class, $holidaySubstitution); + self::assertEquals($expectedSubstitution, $holidaySubstitution); + self::assertTrue($holidays->isHoliday($holidaySubstitution)); + self::assertEquals(Holiday::TYPE_OFFICIAL, $holidaySubstitution->getType()); } unset($holidayOfficial, $holidaySubstitution, $holidays); @@ -174,7 +174,7 @@ public function testCatholicChristmasDayNoSubstitution(): void */ public function testTranslation(): void { - $this->assertTrue(true); + self::assertTrue(true); } /** @@ -182,6 +182,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertTrue(true); + self::assertTrue(true); } } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 65f5ad634..9c967be32 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -83,7 +83,7 @@ public function assertDefinedHolidays( // Loop through all known holidays and assert they are defined by the provider class foreach ($expectedHolidays as $holiday) { - $this->assertArrayHasKey($holiday, \iterator_to_array($holidays)); + self::assertArrayHasKey($holiday, \iterator_to_array($holidays)); } } @@ -111,9 +111,9 @@ public function assertHoliday( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertEquals($expected, $holiday); - $this->assertTrue($holidays->isHoliday($holiday)); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertEquals($expected, $holiday); + self::assertTrue($holidays->isHoliday($holiday)); } /** @@ -140,9 +140,9 @@ public function assertSubstituteHoliday( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday('substituteHoliday:' . $key); - $this->assertInstanceOf(SubstituteHoliday::class, $holiday); - $this->assertEquals($expected, $holiday); - $this->assertTrue($holidays->isHoliday($holiday)); + self::assertInstanceOf(SubstituteHoliday::class, $holiday); + self::assertEquals($expected, $holiday); + self::assertTrue($holidays->isHoliday($holiday)); } /** @@ -193,7 +193,7 @@ public function assertNotHoliday( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - $this->assertNull($holiday); + self::assertNull($holiday); } /** @@ -219,8 +219,8 @@ public function assertTranslatedHolidayName( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertTrue($holidays->isHoliday($holiday)); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertTrue($holidays->isHoliday($holiday)); if (\is_array($translations) && !empty($translations)) { foreach ($translations as $locale => $name) { @@ -238,8 +238,8 @@ public function assertTranslatedHolidayName( } } - $this->assertTrue(isset($translation)); - $this->assertEquals($name, $translation); + self::assertTrue(isset($translation)); + self::assertEquals($name, $translation); } } } @@ -267,8 +267,8 @@ public function assertHolidayType( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertEquals($type, $holiday->getType()); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertEquals($type, $holiday->getType()); } /** @@ -295,9 +295,9 @@ public function assertDayOfWeek( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - $this->assertInstanceOf(Holiday::class, $holiday); - $this->assertTrue($holidays->isHoliday($holiday)); - $this->assertEquals($expectedDayOfWeek, $holiday->format('l')); + self::assertInstanceOf(Holiday::class, $holiday); + self::assertTrue($holidays->isHoliday($holiday)); + self::assertEquals($expectedDayOfWeek, $holiday->format('l')); } /** From a820597b006a384b55129d0d23e60785c6406360 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 10 Sep 2020 09:13:52 +0900 Subject: [PATCH 118/687] Updated PHPDoc to match the function signature. Signed-off-by: Sacha Telgenhof --- tests/Ukraine/SubstitutedHolidayTest.php | 7 +--- tests/YasumiBase.php | 48 ++++++++++++------------ 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 0b06f270b..eca6e7a2f 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -62,13 +62,8 @@ public function testSaturdaySubstitution(): void * @param string $key string the key of the holiday to be checked against * @param int $year holiday calendar year * @param DateTime $expectedOfficial the official date to be checked against - * @param DateTime $expectedSubstitution the substituted date to be checked against + * @param DateTime|null $expectedSubstitution the substituted date to be checked against * - * @throws UnknownLocaleException - * @throws InvalidDateException - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws AssertionFailedError * @throws ReflectionException */ public function assertHolidayWithSubstitution( diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 9c967be32..a497b3abe 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -305,9 +305,9 @@ public function assertDayOfWeek( * * @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 string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $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 @@ -332,9 +332,9 @@ public function generateRandomDates( /** * 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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $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 @@ -439,9 +439,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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $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. * @@ -462,9 +462,9 @@ public function generateRandomEasterMondayDates( * 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 string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $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 @@ -492,9 +492,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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $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. * @@ -515,9 +515,9 @@ public function generateRandomGoodFridayDates( /** * 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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $range year range from which dates will be generated (default: 1000) * * @return array list of random Pentecost test dates used for assertion of holidays. * @@ -541,9 +541,9 @@ public function generateRandomPentecostDates( * * @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 string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int|null $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 @@ -570,7 +570,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( * @param callable $callback callback(int $year, \DateTime $dateTime) to modify $dateTime by custom rules * @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 string|null $timezone name of the timezone for which the dates need to be generated * * @return array list of random test dates used for assertion of holidays with applied callback. * @@ -601,8 +601,8 @@ public function generateRandomDatesWithModifier( /** * Generates a random year (number). * - * @param int $lowerLimit the lower limit for generating a year number (default: 1000) - * @param int $upperLimit the upper limit for generating a year number (default: 9999) + * @param int|null $lowerLimit the lower limit for generating a year number (default: 1000) + * @param int|null $upperLimit the upper limit for generating a year number (default: 9999) * * @return int a year number */ From fa92856fa45e53cafd3fb32771be9bd6935c04d0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 10 Sep 2020 09:15:47 +0900 Subject: [PATCH 119/687] Updated PHPDoc to match the function signature. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 5 ++--- src/Yasumi/Provider/AbstractProvider.php | 2 +- .../Provider/Australia/AustralianCapitalTerritory.php | 8 ++------ src/Yasumi/Provider/Australia/NewSouthWales.php | 4 +--- src/Yasumi/Provider/Australia/NorthernTerritory.php | 4 +--- src/Yasumi/Provider/Australia/SouthAustralia.php | 4 +--- src/Yasumi/Provider/Australia/Victoria.php | 8 ++------ src/Yasumi/Provider/CommonHolidays.php | 8 ++------ src/Yasumi/SubstituteHoliday.php | 3 +-- tests/Ukraine/SubstitutedHolidayTest.php | 5 ----- 10 files changed, 13 insertions(+), 38 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 5c1cd3b53..9b043a3be 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -178,11 +178,10 @@ public function jsonSerialize(): self * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and * Holiday::LOCALE_KEY (the holiday key) was provided. * - * @param array $locales The locales to search for translations + * @param array|null $locales The locales to search for translations * * @return string * @throws MissingTranslationException - * * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY */ @@ -212,7 +211,7 @@ public function getName(array $locales = null): string * * If null is provided, return as if the display locale was provided as a string. * - * @param array $locales Array of locales, or null if the display locale should be used + * @param array|null $locales Array of locales, or null if the display locale should be used * * @return array * diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 462accda5..3a8a6a783 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -102,7 +102,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 |null the locale/language in which holidays need to be + * @param string|null $locale |null the locale/language in which holidays need to be * represented * @param TranslationsInterface|null $globalTranslations global translations */ diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index f5c7dbdcd..680a7b2fc 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -64,13 +64,11 @@ public function initialize(): void * @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|null $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 easterSunday( @@ -100,13 +98,11 @@ private function easterSunday( * @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|null $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( diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 9b498ba12..6e7f78eb5 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -63,13 +63,11 @@ public function initialize(): void * @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|null $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( diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index a053ecf32..8b9ea9749 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -62,13 +62,11 @@ public function initialize(): void * @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|null $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( diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index a4bb1e046..38f9d4696 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -70,13 +70,11 @@ public function initialize(): void * @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|null $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( diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 9b77d3a38..1e3ffc35c 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -64,13 +64,11 @@ public function initialize(): void * @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|null $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 easterSunday( @@ -100,13 +98,11 @@ private function easterSunday( * @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|null $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( diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index c2cbd8eb3..688b0cdff 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -441,13 +441,11 @@ public function internationalWomensDay( * @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|null $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( @@ -522,13 +520,11 @@ protected function calculateSummerWinterTime( * @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|null $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 winterTime( diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 9646086f2..561546c3b 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -96,11 +96,10 @@ public function getSubstitutedHoliday(): Holiday * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and * Holiday::LOCALE_KEY (the holiday key) was provided. * - * @param array $locales The locales to search for translations + * @param array|null $locales The locales to search for translations * * @return string * @throws MissingTranslationException - * * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY */ diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index eca6e7a2f..df87081c1 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -16,12 +16,7 @@ use DateTime; use DateTimeZone; use Exception; -use InvalidArgumentException; -use PHPUnit\Framework\AssertionFailedError; use ReflectionException; -use RuntimeException; -use Yasumi\Exception\InvalidDateException; -use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\SubstituteHoliday; use Yasumi\tests\YasumiTestCaseInterface; From b5cb71accedbe5ad0b812c44c9adf8f32cd49aa7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 10 Sep 2020 09:22:15 +0900 Subject: [PATCH 120/687] Corrected name in test as well (missed). Signed-off-by: Sacha Telgenhof --- tests/Estonia/RestorationOfIndependenceDayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index ff66d3fac..d0dab221d 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -74,7 +74,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), - [self::LOCALE => 'Tasiseseisvumispäev'] + [self::LOCALE => 'Taasiseseisvumispäev'] ); $this->assertTranslatedHolidayName( self::REGION, From c0bbfb3c82a7367d5611a496887b13911ddfdc1d Mon Sep 17 00:00:00 2001 From: Patrick-Root <65601273+Patrick-Root@users.noreply.github.com> Date: Sat, 24 Oct 2020 04:15:18 +0200 Subject: [PATCH 121/687] Feature/pentecost germany (#225) Add Pentecost to Germany.php --- CHANGELOG.md | 1 + src/Yasumi/Provider/Germany.php | 1 + tests/Germany/PentecostTest.php | 75 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 tests/Germany/PentecostTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 81669631d..ba719d0fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added +- Added Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ### Changed diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 22e0b2119..1fb5b62ec 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -53,6 +53,7 @@ public function initialize(): void $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php new file mode 100644 index 000000000..5d3aa6482 --- /dev/null +++ b/tests/Germany/PentecostTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Germany; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Pentecost in Germany. + */ +class PentecostTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'pentecost'; + + /** + * Tests the holiday defined in this test. + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(); + $time_stamp = \strtotime( + $year . '-03-21' . \easter_days($year) . ' day + 49 day' + ); + $date = \date('Y-m-d', $time_stamp); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($date, 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 => 'Pfingstsonntag'] + ); + } + + /** + * 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); + } +} From a757a7cc6fd1715c33c39129052ac49231643b8e Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Sat, 24 Oct 2020 04:17:16 +0200 Subject: [PATCH 122/687] Improve Swiss providers (#233) Improve Swiss providers with links to official laws. --- src/Yasumi/Provider/Switzerland/Bern.php | 1 + src/Yasumi/Provider/Switzerland/Fribourg.php | 36 +++++++ src/Yasumi/Provider/Switzerland/Geneva.php | 1 + src/Yasumi/Provider/Switzerland/Jura.php | 4 + src/Yasumi/Provider/Switzerland/Neuchatel.php | 63 ++++++++++++- src/Yasumi/Provider/Switzerland/Valais.php | 1 + src/Yasumi/Provider/Switzerland/Vaud.php | 1 + src/Yasumi/Provider/Switzerland/Zurich.php | 3 +- .../Switzerland/Fribourg/AllSaintsDayTest.php | 79 ++++++++++++++++ .../Fribourg/AssumptionOfMaryTest.php | 79 ++++++++++++++++ .../BerchtoldsTagTest.php | 6 +- .../Fribourg/CorpusChristiTest.php | 73 ++++++++++++++ .../December26thTest.php} | 29 +++--- tests/Switzerland/Fribourg/FribourgTest.php | 6 ++ .../Fribourg/ImmaculateConceptionTest.php | 79 ++++++++++++++++ tests/Switzerland/Jura/BettagsMontagTest.php | 83 ++++++++++++++++ tests/Switzerland/Jura/EasterTest.php | 70 ++++++++++++++ tests/Switzerland/Jura/JuraTest.php | 3 + tests/Switzerland/Jura/PentecostTest.php | 70 ++++++++++++++ .../Neuchatel/December26thTest.php | 94 +++++++++++++++++++ .../Switzerland/Neuchatel/January2ndTest.php | 94 +++++++++++++++++++ tests/Switzerland/Neuchatel/NeuchatelTest.php | 1 - tests/Switzerland/Zurich/ZurichTest.php | 1 - 23 files changed, 853 insertions(+), 24 deletions(-) create mode 100644 tests/Switzerland/Fribourg/AllSaintsDayTest.php create mode 100644 tests/Switzerland/Fribourg/AssumptionOfMaryTest.php rename tests/Switzerland/{Neuchatel => Fribourg}/BerchtoldsTagTest.php (89%) create mode 100644 tests/Switzerland/Fribourg/CorpusChristiTest.php rename tests/Switzerland/{Zurich/BerchtoldsTagTest.php => Fribourg/December26thTest.php} (64%) create mode 100644 tests/Switzerland/Fribourg/ImmaculateConceptionTest.php create mode 100644 tests/Switzerland/Jura/BettagsMontagTest.php create mode 100644 tests/Switzerland/Jura/EasterTest.php create mode 100644 tests/Switzerland/Jura/PentecostTest.php create mode 100644 tests/Switzerland/Neuchatel/December26thTest.php create mode 100644 tests/Switzerland/Neuchatel/January2ndTest.php diff --git a/src/Yasumi/Provider/Switzerland/Bern.php b/src/Yasumi/Provider/Switzerland/Bern.php index 75cad9701..9b2eba423 100644 --- a/src/Yasumi/Provider/Switzerland/Bern.php +++ b/src/Yasumi/Provider/Switzerland/Bern.php @@ -22,6 +22,7 @@ * Provider for all holidays in Bern (Switzerland). * * @link https://en.wikipedia.org/wiki/Canton_of_Bern + * @link https://www.fin.be.ch/fin/fr/index/personal/personalrecht/wdb.thema.212.html */ class Bern extends Switzerland { diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index da27744ef..9f779e2de 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -12,16 +12,19 @@ namespace Yasumi\Provider\Switzerland; +use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Switzerland; /** * Provider for all holidays in Fribourg (Switzerland). * * @link https://en.wikipedia.org/wiki/Canton_of_Fribourg + * @link https://www.fr.ch/travail-et-entreprises/employes/jour-ferie-jour-chome-quelle-difference */ class Fribourg extends Switzerland { @@ -45,11 +48,44 @@ public function initialize(): void { parent::initialize(); + // For the whole canton $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + + // For the roman catholic communes + $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->immaculateConception($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + + // For the reformed evangelical communes $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->calculateBerchtoldsTag($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER); + $this->calculateDecember26th($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER); + } + + /** + * December 26th + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateDecember26th(): void + { + $this->addHoliday(new Holiday( + 'december26th', + [ + 'en' => 'December 26th', + 'fr' => '26 décembre', + ], + new DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); } } diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 2896476a0..16454b742 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -25,6 +25,7 @@ * Provider for all holidays in Geneva (Switzerland). * * @link https://en.wikipedia.org/wiki/Canton_of_Geneva + * @link https://www.ge.ch/legislation/rsg/f/s/rsg_j1_45.html */ class Geneva extends Switzerland { diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index 1d5501312..829989465 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -24,6 +24,7 @@ * Provider for all holidays in Jura (Switzerland). * * @link https://en.wikipedia.org/wiki/Canton_of_Jura + * @link https://rsju.jura.ch/fr/viewdocument.html?idn=20105&id=26766 */ class Jura extends Switzerland { @@ -60,11 +61,14 @@ public function initialize(): void $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->calculateBerchtoldsTag(); $this->calculatePlebisciteJurassien(); + $this->calculateBettagsMontag(); } /** diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 39eda16bf..944b23df7 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -24,6 +24,8 @@ * Provider for all holidays in Neuchâtel (Switzerland). * * @link https://en.wikipedia.org/wiki/Canton_of_Neuch%C3%A2tel + * @link http://rsn.ne.ch/DATA/program/books/RSN2017/20171/htm/94102.htm + * @link https://www.ne.ch/themes/travail/Pages/jours-feries.aspx */ class Neuchatel extends Switzerland { @@ -54,15 +56,26 @@ public function initialize(): void $this->locale, Holiday::TYPE_OTHER )); - $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); - $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); - $this->calculateBerchtoldsTag(); $this->calculateBettagsMontag(); $this->calculateInstaurationRepublique(); + + $newYearsDay = $this->newYearsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER); + $this->addHoliday($newYearsDay); + if ($newYearsDay->format('N') === '7') { + // If the New Year's Day is a sunday, the next day is an holiday + $this->calculateJanuary2nd(); + } + + $christmasDay = $this->christmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER); + $this->addHoliday($christmasDay); + if ($christmasDay->format('N') === '7') { + // If the Christmas Day is a sunday, the next day is an holiday + $this->calculateDecember26th(); + } } /** @@ -89,4 +102,48 @@ private function calculateInstaurationRepublique(): void )); } } + + /** + * January 2nd + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateJanuary2nd(): void + { + $this->addHoliday(new Holiday( + 'january2nd', + [ + 'en' => 'January 2nd', + 'fr' => '2 janvier', + ], + new DateTime($this->year . '-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + } + + /** + * December 26th + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateDecember26th(): void + { + $this->addHoliday(new Holiday( + 'december26th', + [ + 'en' => 'December 26th', + 'fr' => '26 décembre', + ], + new DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + } } diff --git a/src/Yasumi/Provider/Switzerland/Valais.php b/src/Yasumi/Provider/Switzerland/Valais.php index e316cc788..a8647a07f 100644 --- a/src/Yasumi/Provider/Switzerland/Valais.php +++ b/src/Yasumi/Provider/Switzerland/Valais.php @@ -22,6 +22,7 @@ * Provider for all holidays in Valais (Switzerland). * * @link https://en.wikipedia.org/wiki/Valais + * @link https://www.vs.ch/web/spt/jours-feries */ class Valais extends Switzerland { diff --git a/src/Yasumi/Provider/Switzerland/Vaud.php b/src/Yasumi/Provider/Switzerland/Vaud.php index 7403d5c4b..ab13dcf5f 100644 --- a/src/Yasumi/Provider/Switzerland/Vaud.php +++ b/src/Yasumi/Provider/Switzerland/Vaud.php @@ -22,6 +22,7 @@ * Provider for all holidays in Vaud (Switzerland). * * @link https://en.wikipedia.org/wiki/Vaud + * @link https://www.vd.ch/themes/formation/jours-feries-et-vacances-scolaires/ */ class Vaud extends Switzerland { diff --git a/src/Yasumi/Provider/Switzerland/Zurich.php b/src/Yasumi/Provider/Switzerland/Zurich.php index 7c411a41b..0444a26b0 100644 --- a/src/Yasumi/Provider/Switzerland/Zurich.php +++ b/src/Yasumi/Provider/Switzerland/Zurich.php @@ -22,6 +22,7 @@ * Provider for all holidays in Zürich (Switzerland). * * @link https://en.wikipedia.org/wiki/Canton_of_Z%C3%BCrich + * @link https://www.zh.ch/de/wirtschaft-arbeit/arbeitsbedingungen/arbeitsssicherheit-gesundheitsschutz/arbeits-ruhezeiten/feiertage.html */ class Zurich extends Switzerland { @@ -58,7 +59,5 @@ public function initialize(): void $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); - - $this->calculateBerchtoldsTag(); } } diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php new file mode 100644 index 000000000..ff32949fd --- /dev/null +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Switzerland\Fribourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing All Saints' Day in Fribourg (Switzerland). + */ +class AllSaintsDayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'allSaintsDay'; + + /** + * Tests All Saints' Day. + * + * @dataProvider AllSaintsDayDataProvider + * + * @param int $year the year for which All Saints' Day needs to be tested + * @param DateTime $expected the expected date + * + * @throws ReflectionException + */ + public function testAllSaintsDay($year, $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests translated name of All Saints' Day. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Toussaint'] + ); + } + + /** + * 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_OTHER); + } + + /** + * 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 + */ + public function AllSaintsDayDataProvider(): array + { + return $this->generateRandomDates(11, 1, self::TIMEZONE); + } +} diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php new file mode 100644 index 000000000..fd7c2fb1d --- /dev/null +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Switzerland\Fribourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the day of the Assumption of Mary in Fribourg (Switzerland). + */ +class AssumptionOfMaryTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the day of the Assumption of Mary. + * + * @dataProvider AssumptionOfMaryDataProvider + * + * @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 + */ + public function testAssumptionOfMary($year, $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests translated name of the day of the Assumption of Mary. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Assomption'] + ); + } + + /** + * 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_OTHER); + } + + /** + * 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 + */ + public function AssumptionOfMaryDataProvider(): array + { + return $this->generateRandomDates(8, 15, self::TIMEZONE); + } +} diff --git a/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php similarity index 89% rename from tests/Switzerland/Neuchatel/BerchtoldsTagTest.php rename to tests/Switzerland/Fribourg/BerchtoldsTagTest.php index 26335be18..84af75391 100644 --- a/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Switzerland\Neuchatel; +namespace Yasumi\tests\Switzerland\Fribourg; use DateTime; use DateTimeZone; @@ -20,9 +20,9 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing BerchtoldsTag in Neuchatel (Switzerland). + * Class for testing BerchtoldsTag in Fribourg (Switzerland). */ -class BerchtoldsTagTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends FribourgBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday diff --git a/tests/Switzerland/Fribourg/CorpusChristiTest.php b/tests/Switzerland/Fribourg/CorpusChristiTest.php new file mode 100644 index 000000000..c52cfc937 --- /dev/null +++ b/tests/Switzerland/Fribourg/CorpusChristiTest.php @@ -0,0 +1,73 @@ + + */ + +namespace Yasumi\tests\Switzerland\Fribourg; + +use DateInterval; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\ChristianHolidays; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Corpus Christi in Fribourg (Switzerland). + */ +class CorpusChristiTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +{ + use ChristianHolidays; + + /** + * The name of the holiday + */ + public const HOLIDAY = 'corpusChristi'; + + /** + * Tests Corpus Christi. + * + * @throws Exception + * @throws ReflectionException + */ + public function testCorpusChristi(): void + { + $year = 2016; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + ); + } + + /** + * Tests 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 => 'Fête-Dieu'] + ); + } + + /** + * 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_OTHER); + } +} diff --git a/tests/Switzerland/Zurich/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/December26thTest.php similarity index 64% rename from tests/Switzerland/Zurich/BerchtoldsTagTest.php rename to tests/Switzerland/Fribourg/December26thTest.php index b8d0ceeb0..d796bcd33 100644 --- a/tests/Switzerland/Zurich/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -10,7 +10,7 @@ * @author Sacha Telgenhof */ -namespace Yasumi\tests\Switzerland\Zurich; +namespace Yasumi\tests\Switzerland\Fribourg; use DateTime; use DateTimeZone; @@ -20,32 +20,33 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing BerchtoldsTag in Zurich (Switzerland). + * Class for testing December 26th in Fribourg (Switzerland). */ -class BerchtoldsTagTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class December26thTest extends FribourgBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday */ - public const HOLIDAY = 'berchtoldsTag'; + public const HOLIDAY = 'december26th'; /** - * Tests BerchtoldsTag - * - * @throws ReflectionException + * Tests December 26th. * @throws Exception + * @throws ReflectionException */ - public function testBerchtoldsTag(): void + public function testDecember26th(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year . '-01-02', new DateTimeZone(self::TIMEZONE)); - - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("${year}-12-26", new DateTimeZone(self::TIMEZONE)) + ); } /** - * Tests translated name of BerchtoldsTag. + * Tests translated name of December 26th. * @throws ReflectionException */ public function testTranslation(): void @@ -54,7 +55,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Berchtoldstag'] + [self::LOCALE => '26 décembre'] ); } diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index f91dc42cf..e7e46200e 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -51,6 +51,12 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'berchtoldsTag', + 'december26th', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php new file mode 100644 index 000000000..9c4f8b824 --- /dev/null +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Switzerland\Fribourg; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the day of Immaculate Conception in Fribourg (Switzerland). + */ +class ImmaculateConceptionTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'immaculateConception'; + + /** + * 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): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the day of the holiday defined in this test + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(12, 8, 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 => 'Immaculée Conception'] + ); + } + + /** + * 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_OTHER); + } +} diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php new file mode 100644 index 000000000..352ee09c7 --- /dev/null +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -0,0 +1,83 @@ + + */ + +namespace Yasumi\tests\Switzerland\Jura; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Bettags Montag in Jura (Switzerland). + */ +class BettagsMontagTest extends JuraBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'bettagsMontag'; + + /** + * Tests Bettags Montag on or after 1832 + * + * @throws ReflectionException + * @throws Exception + */ + public function testBettagsMontagOnAfter1832(): void + { + $year = $this->generateRandomYear(1832); + + // Find third Sunday of September + $date = new DateTime('Third Sunday of ' . $year . '-09', new DateTimeZone(self::TIMEZONE)); + // Go to next Thursday + $date->add(new DateInterval('P1D')); + + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + } + + /** + * Tests Bettags Montag before 1832 + * @throws ReflectionException + */ + public function testBettagsMontagBefore1832(): void + { + $year = $this->generateRandomYear(1000, 1831); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests translated name of Bettags Montag. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1832), + [self::LOCALE => 'Jeûne fédéral'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900), Holiday::TYPE_OTHER); + } +} diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php new file mode 100644 index 000000000..649cdc21e --- /dev/null +++ b/tests/Switzerland/Jura/EasterTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Switzerland\Jura; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Easter in Jura (Switzerland). + */ +class EasterTest extends JuraBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'easter'; + + /** + * Tests the holiday defined in this test. + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = 2009; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-4-12", 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 => 'Pâques'] + ); + } + + /** + * 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_OTHER); + } +} diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index 4d5d3bab8..130c88d65 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -53,10 +53,13 @@ public function testRegionalHolidays(): void 'newYearsDay', 'christmasDay', 'ascensionDay', + 'easter', 'easterMonday', + 'pentecost', 'pentecostMonday', 'berchtoldsTag', 'plebisciteJurassien', + 'bettagsMontag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php new file mode 100644 index 000000000..6b901def0 --- /dev/null +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Switzerland\Jura; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Pentecost in Jura (Switzerland). + */ +class PentecostTest extends JuraBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'pentecost'; + + /** + * Tests the holiday defined in this test. + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = 1344; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-23", 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 => 'Pentecôte'] + ); + } + + /** + * 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_OTHER); + } +} diff --git a/tests/Switzerland/Neuchatel/December26thTest.php b/tests/Switzerland/Neuchatel/December26thTest.php new file mode 100644 index 000000000..fc6dd6eab --- /dev/null +++ b/tests/Switzerland/Neuchatel/December26thTest.php @@ -0,0 +1,94 @@ + + */ + +namespace Yasumi\tests\Switzerland\Neuchatel; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing December 26th in Neuchatel (Switzerland). + */ +class December26thTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'december26th'; + + /** + * One of the year the holiday is observed + */ + public const OBSERVANCE_YEAR = 2022; + + /** + * Tests December 26th. + * @throws Exception + * @throws ReflectionException + */ + public function testDecember26th(): void + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + self::OBSERVANCE_YEAR, + new DateTime(self::OBSERVANCE_YEAR.'-12-26', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2020 + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2021 + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2023 + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2024 + ); + } + + /** + * Tests translated name of December 26th. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + self::OBSERVANCE_YEAR, + [self::LOCALE => '26 décembre'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, self::OBSERVANCE_YEAR, Holiday::TYPE_OTHER); + } +} diff --git a/tests/Switzerland/Neuchatel/January2ndTest.php b/tests/Switzerland/Neuchatel/January2ndTest.php new file mode 100644 index 000000000..4305060c2 --- /dev/null +++ b/tests/Switzerland/Neuchatel/January2ndTest.php @@ -0,0 +1,94 @@ + + */ + +namespace Yasumi\tests\Switzerland\Neuchatel; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing January 2nd in Neuchatel (Switzerland). + */ +class January2ndTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'january2nd'; + + /** + * One of the year the holiday is observed + */ + public const OBSERVANCE_YEAR = 2023; + + /** + * Tests January 2nd. + * @throws Exception + * @throws ReflectionException + */ + public function testJanuary2nd(): void + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + self::OBSERVANCE_YEAR, + new DateTime(self::OBSERVANCE_YEAR.'-1-02', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2020 + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2021 + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2022 + ); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2024 + ); + } + + /** + * Tests translated name of January 2nd. + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + self::OBSERVANCE_YEAR, + [self::LOCALE => '2 janvier'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, self::OBSERVANCE_YEAR, Holiday::TYPE_OTHER); + } +} diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index 223de6ad2..45c8f5855 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -52,7 +52,6 @@ public function testRegionalHolidays(): void 'easterMonday', 'pentecostMonday', 'internationalWorkersDay', - 'berchtoldsTag', 'bettagsMontag', 'instaurationRepublique', ], self::REGION, $this->year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index 7c4a63804..ff1cc430d 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -53,7 +53,6 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } From f37ee2eafc4bd83af7e308a8b8dcf357ebb8b8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Fri, 27 Nov 2020 14:53:13 +0100 Subject: [PATCH 123/687] Add .gitattributes (#237) --- .gitattributes | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..b6ce471a1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +/.github export-ignore +/tests export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.php_cs export-ignore +/.scrutinizer.yml export-ignore +/.styleci.yml export-ignore +/.travis.yml export-ignore +/CHANGELOG.md export-ignore +/CODE_OF_CONDUCT.md export-ignore +/CONTRIBUTING.md export-ignore +/phpunit.xml.dist export-ignore From ac0c845f3ac0af1dd538503d537c7aed7ec012d8 Mon Sep 17 00:00:00 2001 From: Hisateru Tanaka Date: Tue, 12 Jan 2021 21:43:11 +0900 Subject: [PATCH 124/687] Japanese holidays in 2021 for COVID-19 rescheduled Olympic games (#240) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Japan.php | 18 +++++++++++++++--- tests/Japan/MarineDayTest.php | 16 ++++++++++++++++ tests/Japan/MountainDayTest.php | 16 ++++++++++++++++ tests/Japan/SportsDayTest.php | 17 +++++++++++++++++ 5 files changed, 65 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba719d0fa..abfc8c8bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ### Changed +- Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) ### Fixed diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 026450a54..2f46e277c 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -367,7 +367,11 @@ private function calculateGreeneryDay(): void private function calculateMarineDay(): void { $date = null; - if (2020 === $this->year) { + if (2021 === $this->year) { + // For Olympic 2021 Tokyo (after COVID-19) + $date = new DateTime("$this->year-7-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + } elseif (2020 === $this->year) { + // For Olympic 2020 Tokyo $date = new DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2003) { $date = new DateTime("third monday of july $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -398,7 +402,11 @@ private function calculateMarineDay(): void private function calculateMountainDay(): void { $date = null; - if (2020 === $this->year) { + if (2021 === $this->year) { + // For Olympic 2021 Tokyo (after COVID-19) + $date = new DateTime("$this->year-8-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + } elseif (2020 === $this->year) { + // For Olympic 2020 Tokyo $date = new DateTime("$this->year-8-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2016) { $date = new DateTime("$this->year-8-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -461,7 +469,11 @@ private function calculateRespectForTheAgeDay(): void private function calculateSportsDay(): void { $date = null; - if (2020 === $this->year) { + if (2021 === $this->year) { + // For Olympic 2021 Tokyo (after COVID-19) + $date = new DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + } elseif (2020 === $this->year) { + // For Olympic 2020 Tokyo $date = new DateTime("$this->year-7-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2000) { $date = new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 2ab8fc334..e3f1a1fa0 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -34,6 +34,22 @@ class MarineDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface */ public const ESTABLISHMENT_YEAR = 1996; + /** + * Tests Marine Day in 2021. Marine Day in 2021 is July 22th for rescheduled Olympic Games after COVID-19. + * @throws Exception + * @throws ReflectionException + */ + public function testMarineDayIn2021(): void + { + $year = 2021; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-7-22", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests Marine Day in 2020. Marine Day in 2020 is July 23th for the Olympic Games. * @throws Exception diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index ceb74d490..e0d0f3748 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -34,6 +34,22 @@ class MountainDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa */ public const ESTABLISHMENT_YEAR = 2016; + /** + * Tests Mountain Day in 2021. Mountain Day in 2021 is August 8th for rescheduled Olympic Games after COVID-19. + * @throws Exception + * @throws ReflectionException + */ + public function testMountainDayIn2021(): void + { + $year = 2021; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-8-8", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests Mountain Day in 2020. Mountain Day in 2020 is August 10th for the Olympic Games. * @throws Exception diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 6448df9c4..e14f9ec5f 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -34,6 +34,23 @@ class SportsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface */ public const ESTABLISHMENT_YEAR = 1996; + /** + * Tests Health And Sports Day in 2021. Health And Sports Day in 2021 is July 23th for rescheduled Olympic Games + * after COVID-19. + * @throws Exception + * @throws ReflectionException + */ + public function testSportsDayIn2021(): void + { + $year = 2021; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-7-23", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests Health And Sports Day in 2020. Health And Sports Day in 2020 is July 24th for the Olympic Games. * @throws Exception From 648c901d728724c62a1e8f1ab611a8daf4921d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Tue, 12 Jan 2021 13:58:28 +0100 Subject: [PATCH 125/687] Test on php 8 and remove faker deps (#238) --- composer.json | 3 +- tests/Base/YasumiTest.php | 23 +++++----- tests/YasumiBase.php | 95 ++++++++++++++++++++++++++++++++++++--- 3 files changed, 102 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 6411c39da..bc72ccdce 100755 --- a/composer.json +++ b/composer.json @@ -40,9 +40,8 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", - "fzaninotto/faker": "^1.9", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^8.5 | ^9.4" }, "autoload": { "psr-4": { diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index a7fc4d9e1..2923595c0 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -15,7 +15,6 @@ use DateTime; use DateTimeImmutable; use Exception; -use Faker\Factory; use InvalidArgumentException; use PHPUnit\Framework\TestCase; use ReflectionException; @@ -104,7 +103,7 @@ public function testCreateWithAbstractExtension(): void $class = YasumiExternalProvider::class; $instance = Yasumi::create( $class, - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) + self::numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) ); self::assertInstanceOf(YasumiExternalProvider::class, $instance); } @@ -120,7 +119,7 @@ public function testCreateWithInvalidLocale(): void Yasumi::create( 'Japan', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), + self::numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), 'wx_YZ' ); } @@ -145,7 +144,7 @@ public function testCount(): void */ public function testGetType(): void { - $holidays = Yasumi::create('Japan', Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND)); + $holidays = Yasumi::create('Japan', self::numberBetween(1949, self::YEAR_UPPER_BOUND)); $holiday = $holidays->getHoliday('newYearsDay'); self::assertIsString($holiday->getType()); @@ -157,7 +156,7 @@ public function testGetType(): void */ public function testGetYear(): void { - $year = Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND); + $year = self::numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND); $holidays = Yasumi::create('Netherlands', $year); self::assertIsInt($holidays->getYear()); @@ -173,7 +172,7 @@ public function testNext(): void { $country = 'Japan'; $name = 'childrensDay'; - $year = Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND - 1); + $year = self::numberBetween(1949, self::YEAR_UPPER_BOUND - 1); $holidays = Yasumi::create($country, $year); @@ -191,7 +190,7 @@ public function testNextWithBlankKey(): void $holidays = Yasumi::create( 'Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) + self::numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) ); $holidays->next(''); } @@ -206,7 +205,7 @@ public function testPrevious(): void $country = 'Netherlands'; $name = 'liberationDay'; $year_lower_limit = 1949; - $year = Factory::create()->numberBetween($year_lower_limit, self::YEAR_UPPER_BOUND); + $year = self::numberBetween($year_lower_limit, self::YEAR_UPPER_BOUND); $holidays = Yasumi::create($country, $year); @@ -229,7 +228,7 @@ public function testPreviousWithBlankKey(): void $holidays = Yasumi::create( 'Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) + self::numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) ); $holidays->previous(''); } @@ -423,7 +422,7 @@ public function testIsHolidayException(): void $this->expectException(TypeError::class); /** @noinspection PhpParamsInspection */ - Yasumi::create('Spain', Factory::create()->numberBetween( + Yasumi::create('Spain', self::numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND ))->isHoliday(new stdClass()); @@ -499,7 +498,7 @@ public function testIsWorkingDayException(): void $this->expectException(TypeError::class); /** @noinspection PhpParamsInspection */ - Yasumi::create('SouthAfrica', Factory::create()->numberBetween( + Yasumi::create('SouthAfrica', self::numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND ))->isWorkingDay(new stdClass()); @@ -562,7 +561,7 @@ public function testRemoveHoliday(): void */ public function testCreateByISO3166_2(): void { - $year = Factory::create()->numberBetween( + $year = self::numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND ); diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index a497b3abe..8b700c480 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -17,7 +17,6 @@ use DateTimeInterface; use DateTimeZone; use Exception; -use Faker\Factory as Faker; use InvalidArgumentException; use PHPUnit\Framework\AssertionFailedError; use ReflectionException; @@ -40,6 +39,8 @@ */ trait YasumiBase { + protected static $defaultTimezone = null; + /** * Asserts that the expected holidays are indeed a holiday for the given provider and year * @@ -322,7 +323,7 @@ public function generateRandomDates( $data = []; $range = $range ?? 1000; for ($y = 1; $y <= ($iterations ?? 10); $y++) { - $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC'))]; } @@ -348,7 +349,7 @@ public function generateRandomEasterDates( $range = $range ?? 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); $date = $this->calculateEaster($year, $timezone ?? 'UTC'); $data[] = [$year, $date->format('Y-m-d')]; @@ -478,7 +479,7 @@ public function generateRandomModifiedEasterDates( $data = []; $range = $range ?? 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); $date = $this->calculateEaster($year, $timezone ?? 'UTC'); $cb($date); @@ -610,7 +611,7 @@ public function generateRandomYear( int $lowerLimit = null, int $upperLimit = null ): int { - return (int) Faker::create()->numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); + return (int) self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } /** @@ -627,4 +628,88 @@ public function isWeekend( ): bool { return \in_array((int) $dateTime->format('w'), $weekendDays, true); } + + /** + * Returns a random number between $int1 and $int2 (any order) + * + * @param integer $int1 default to 0 + * @param integer $int2 defaults to 32 bit max integer, ie 2147483647 + * @example 79907610 + * + * @return integer + */ + public static function numberBetween($int1 = 0, $int2 = 2147483647) + { + $min = $int1 < $int2 ? $int1 : $int2; + $max = $int1 < $int2 ? $int2 : $int1; + return \mt_rand($min, $max); + } + + /** + * Get a DateTime object based on a random date between two given dates. + * Accepts date strings that can be recognized by strtotime(). + * + * @param \DateTime|string $startDate Defaults to 30 years ago + * @param \DateTime|string $endDate Defaults to "now" + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` + * @example DateTime('1999-02-02 11:42:52') + * @return \DateTime + * @see http://php.net/manual/en/timezones.php + * @see http://php.net/manual/en/function.date-default-timezone-get.php + */ + public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null) + { + $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : \strtotime($startDate); + $endTimestamp = static::getMaxTimestamp($endDate); + + if ($startTimestamp > $endTimestamp) { + throw new \InvalidArgumentException('Start date must be anterior to end date.'); + } + + $timestamp = \mt_rand($startTimestamp, $endTimestamp); + + return static::setTimezone( + new \DateTime('@' . $timestamp), + $timezone + ); + } + + /** + * @param \DateTime|string|float|int $max + * @return int|false + */ + protected static function getMaxTimestamp($max = 'now') + { + if (\is_numeric($max)) { + return (int) $max; + } + + if ($max instanceof \DateTime) { + return $max->getTimestamp(); + } + + return \strtotime(empty($max) ? 'now' : $max); + } + + /** + * Internal method to set the time zone on a DateTime. + * + * @param \DateTime $dt + * @param string|null $timezone + * + * @return \DateTime + */ + private static function setTimezone(\DateTime $dt, $timezone) + { + return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); + } + + /** + * @param string|null $timezone + * @return null|string + */ + private static function resolveTimezone($timezone) + { + return ((null === $timezone) ? ((null === static::$defaultTimezone) ? \date_default_timezone_get() : static::$defaultTimezone) : $timezone); + } } From 47eb2d6da0d87bd47623b97bc0598f8151cd5969 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 12 Jan 2021 22:25:33 +0900 Subject: [PATCH 126/687] Updated copyright year. --- .php_cs | 2 +- LICENSE | 2 +- phpunit.xml | 2 +- src/Yasumi/Exception/Exception.php | 4 ++-- src/Yasumi/Exception/InvalidDateException.php | 4 ++-- src/Yasumi/Exception/InvalidYearException.php | 5 +++-- src/Yasumi/Exception/MissingTranslationException.php | 4 ++-- src/Yasumi/Exception/ProviderNotFoundException.php | 4 ++-- src/Yasumi/Exception/UnknownLocaleException.php | 4 ++-- src/Yasumi/Filters/AbstractFilter.php | 4 ++-- src/Yasumi/Filters/BankHolidaysFilter.php | 4 ++-- src/Yasumi/Filters/BetweenFilter.php | 4 ++-- src/Yasumi/Filters/ObservedHolidaysFilter.php | 4 ++-- src/Yasumi/Filters/OfficialHolidaysFilter.php | 4 ++-- src/Yasumi/Filters/OnFilter.php | 4 ++-- src/Yasumi/Filters/OtherHolidaysFilter.php | 4 ++-- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 4 ++-- src/Yasumi/Holiday.php | 6 +++--- src/Yasumi/Provider/AbstractProvider.php | 4 ++-- src/Yasumi/Provider/Australia.php | 4 ++-- .../Provider/Australia/AustralianCapitalTerritory.php | 4 ++-- src/Yasumi/Provider/Australia/NewSouthWales.php | 4 ++-- src/Yasumi/Provider/Australia/NorthernTerritory.php | 4 ++-- src/Yasumi/Provider/Australia/Queensland.php | 4 ++-- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 4 ++-- src/Yasumi/Provider/Australia/SouthAustralia.php | 4 ++-- src/Yasumi/Provider/Australia/Tasmania.php | 4 ++-- .../Provider/Australia/Tasmania/CentralNorth.php | 4 ++-- .../Provider/Australia/Tasmania/FlindersIsland.php | 4 ++-- src/Yasumi/Provider/Australia/Tasmania/KingIsland.php | 4 ++-- src/Yasumi/Provider/Australia/Tasmania/Northeast.php | 4 ++-- src/Yasumi/Provider/Australia/Tasmania/Northwest.php | 4 ++-- .../Australia/Tasmania/Northwest/CircularHead.php | 4 ++-- src/Yasumi/Provider/Australia/Tasmania/South.php | 4 ++-- .../Provider/Australia/Tasmania/South/Southeast.php | 4 ++-- src/Yasumi/Provider/Australia/Victoria.php | 4 ++-- src/Yasumi/Provider/Australia/WesternAustralia.php | 4 ++-- src/Yasumi/Provider/Austria.php | 4 ++-- src/Yasumi/Provider/Austria/Burgenland.php | 4 ++-- src/Yasumi/Provider/Austria/Carinthia.php | 4 ++-- src/Yasumi/Provider/Austria/LowerAustria.php | 4 ++-- src/Yasumi/Provider/Austria/Salzburg.php | 4 ++-- src/Yasumi/Provider/Austria/Styria.php | 4 ++-- src/Yasumi/Provider/Austria/Tyrol.php | 4 ++-- src/Yasumi/Provider/Austria/UpperAustria.php | 4 ++-- src/Yasumi/Provider/Austria/Vienna.php | 4 ++-- src/Yasumi/Provider/Austria/Vorarlberg.php | 4 ++-- src/Yasumi/Provider/Belgium.php | 4 ++-- src/Yasumi/Provider/Bosnia.php | 4 ++-- src/Yasumi/Provider/Brazil.php | 4 ++-- src/Yasumi/Provider/Canada.php | 4 ++-- src/Yasumi/Provider/Canada/Alberta.php | 4 ++-- src/Yasumi/Provider/Canada/BritishColumbia.php | 4 ++-- src/Yasumi/Provider/Canada/Manitoba.php | 4 ++-- src/Yasumi/Provider/Canada/NewBrunswick.php | 4 ++-- .../Provider/Canada/NewfoundlandAndLabrador.php | 4 ++-- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 4 ++-- src/Yasumi/Provider/Canada/NovaScotia.php | 4 ++-- src/Yasumi/Provider/Canada/Nunavut.php | 4 ++-- src/Yasumi/Provider/Canada/Ontario.php | 4 ++-- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 4 ++-- src/Yasumi/Provider/Canada/Quebec.php | 4 ++-- src/Yasumi/Provider/Canada/Saskatchewan.php | 4 ++-- src/Yasumi/Provider/Canada/Yukon.php | 4 ++-- src/Yasumi/Provider/ChristianHolidays.php | 4 ++-- src/Yasumi/Provider/CommonHolidays.php | 4 ++-- src/Yasumi/Provider/Croatia.php | 4 ++-- src/Yasumi/Provider/CzechRepublic.php | 4 ++-- src/Yasumi/Provider/DateTimeZoneFactory.php | 4 ++-- src/Yasumi/Provider/Denmark.php | 4 ++-- src/Yasumi/Provider/Estonia.php | 4 ++-- src/Yasumi/Provider/Finland.php | 4 ++-- src/Yasumi/Provider/France.php | 4 ++-- src/Yasumi/Provider/France/BasRhin.php | 4 ++-- src/Yasumi/Provider/France/HautRhin.php | 4 ++-- src/Yasumi/Provider/France/Moselle.php | 4 ++-- src/Yasumi/Provider/Germany.php | 4 ++-- src/Yasumi/Provider/Germany/BadenWurttemberg.php | 4 ++-- src/Yasumi/Provider/Germany/Bavaria.php | 4 ++-- src/Yasumi/Provider/Germany/Berlin.php | 4 ++-- src/Yasumi/Provider/Germany/Brandenburg.php | 4 ++-- src/Yasumi/Provider/Germany/Bremen.php | 4 ++-- src/Yasumi/Provider/Germany/Hamburg.php | 4 ++-- src/Yasumi/Provider/Germany/Hesse.php | 4 ++-- src/Yasumi/Provider/Germany/LowerSaxony.php | 4 ++-- .../Provider/Germany/MecklenburgWesternPomerania.php | 4 ++-- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 4 ++-- src/Yasumi/Provider/Germany/RhinelandPalatinate.php | 4 ++-- src/Yasumi/Provider/Germany/Saarland.php | 4 ++-- src/Yasumi/Provider/Germany/Saxony.php | 4 ++-- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 4 ++-- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 4 ++-- src/Yasumi/Provider/Germany/Thuringia.php | 4 ++-- src/Yasumi/Provider/Greece.php | 4 ++-- src/Yasumi/Provider/Hungary.php | 4 ++-- src/Yasumi/Provider/Ireland.php | 4 ++-- src/Yasumi/Provider/Italy.php | 4 ++-- src/Yasumi/Provider/Japan.php | 4 ++-- src/Yasumi/Provider/Latvia.php | 4 ++-- src/Yasumi/Provider/Lithuania.php | 4 ++-- src/Yasumi/Provider/Luxembourg.php | 11 +++++++++++ src/Yasumi/Provider/Netherlands.php | 4 ++-- src/Yasumi/Provider/NewZealand.php | 4 ++-- src/Yasumi/Provider/Norway.php | 4 ++-- src/Yasumi/Provider/Poland.php | 4 ++-- src/Yasumi/Provider/Portugal.php | 4 ++-- src/Yasumi/Provider/Romania.php | 4 ++-- src/Yasumi/Provider/Russia.php | 4 ++-- src/Yasumi/Provider/Slovakia.php | 4 ++-- src/Yasumi/Provider/SouthAfrica.php | 4 ++-- src/Yasumi/Provider/SouthKorea.php | 4 ++-- src/Yasumi/Provider/Spain.php | 4 ++-- src/Yasumi/Provider/Spain/Andalusia.php | 4 ++-- src/Yasumi/Provider/Spain/Aragon.php | 4 ++-- 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 ++-- src/Yasumi/Provider/Spain/CastillaLaMancha.php | 4 ++-- src/Yasumi/Provider/Spain/Catalonia.php | 4 ++-- src/Yasumi/Provider/Spain/Ceuta.php | 4 ++-- src/Yasumi/Provider/Spain/CommunityOfMadrid.php | 4 ++-- src/Yasumi/Provider/Spain/Extremadura.php | 4 ++-- src/Yasumi/Provider/Spain/Galicia.php | 4 ++-- src/Yasumi/Provider/Spain/LaRioja.php | 4 ++-- src/Yasumi/Provider/Spain/Melilla.php | 4 ++-- src/Yasumi/Provider/Spain/Navarre.php | 4 ++-- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 4 ++-- src/Yasumi/Provider/Spain/ValencianCommunity.php | 4 ++-- src/Yasumi/Provider/Sweden.php | 4 ++-- src/Yasumi/Provider/Switzerland.php | 4 ++-- src/Yasumi/Provider/Switzerland/Aargau.php | 4 ++-- .../Provider/Switzerland/AppenzellAusserrhoden.php | 4 ++-- .../Provider/Switzerland/AppenzellInnerrhoden.php | 4 ++-- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 4 ++-- src/Yasumi/Provider/Switzerland/BaselStadt.php | 4 ++-- src/Yasumi/Provider/Switzerland/Bern.php | 4 ++-- src/Yasumi/Provider/Switzerland/Fribourg.php | 4 ++-- src/Yasumi/Provider/Switzerland/Geneva.php | 4 ++-- src/Yasumi/Provider/Switzerland/Glarus.php | 4 ++-- src/Yasumi/Provider/Switzerland/Grisons.php | 4 ++-- src/Yasumi/Provider/Switzerland/Jura.php | 4 ++-- src/Yasumi/Provider/Switzerland/Lucerne.php | 4 ++-- src/Yasumi/Provider/Switzerland/Neuchatel.php | 4 ++-- src/Yasumi/Provider/Switzerland/Nidwalden.php | 4 ++-- src/Yasumi/Provider/Switzerland/Obwalden.php | 4 ++-- src/Yasumi/Provider/Switzerland/Schaffhausen.php | 4 ++-- src/Yasumi/Provider/Switzerland/Schwyz.php | 4 ++-- src/Yasumi/Provider/Switzerland/Solothurn.php | 4 ++-- src/Yasumi/Provider/Switzerland/StGallen.php | 4 ++-- src/Yasumi/Provider/Switzerland/Thurgau.php | 4 ++-- src/Yasumi/Provider/Switzerland/Ticino.php | 4 ++-- src/Yasumi/Provider/Switzerland/Uri.php | 4 ++-- src/Yasumi/Provider/Switzerland/Valais.php | 4 ++-- src/Yasumi/Provider/Switzerland/Vaud.php | 4 ++-- src/Yasumi/Provider/Switzerland/Zug.php | 4 ++-- src/Yasumi/Provider/Switzerland/Zurich.php | 4 ++-- src/Yasumi/Provider/USA.php | 4 ++-- src/Yasumi/Provider/Ukraine.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom/England.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 4 ++-- src/Yasumi/Provider/UnitedKingdom/Wales.php | 4 ++-- src/Yasumi/ProviderInterface.php | 4 ++-- src/Yasumi/SubstituteHoliday.php | 5 +++-- src/Yasumi/Translations.php | 4 ++-- src/Yasumi/TranslationsInterface.php | 4 ++-- src/Yasumi/Yasumi.php | 4 ++-- src/Yasumi/data/locales.php | 4 ++-- src/Yasumi/data/translations/allSaintsDay.php | 4 ++-- src/Yasumi/data/translations/allSaintsEve.php | 4 ++-- src/Yasumi/data/translations/allSoulsDay.php | 4 ++-- src/Yasumi/data/translations/annunciation.php | 4 ++-- src/Yasumi/data/translations/anzacDay.php | 4 ++-- src/Yasumi/data/translations/armisticeDay.php | 4 ++-- src/Yasumi/data/translations/ascensionDay.php | 4 ++-- src/Yasumi/data/translations/ashWednesday.php | 4 ++-- src/Yasumi/data/translations/assumptionOfMary.php | 4 ++-- src/Yasumi/data/translations/australiaDay.php | 4 ++-- src/Yasumi/data/translations/canadaDay.php | 4 ++-- .../data/translations/carnationRevolutionDay.php | 4 ++-- src/Yasumi/data/translations/christmasDay.php | 4 ++-- src/Yasumi/data/translations/christmasEve.php | 4 ++-- src/Yasumi/data/translations/civicHoliday.php | 4 ++-- src/Yasumi/data/translations/corpusChristi.php | 4 ++-- src/Yasumi/data/translations/dayAfterNewYearsDay.php | 4 ++-- src/Yasumi/data/translations/dayOfLiberation.php | 4 ++-- src/Yasumi/data/translations/dayOfReformation.php | 4 ++-- src/Yasumi/data/translations/discoveryDay.php | 4 ++-- src/Yasumi/data/translations/easter.php | 4 ++-- src/Yasumi/data/translations/easterMonday.php | 4 ++-- src/Yasumi/data/translations/epiphany.php | 4 ++-- src/Yasumi/data/translations/epiphanyEve.php | 4 ++-- src/Yasumi/data/translations/familyDay.php | 4 ++-- src/Yasumi/data/translations/fathersDay.php | 4 ++-- src/Yasumi/data/translations/goldCupParadeDay.php | 4 ++-- src/Yasumi/data/translations/goodFriday.php | 4 ++-- src/Yasumi/data/translations/heritageDay.php | 4 ++-- src/Yasumi/data/translations/immaculateConception.php | 4 ++-- .../data/translations/internationalWomensDay.php | 4 ++-- .../data/translations/internationalWorkersDay.php | 4 ++-- src/Yasumi/data/translations/islanderDay.php | 4 ++-- src/Yasumi/data/translations/labourDay.php | 4 ++-- src/Yasumi/data/translations/louisRielDay.php | 4 ++-- src/Yasumi/data/translations/maundyThursday.php | 4 ++-- src/Yasumi/data/translations/mothersDay.php | 4 ++-- src/Yasumi/data/translations/natalHoliday.php | 4 ++-- .../translations/nationalIndigenousPeoplesDay.php | 4 ++-- src/Yasumi/data/translations/nationalPatriotsDay.php | 4 ++-- src/Yasumi/data/translations/newYearsDay.php | 4 ++-- src/Yasumi/data/translations/newYearsEve.php | 4 ++-- .../data/translations/novaScotiaHeritageDay.php | 4 ++-- src/Yasumi/data/translations/orangemensDay.php | 4 ++-- src/Yasumi/data/translations/pentecost.php | 4 ++-- src/Yasumi/data/translations/pentecostMonday.php | 4 ++-- src/Yasumi/data/translations/plebisciteDay.php | 4 ++-- src/Yasumi/data/translations/portugalDay.php | 4 ++-- .../data/translations/portugueseRepublicDay.php | 4 ++-- src/Yasumi/data/translations/queensBirthday.php | 4 ++-- src/Yasumi/data/translations/reformationDay.php | 4 ++-- src/Yasumi/data/translations/remembranceDay.php | 4 ++-- .../data/translations/restorationOfIndepence.php | 4 ++-- src/Yasumi/data/translations/saintJeanBaptisteDay.php | 4 ++-- src/Yasumi/data/translations/saskatchewanDay.php | 4 ++-- src/Yasumi/data/translations/secondChristmasDay.php | 4 ++-- src/Yasumi/data/translations/secondNewYearsDay.php | 4 ++-- src/Yasumi/data/translations/stAndrewsDay.php | 4 ++-- src/Yasumi/data/translations/stDavidsDay.php | 4 ++-- src/Yasumi/data/translations/stFloriansDay.php | 4 ++-- src/Yasumi/data/translations/stGeorgesDay.php | 4 ++-- src/Yasumi/data/translations/stJohnsDay.php | 4 ++-- src/Yasumi/data/translations/stJohnsEve.php | 4 ++-- src/Yasumi/data/translations/stJosephsDay.php | 4 ++-- src/Yasumi/data/translations/stLeopoldsDay.php | 4 ++-- src/Yasumi/data/translations/stMartinsDay.php | 4 ++-- src/Yasumi/data/translations/stRupertsDay.php | 4 ++-- src/Yasumi/data/translations/stStephensDay.php | 4 ++-- src/Yasumi/data/translations/substituteHoliday.php | 4 ++-- src/Yasumi/data/translations/summerTime.php | 4 ++-- src/Yasumi/data/translations/terryFoxDay.php | 4 ++-- src/Yasumi/data/translations/thanksgivingDay.php | 4 ++-- src/Yasumi/data/translations/valentinesDay.php | 4 ++-- src/Yasumi/data/translations/victoriaDay.php | 4 ++-- src/Yasumi/data/translations/victoryInEuropeDay.php | 4 ++-- src/Yasumi/data/translations/waitangiDay.php | 4 ++-- src/Yasumi/data/translations/walpurgisEve.php | 4 ++-- src/Yasumi/data/translations/winterTime.php | 4 ++-- src/Yasumi/data/translations/worldAnimalDay.php | 4 ++-- src/Yasumi/data/translations/yukonHeritageDay.php | 4 ++-- tests/Australia/AnzacDayTest.php | 4 ++-- tests/Australia/AustraliaBaseTestCase.php | 4 ++-- tests/Australia/AustraliaDayTest.php | 4 ++-- tests/Australia/AustraliaTest.php | 4 ++-- .../AustralianCapitalTerritory/AnzacDayTest.php | 4 ++-- .../AustralianCapitalTerritory/AustraliaDayTest.php | 4 ++-- .../AustralianCapitalTerritoryBaseTestCase.php | 4 ++-- .../AustralianCapitalTerritoryTest.php | 4 ++-- .../AustralianCapitalTerritory/BoxingDayTest.php | 4 ++-- .../AustralianCapitalTerritory/CanberraDayTest.php | 4 ++-- .../AustralianCapitalTerritory/ChristmasDayTest.php | 4 ++-- .../AustralianCapitalTerritory/EasterMondayTest.php | 4 ++-- .../AustralianCapitalTerritory/EasterSaturdayTest.php | 4 ++-- .../AustralianCapitalTerritory/EasterSundayTest.php | 4 ++-- .../AustralianCapitalTerritory/GoodFridayTest.php | 4 ++-- .../AustralianCapitalTerritory/LabourDayTest.php | 4 ++-- .../AustralianCapitalTerritory/NewYearsDayTest.php | 4 ++-- .../AustralianCapitalTerritory/QueensBirthdayTest.php | 4 ++-- .../ReconciliationDayTest.php | 4 ++-- tests/Australia/BoxingDayTest.php | 4 ++-- tests/Australia/ChristmasDayTest.php | 4 ++-- tests/Australia/EasterMondayTest.php | 4 ++-- tests/Australia/GoodFridayTest.php | 4 ++-- tests/Australia/NewSouthWales/AnzacDayTest.php | 4 ++-- tests/Australia/NewSouthWales/AustraliaDayTest.php | 4 ++-- tests/Australia/NewSouthWales/BankHolidayTest.php | 4 ++-- tests/Australia/NewSouthWales/BoxingDayTest.php | 4 ++-- tests/Australia/NewSouthWales/ChristmasDayTest.php | 4 ++-- tests/Australia/NewSouthWales/EasterMondayTest.php | 4 ++-- tests/Australia/NewSouthWales/EasterSaturdayTest.php | 4 ++-- tests/Australia/NewSouthWales/EasterSundayTest.php | 4 ++-- tests/Australia/NewSouthWales/GoodFridayTest.php | 4 ++-- tests/Australia/NewSouthWales/LabourDayTest.php | 4 ++-- .../NewSouthWales/NewSouthWalesBaseTestCase.php | 4 ++-- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 4 ++-- tests/Australia/NewSouthWales/NewYearsDayTest.php | 4 ++-- tests/Australia/NewSouthWales/QueensBirthdayTest.php | 4 ++-- tests/Australia/NewYearsDayTest.php | 4 ++-- tests/Australia/NorthernTerritory/AnzacDayTest.php | 4 ++-- .../Australia/NorthernTerritory/AustraliaDayTest.php | 4 ++-- tests/Australia/NorthernTerritory/BoxingDayTest.php | 4 ++-- .../Australia/NorthernTerritory/ChristmasDayTest.php | 4 ++-- .../Australia/NorthernTerritory/EasterMondayTest.php | 4 ++-- .../NorthernTerritory/EasterSaturdayTest.php | 4 ++-- tests/Australia/NorthernTerritory/GoodFridayTest.php | 4 ++-- tests/Australia/NorthernTerritory/MayDayTest.php | 4 ++-- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 4 ++-- .../NorthernTerritoryBaseTestCase.php | 4 ++-- .../NorthernTerritory/NorthernTerritoryTest.php | 4 ++-- tests/Australia/NorthernTerritory/PicnicDayTest.php | 4 ++-- .../NorthernTerritory/QueensBirthdayTest.php | 4 ++-- tests/Australia/Queensland/AnzacDayTest.php | 4 ++-- tests/Australia/Queensland/AustraliaDayTest.php | 4 ++-- tests/Australia/Queensland/BoxingDayTest.php | 4 ++-- tests/Australia/Queensland/Brisbane/AnzacDayTest.php | 4 ++-- .../Queensland/Brisbane/AustraliaDayTest.php | 4 ++-- tests/Australia/Queensland/Brisbane/BoxingDayTest.php | 4 ++-- .../Queensland/Brisbane/BrisbaneBaseTestCase.php | 4 ++-- tests/Australia/Queensland/Brisbane/BrisbaneTest.php | 4 ++-- .../Queensland/Brisbane/ChristmasDayTest.php | 4 ++-- .../Queensland/Brisbane/EasterMondayTest.php | 4 ++-- .../Australia/Queensland/Brisbane/GoodFridayTest.php | 4 ++-- tests/Australia/Queensland/Brisbane/LabourDayTest.php | 4 ++-- .../Australia/Queensland/Brisbane/NewYearsDayTest.php | 4 ++-- .../Australia/Queensland/Brisbane/PeoplesDayTest.php | 4 ++-- .../Queensland/Brisbane/QueensBirthdayTest.php | 4 ++-- tests/Australia/Queensland/ChristmasDayTest.php | 4 ++-- tests/Australia/Queensland/EasterMondayTest.php | 4 ++-- tests/Australia/Queensland/GoodFridayTest.php | 4 ++-- tests/Australia/Queensland/LabourDayTest.php | 4 ++-- tests/Australia/Queensland/NewYearsDayTest.php | 4 ++-- tests/Australia/Queensland/QueensBirthdayTest.php | 4 ++-- tests/Australia/Queensland/QueenslandBaseTestCase.php | 4 ++-- tests/Australia/Queensland/QueenslandTest.php | 4 ++-- tests/Australia/SouthAustralia/AdelaideCupDayTest.php | 4 ++-- tests/Australia/SouthAustralia/AnzacDayTest.php | 4 ++-- tests/Australia/SouthAustralia/AustraliaDayTest.php | 4 ++-- tests/Australia/SouthAustralia/ChristmasDayTest.php | 4 ++-- tests/Australia/SouthAustralia/EasterMondayTest.php | 4 ++-- tests/Australia/SouthAustralia/EasterSaturdayTest.php | 4 ++-- tests/Australia/SouthAustralia/GoodFridayTest.php | 4 ++-- tests/Australia/SouthAustralia/LabourDayTest.php | 4 ++-- tests/Australia/SouthAustralia/NewYearsDayTest.php | 4 ++-- .../Australia/SouthAustralia/ProclamationDayTest.php | 4 ++-- tests/Australia/SouthAustralia/QueensBirthdayTest.php | 4 ++-- .../SouthAustralia/SouthAustraliaBaseTestCase.php | 4 ++-- tests/Australia/SouthAustralia/SouthAustraliaTest.php | 4 ++-- tests/Australia/Tasmania/AnzacDayTest.php | 4 ++-- tests/Australia/Tasmania/AustraliaDayTest.php | 4 ++-- tests/Australia/Tasmania/BoxingDayTest.php | 4 ++-- .../Australia/Tasmania/CentralNorth/AnzacDayTest.php | 4 ++-- .../Tasmania/CentralNorth/AustraliaDayTest.php | 4 ++-- .../Australia/Tasmania/CentralNorth/BoxingDayTest.php | 4 ++-- .../CentralNorth/CentralNorthBaseTestCase.php | 4 ++-- .../Tasmania/CentralNorth/CentralNorthTest.php | 4 ++-- .../Tasmania/CentralNorth/ChristmasDayTest.php | 4 ++-- .../Tasmania/CentralNorth/DevonportShowTest.php | 4 ++-- .../Tasmania/CentralNorth/EasterMondayTest.php | 4 ++-- .../Tasmania/CentralNorth/EightHourDayTest.php | 4 ++-- .../Tasmania/CentralNorth/GoodFridayTest.php | 4 ++-- .../Tasmania/CentralNorth/NewYearsDayTest.php | 4 ++-- .../Tasmania/CentralNorth/QueensBirthdayTest.php | 4 ++-- .../Tasmania/CentralNorth/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/ChristmasDayTest.php | 4 ++-- tests/Australia/Tasmania/EasterMondayTest.php | 4 ++-- tests/Australia/Tasmania/EightHourDayTest.php | 4 ++-- .../Tasmania/FlindersIsland/AnzacDayTest.php | 4 ++-- .../Tasmania/FlindersIsland/AustraliaDayTest.php | 4 ++-- .../Tasmania/FlindersIsland/BoxingDayTest.php | 4 ++-- .../Tasmania/FlindersIsland/ChristmasDayTest.php | 4 ++-- .../Tasmania/FlindersIsland/EasterMondayTest.php | 4 ++-- .../Tasmania/FlindersIsland/EightHourDayTest.php | 4 ++-- .../FlindersIsland/FlindersIslandBaseTestCase.php | 4 ++-- .../FlindersIsland/FlindersIslandShowTest.php | 4 ++-- .../Tasmania/FlindersIsland/FlindersIslandTest.php | 4 ++-- .../Tasmania/FlindersIsland/GoodFridayTest.php | 4 ++-- .../Tasmania/FlindersIsland/NewYearsDayTest.php | 4 ++-- .../Tasmania/FlindersIsland/QueensBirthdayTest.php | 4 ++-- .../Tasmania/FlindersIsland/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/GoodFridayTest.php | 4 ++-- tests/Australia/Tasmania/KingIsland/AnzacDayTest.php | 4 ++-- .../Tasmania/KingIsland/AustraliaDayTest.php | 4 ++-- tests/Australia/Tasmania/KingIsland/BoxingDayTest.php | 4 ++-- .../Tasmania/KingIsland/ChristmasDayTest.php | 4 ++-- .../Tasmania/KingIsland/EasterMondayTest.php | 4 ++-- .../Tasmania/KingIsland/EightHourDayTest.php | 4 ++-- .../Australia/Tasmania/KingIsland/GoodFridayTest.php | 4 ++-- .../Tasmania/KingIsland/KingIslandBaseTestCase.php | 4 ++-- .../Tasmania/KingIsland/KingIslandShowTest.php | 4 ++-- .../Australia/Tasmania/KingIsland/KingIslandTest.php | 4 ++-- .../Australia/Tasmania/KingIsland/NewYearsDayTest.php | 4 ++-- .../Tasmania/KingIsland/QueensBirthdayTest.php | 4 ++-- .../Tasmania/KingIsland/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/NewYearsDayTest.php | 4 ++-- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 4 ++-- .../Australia/Tasmania/Northeast/AustraliaDayTest.php | 4 ++-- tests/Australia/Tasmania/Northeast/BoxingDayTest.php | 4 ++-- .../Australia/Tasmania/Northeast/ChristmasDayTest.php | 4 ++-- .../Australia/Tasmania/Northeast/EasterMondayTest.php | 4 ++-- .../Australia/Tasmania/Northeast/EightHourDayTest.php | 4 ++-- tests/Australia/Tasmania/Northeast/GoodFridayTest.php | 4 ++-- .../Tasmania/Northeast/LauncestonShowTest.php | 4 ++-- .../Australia/Tasmania/Northeast/NewYearsDayTest.php | 4 ++-- .../Tasmania/Northeast/NortheastBaseTestCase.php | 4 ++-- tests/Australia/Tasmania/Northeast/NortheastTest.php | 4 ++-- .../Tasmania/Northeast/QueensBirthdayTest.php | 4 ++-- .../Tasmania/Northeast/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 4 ++-- .../Australia/Tasmania/Northwest/AustraliaDayTest.php | 4 ++-- tests/Australia/Tasmania/Northwest/BoxingDayTest.php | 4 ++-- tests/Australia/Tasmania/Northwest/BurnieShowTest.php | 4 ++-- .../Australia/Tasmania/Northwest/ChristmasDayTest.php | 4 ++-- .../Tasmania/Northwest/CircularHead/AGFESTTest.php | 4 ++-- .../Tasmania/Northwest/CircularHead/AnzacDayTest.php | 4 ++-- .../Northwest/CircularHead/AustraliaDayTest.php | 4 ++-- .../Tasmania/Northwest/CircularHead/BoxingDayTest.php | 4 ++-- .../Northwest/CircularHead/BurnieShowTest.php | 4 ++-- .../Northwest/CircularHead/ChristmasDayTest.php | 4 ++-- .../CircularHead/CircularHeadBaseTestCase.php | 4 ++-- .../Northwest/CircularHead/CircularHeadTest.php | 4 ++-- .../Northwest/CircularHead/EasterMondayTest.php | 4 ++-- .../Northwest/CircularHead/EightHourDayTest.php | 4 ++-- .../Northwest/CircularHead/GoodFridayTest.php | 4 ++-- .../Northwest/CircularHead/NewYearsDayTest.php | 4 ++-- .../Northwest/CircularHead/QueensBirthdayTest.php | 4 ++-- .../Northwest/CircularHead/RecreationDayTest.php | 4 ++-- .../Australia/Tasmania/Northwest/EasterMondayTest.php | 4 ++-- .../Australia/Tasmania/Northwest/EightHourDayTest.php | 4 ++-- tests/Australia/Tasmania/Northwest/GoodFridayTest.php | 4 ++-- .../Australia/Tasmania/Northwest/NewYearsDayTest.php | 4 ++-- .../Tasmania/Northwest/NorthwestBaseTestCase.php | 4 ++-- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 4 ++-- .../Tasmania/Northwest/QueensBirthdayTest.php | 4 ++-- .../Tasmania/Northwest/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/QueensBirthdayTest.php | 4 ++-- tests/Australia/Tasmania/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/South/AnzacDayTest.php | 4 ++-- tests/Australia/Tasmania/South/AustraliaDayTest.php | 4 ++-- tests/Australia/Tasmania/South/BoxingDayTest.php | 4 ++-- tests/Australia/Tasmania/South/ChristmasDayTest.php | 4 ++-- tests/Australia/Tasmania/South/EasterMondayTest.php | 4 ++-- tests/Australia/Tasmania/South/EightHourDayTest.php | 4 ++-- tests/Australia/Tasmania/South/GoodFridayTest.php | 4 ++-- tests/Australia/Tasmania/South/HobartShowTest.php | 4 ++-- tests/Australia/Tasmania/South/NewYearsDayTest.php | 4 ++-- tests/Australia/Tasmania/South/QueensBirthdayTest.php | 4 ++-- tests/Australia/Tasmania/South/RecreationDayTest.php | 4 ++-- tests/Australia/Tasmania/South/SouthBaseTestCase.php | 4 ++-- tests/Australia/Tasmania/South/SouthTest.php | 4 ++-- .../Tasmania/South/Southeast/AnzacDayTest.php | 4 ++-- .../Tasmania/South/Southeast/AustraliaDayTest.php | 4 ++-- .../Tasmania/South/Southeast/BoxingDayTest.php | 4 ++-- .../Tasmania/South/Southeast/ChristmasDayTest.php | 4 ++-- .../Tasmania/South/Southeast/EasterMondayTest.php | 4 ++-- .../Tasmania/South/Southeast/EightHourDayTest.php | 4 ++-- .../Tasmania/South/Southeast/GoodFridayTest.php | 4 ++-- .../Tasmania/South/Southeast/HobartRegattaTest.php | 4 ++-- .../Tasmania/South/Southeast/HobartShowTest.php | 4 ++-- .../Tasmania/South/Southeast/NewYearsDayTest.php | 4 ++-- .../Tasmania/South/Southeast/QueensBirthdayTest.php | 4 ++-- .../South/Southeast/SoutheastBaseTestCase.php | 4 ++-- .../Tasmania/South/Southeast/SoutheastTest.php | 4 ++-- tests/Australia/Tasmania/TasmaniaBaseTestCase.php | 4 ++-- tests/Australia/Tasmania/TasmaniaTest.php | 4 ++-- tests/Australia/Victoria/AFLGrandFinalFridayTest.php | 4 ++-- tests/Australia/Victoria/AnzacDayTest.php | 4 ++-- tests/Australia/Victoria/AustraliaDayTest.php | 4 ++-- tests/Australia/Victoria/BoxingDayTest.php | 4 ++-- tests/Australia/Victoria/ChristmasDayTest.php | 4 ++-- tests/Australia/Victoria/EasterMondayTest.php | 4 ++-- tests/Australia/Victoria/EasterSaturdayTest.php | 4 ++-- tests/Australia/Victoria/EasterSundayTest.php | 4 ++-- tests/Australia/Victoria/GoodFridayTest.php | 4 ++-- tests/Australia/Victoria/LabourDayTest.php | 4 ++-- tests/Australia/Victoria/MelbourneCupDayTest.php | 4 ++-- tests/Australia/Victoria/NewYearsDayTest.php | 4 ++-- tests/Australia/Victoria/QueensBirthdayTest.php | 4 ++-- tests/Australia/Victoria/VictoriaBaseTestCase.php | 4 ++-- tests/Australia/Victoria/VictoriaTest.php | 4 ++-- tests/Australia/WesternAustralia/AnzacDayTest.php | 4 ++-- tests/Australia/WesternAustralia/AustraliaDayTest.php | 4 ++-- tests/Australia/WesternAustralia/BoxingDayTest.php | 4 ++-- tests/Australia/WesternAustralia/ChristmasDayTest.php | 4 ++-- tests/Australia/WesternAustralia/EasterMondayTest.php | 4 ++-- tests/Australia/WesternAustralia/GoodFridayTest.php | 4 ++-- tests/Australia/WesternAustralia/LabourDayTest.php | 4 ++-- tests/Australia/WesternAustralia/NewYearsDayTest.php | 4 ++-- .../Australia/WesternAustralia/QueensBirthdayTest.php | 4 ++-- .../WesternAustralia/WesternAustraliaBaseTestCase.php | 4 ++-- .../WesternAustralia/WesternAustraliaDayTest.php | 4 ++-- .../WesternAustralia/WesternAustraliaTest.php | 4 ++-- tests/Austria/AllSaintsDayTest.php | 4 ++-- tests/Austria/AscensionDayTest.php | 4 ++-- tests/Austria/AssumptionOfMaryTest.php | 4 ++-- tests/Austria/AustriaBaseTestCase.php | 4 ++-- tests/Austria/AustriaTest.php | 4 ++-- tests/Austria/Burgenland/BurgenlandBaseTestCase.php | 4 ++-- tests/Austria/Burgenland/stMartinsDayTest.php | 4 ++-- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 4 ++-- tests/Austria/Carinthia/PlebisciteDayTest.php | 4 ++-- tests/Austria/Carinthia/StJosephsDayTest.php | 4 ++-- tests/Austria/ChristmasTest.php | 4 ++-- tests/Austria/CorpusChristiTest.php | 4 ++-- tests/Austria/EasterMondayTest.php | 4 ++-- tests/Austria/EasterTest.php | 4 ++-- tests/Austria/EpiphanyTest.php | 4 ++-- tests/Austria/ImmaculateConceptionTest.php | 4 ++-- tests/Austria/InternationalWorkersDayTest.php | 4 ++-- .../Austria/LowerAustria/LowerAustriaBaseTestCase.php | 4 ++-- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 4 ++-- tests/Austria/NationalDayTest.php | 4 ++-- tests/Austria/NewYearsDayTest.php | 4 ++-- tests/Austria/PentecostMondayTest.php | 4 ++-- tests/Austria/PentecostTest.php | 4 ++-- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 4 ++-- tests/Austria/Salzburg/StRupertsDayTest.php | 4 ++-- tests/Austria/SecondChristmasDayTest.php | 4 ++-- tests/Austria/Styria/StJosephsDayTest.php | 4 ++-- tests/Austria/Styria/StyriaBaseTestCase.php | 4 ++-- tests/Austria/Tyrol/StJosephsDayTest.php | 4 ++-- tests/Austria/Tyrol/TyrolBaseTestCase.php | 4 ++-- tests/Austria/UpperAustria/StFloriansDayTest.php | 4 ++-- .../Austria/UpperAustria/UpperAustriaBaseTestCase.php | 4 ++-- tests/Austria/Vienna/StLeopoldsDayTest.php | 4 ++-- tests/Austria/Vienna/ViennaBaseTestCase.php | 4 ++-- tests/Austria/Vorarlberg/StJosephsDayTest.php | 4 ++-- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 4 ++-- tests/Base/HolidayBetweenFilterTest.php | 4 ++-- tests/Base/HolidayFiltersTest.php | 4 ++-- tests/Base/HolidayOnFilterTest.php | 4 ++-- tests/Base/HolidayTest.php | 4 ++-- tests/Base/SubstituteHolidayTest.php | 4 ++-- tests/Base/TranslationsTest.php | 4 ++-- tests/Base/TypographyTest.php | 8 ++++---- tests/Base/WeekendTest.php | 4 ++-- tests/Base/YasumiExternalProvider.php | 4 ++-- tests/Base/YasumiTest.php | 4 ++-- tests/Base/YasumiWorkdayTest.php | 4 ++-- tests/Belgium/AllSaintsDayTest.php | 4 ++-- tests/Belgium/ArmisticeDayTest.php | 4 ++-- tests/Belgium/AscensionDayTest.php | 4 ++-- tests/Belgium/AssumptionOfMaryTest.php | 4 ++-- tests/Belgium/BelgiumBaseTestCase.php | 4 ++-- tests/Belgium/BelgiumTest.php | 4 ++-- tests/Belgium/ChristmasTest.php | 4 ++-- tests/Belgium/EasterMondayTest.php | 4 ++-- tests/Belgium/EasterTest.php | 4 ++-- tests/Belgium/InternationalWorkersDayTest.php | 4 ++-- tests/Belgium/NationalDayTest.php | 4 ++-- tests/Belgium/NewYearsDayTest.php | 4 ++-- tests/Belgium/PentecostTest.php | 4 ++-- tests/Belgium/pentecostMondayTest.php | 4 ++-- tests/Bosnia/BosniaBaseTestCase.php | 4 ++-- tests/Bosnia/BosniaTest.php | 4 ++-- tests/Bosnia/ChristmasDayTest.php | 4 ++-- tests/Bosnia/DayAfterNewYearsDay.php | 4 ++-- tests/Bosnia/EasterTest.php | 4 ++-- tests/Bosnia/IndependenceDayTest.php | 4 ++-- tests/Bosnia/InternationalWorkersDayTest.php | 4 ++-- tests/Bosnia/NewYearsDayTest.php | 4 ++-- tests/Bosnia/OrthodoxChristmasDay.php | 4 ++-- tests/Bosnia/SecondLabourDay.php | 4 ++-- tests/Bosnia/StatehoodDayTest.php | 4 ++-- tests/Brazil/AllSoulsDayTest.php | 4 ++-- tests/Brazil/AshWednesdayTest.php | 4 ++-- tests/Brazil/BrazilBaseTestCase.php | 4 ++-- tests/Brazil/BrazilTest.php | 4 ++-- tests/Brazil/CarnavalMondayTest.php | 4 ++-- tests/Brazil/CarnavalTuesdayTest.php | 4 ++-- tests/Brazil/ChristmasDayTest.php | 4 ++-- tests/Brazil/CorpusChristiTest.php | 4 ++-- tests/Brazil/EasterTest.php | 4 ++-- tests/Brazil/GoodFridayTest.php | 4 ++-- tests/Brazil/IndependenceDayTest.php | 4 ++-- tests/Brazil/InternationalWorkersDayTest.php | 4 ++-- tests/Brazil/NewYearsDayTest.php | 4 ++-- tests/Brazil/OurLadyOfAparecidaDayTest.php | 4 ++-- tests/Brazil/ProclamationOfRepublicDayTest.php | 4 ++-- tests/Brazil/TiradentesDayTest.php | 4 ++-- tests/Canada/Alberta/AlbertaBaseTestCase.php | 4 ++-- tests/Canada/Alberta/AlbertaTest.php | 4 ++-- .../BritishColumbia/BritishColumbiaBaseTestCase.php | 4 ++-- tests/Canada/BritishColumbia/BritishColumbiaTest.php | 4 ++-- tests/Canada/CanadaBaseTestCase.php | 4 ++-- tests/Canada/CanadaDayTest.php | 4 ++-- tests/Canada/CanadaTest.php | 4 ++-- tests/Canada/ChristmasDayTest.php | 4 ++-- tests/Canada/LabourDayTest.php | 4 ++-- tests/Canada/Manitoba/ManitobaBaseTestCase.php | 4 ++-- tests/Canada/Manitoba/ManitobaTest.php | 4 ++-- .../Canada/NewBrunswick/NewBrunswickBaseTestCase.php | 4 ++-- tests/Canada/NewBrunswick/NewBrunswickTest.php | 4 ++-- tests/Canada/NewYearsDayTest.php | 4 ++-- .../NewfoundlandAndLabradorBaseTestCase.php | 4 ++-- .../NewfoundlandAndLabradorTest.php | 4 ++-- .../NorthwestTerritoriesBaseTestCase.php | 4 ++-- .../NorthwestTerritories/NorthwestTerritoriesTest.php | 4 ++-- tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php | 4 ++-- tests/Canada/NovaScotia/NovaScotiaTest.php | 4 ++-- tests/Canada/Nunavut/NunavutBaseTestCase.php | 4 ++-- tests/Canada/Nunavut/NunavutTest.php | 4 ++-- tests/Canada/Ontario/OntarioBaseTestCase.php | 4 ++-- tests/Canada/Ontario/OntarioTest.php | 4 ++-- .../PrinceEdwardIslandBaseTestCase.php | 4 ++-- .../PrinceEdwardIsland/PrinceEdwardIslandTest.php | 4 ++-- tests/Canada/Quebec/QuebecBaseTestCase.php | 4 ++-- tests/Canada/Quebec/QuebecTest.php | 4 ++-- tests/Canada/RemembranceDayTest.php | 4 ++-- .../Canada/Saskatchewan/SaskatchewanBaseTestCase.php | 4 ++-- tests/Canada/Saskatchewan/SaskatchewanTest.php | 4 ++-- tests/Canada/ThanksgivingDayTest.php | 4 ++-- tests/Canada/Yukon/YukonBaseTestCase.php | 4 ++-- tests/Canada/Yukon/YukonTest.php | 4 ++-- tests/Croatia/AllSaintsDayTest.php | 4 ++-- tests/Croatia/AntifascistStruggleDayTest.php | 4 ++-- tests/Croatia/AssumptionOfMaryTest.php | 4 ++-- tests/Croatia/ChristmasDayTest.php | 4 ++-- tests/Croatia/CorpusChristiTest.php | 4 ++-- tests/Croatia/CroatiaBaseTestCase.php | 4 ++-- tests/Croatia/EasterMondayTest.php | 4 ++-- tests/Croatia/EasterTest.php | 4 ++-- tests/Croatia/EpiphanyTest.php | 4 ++-- tests/Croatia/HomelandThanksgivingDayTest.php | 4 ++-- tests/Croatia/IndependenceDayTest.php | 4 ++-- tests/Croatia/InternationalWorkersDayTest.php | 4 ++-- tests/Croatia/NewYearsDayTest.php | 4 ++-- tests/Croatia/RemembranceDayTest.php | 4 ++-- tests/Croatia/StStephensDayTest.php | 4 ++-- tests/Croatia/StatehoodDayTest.php | 4 ++-- tests/CzechRepublic/ChristmasDayTest.php | 4 ++-- tests/CzechRepublic/ChristmasEveTest.php | 4 ++-- tests/CzechRepublic/CzechRepublicBaseTestCase.php | 4 ++-- tests/CzechRepublic/CzechRepublicTest.php | 4 ++-- tests/CzechRepublic/CzechStateHoodDayTest.php | 4 ++-- tests/CzechRepublic/EasterMondayTest.php | 4 ++-- tests/CzechRepublic/GoodFridayTest.php | 4 ++-- .../IndependentCzechoslovakStateDayTest.php | 4 ++-- tests/CzechRepublic/InternationalWorkersDayTest.php | 4 ++-- tests/CzechRepublic/JanHusDayTest.php | 4 ++-- tests/CzechRepublic/NewYearsDayTest.php | 4 ++-- .../RenewalOfIndependentCzechStateDayTest.php | 4 ++-- .../CzechRepublic/SaintsCyrilAndMethodiusDayTest.php | 4 ++-- tests/CzechRepublic/SecondChristmasDayTest.php | 4 ++-- .../StruggleForFreedomAndDemocracyDayTest.php | 4 ++-- tests/CzechRepublic/VictoryInEuropeDayTest.php | 4 ++-- tests/Denmark/AscensionDayTest.php | 4 ++-- tests/Denmark/ChristmasDayTest.php | 4 ++-- tests/Denmark/ChristmasEveTest.php | 4 ++-- tests/Denmark/ConstitutionDayTest.php | 4 ++-- tests/Denmark/DenmarkBaseTestCase.php | 4 ++-- tests/Denmark/DenmarkTest.php | 4 ++-- tests/Denmark/EasterMondayTest.php | 4 ++-- tests/Denmark/EasterTest.php | 4 ++-- tests/Denmark/GoodFridayTest.php | 4 ++-- tests/Denmark/GreatPrayerDayTest.php | 4 ++-- tests/Denmark/InternationalWorkersDayTest.php | 4 ++-- tests/Denmark/MaundyThursdayTest.php | 4 ++-- tests/Denmark/NewYearsDayTest.php | 4 ++-- tests/Denmark/NewYearsEveTest.php | 4 ++-- tests/Denmark/PentecostMondayTest.php | 4 ++-- tests/Denmark/PentecostTest.php | 4 ++-- tests/Denmark/SecondChristmasDayTest.php | 4 ++-- tests/Denmark/SummerTimeTest.php | 4 ++-- tests/Denmark/WinterTimeTest.php | 4 ++-- tests/Estonia/ChristmasDayTest.php | 4 ++-- tests/Estonia/ChristmasEveDayTest.php | 4 ++-- tests/Estonia/EasterDayTest.php | 4 ++-- tests/Estonia/EstoniaBaseTestCase.php | 4 ++-- tests/Estonia/EstoniaTest.php | 4 ++-- tests/Estonia/GoodFridayDayTest.php | 4 ++-- tests/Estonia/IndependenceDayTest.php | 4 ++-- tests/Estonia/InternationalWorkersDayTest.php | 4 ++-- tests/Estonia/NewYearsDayTest.php | 4 ++-- tests/Estonia/PentecostTest.php | 4 ++-- tests/Estonia/RestorationOfIndependenceDayTest.php | 4 ++-- tests/Estonia/SecondChristmasDayTest.php | 4 ++-- tests/Estonia/StJohnsDayTest.php | 4 ++-- tests/Estonia/VictoryDayTest.php | 4 ++-- tests/Finland/AllSaintsDayTest.php | 4 ++-- tests/Finland/AscensionDayTest.php | 4 ++-- tests/Finland/ChristmasDayTest.php | 4 ++-- tests/Finland/EasterMondayTest.php | 4 ++-- tests/Finland/EasterTest.php | 4 ++-- tests/Finland/EpiphanyTest.php | 4 ++-- tests/Finland/FinlandBaseTestCase.php | 4 ++-- tests/Finland/FinlandTest.php | 4 ++-- tests/Finland/GoodFridayTest.php | 4 ++-- tests/Finland/IndependenceDayTest.php | 4 ++-- tests/Finland/InternationalWorkersDayTest.php | 4 ++-- tests/Finland/NewYearsDayTest.php | 4 ++-- tests/Finland/PentecostTest.php | 4 ++-- tests/Finland/SecondChristmasDayTest.php | 4 ++-- tests/Finland/stJohnsDayTest.php | 4 ++-- tests/France/AllSaintsDayTest.php | 4 ++-- tests/France/ArmisticeDayTest.php | 4 ++-- tests/France/AscensionDayTest.php | 4 ++-- tests/France/AssumptionOfMaryTest.php | 4 ++-- tests/France/BasRhin/BasRhinBaseTestCase.php | 4 ++-- tests/France/BasRhin/BasRhinTest.php | 4 ++-- tests/France/BasRhin/GoodFridayTest.php | 4 ++-- tests/France/BasRhin/stStephensDayTest.php | 4 ++-- tests/France/BastilleDayTest.php | 4 ++-- tests/France/ChristmasDayTest.php | 4 ++-- tests/France/EasterMondayTest.php | 4 ++-- tests/France/FranceBaseTestCase.php | 4 ++-- tests/France/FranceTest.php | 4 ++-- tests/France/HautRhin/GoodFridayTest.php | 4 ++-- tests/France/HautRhin/HautRhinBaseTestCase.php | 4 ++-- tests/France/HautRhin/HautRhinTest.php | 4 ++-- tests/France/HautRhin/stStephensDayTest.php | 4 ++-- tests/France/InternationalWorkersDayTest.php | 4 ++-- tests/France/Moselle/GoodFridayTest.php | 4 ++-- tests/France/Moselle/MoselleBaseTestCase.php | 4 ++-- tests/France/Moselle/MoselleTest.php | 4 ++-- tests/France/Moselle/stStephensDayTest.php | 4 ++-- tests/France/NewYearsDayTest.php | 4 ++-- tests/France/PentecostMondayTest.php | 4 ++-- tests/France/VictoryInEuropeDayTest.php | 4 ++-- tests/Germany/AscensionDayTest.php | 4 ++-- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 4 ++-- .../BadenWurttemberg/BadenWurttembergBaseTestCase.php | 4 ++-- .../Germany/BadenWurttemberg/BadenWurttembergTest.php | 4 ++-- tests/Germany/BadenWurttemberg/CorpusChristiTest.php | 4 ++-- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 4 ++-- tests/Germany/BadenWurttemberg/GermanUnityDayTest.php | 4 ++-- .../BadenWurttemberg/ReformationDay2017Test.php | 4 ++-- tests/Germany/Bavaria/AllSaintsDayTest.php | 4 ++-- tests/Germany/Bavaria/BavariaBaseTestCase.php | 4 ++-- tests/Germany/Bavaria/BavariaTest.php | 4 ++-- tests/Germany/Bavaria/CorpusChristiTest.php | 4 ++-- tests/Germany/Bavaria/EpiphanyTest.php | 4 ++-- tests/Germany/Bavaria/GermanUnityDayTest.php | 4 ++-- tests/Germany/Bavaria/ReformationDay2017Test.php | 4 ++-- tests/Germany/Berlin/BerlinBaseTestCase.php | 4 ++-- tests/Germany/Berlin/BerlinTest.php | 4 ++-- tests/Germany/Berlin/DayOfLiberation2020Test.php | 4 ++-- tests/Germany/Berlin/GermanUnityDayTest.php | 4 ++-- .../Germany/Berlin/InternationalWomensDay2019Test.php | 4 ++-- tests/Germany/Berlin/ReformationDay2017Test.php | 4 ++-- tests/Germany/Brandenburg/BrandenburgBaseTestCase.php | 4 ++-- tests/Germany/Brandenburg/BrandenburgTest.php | 4 ++-- tests/Germany/Brandenburg/GermanUnityDayTest.php | 4 ++-- tests/Germany/Brandenburg/ReformationDayTest.php | 4 ++-- tests/Germany/Bremen/BremenBaseTestCase.php | 4 ++-- tests/Germany/Bremen/BremenTest.php | 4 ++-- tests/Germany/Bremen/GermanUnityDayTest.php | 4 ++-- tests/Germany/Bremen/ReformationDay2017Test.php | 4 ++-- tests/Germany/Bremen/ReformationDayTest.php | 4 ++-- tests/Germany/ChristmasTest.php | 4 ++-- tests/Germany/EasterMondayTest.php | 4 ++-- tests/Germany/GermanUnityDayTest.php | 4 ++-- tests/Germany/GermanyBaseTestCase.php | 4 ++-- tests/Germany/GermanyTest.php | 4 ++-- tests/Germany/GoodFridayTest.php | 4 ++-- tests/Germany/Hamburg/DayOfReformationTest.php | 4 ++-- tests/Germany/Hamburg/GermanUnityDay.php | 4 ++-- tests/Germany/Hamburg/HamburgBaseTestCase.php | 4 ++-- tests/Germany/Hamburg/HamburgTest.php | 4 ++-- tests/Germany/Hamburg/ReformationDay2017Test.php | 4 ++-- tests/Germany/Hesse/CorpusChristiTest.php | 4 ++-- tests/Germany/Hesse/GermanUnityDayTest.php | 4 ++-- tests/Germany/Hesse/HesseBaseTestCase.php | 4 ++-- tests/Germany/Hesse/HesseTest.php | 4 ++-- tests/Germany/Hesse/ReformationDay2017Test.php | 4 ++-- tests/Germany/InternationalWorkersDayTest.php | 4 ++-- tests/Germany/LowerSaxony/GermanUnityDayTest.php | 4 ++-- tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php | 4 ++-- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 4 ++-- tests/Germany/LowerSaxony/ReformationDay2017Test.php | 4 ++-- tests/Germany/LowerSaxony/ReformationDayTest.php | 4 ++-- .../GermanUnityDayTest.php | 4 ++-- .../MecklenburgWesternPomeraniaBaseTestCase.php | 4 ++-- .../MecklenburgWesternPomeraniaTest.php | 4 ++-- .../ReformationDayTest.php | 4 ++-- tests/Germany/NewYearsDayTest.php | 4 ++-- tests/Germany/NewYearsEveTest.php | 4 ++-- .../Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 4 ++-- .../NorthRhineWestphalia/CorpusChristiTest.php | 4 ++-- .../NorthRhineWestphalia/GermanUnityDayTest.php | 4 ++-- .../NorthRhineWestphaliaBaseTestCase.php | 4 ++-- .../NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 4 ++-- .../NorthRhineWestphalia/ReformationDay2017Test.php | 4 ++-- tests/Germany/PentecostMondayTest.php | 4 ++-- tests/Germany/PentecostTest.php | 4 ++-- tests/Germany/ReformationDay2017Test.php | 4 ++-- .../Germany/RhinelandPalatinate/AllSaintsDayTest.php | 4 ++-- .../Germany/RhinelandPalatinate/CorpusChristiTest.php | 4 ++-- .../RhinelandPalatinate/GermanUnityDayTest.php | 4 ++-- .../RhinelandPalatinate/ReformationDay2017Test.php | 4 ++-- .../RhinelandPalatinateBaseTestCase.php | 4 ++-- .../RhinelandPalatinate/RhinelandPalatinateTest.php | 4 ++-- tests/Germany/Saarland/AllSaintsDayTest.php | 4 ++-- tests/Germany/Saarland/AssumptionOfMaryTest.php | 4 ++-- tests/Germany/Saarland/CorpusChristiTest.php | 4 ++-- tests/Germany/Saarland/GermanUnityDayTest.php | 4 ++-- tests/Germany/Saarland/ReformationDay2017Test.php | 4 ++-- tests/Germany/Saarland/SaarlandBaseTestCase.php | 4 ++-- tests/Germany/Saarland/SaarlandTest.php | 4 ++-- tests/Germany/Saxony/GermanUnityDayTest.php | 4 ++-- tests/Germany/Saxony/ReformationDayTest.php | 4 ++-- tests/Germany/Saxony/RepentanceAndPrayerDayTest.php | 4 ++-- tests/Germany/Saxony/SaxonyBaseTestCase.php | 4 ++-- tests/Germany/Saxony/SaxonyTest.php | 4 ++-- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 4 ++-- tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php | 4 ++-- tests/Germany/SaxonyAnhalt/ReformationDayTest.php | 4 ++-- .../Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 4 ++-- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 4 ++-- .../Germany/SchleswigHolstein/GermanUnityDayTest.php | 4 ++-- .../SchleswigHolstein/ReformationDay2017Test.php | 4 ++-- .../Germany/SchleswigHolstein/ReformationDayTest.php | 4 ++-- .../SchleswigHolsteinBaseTestCase.php | 4 ++-- .../SchleswigHolstein/SchleswigHolsteinTest.php | 4 ++-- tests/Germany/SecondChristmasDayTest.php | 4 ++-- tests/Germany/Thuringia/GermanUnityDayTest.php | 4 ++-- tests/Germany/Thuringia/ReformationDayTest.php | 4 ++-- tests/Germany/Thuringia/ThuringiaBaseTestCase.php | 4 ++-- tests/Germany/Thuringia/ThuringiaTest.php | 4 ++-- tests/Greece/AnnunciationTest.php | 4 ++-- tests/Greece/AscensionDayTest.php | 4 ++-- tests/Greece/AssumptionOfMaryTest.php | 4 ++-- tests/Greece/ChristmasDayTest.php | 4 ++-- tests/Greece/CleanMondayTest.php | 4 ++-- tests/Greece/EasterMondayTest.php | 4 ++-- tests/Greece/EasterTest.php | 4 ++-- tests/Greece/EpiphanyTest.php | 4 ++-- tests/Greece/GreeceBaseTestCase.php | 4 ++-- tests/Greece/GreeceTest.php | 4 ++-- tests/Greece/IndepencenceDayTest.php | 4 ++-- tests/Greece/InternationalWorkersDayTest.php | 4 ++-- tests/Greece/NewYearsDayTest.php | 4 ++-- tests/Greece/OhiDayTest.php | 4 ++-- tests/Greece/PentecostMondayTest.php | 4 ++-- tests/Greece/PentecostTest.php | 4 ++-- tests/Greece/PolytechnioTest.php | 4 ++-- tests/Greece/ThreeHolyHierarchsTest.php | 4 ++-- tests/Greece/goodFridayTest.php | 4 ++-- tests/Hungary/AllSaintsDayTest.php | 4 ++-- tests/Hungary/ChristmasTest.php | 4 ++-- tests/Hungary/EasterMondayTest.php | 4 ++-- tests/Hungary/EasterTest.php | 4 ++-- tests/Hungary/HungaryBaseTestCase.php | 4 ++-- tests/Hungary/HungaryTest.php | 4 ++-- tests/Hungary/InternationalWorkersDayTest.php | 4 ++-- tests/Hungary/MemorialDay1848Test.php | 4 ++-- tests/Hungary/MemorialDay1956Test.php | 4 ++-- tests/Hungary/NewYearsDayTest.php | 4 ++-- tests/Hungary/PentecostMondayTest.php | 4 ++-- tests/Hungary/PentecostTest.php | 4 ++-- tests/Hungary/SecondChristmasDayTest.php | 4 ++-- tests/Hungary/StateFoundationDayTest.php | 4 ++-- tests/Ireland/AugustHolidayTest.php | 4 ++-- tests/Ireland/ChristmasDayTest.php | 4 ++-- tests/Ireland/EasterMondayTest.php | 4 ++-- tests/Ireland/EasterTest.php | 4 ++-- tests/Ireland/GoodFridayTest.php | 4 ++-- tests/Ireland/IrelandBaseTestCase.php | 4 ++-- tests/Ireland/IrelandTest.php | 4 ++-- tests/Ireland/JuneHolidayTest.php | 4 ++-- tests/Ireland/MayDayTest.php | 4 ++-- tests/Ireland/NewYearsDayTest.php | 4 ++-- tests/Ireland/OctoberHolidayTest.php | 4 ++-- tests/Ireland/PentecostTest.php | 4 ++-- tests/Ireland/StPatricksDayTest.php | 4 ++-- tests/Ireland/StStephensDayTest.php | 4 ++-- tests/Ireland/pentecostMondayTest.php | 4 ++-- tests/Italy/AllSaintsDayTest.php | 4 ++-- tests/Italy/AssumptionOfMaryTest.php | 4 ++-- tests/Italy/ChristmasTest.php | 4 ++-- tests/Italy/EasterMondayTest.php | 4 ++-- tests/Italy/EasterTest.php | 4 ++-- tests/Italy/EpiphanyTest.php | 4 ++-- tests/Italy/ImmaculateConceptionTest.php | 4 ++-- tests/Italy/InternationalWorkersDayTest.php | 4 ++-- tests/Italy/ItalyBaseTestCase.php | 4 ++-- tests/Italy/ItalyTest.php | 4 ++-- tests/Italy/LiberationDayTest.php | 4 ++-- tests/Italy/NewYearsDayTest.php | 4 ++-- tests/Italy/RepublicDayTest.php | 4 ++-- tests/Italy/stStephensDayTest.php | 4 ++-- tests/Japan/AutumnalEquinoxDayTest.php | 4 ++-- tests/Japan/ChildrensDayTest.php | 4 ++-- tests/Japan/ComingOfAgeDayTest.php | 4 ++-- tests/Japan/ConstitutionMemorialDayTest.php | 4 ++-- tests/Japan/CoronationDayTest.php | 4 ++-- tests/Japan/CultureDayTest.php | 4 ++-- tests/Japan/EmperorsBirthdayTest.php | 4 ++-- tests/Japan/EnthronementProclamationCeremonyTest.php | 4 ++-- tests/Japan/GreeneryDayTest.php | 4 ++-- tests/Japan/JapanBaseTestCase.php | 4 ++-- tests/Japan/JapanTest.php | 4 ++-- tests/Japan/LabourThanksgivingDayTest.php | 4 ++-- tests/Japan/MarineDayTest.php | 4 ++-- tests/Japan/MountainDayTest.php | 4 ++-- tests/Japan/NationalFoundationDayTest.php | 4 ++-- tests/Japan/NewYearsDayTest.php | 4 ++-- tests/Japan/PublicBridgeDayTest.php | 4 ++-- tests/Japan/RespectForTheAgedDayTest.php | 4 ++-- tests/Japan/ShowaDayTest.php | 4 ++-- tests/Japan/SportsDayTest.php | 4 ++-- tests/Japan/VernalEquinoxDayTest.php | 4 ++-- tests/Latvia/ChristmasDayTest.php | 4 ++-- tests/Latvia/ChristmasEveDayTest.php | 4 ++-- tests/Latvia/EasterDayTest.php | 4 ++-- tests/Latvia/EasterMondayDayTest.php | 4 ++-- tests/Latvia/GoodFridayDayTest.php | 4 ++-- tests/Latvia/InternationalWorkersDayTest.php | 4 ++-- tests/Latvia/LatviaBaseTestCase.php | 4 ++-- tests/Latvia/LatviaTest.php | 4 ++-- tests/Latvia/MidsummerEveDayTest.php | 4 ++-- tests/Latvia/NewYearsDayTest.php | 4 ++-- tests/Latvia/NewYearsEveDayTest.php | 4 ++-- .../ProclamationOfTheRepublicOfLatviaDayTest.php | 4 ++-- tests/Latvia/RestorationOfIndependenceDayTest.php | 4 ++-- tests/Latvia/SecondChristmasDayTest.php | 4 ++-- tests/Latvia/StJohnsDayTest.php | 4 ++-- tests/Lithuania/AllSaintsDayTest.php | 4 ++-- tests/Lithuania/AllSoulsDayTest.php | 4 ++-- tests/Lithuania/AssumptionOfMaryDayTest.php | 4 ++-- tests/Lithuania/ChristmasDayTest.php | 4 ++-- tests/Lithuania/ChristmasEveDayTest.php | 4 ++-- tests/Lithuania/EasterDayTest.php | 4 ++-- tests/Lithuania/EasterMondayDayTest.php | 4 ++-- tests/Lithuania/InternationalWorkersDayTest.php | 4 ++-- tests/Lithuania/LithuaniaBaseTestCase.php | 4 ++-- tests/Lithuania/LithuaniaTest.php | 4 ++-- tests/Lithuania/NewYearsDayTest.php | 4 ++-- .../RestorationOfIndependenceOfLithuaniaDayTest.php | 4 ++-- .../RestorationOfTheStateOfLithuaniaDayTest.php | 4 ++-- tests/Lithuania/SecondChristmasDayTest.php | 4 ++-- tests/Lithuania/StJohnsDayTest.php | 4 ++-- tests/Lithuania/StatehoodDayTest.php | 4 ++-- tests/Luxembourg/AllSaintsDayTest.php | 4 ++-- tests/Luxembourg/AscensionDayTest.php | 4 ++-- tests/Luxembourg/AssumptionOfMaryTest.php | 4 ++-- tests/Luxembourg/ChristmasDayTest.php | 4 ++-- tests/Luxembourg/EasterMondayTest.php | 4 ++-- tests/Luxembourg/EuropeDayTest.php | 4 ++-- tests/Luxembourg/InternationalWorkersDayTest.php | 4 ++-- tests/Luxembourg/LuxembourgBaseTestCase.php | 4 ++-- tests/Luxembourg/LuxembourgTest.php | 4 ++-- tests/Luxembourg/NationalDayTest.php | 4 ++-- tests/Luxembourg/NewYearsDayTest.php | 4 ++-- tests/Luxembourg/PentecostMondayTest.php | 4 ++-- tests/Luxembourg/SecondChristmasDayTest.php | 4 ++-- tests/Netherlands/AscensionDayTest.php | 4 ++-- tests/Netherlands/AshWednesdayTest.php | 4 ++-- tests/Netherlands/ChristmasDayTest.php | 4 ++-- tests/Netherlands/CommemorationDayTest.php | 4 ++-- tests/Netherlands/EasterMondayTest.php | 4 ++-- tests/Netherlands/EasterTest.php | 4 ++-- tests/Netherlands/EpiphanyTest.php | 4 ++-- tests/Netherlands/FathersDayTest.php | 4 ++-- tests/Netherlands/GoodFridayTest.php | 4 ++-- tests/Netherlands/HalloweenTest.php | 4 ++-- tests/Netherlands/InternationalWorkersDayTest.php | 4 ++-- tests/Netherlands/KingsDayTest.php | 4 ++-- tests/Netherlands/LiberationDayTest.php | 4 ++-- tests/Netherlands/MothersDayTest.php | 4 ++-- tests/Netherlands/NetherlandsBaseTestCase.php | 4 ++-- tests/Netherlands/NetherlandsTest.php | 4 ++-- tests/Netherlands/NewYearsDayTest.php | 4 ++-- tests/Netherlands/PentecostTest.php | 4 ++-- tests/Netherlands/QueensDayTest.php | 4 ++-- tests/Netherlands/SummertimeTest.php | 4 ++-- tests/Netherlands/ValentinesDayTest.php | 4 ++-- tests/Netherlands/WintertimeTest.php | 4 ++-- tests/Netherlands/WorldAnimalDayTest.php | 4 ++-- tests/Netherlands/carnivalDayTest.php | 4 ++-- tests/Netherlands/pentecostMondayTest.php | 4 ++-- tests/Netherlands/princesDayTest.php | 4 ++-- tests/Netherlands/secondCarnivalDay.php | 4 ++-- tests/Netherlands/secondChristmasdayTest.php | 4 ++-- tests/Netherlands/stMartinsDayTest.php | 4 ++-- tests/Netherlands/stNicholasDayTest.php | 4 ++-- tests/Netherlands/thirdCarnivalDay.php | 4 ++-- tests/NewZealand/AnzacDayTest.php | 4 ++-- tests/NewZealand/BoxingDayTest.php | 4 ++-- tests/NewZealand/ChristmasDayTest.php | 4 ++-- tests/NewZealand/DayAfterNewYearsDayTest.php | 4 ++-- tests/NewZealand/EasterMondayTest.php | 4 ++-- tests/NewZealand/GoodFridayTest.php | 4 ++-- tests/NewZealand/LabourDayTest.php | 4 ++-- tests/NewZealand/NewYearsDayTest.php | 4 ++-- tests/NewZealand/NewZealandBaseTestCase.php | 4 ++-- tests/NewZealand/NewZealandTest.php | 4 ++-- tests/NewZealand/QueensBirthdayTest.php | 4 ++-- tests/NewZealand/WaitangiDayTest.php | 4 ++-- tests/Norway/AscensionDayTest.php | 4 ++-- tests/Norway/ChristmasDayTest.php | 4 ++-- tests/Norway/ConstitutionDayTest.php | 4 ++-- tests/Norway/EasterMondayTest.php | 4 ++-- tests/Norway/EasterTest.php | 4 ++-- tests/Norway/GoodFridayTest.php | 4 ++-- tests/Norway/InternationalWorkersDayTest.php | 4 ++-- tests/Norway/MaundyThursdayTest.php | 4 ++-- tests/Norway/NewYearsDayTest.php | 4 ++-- tests/Norway/NorwayBaseTestCase.php | 4 ++-- tests/Norway/NorwayTest.php | 4 ++-- tests/Norway/PentecostMondayTest.php | 4 ++-- tests/Norway/PentecostTest.php | 4 ++-- tests/Norway/SecondChristmasDayTest.php | 4 ++-- tests/Poland/AllSaintsDayTest.php | 4 ++-- tests/Poland/AssumptionOfMaryTest.php | 4 ++-- tests/Poland/ChristmasTest.php | 4 ++-- tests/Poland/ConstitutionDayTest.php | 4 ++-- tests/Poland/CorpusChristiTest.php | 4 ++-- tests/Poland/EasterMondayTest.php | 4 ++-- tests/Poland/EasterTest.php | 4 ++-- tests/Poland/EpiphanyTest.php | 4 ++-- tests/Poland/IndependenceDayTest.php | 4 ++-- tests/Poland/InternationalWorkersDayTest.php | 4 ++-- tests/Poland/NewYearsDayTest.php | 4 ++-- tests/Poland/PentecostTest.php | 4 ++-- tests/Poland/PolandBaseTestCase.php | 4 ++-- tests/Poland/PolandTest.php | 4 ++-- tests/Poland/SecondChristmasDayTest.php | 4 ++-- tests/Portugal/AllSaintsDayTest.php | 4 ++-- tests/Portugal/AssumptionOfMaryTest.php | 4 ++-- tests/Portugal/CarnationRevolutionDayTest.php | 4 ++-- tests/Portugal/ChristmasTest.php | 4 ++-- tests/Portugal/CorpusChristiTest.php | 4 ++-- tests/Portugal/EasterTest.php | 4 ++-- tests/Portugal/GoodFridayTest.php | 4 ++-- tests/Portugal/ImmaculateConceptionTest.php | 4 ++-- tests/Portugal/InternationalWorkersDayTest.php | 4 ++-- tests/Portugal/NewYearsDayTest.php | 4 ++-- tests/Portugal/PortugalBaseTestCase.php | 4 ++-- tests/Portugal/PortugalDayTest.php | 4 ++-- tests/Portugal/PortugalTest.php | 4 ++-- tests/Portugal/PortugueseRepublicDayTest.php | 4 ++-- tests/Portugal/RestorationOfIndependenceTest.php | 4 ++-- tests/Romania/AssumptionOfMaryTest.php | 4 ++-- tests/Romania/ChildrensDayTest.php | 4 ++-- tests/Romania/ChristmasDayTest.php | 4 ++-- tests/Romania/ConstantinBrancusiDayTest.php | 4 ++-- tests/Romania/DayAfterNewYearsDayTest.php | 4 ++-- tests/Romania/EasterMondayTest.php | 4 ++-- tests/Romania/EasterTest.php | 4 ++-- tests/Romania/InternationalWorkersDayTest.php | 4 ++-- tests/Romania/NationalDayTest.php | 4 ++-- tests/Romania/NewYearsDayTest.php | 4 ++-- tests/Romania/PentecostMondayTest.php | 4 ++-- tests/Romania/PentecostTest.php | 4 ++-- tests/Romania/RomaniaBaseTestCase.php | 4 ++-- tests/Romania/RomaniaTest.php | 4 ++-- tests/Romania/SecondChristmasDayTest.php | 4 ++-- tests/Romania/StAndrewsDayTest.php | 4 ++-- tests/Romania/UnitedPrincipalitiesDayTest.php | 4 ++-- tests/Russia/DefenceOfTheFatherlandDayTest.php | 4 ++-- tests/Russia/InternationalWomensDayTest.php | 4 ++-- tests/Russia/NewYearHolidaysDay2Test.php | 4 ++-- tests/Russia/NewYearHolidaysDay3Test.php | 4 ++-- tests/Russia/NewYearHolidaysDay4Test.php | 4 ++-- tests/Russia/NewYearHolidaysDay5Test.php | 4 ++-- tests/Russia/NewYearHolidaysDay6Test.php | 4 ++-- tests/Russia/NewYearHolidaysDay8Test.php | 4 ++-- tests/Russia/NewYearsDayTest.php | 4 ++-- tests/Russia/OrthodoxChristmasDayTest.php | 4 ++-- tests/Russia/RussiaBaseTestCase.php | 4 ++-- tests/Russia/RussiaDayTest.php | 4 ++-- tests/Russia/RussiaTest.php | 4 ++-- tests/Russia/SpringAndLabourDayTest.php | 4 ++-- tests/Russia/UnityDayTest.php | 4 ++-- tests/Russia/VictoryDayTest.php | 4 ++-- tests/Slovakia/AllSaintsDayTest.php | 4 ++-- tests/Slovakia/ChristmasDayTest.php | 4 ++-- tests/Slovakia/ChristmasEveTest.php | 4 ++-- tests/Slovakia/EasterMondayTest.php | 4 ++-- tests/Slovakia/EpiphanyTest.php | 4 ++-- tests/Slovakia/GoodFridayTest.php | 4 ++-- tests/Slovakia/InternationalWorkersDayTest.php | 4 ++-- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 4 ++-- tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php | 4 ++-- tests/Slovakia/SecondChristmasDayTest.php | 4 ++-- tests/Slovakia/SlovakConstitutionDayTest.php | 4 ++-- tests/Slovakia/SlovakIndependeceDayTest.php | 4 ++-- tests/Slovakia/SlovakNationalUprisingDayTest.php | 4 ++-- tests/Slovakia/SlovakiaBaseTestCase.php | 4 ++-- tests/Slovakia/SlovakiaTest.php | 4 ++-- .../StruggleForFreedomAndDemocracyDayTest.php | 4 ++-- tests/Slovakia/VictoryInEuropeDayTest.php | 4 ++-- tests/SouthAfrica/ChristmasDayTest.php | 4 ++-- tests/SouthAfrica/FamilyDayTest.php | 4 ++-- tests/SouthAfrica/FreedomDayTest.php | 4 ++-- tests/SouthAfrica/GoodFridayTest.php | 4 ++-- tests/SouthAfrica/HeritageDayTest.php | 4 ++-- tests/SouthAfrica/HumanRightsDayTest.php | 4 ++-- tests/SouthAfrica/MunicipalElections2016DayTest.php | 4 ++-- tests/SouthAfrica/NationalWomensDayTest.php | 4 ++-- tests/SouthAfrica/NewYearsDayTest.php | 4 ++-- tests/SouthAfrica/ReconciliationDayTest.php | 4 ++-- tests/SouthAfrica/SecondChristmasDayTest.php | 4 ++-- tests/SouthAfrica/SouthAfricaBaseTestCase.php | 4 ++-- tests/SouthAfrica/SouthAfricaTest.php | 4 ++-- tests/SouthAfrica/SubstituteDayOfGoodwillTest.php | 4 ++-- tests/SouthAfrica/WorkersDayTest.php | 4 ++-- tests/SouthAfrica/YouthDayTest.php | 4 ++-- tests/SouthKorea/ArborDayTest.php | 4 ++-- tests/SouthKorea/ArmedForcesDayTest.php | 4 ++-- tests/SouthKorea/BuddhasBirthdayTest.php | 4 ++-- tests/SouthKorea/ChildrensDayTest.php | 4 ++-- tests/SouthKorea/ChristmasDayTest.php | 4 ++-- tests/SouthKorea/ChuseokTest.php | 4 ++-- tests/SouthKorea/ConstitutionDayTest.php | 4 ++-- tests/SouthKorea/GaecheonjeolTest.php | 4 ++-- tests/SouthKorea/HangulDayTest.php | 4 ++-- tests/SouthKorea/IndependenceMovementDayTest.php | 4 ++-- tests/SouthKorea/LiberationDayTest.php | 4 ++-- tests/SouthKorea/MemorialDayTest.php | 4 ++-- tests/SouthKorea/NewYearsDayTest.php | 4 ++-- tests/SouthKorea/SeollalTest.php | 4 ++-- tests/SouthKorea/SouthKoreaBaseTestCase.php | 4 ++-- tests/SouthKorea/SouthKoreaTest.php | 4 ++-- tests/Spain/AllSaintsDayTest.php | 4 ++-- tests/Spain/Andalusia/AndalusiaBaseTestCase.php | 4 ++-- tests/Spain/Andalusia/AndalusiaDayTest.php | 4 ++-- tests/Spain/Andalusia/AndalusiaTest.php | 4 ++-- tests/Spain/Aragon/AragonBaseTestCase.php | 4 ++-- tests/Spain/Aragon/AragonTest.php | 4 ++-- tests/Spain/Aragon/StGeorgesDayTest.php | 4 ++-- tests/Spain/AssumptionOfMaryTest.php | 4 ++-- tests/Spain/Asturias/AsturiasBaseTestCase.php | 4 ++-- tests/Spain/Asturias/AsturiasDayTest.php | 4 ++-- tests/Spain/Asturias/AsturiasTest.php | 4 ++-- .../BalearicIslands/BalearicIslandsBaseTestCase.php | 4 ++-- .../Spain/BalearicIslands/BalearicIslandsDayTest.php | 4 ++-- tests/Spain/BalearicIslands/BalearicIslandsTest.php | 4 ++-- .../Spain/BasqueCountry/BasqueCountryBaseTestCase.php | 4 ++-- tests/Spain/BasqueCountry/BasqueCountryDayTest.php | 4 ++-- tests/Spain/BasqueCountry/BasqueCountryTest.php | 4 ++-- .../Spain/CanaryIslands/CanaryIslandsBaseTestCase.php | 4 ++-- tests/Spain/CanaryIslands/CanaryIslandsDayTest.php | 4 ++-- tests/Spain/CanaryIslands/CanaryIslandsTest.php | 4 ++-- tests/Spain/Cantabria/CantabriaBaseTestCase.php | 4 ++-- tests/Spain/Cantabria/CantabriaDayTest.php | 4 ++-- tests/Spain/Cantabria/CantabriaTest.php | 4 ++-- .../CastileAndLeon/CastileAndLeonBaseTestCase.php | 4 ++-- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 4 ++-- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 4 ++-- .../CastillaLaMancha/CastillaLaManchaBaseTestCase.php | 4 ++-- .../CastillaLaMancha/CastillaLaManchaDayTest.php | 4 ++-- tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php | 4 ++-- tests/Spain/Catalonia/CataloniaBaseTestCase.php | 4 ++-- tests/Spain/Catalonia/CataloniaTest.php | 4 ++-- tests/Spain/Catalonia/nationalCataloniaDayTest.php | 4 ++-- tests/Spain/Catalonia/stJohnsDayTest.php | 4 ++-- tests/Spain/Ceuta/CeutaBaseTestCase.php | 4 ++-- tests/Spain/Ceuta/CeutaTest.php | 4 ++-- tests/Spain/Ceuta/ceutaDayTest.php | 4 ++-- tests/Spain/ChristmasTest.php | 4 ++-- .../CommunityOfMadridBaseTestCase.php | 4 ++-- .../Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 4 ++-- .../CommunityOfMadrid/DosdeMayoUprisingDayTest.php | 4 ++-- tests/Spain/ConstitutionDayTest.php | 4 ++-- tests/Spain/EasterMondayTest.php | 4 ++-- tests/Spain/EpiphanyTest.php | 4 ++-- tests/Spain/Extremadura/ExtremaduraBaseTestCase.php | 4 ++-- tests/Spain/Extremadura/ExtremaduraDayTest.php | 4 ++-- tests/Spain/Extremadura/ExtremaduraTest.php | 4 ++-- tests/Spain/Galicia/GaliciaBaseTestCase.php | 4 ++-- tests/Spain/Galicia/GaliciaTest.php | 4 ++-- tests/Spain/Galicia/GalicianLiteratureDayTest.php | 4 ++-- tests/Spain/Galicia/stJamesDayTest.php | 4 ++-- tests/Spain/GoodFridayTest.php | 4 ++-- tests/Spain/ImmaculateConceptionTest.php | 4 ++-- tests/Spain/InternationalWorkersDayTest.php | 4 ++-- tests/Spain/LaRioja/LaRiojaBaseTestCase.php | 4 ++-- tests/Spain/LaRioja/LaRiojaDayTest.php | 4 ++-- tests/Spain/LaRioja/LaRiojaTest.php | 4 ++-- tests/Spain/MaundyThursdayTest.php | 4 ++-- tests/Spain/Melilla/MelillaBaseTestCase.php | 4 ++-- tests/Spain/Melilla/MelillaTest.php | 4 ++-- tests/Spain/NationalDayTest.php | 4 ++-- tests/Spain/Navarre/NavarreBaseTestCase.php | 4 ++-- tests/Spain/Navarre/NavarreTest.php | 4 ++-- tests/Spain/NewYearsDayTest.php | 4 ++-- .../RegionOfMurcia/RegionOfMurciaBaseTestCase.php | 4 ++-- tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php | 4 ++-- tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php | 4 ++-- tests/Spain/SpainBaseTestCase.php | 4 ++-- tests/Spain/SpainTest.php | 4 ++-- .../ValencianCommunityBaseTestCase.php | 4 ++-- .../ValencianCommunity/ValencianCommunityDayTest.php | 4 ++-- .../ValencianCommunity/ValencianCommunityTest.php | 4 ++-- tests/Spain/ValentinesDayTest.php | 4 ++-- tests/Spain/stJosephsDayTest.php | 4 ++-- tests/Sweden/AllSaintsDayTest.php | 4 ++-- tests/Sweden/AllSaintsEveTest.php | 4 ++-- tests/Sweden/AscensionDayTest.php | 4 ++-- tests/Sweden/ChristmasDayTest.php | 4 ++-- tests/Sweden/ChristmasEveTest.php | 4 ++-- tests/Sweden/EasterMondayTest.php | 4 ++-- tests/Sweden/EasterTest.php | 4 ++-- tests/Sweden/EpiphanyEveTest.php | 4 ++-- tests/Sweden/EpiphanyTest.php | 4 ++-- tests/Sweden/GoodFridayTest.php | 4 ++-- tests/Sweden/InternationalWorkersDayTest.php | 4 ++-- tests/Sweden/NationalDayTest.php | 4 ++-- tests/Sweden/NewYearsDayTest.php | 4 ++-- tests/Sweden/NewYearsEveTest.php | 4 ++-- tests/Sweden/PentecostTest.php | 4 ++-- tests/Sweden/SecondChristmasDayTest.php | 4 ++-- tests/Sweden/StJohnsDayTest.php | 4 ++-- tests/Sweden/StJohnsEveTest.php | 4 ++-- tests/Sweden/SwedenBaseTestCase.php | 4 ++-- tests/Sweden/SwedenTest.php | 4 ++-- tests/Sweden/WalpurgisEveTest.php | 4 ++-- tests/Switzerland/Aargau/AargauBaseTestCase.php | 4 ++-- tests/Switzerland/Aargau/AargauTest.php | 4 ++-- tests/Switzerland/Aargau/AscensionDayTest.php | 4 ++-- tests/Switzerland/Aargau/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Aargau/GoodFridayTest.php | 4 ++-- tests/Switzerland/Aargau/NewYearsDayTest.php | 4 ++-- .../AppenzellAusserrhodenBaseTestCase.php | 4 ++-- .../AppenzellAusserrhodenTest.php | 4 ++-- .../AppenzellAusserrhoden/AscensionDayTest.php | 4 ++-- .../AppenzellAusserrhoden/ChristmasDayTest.php | 4 ++-- .../AppenzellAusserrhoden/EasterMondayTest.php | 4 ++-- .../AppenzellAusserrhoden/GoodFridayTest.php | 4 ++-- .../AppenzellAusserrhoden/NewYearsDayTest.php | 4 ++-- .../AppenzellAusserrhoden/PentecostMondayTest.php | 4 ++-- .../AppenzellAusserrhoden/StStephensDayTest.php | 4 ++-- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 4 ++-- .../AppenzellInnerrhodenBaseTestCase.php | 4 ++-- .../AppenzellInnerrhoden/AppenzellInnerrhodenTest.php | 4 ++-- .../AppenzellInnerrhoden/AscensionDayTest.php | 4 ++-- .../AppenzellInnerrhoden/AssumptionOfMaryTest.php | 4 ++-- .../AppenzellInnerrhoden/ChristmasDayTest.php | 4 ++-- .../AppenzellInnerrhoden/CorpusChristiTest.php | 4 ++-- .../AppenzellInnerrhoden/EasterMondayTest.php | 4 ++-- .../AppenzellInnerrhoden/GoodFridayTest.php | 4 ++-- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 4 ++-- .../AppenzellInnerrhoden/NewYearsDayTest.php | 4 ++-- .../AppenzellInnerrhoden/PentecostMondayTest.php | 4 ++-- .../AppenzellInnerrhoden/StStephensDayTest.php | 4 ++-- .../Switzerland/BaselLandschaft/AscensionDayTest.php | 4 ++-- .../BaselLandschaft/BaselLandschaftBaseTestCase.php | 4 ++-- .../BaselLandschaft/BaselLandschaftTest.php | 4 ++-- .../Switzerland/BaselLandschaft/ChristmasDayTest.php | 4 ++-- .../Switzerland/BaselLandschaft/EasterMondayTest.php | 4 ++-- tests/Switzerland/BaselLandschaft/GoodFridayTest.php | 4 ++-- tests/Switzerland/BaselLandschaft/NewYearsDayTest.php | 4 ++-- .../BaselLandschaft/PentecostMondayTest.php | 4 ++-- .../Switzerland/BaselLandschaft/StStephensDayTest.php | 4 ++-- tests/Switzerland/BaselLandschaft/WorkersDayTest.php | 4 ++-- tests/Switzerland/BaselStadt/AscensionDayTest.php | 4 ++-- .../Switzerland/BaselStadt/BaselStadtBaseTestCase.php | 4 ++-- tests/Switzerland/BaselStadt/BaselStadtTest.php | 4 ++-- tests/Switzerland/BaselStadt/ChristmasDayTest.php | 4 ++-- tests/Switzerland/BaselStadt/EasterMondayTest.php | 4 ++-- tests/Switzerland/BaselStadt/GoodFridayTest.php | 4 ++-- tests/Switzerland/BaselStadt/NewYearsDayTest.php | 4 ++-- tests/Switzerland/BaselStadt/PentecostMondayTest.php | 4 ++-- tests/Switzerland/BaselStadt/StStephensDayTest.php | 4 ++-- tests/Switzerland/BaselStadt/WorkersDayTest.php | 4 ++-- tests/Switzerland/Bern/AscensionDayTest.php | 4 ++-- tests/Switzerland/Bern/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Bern/BernBaseTestCase.php | 4 ++-- tests/Switzerland/Bern/BernTest.php | 4 ++-- tests/Switzerland/Bern/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Bern/EasterMondayTest.php | 4 ++-- tests/Switzerland/Bern/GoodFridayTest.php | 4 ++-- tests/Switzerland/Bern/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Bern/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Bern/StStephensDayTest.php | 4 ++-- tests/Switzerland/Fribourg/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Fribourg/AscensionDayTest.php | 4 ++-- tests/Switzerland/Fribourg/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Fribourg/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Fribourg/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Fribourg/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Fribourg/December26thTest.php | 4 ++-- tests/Switzerland/Fribourg/EasterMondayTest.php | 4 ++-- tests/Switzerland/Fribourg/FribourgBaseTestCase.php | 4 ++-- tests/Switzerland/Fribourg/FribourgTest.php | 4 ++-- tests/Switzerland/Fribourg/GoodFridayTest.php | 4 ++-- .../Switzerland/Fribourg/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Fribourg/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Fribourg/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Geneva/AscensionDayTest.php | 4 ++-- tests/Switzerland/Geneva/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Geneva/EasterMondayTest.php | 4 ++-- tests/Switzerland/Geneva/GenevaBaseTestCase.php | 4 ++-- tests/Switzerland/Geneva/GenevaTest.php | 4 ++-- tests/Switzerland/Geneva/GoodFridayTest.php | 4 ++-- tests/Switzerland/Geneva/JeuneGenevoisTest.php | 4 ++-- tests/Switzerland/Geneva/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Geneva/PentecostMondayTest.php | 4 ++-- .../Switzerland/Geneva/RestaurationGenevoiseTest.php | 4 ++-- tests/Switzerland/Glarus/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Glarus/AscensionDayTest.php | 4 ++-- tests/Switzerland/Glarus/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Glarus/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Glarus/EasterMondayTest.php | 4 ++-- tests/Switzerland/Glarus/GlarusBaseTestCase.php | 4 ++-- tests/Switzerland/Glarus/GlarusTest.php | 4 ++-- tests/Switzerland/Glarus/GoodFridayTest.php | 4 ++-- tests/Switzerland/Glarus/NafelserFahrtTest.php | 4 ++-- tests/Switzerland/Glarus/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Glarus/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Glarus/StStephensDayTest.php | 4 ++-- tests/Switzerland/Grisons/AscensionDayTest.php | 4 ++-- tests/Switzerland/Grisons/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Grisons/EasterMondayTest.php | 4 ++-- tests/Switzerland/Grisons/GoodFridayTest.php | 4 ++-- tests/Switzerland/Grisons/GrisonsBaseTestCase.php | 4 ++-- tests/Switzerland/Grisons/GrisonsTest.php | 4 ++-- tests/Switzerland/Grisons/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Grisons/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Grisons/StStephensDayTest.php | 4 ++-- tests/Switzerland/Jura/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Jura/AscensionDayTest.php | 4 ++-- tests/Switzerland/Jura/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Jura/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Jura/BettagsMontagTest.php | 4 ++-- tests/Switzerland/Jura/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Jura/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Jura/EasterMondayTest.php | 4 ++-- tests/Switzerland/Jura/EasterTest.php | 4 ++-- tests/Switzerland/Jura/GoodFridayTest.php | 4 ++-- tests/Switzerland/Jura/JuraBaseTestCase.php | 4 ++-- tests/Switzerland/Jura/JuraTest.php | 4 ++-- tests/Switzerland/Jura/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Jura/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Jura/PentecostTest.php | 4 ++-- tests/Switzerland/Jura/PlebisciteJurassienTest.php | 4 ++-- tests/Switzerland/Jura/WorkersDayTest.php | 4 ++-- tests/Switzerland/Lucerne/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Lucerne/AscensionDayTest.php | 4 ++-- tests/Switzerland/Lucerne/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Lucerne/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Lucerne/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Lucerne/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Lucerne/EasterMondayTest.php | 4 ++-- tests/Switzerland/Lucerne/GoodFridayTest.php | 4 ++-- .../Switzerland/Lucerne/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Lucerne/LucerneBaseTestCase.php | 4 ++-- tests/Switzerland/Lucerne/LucerneTest.php | 4 ++-- tests/Switzerland/Lucerne/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Lucerne/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Lucerne/StStephensDayTest.php | 4 ++-- tests/Switzerland/Neuchatel/AscensionDayTest.php | 4 ++-- tests/Switzerland/Neuchatel/BettagsMontagTest.php | 4 ++-- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Neuchatel/December26thTest.php | 4 ++-- tests/Switzerland/Neuchatel/EasterMondayTest.php | 4 ++-- tests/Switzerland/Neuchatel/GoodFridayTest.php | 4 ++-- .../Neuchatel/InstaurationRepubliqueTest.php | 4 ++-- tests/Switzerland/Neuchatel/January2ndTest.php | 4 ++-- tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php | 4 ++-- tests/Switzerland/Neuchatel/NeuchatelTest.php | 4 ++-- tests/Switzerland/Neuchatel/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Neuchatel/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Neuchatel/WorkersDayTest.php | 4 ++-- tests/Switzerland/Nidwalden/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Nidwalden/AscensionDayTest.php | 4 ++-- tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Nidwalden/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Nidwalden/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Nidwalden/EasterMondayTest.php | 4 ++-- tests/Switzerland/Nidwalden/GoodFridayTest.php | 4 ++-- .../Nidwalden/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Nidwalden/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php | 4 ++-- tests/Switzerland/Nidwalden/NidwaldenTest.php | 4 ++-- tests/Switzerland/Nidwalden/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Nidwalden/StJosephDayTest.php | 4 ++-- tests/Switzerland/Nidwalden/StStephensDayTest.php | 4 ++-- tests/Switzerland/Obwalden/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Obwalden/AscensionDayTest.php | 4 ++-- tests/Switzerland/Obwalden/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Obwalden/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Obwalden/BruderKlausenFestTest.php | 4 ++-- tests/Switzerland/Obwalden/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Obwalden/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Obwalden/EasterMondayTest.php | 4 ++-- tests/Switzerland/Obwalden/GoodFridayTest.php | 4 ++-- .../Switzerland/Obwalden/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Obwalden/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php | 4 ++-- tests/Switzerland/Obwalden/ObwaldenTest.php | 4 ++-- tests/Switzerland/Obwalden/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Obwalden/StStephensDayTest.php | 4 ++-- tests/Switzerland/Schaffhausen/AscensionDayTest.php | 4 ++-- tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Schaffhausen/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Schaffhausen/EasterMondayTest.php | 4 ++-- tests/Switzerland/Schaffhausen/GoodFridayTest.php | 4 ++-- tests/Switzerland/Schaffhausen/NewYearsDayTest.php | 4 ++-- .../Switzerland/Schaffhausen/PentecostMondayTest.php | 4 ++-- .../Schaffhausen/SchaffhausenBaseTestCase.php | 4 ++-- tests/Switzerland/Schaffhausen/SchaffhausenTest.php | 4 ++-- tests/Switzerland/Schaffhausen/StStephensDayTest.php | 4 ++-- tests/Switzerland/Schaffhausen/WorkersDayTest.php | 4 ++-- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Schwyz/AscensionDayTest.php | 4 ++-- tests/Switzerland/Schwyz/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Schwyz/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Schwyz/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Schwyz/EasterMondayTest.php | 4 ++-- tests/Switzerland/Schwyz/EpiphanyTest.php | 4 ++-- tests/Switzerland/Schwyz/GoodFridayTest.php | 4 ++-- tests/Switzerland/Schwyz/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Schwyz/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Schwyz/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Schwyz/SchwyzBaseTestCase.php | 4 ++-- tests/Switzerland/Schwyz/SchwyzTest.php | 4 ++-- tests/Switzerland/Schwyz/StJosephDayTest.php | 4 ++-- tests/Switzerland/Schwyz/StStephensDayTest.php | 4 ++-- tests/Switzerland/Solothurn/AscensionDayTest.php | 4 ++-- tests/Switzerland/Solothurn/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Solothurn/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Solothurn/GoodFridayTest.php | 4 ++-- tests/Switzerland/Solothurn/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Solothurn/SolothurnBaseTestCase.php | 4 ++-- tests/Switzerland/Solothurn/SolothurnTest.php | 4 ++-- tests/Switzerland/StGallen/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/StGallen/AscensionDayTest.php | 4 ++-- tests/Switzerland/StGallen/ChristmasDayTest.php | 4 ++-- tests/Switzerland/StGallen/EasterMondayTest.php | 4 ++-- tests/Switzerland/StGallen/GoodFridayTest.php | 4 ++-- tests/Switzerland/StGallen/NewYearsDayTest.php | 4 ++-- tests/Switzerland/StGallen/PentecostMondayTest.php | 4 ++-- tests/Switzerland/StGallen/StGallenBaseTestCase.php | 4 ++-- tests/Switzerland/StGallen/StGallenTest.php | 4 ++-- tests/Switzerland/StGallen/StStephensDayTest.php | 4 ++-- tests/Switzerland/SwissNationalDayTest.php | 4 ++-- tests/Switzerland/SwitzerlandBaseTestCase.php | 4 ++-- tests/Switzerland/SwitzerlandTest.php | 4 ++-- tests/Switzerland/Thurgau/AscensionDayTest.php | 4 ++-- tests/Switzerland/Thurgau/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Thurgau/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Thurgau/EasterMondayTest.php | 4 ++-- tests/Switzerland/Thurgau/GoodFridayTest.php | 4 ++-- tests/Switzerland/Thurgau/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Thurgau/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Thurgau/StStephensDayTest.php | 4 ++-- tests/Switzerland/Thurgau/ThurgauBaseTestCase.php | 4 ++-- tests/Switzerland/Thurgau/ThurgauTest.php | 4 ++-- tests/Switzerland/Thurgau/WorkersDayTest.php | 4 ++-- tests/Switzerland/Ticino/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Ticino/AscensionDayTest.php | 4 ++-- tests/Switzerland/Ticino/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Ticino/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Ticino/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Ticino/EasterMondayTest.php | 4 ++-- tests/Switzerland/Ticino/EpiphanyTest.php | 4 ++-- tests/Switzerland/Ticino/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Ticino/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Ticino/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Ticino/StJosephDayTest.php | 4 ++-- tests/Switzerland/Ticino/StPeterPaulTest.php | 4 ++-- tests/Switzerland/Ticino/StStephensDayTest.php | 4 ++-- tests/Switzerland/Ticino/TicinoBaseTestCase.php | 4 ++-- tests/Switzerland/Ticino/TicinoTest.php | 4 ++-- tests/Switzerland/Ticino/WorkersDayTest.php | 4 ++-- tests/Switzerland/Uri/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Uri/AscensionDayTest.php | 4 ++-- tests/Switzerland/Uri/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Uri/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Uri/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Uri/EasterMondayTest.php | 4 ++-- tests/Switzerland/Uri/EpiphanyTest.php | 4 ++-- tests/Switzerland/Uri/GoodFridayTest.php | 4 ++-- tests/Switzerland/Uri/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Uri/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Uri/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Uri/StJosephDayTest.php | 4 ++-- tests/Switzerland/Uri/StStephensDayTest.php | 4 ++-- tests/Switzerland/Uri/UriBaseTestCase.php | 4 ++-- tests/Switzerland/Uri/UriTest.php | 4 ++-- tests/Switzerland/Valais/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Valais/AscensionDayTest.php | 4 ++-- tests/Switzerland/Valais/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Valais/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Valais/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Valais/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Valais/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Valais/StJosephDayTest.php | 4 ++-- tests/Switzerland/Valais/ValaisBaseTestCase.php | 4 ++-- tests/Switzerland/Valais/ValaisTest.php | 4 ++-- tests/Switzerland/Vaud/AscensionDayTest.php | 4 ++-- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Vaud/BettagsMontagTest.php | 4 ++-- tests/Switzerland/Vaud/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Vaud/EasterMondayTest.php | 4 ++-- tests/Switzerland/Vaud/GoodFridayTest.php | 4 ++-- tests/Switzerland/Vaud/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Vaud/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Vaud/VaudBaseTestCase.php | 4 ++-- tests/Switzerland/Vaud/VaudTest.php | 4 ++-- tests/Switzerland/Zug/AllSaintsDayTest.php | 4 ++-- tests/Switzerland/Zug/AscensionDayTest.php | 4 ++-- tests/Switzerland/Zug/AssumptionOfMaryTest.php | 4 ++-- tests/Switzerland/Zug/BerchtoldsTagTest.php | 4 ++-- tests/Switzerland/Zug/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Zug/CorpusChristiTest.php | 4 ++-- tests/Switzerland/Zug/EasterMondayTest.php | 4 ++-- tests/Switzerland/Zug/GoodFridayTest.php | 4 ++-- tests/Switzerland/Zug/ImmaculateConceptionTest.php | 4 ++-- tests/Switzerland/Zug/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Zug/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Zug/StStephensDayTest.php | 4 ++-- tests/Switzerland/Zug/ZugBaseTestCase.php | 4 ++-- tests/Switzerland/Zug/ZugTest.php | 4 ++-- tests/Switzerland/Zurich/AscensionDayTest.php | 4 ++-- tests/Switzerland/Zurich/ChristmasDayTest.php | 4 ++-- tests/Switzerland/Zurich/EasterMondayTest.php | 4 ++-- tests/Switzerland/Zurich/GoodFridayTest.php | 4 ++-- tests/Switzerland/Zurich/NewYearsDayTest.php | 4 ++-- tests/Switzerland/Zurich/PentecostMondayTest.php | 4 ++-- tests/Switzerland/Zurich/StStephensDayTest.php | 4 ++-- tests/Switzerland/Zurich/WorkersDayTest.php | 4 ++-- tests/Switzerland/Zurich/ZurichBaseTestCase.php | 4 ++-- tests/Switzerland/Zurich/ZurichTest.php | 4 ++-- tests/USA/ChristmasDayTest.php | 4 ++-- tests/USA/ColumbusDayTest.php | 4 ++-- tests/USA/IndependenceDayTest.php | 4 ++-- tests/USA/LabourDayTest.php | 4 ++-- tests/USA/MartinLutherKingDayTest.php | 4 ++-- tests/USA/MemorialDayTest.php | 4 ++-- tests/USA/NewYearsDayTest.php | 4 ++-- tests/USA/ThanksgivingDayTest.php | 4 ++-- tests/USA/USABaseTestCase.php | 4 ++-- tests/USA/USATest.php | 4 ++-- tests/USA/VeteransDayTest.php | 4 ++-- tests/USA/WashingtonsBirthdayTest.php | 4 ++-- tests/Ukraine/CatholicChristmasDayTest.php | 4 ++-- tests/Ukraine/ChristmasDayTest.php | 4 ++-- tests/Ukraine/ConstitutionDayTest.php | 4 ++-- tests/Ukraine/DefenderOfUkraineDayTest.php | 4 ++-- tests/Ukraine/EasterTest.php | 4 ++-- tests/Ukraine/IndependenceDayTest.php | 4 ++-- tests/Ukraine/InternationalWomensDayTest.php | 4 ++-- tests/Ukraine/InternationalWorkersDayTest.php | 4 ++-- tests/Ukraine/NewYearsDayTest.php | 4 ++-- tests/Ukraine/PentecostTest.php | 4 ++-- tests/Ukraine/SecondInternationalWorkersDayTest.php | 4 ++-- tests/Ukraine/SubstitutedHolidayTest.php | 4 ++-- tests/Ukraine/UkraineBaseTestCase.php | 4 ++-- tests/Ukraine/UkraineTest.php | 4 ++-- tests/Ukraine/VictoryDayTest.php | 4 ++-- tests/UnitedKingdom/BoxingDayTest.php | 4 ++-- tests/UnitedKingdom/ChristmasDayTest.php | 4 ++-- tests/UnitedKingdom/EasterMondayTest.php | 4 ++-- tests/UnitedKingdom/England/BoxingDayTest.php | 4 ++-- tests/UnitedKingdom/England/ChristmasDayTest.php | 4 ++-- tests/UnitedKingdom/England/EasterMondayTest.php | 4 ++-- tests/UnitedKingdom/England/EnglandBaseTestCase.php | 4 ++-- tests/UnitedKingdom/England/EnglandTest.php | 4 ++-- tests/UnitedKingdom/England/GoodFridayTest.php | 4 ++-- tests/UnitedKingdom/England/MayDayBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/England/NewYearsDayTest.php | 4 ++-- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/GoodFridayTest.php | 4 ++-- tests/UnitedKingdom/MayDayBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/NewYearsDayTest.php | 4 ++-- .../NorthernIreland/BattleOfTheBoyneTest.php | 4 ++-- tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php | 4 ++-- .../NorthernIreland/ChristmasDayTest.php | 4 ++-- .../NorthernIreland/EasterMondayTest.php | 4 ++-- .../UnitedKingdom/NorthernIreland/GoodFridayTest.php | 4 ++-- .../NorthernIreland/MayDayBankHolidayTest.php | 4 ++-- .../UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 4 ++-- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 4 ++-- .../NorthernIreland/NorthernIrelandTest.php | 4 ++-- .../NorthernIreland/SpringBankHolidayTest.php | 4 ++-- .../NorthernIreland/StPatricksDayTest.php | 4 ++-- .../NorthernIreland/SummerBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/BoxingDayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/ChristmasDayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/GoodFridayTest.php | 4 ++-- .../UnitedKingdom/Scotland/MayDayBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/NewYearsDayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php | 4 ++-- tests/UnitedKingdom/Scotland/ScotlandTest.php | 4 ++-- .../UnitedKingdom/Scotland/SecondNewYearsDayTest.php | 4 ++-- .../UnitedKingdom/Scotland/SpringBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Scotland/StAndrewsDayTest.php | 4 ++-- .../UnitedKingdom/Scotland/SummerBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/SummerBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 4 ++-- tests/UnitedKingdom/UnitedKingdomTest.php | 4 ++-- tests/UnitedKingdom/Wales/BoxingDayTest.php | 4 ++-- tests/UnitedKingdom/Wales/ChristmasDayTest.php | 4 ++-- tests/UnitedKingdom/Wales/EasterMondayTest.php | 4 ++-- tests/UnitedKingdom/Wales/GoodFridayTest.php | 4 ++-- tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 4 ++-- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 4 ++-- tests/UnitedKingdom/Wales/WalesTest.php | 4 ++-- tests/YasumiBase.php | 4 ++-- tests/YasumiTestCaseInterface.php | 4 ++-- 1590 files changed, 3191 insertions(+), 3178 deletions(-) diff --git a/.php_cs b/.php_cs index 0852abcc4..6d500380b 100644 --- a/.php_cs +++ b/.php_cs @@ -2,7 +2,7 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2020 AzuyaLabs + * Copyright (c) 2015 - 2021 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index 0408169d4..330b3191f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2020 AzuyaLabs +Copyright (c) 2015 - 2021 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/phpunit.xml b/phpunit.xml index 32b98f5f3..97ddcf216 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,7 +2,7 @@ + + + + + + + + + + From 9c5d17d1f9b8ea47eeee5c40293a48302a7651eb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 15:39:22 +0900 Subject: [PATCH 172/687] The pcntl & posix extensions must be loaded in order for Psalm to be able to use multiple processes. On Windows these aren't enabled by default. --- .github/workflows/static-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 971ebe50b..81def0986 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -52,4 +52,4 @@ jobs: run: vendor/bin/phpstan --level=5 analyse src - name: Run static analysis - Psalm - run: vendor/bin/psalm --threads=2 + run: vendor/bin/psalm From f5c4e469c610e110b6aa4008c85f95df9a4b760b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 16:04:27 +0900 Subject: [PATCH 173/687] Added convenience script to combine static analysis tools. --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1736f00f7..df5f31c33 100755 --- a/composer.json +++ b/composer.json @@ -61,7 +61,11 @@ "phpstan": "vendor/bin/phpstan --level=5 analyse src tests", "psalm": "vendor/bin/psalm --threads=2", "test": "vendor/bin/phpunit", - "infection": "vendor/bin/infection run -j 2" + "infection": "vendor/bin/infection run -j 2", + "analyse": [ + "@phpstan", + "@psalm" + ] }, "config": { "sort-packages": true From ba712ae8c78fd59a32e347136609224157353693 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 16:05:05 +0900 Subject: [PATCH 174/687] Removing Travis configuration as we have moved to Github Actions. --- .travis.yml | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 17a21e5fa..000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: php - -php: - - 7.3 - - 7.4 - - 8.0 - - nightly - -dist: trusty -sudo: required - -cache: - directories: - - $HOME/.composer/cache - -before_install: - - if [[ $HHVM == true ]]; then sudo apt-get update; fi - - if [[ $HHVM == true ]]; then sudo apt-get install hhvm=3.\*; fi - -before_script: - - composer self-update - - composer install --no-interaction - -script: - - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.12 && 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: hhvm - - php: nightly - - include: - - php: 7.3 - env: PHPSTAN=1 - - php: 7.4 - env: PHPSTAN=1 - - php: 8.0 - env: PHPSTAN=1 - - php: hhvm - env: HHVM=true From 721cf40398c43eb908c63c84ae827724528074f1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 16:57:58 +0900 Subject: [PATCH 175/687] Fixed issue in the test for Ontario that IslanderDay is only celebrated since 2009. --- .../PrinceEdwardIsland/PrinceEdwardIslandTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index e3603606d..8916bf87c 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -42,13 +42,18 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'goldCupParadeDay', - 'islanderDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2009) { + $holidays[] = 'islanderDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From 6a7e5bb5658fa819ddad4cd89ed9ddcff7fa632f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 17:00:39 +0900 Subject: [PATCH 176/687] Removing StyleCI configuration as we have moved to Github Actions. --- .styleci.yml | 12 ------------ CHANGELOG.md | 1 + 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index b508228b0..000000000 --- a/.styleci.yml +++ /dev/null @@ -1,12 +0,0 @@ -preset: psr2 - -risky: true - -enabled: - - short_array_syntax - - native_function_invocation - - alpha_ordered_imports - - no_unused_imports - - single_quote - - space_after_semicolon - - trailing_comma_in_multiline_array \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 656b0fc29..c1ed9e886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Updated Copyright year ### Fixed +- Issue in the test for Ontario that IslanderDay was considered for all years: it is only celebrated since 2009. - Incorrect invocation of Fribourg::calculateBerchtoldsTag() and Fribourg::calculateDecember26th (Switzerland) - Use parameter and return type hinting From 82f46912c61db5ff63ccdbb4ab9fa9cb236901f6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 17:11:15 +0900 Subject: [PATCH 177/687] Replaced status badges with updates from Actions. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1cec8ec9..ccf5d4a4e 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ [![GitHub Release](https://img.shields.io/github/release/azuyalabs/yasumi.svg?style=flat-square)](https://github.com/azuyalabs/yasumi/releases) [![Total Downloads](https://img.shields.io/packagist/dt/azuyalabs/yasumi.svg?style=flat-square)](https://packagist.org/packages/azuyalabs/yasumi) +![Code Style](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Code%20Style?label=Code%20Style&style=flat-square) +![Static analysis](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Static%20analysis?label=Static%20analysis&style=flat-square) +![Unit tests](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Unit%20tests?label=Unit%20tests&style=flat-square) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/azuyalabs/yasumi.svg?style=flat-square)](https://travis-ci.org/azuyalabs/yasumi) -[![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) Introduction From 4b1a1fe986f8dde2a4ef06dac54d6c3ac147553a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 17:55:47 +0900 Subject: [PATCH 178/687] Renamed so the names are a bit more generic (in case we'd like to use different tools in the future). --- .github/workflows/{code-style.yml => coding-standard.yml} | 2 +- .github/workflows/{tests.yml => testing.yml} | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{code-style.yml => coding-standard.yml} (98%) rename .github/workflows/{tests.yml => testing.yml} (98%) diff --git a/.github/workflows/code-style.yml b/.github/workflows/coding-standard.yml similarity index 98% rename from .github/workflows/code-style.yml rename to .github/workflows/coding-standard.yml index f613dd8b5..45a425f86 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/coding-standard.yml @@ -1,4 +1,4 @@ -name: "Code Style" +name: "Coding Standard" on: - push diff --git a/.github/workflows/tests.yml b/.github/workflows/testing.yml similarity index 98% rename from .github/workflows/tests.yml rename to .github/workflows/testing.yml index bf95fed9a..945e33fff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/testing.yml @@ -1,4 +1,4 @@ -name: "Unit tests" +name: "Testing" on: - push diff --git a/README.md b/README.md index ccf5d4a4e..668731f38 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![GitHub Release](https://img.shields.io/github/release/azuyalabs/yasumi.svg?style=flat-square)](https://github.com/azuyalabs/yasumi/releases) [![Total Downloads](https://img.shields.io/packagist/dt/azuyalabs/yasumi.svg?style=flat-square)](https://packagist.org/packages/azuyalabs/yasumi) -![Code Style](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Code%20Style?label=Code%20Style&style=flat-square) +![Coding Standard](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Coding%20Standard?label=Coding%20Standard&style=flat-square) ![Static analysis](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Static%20analysis?label=Static%20analysis&style=flat-square) -![Unit tests](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Unit%20tests?label=Unit%20tests&style=flat-square) +![Testing](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Testing?label=Testing&style=flat-square) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) [![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) From f485da38c15c974ee3b9a68ad6b8ac100475f959 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Jan 2021 21:27:13 +0900 Subject: [PATCH 179/687] Removing Scrutinzer configuration as we have moved to Github Actions. --- .scrutinizer.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .scrutinizer.yml diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 330bafe04..000000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,23 +0,0 @@ -checks: - php: - code_rating: true - duplication: false - no_short_open_tag: true - no_debug_code: true - -tools: - external_code_coverage: false - php_code_sniffer: true - php_mess_detector: true - php_cs_fixer: - config: { level: psr2 } - -filter: - paths: [src/*] - -build: - nodes: - analysis: - tests: - override: - - php-scrutinizer-run \ No newline at end of file From 85460c6773432661fd423c4896e14fbfebe6451a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 31 Jan 2021 11:14:36 +0900 Subject: [PATCH 180/687] Corrected the days as they should be the other way around. --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 6bbb23656..93f0cd096 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,8 +5,8 @@ on: - cron: "0 0 * * *" env: - DAYS_BEFORE_CLOSE: 90 - DAYS_BEFORE_STALE: 10 + DAYS_BEFORE_CLOSE: 10 + DAYS_BEFORE_STALE: 90 jobs: stale: From 19699e300200a0895306008afe19e61e6c8e9765 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 31 Jan 2021 11:28:58 +0900 Subject: [PATCH 181/687] Removed use of Scrutinizer. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 668731f38..485f60ab6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ ![Static analysis](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Static%20analysis?label=Static%20analysis&style=flat-square) ![Testing](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Testing?label=Testing&style=flat-square) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![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) Introduction ------------ From 16cdf5b10e1bebd07bdc99b49d99719884bfb3b6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 31 Jan 2021 13:07:46 +0900 Subject: [PATCH 182/687] Fixed issue that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. --- CHANGELOG.md | 1 + tests/Canada/NovaScotia/NovaScotiaTest.php | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1ed9e886..f8a901a1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Updated Copyright year ### Fixed +- Issue in the test for NovaScotia that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. - Issue in the test for Ontario that IslanderDay was considered for all years: it is only celebrated since 2009. - Incorrect invocation of Fribourg::calculateBerchtoldsTag() and Fribourg::calculateDecember26th (Switzerland) - Use parameter and return type hinting diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index 320d4232d..36eec2471 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -42,13 +42,18 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'natalHoliday', - 'novaScotiaHeritageDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 2015) { + $holidays[] = 'novaScotiaHeritageDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From 50737f6840656e62c9dd735877557bf8176ff28c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 1 Feb 2021 00:25:29 +0900 Subject: [PATCH 183/687] Updated Code of Conduct to v2 of the Contributor Covenant. --- CODE_OF_CONDUCT.md | 134 ++++++++++++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 49 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 48cdd3a95..76ef2908f 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,75 +2,111 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for +everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity +and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, +or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to creating a positive environment -include: +Examples of behavior that contributes to a positive environment for our community include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community -Examples of unacceptable behavior by participants include: +Examples of unacceptable behavior include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting -## Our Responsibilities +## Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take +appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, +issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for +moderation decisions when appropriate. ## Scope -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing +the community in public spaces. Examples of representing our community include using an official e-mail address, posting +via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at me@sachatelgenhof.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible +for enforcement at +[me@sachatelgenhof.com](mailto:me@sachatelgenhof.com). All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem +in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the +community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation +and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including +unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding +interactions in community spaces as well as external channels like social media. Violating these terms may lead to a +temporary or permanent ban. + +### 3. Temporary Ban -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified +period of time. No public or private interaction with the people involved, including unsolicited interaction with those +enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate +behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. [homepage]: https://www.contributor-covenant.org -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html + +[Mozilla CoC]: https://github.com/mozilla/diversity + +[FAQ]: https://www.contributor-covenant.org/faq + +[translations]: https://www.contributor-covenant.org/translations + From 401c78780f8d0aecb8e3a710767807c5098c53d5 Mon Sep 17 00:00:00 2001 From: Mahmood Dhia Date: Tue, 23 Mar 2021 14:41:01 +0100 Subject: [PATCH 184/687] Allow override WEEKEND_DATA in provider classes (#235) Co-authored-by: Mahmood Dhia --- 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 ec4ade721..45190dde2 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -215,7 +215,7 @@ public function isWeekendDay(\DateTimeInterface $date): bool // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. if (\in_array( (int) $date->format('w'), - self::WEEKEND_DATA[$this::ID] ?? [0, 6], + static::WEEKEND_DATA[$this::ID] ?? [0, 6], true ) ) { From b7d5f9a9f5d3761108e64c5877d7d09c61fea545 Mon Sep 17 00:00:00 2001 From: Zurab Sardarov <35600518+zsardarov@users.noreply.github.com> Date: Tue, 23 Mar 2021 17:42:29 +0400 Subject: [PATCH 185/687] Added Georgia Provider. (#245) --- src/Yasumi/Provider/Georgia.php | 231 ++++++++++++++++++ src/Yasumi/data/translations/easter.php | 1 + .../translations/internationalWomensDay.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + tests/Georgia/EasterTest.php | 63 +++++ tests/Georgia/GeorgiaBaseTestCase.php | 42 ++++ tests/Georgia/GeorgiaTest.php | 113 +++++++++ tests/Georgia/IndependenceDayTest.php | 75 ++++++ tests/Georgia/InternationalWomensDayTest.php | 77 ++++++ tests/Georgia/MtskhetobaDayTest.php | 77 ++++++ tests/Georgia/NewYearsDayTest.php | 77 ++++++ tests/Georgia/OrthodoxChristmasDayTest.php | 77 ++++++ tests/Georgia/OrthodoxEpiphanyDayTest.php | 77 ++++++ tests/Georgia/SecondNewYearDayTest.php | 77 ++++++ tests/Georgia/StAndrewsDayTest.php | 77 ++++++ tests/Georgia/StGeorgesDayTest.php | 77 ++++++ tests/Georgia/StMarysDayTest.php | 77 ++++++ tests/Georgia/UnityDayTest.php | 75 ++++++ tests/Georgia/VictoryDayTest.php | 77 ++++++ 19 files changed, 1372 insertions(+) create mode 100644 src/Yasumi/Provider/Georgia.php create mode 100644 tests/Georgia/EasterTest.php create mode 100644 tests/Georgia/GeorgiaBaseTestCase.php create mode 100644 tests/Georgia/GeorgiaTest.php create mode 100644 tests/Georgia/IndependenceDayTest.php create mode 100644 tests/Georgia/InternationalWomensDayTest.php create mode 100644 tests/Georgia/MtskhetobaDayTest.php create mode 100644 tests/Georgia/NewYearsDayTest.php create mode 100644 tests/Georgia/OrthodoxChristmasDayTest.php create mode 100644 tests/Georgia/OrthodoxEpiphanyDayTest.php create mode 100644 tests/Georgia/SecondNewYearDayTest.php create mode 100644 tests/Georgia/StAndrewsDayTest.php create mode 100644 tests/Georgia/StGeorgesDayTest.php create mode 100644 tests/Georgia/StMarysDayTest.php create mode 100644 tests/Georgia/UnityDayTest.php create mode 100644 tests/Georgia/VictoryDayTest.php diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php new file mode 100644 index 000000000..a40e53a50 --- /dev/null +++ b/src/Yasumi/Provider/Georgia.php @@ -0,0 +1,231 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Holiday; + +/** + * Provider for all holidays in Georgia. + * + * @author Zurab Sardarov + */ +class Georgia extends AbstractProvider +{ + use CommonHolidays; + use ChristianHolidays; + + public const PROCLAMATION_OF_INDEPENDENCE_YEAR = 1918; + + public const APRIL_NINE_TRAGEDY_YEAR = 1989; + + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'GE'; + + /** + * Initialize holidays for Georgia. + * + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Asia/Tbilisi'; + + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale)); + + $this->addSecondNewYearDay(); + $this->addOrthodoxChristmasDay(); + $this->addIndependenceDay(); + $this->addMothersDay(); + $this->addUnityDay(); + $this->addVictoryDay(); + $this->addStAndrewsDay(); + $this->addOrthodoxEpiphanyDay(); + $this->addMtskhetobaDay(); + $this->addStMarysDay(); + $this->addStGeorgesDay(); + } + + /** + * @throws \Exception + */ + public function calculateEaster(int $year, string $timezone): \DateTime + { + return $this->calculateOrthodoxEaster($year, $timezone); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addOrthodoxChristmasDay(): void + { + $date = new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('orthodoxChristmasDay', [ + 'en' => 'Orthodox Christmas Day', + 'ka' => 'ქრისტეს შობა', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addIndependenceDay(): void + { + if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { + $date = new \DateTime("{$this->year}-05-26", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('independenceDay', [ + 'en' => 'Independence Day', + 'ka' => 'საქართველოს დამოუკიდებლობის დღე', + ], $date, $this->locale)); + } + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addUnityDay(): void + { + if ($this->year >= self::APRIL_NINE_TRAGEDY_YEAR) { + $date = new \DateTime("{$this->year}-04-09", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('unityDay', [ + 'en' => 'National Unity Day', + 'ka' => 'ეროვნული ერთიანობის დღე', + ], $date, $this->locale)); + } + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addMothersDay(): void + { + $date = new \DateTime("{$this->year}-03-03", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('mothersDay', [ + 'en' => 'Mothers Day', + 'ka' => 'დედის დღე', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addVictoryDay() + { + $date = new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('victoryDay', [ + 'en' => 'Day of Victory over Fascism', + 'ka' => 'ფაშიზმზე გამარჯვების დღე', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addStAndrewsDay(): void + { + $date = new \DateTime("{$this->year}-05-12", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('stAndrewsDay', [ + 'en' => 'Saint Andrew the First-Called Day', + 'ka' => 'წმინდა ანდრია პირველწოდებულის ხსენების დღე', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addOrthodoxEpiphanyDay(): void + { + $date = new \DateTime("{$this->year}-01-19", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('orthodoxEpiphanyDay', [ + 'en' => 'Orthodox Epiphany Day', + 'ka' => 'ნათლისღება', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addStMarysDay(): void + { + $date = new \DateTime("{$this->year}-08-28", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('stMarysDay', [ + 'en' => 'Saint Marys Day', + 'ka' => 'მარიამობა', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addMtskhetobaDay(): void + { + $date = new \DateTime("{$this->year}-10-14", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('mtskhetobaDay', [ + 'en' => 'Day of Svetitskhoveli Cathedral', + 'ka' => 'მცხეთობა', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addStGeorgesDay(): void + { + $date = new \DateTime("{$this->year}-11-23", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('stGeorgesDay', [ + 'en' => 'Saint Georges Day', + 'ka' => 'გიორგობა', + ], $date, $this->locale)); + } + + /** + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function addSecondNewYearDay(): void + { + $date = new \DateTime("$this->year-01-02", new \DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('secondDayOfNewYear', [ + 'en' => 'Second day of the New Year', + 'ka' => 'ბედობა', + ], $date, $this->locale)); + } +} diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index 2c9be1a1d..b874d07e1 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -30,6 +30,7 @@ 'hr' => 'Uskrs', 'hu' => 'Húsvét', 'it' => 'Pasqua', + 'ka' => 'აღდგომა', 'lt' => 'Velykos', 'lv' => 'Lieldienas', 'nb' => 'første påskedag', diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 3ad17d61e..8653a76fc 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -17,6 +17,7 @@ return [ 'de' => 'Internationaler Frauentag', 'en' => 'International Women’s Day', + 'ka' => 'ქალთა საერთაშორისო დღე', 'ko' => '국제 여성의 날', 'ru' => 'Международный женский день', 'uk' => 'Міжнародний жіночий день', diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 862f17703..d98a398b7 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -34,6 +34,7 @@ 'hu' => 'Újév', 'it' => 'Capodanno', 'ja' => '元日', + 'ka' => 'ახალი წელი', 'ko' => '새해', 'lt' => 'Naujųjų metų diena', 'lv' => 'Jaunais Gads', diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php new file mode 100644 index 000000000..5481a9a7e --- /dev/null +++ b/tests/Georgia/EasterTest.php @@ -0,0 +1,63 @@ +assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-04-28", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'აღდგომა'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/GeorgiaBaseTestCase.php b/tests/Georgia/GeorgiaBaseTestCase.php new file mode 100644 index 000000000..2ecb97e07 --- /dev/null +++ b/tests/Georgia/GeorgiaBaseTestCase.php @@ -0,0 +1,42 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Georgia holiday provider. + */ +abstract class GeorgiaBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Name of the country to be tested. + */ + public const REGION = 'Georgia'; + + /** + * Timezone in which this provider has holidays defined. + */ + public const TIMEZONE = 'Asia/Tbilisi'; + + /** + * Locale that is considered common for this provider. + */ + public const LOCALE = 'ka_GE'; +} diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php new file mode 100644 index 000000000..09a28589b --- /dev/null +++ b/tests/Georgia/GeorgiaTest.php @@ -0,0 +1,113 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\Georgia; + +/** + * Class for testing holidays in Georgia. + * + * @author Zurab Sardarov + */ +class GeorgiaTest extends GeorgiaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(); + } + + /** + * Tests if all official holidays in Georgia are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'easter', + 'victoryDay', + 'mothersDay', + 'newYearsDay', + 'internationalWomensDay', + 'secondDayOfNewYear', + 'orthodoxChristmasDay', + 'stAndrewsDay', + 'orthodoxEpiphanyDay', + 'mtskhetobaDay', + 'stMarysDay', + 'stGeorgesDay', + ]; + + if ($this->year >= Georgia::PROCLAMATION_OF_INDEPENDENCE_YEAR) { + $holidays[] = 'independenceDay'; + } + if ($this->year >= Georgia::APRIL_NINE_TRAGEDY_YEAR) { + $holidays[] = 'unityDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Georgia 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 Georgia 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 Georgia 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 Georgia are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } +} diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php new file mode 100644 index 000000000..83e568b52 --- /dev/null +++ b/tests/Georgia/IndependenceDayTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class IndependenceDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'independenceDay'; + + /** + * @throws ReflectionException + * @throws Exception + */ + public function testHoliday(): void + { + $year = 2019; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("{$year}-05-26", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $year = 2019; + + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'საქართველოს დამოუკიდებლობის დღე'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $year = 2019; + + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php new file mode 100644 index 000000000..895d35f03 --- /dev/null +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class InternationalWomensDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'internationalWomensDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(3, 8, 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 => 'ქალთა საერთაშორისო დღე'] + ); + } + + /** + * 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/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php new file mode 100644 index 000000000..1e20a9f49 --- /dev/null +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class MtskhetobaDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'mtskhetobaDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(10, 14, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'მცხეთობა'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php new file mode 100644 index 000000000..1709219f3 --- /dev/null +++ b/tests/Georgia/NewYearsDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class NewYearsDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'ახალი წელი'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php new file mode 100644 index 000000000..8b983b9e1 --- /dev/null +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class OrthodoxChristmasDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'orthodoxChristmasDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 7, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'ქრისტეს შობა'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php new file mode 100644 index 000000000..459b727b5 --- /dev/null +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class OrthodoxEpiphanyDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'orthodoxEpiphanyDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 19, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'ნათლისღება'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php new file mode 100644 index 000000000..4c98273a0 --- /dev/null +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class SecondNewYearDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'secondDayOfNewYear'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 2, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'ბედობა'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php new file mode 100644 index 000000000..c0138c8fa --- /dev/null +++ b/tests/Georgia/StAndrewsDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class StAndrewsDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'stAndrewsDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(5, 12, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'წმინდა ანდრია პირველწოდებულის ხსენების დღე'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php new file mode 100644 index 000000000..413a7c288 --- /dev/null +++ b/tests/Georgia/StGeorgesDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class StGeorgesDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'stGeorgesDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(11, 23, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'გიორგობა'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php new file mode 100644 index 000000000..9e5d89687 --- /dev/null +++ b/tests/Georgia/StMarysDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class StMarysDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'stMarysDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(8, 28, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'მარიამობა'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php new file mode 100644 index 000000000..d015b3a82 --- /dev/null +++ b/tests/Georgia/UnityDayTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class UnityDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'unityDay'; + + /** + * @throws ReflectionException + * @throws Exception + */ + public function testHoliday(): void + { + $year = 2019; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("{$year}-04-09", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $year = 2019; + + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'ეროვნული ერთიანობის დღე'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $year = 2019; + + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php new file mode 100644 index 000000000..d50bf8da2 --- /dev/null +++ b/tests/Georgia/VictoryDayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Georgia; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +class VictoryDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'victoryDay'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + */ + public function testHoliday(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(5, 9, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation() + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'ფაშიზმზე გამარჯვების დღე'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType() + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} From 39308c69da7a1d0bca0d005eed9134bac3301289 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 2 Feb 2021 23:56:31 +0900 Subject: [PATCH 186/687] Refactored removing the magic numbers for the lower and upper limits of the calendar year. --- CHANGELOG.md | 1 + src/Yasumi/Yasumi.php | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a901a1d..206ab3f35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Changed - Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) +- Refactored removing the magic numbers for the lower and upper limits of the calendar year. - Reformatted code using new/updated Code Styling rules. - Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer...[WIP] - Updated Copyright year diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index ee08c6428..9cbd46829 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -31,11 +31,12 @@ */ class Yasumi { - /** - * Default locale. - */ public const DEFAULT_LOCALE = 'en_US'; + public const YEAR_LOWER_BOUND = 1000; + + public const YEAR_UPPER_BOUND = 9999; + /** * @var array list of all defined locales */ @@ -111,13 +112,13 @@ public static function nextWorkingDay( * * @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. + * between the defined lower and upper bounds. * @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 InvalidYearException if the year parameter is not between the defined lower and upper bounds * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given country does not exist * @throws \ReflectionException @@ -136,8 +137,8 @@ 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 (%d given).', $year)); + if ($year < self::YEAR_LOWER_BOUND || $year > self::YEAR_UPPER_BOUND) { + throw new InvalidYearException(\sprintf('Year needs to be between %d and %d (%d given).', self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND, $year)); } // Load internal locales variable @@ -178,13 +179,13 @@ public static function getAvailableLocales(): array * * @param string $isoCode 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 - * integer between 1000 and 9999. + * integer between the defined lower and upper bounds. * @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 InvalidArgumentException if the year parameter is not between the defined lower and upper bounds * @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 @@ -226,10 +227,10 @@ public static function getProviders(): array foreach ($filesIterator as $file) { if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( - $file->getBasename('.php'), - self::$ignoredProvider, - true - )) { + $file->getBasename('.php'), + self::$ignoredProvider, + true + )) { continue; } From af9432da9d530008425bd39ed8caf2ef90261532 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 23 Mar 2021 23:26:33 +0900 Subject: [PATCH 187/687] Updated CHANGELOG reflecting latest changes and changes from earlier commits. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 206ab3f35..f981d9466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,28 +6,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added +- Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov ](https://github.com/zsardarov)) - Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) + - PHPStan to the dependencies allowing for local analysis. - `.gitattributes` file to reduce the size of a release package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) ### Changed - Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) +- Some improvements/refactoring of the Swiss holiday providers (including links to sources) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) + +- Allow the `WEEKEND_DATA` constant in provider classes to be overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) - Refactored removing the magic numbers for the lower and upper limits of the calendar year. - Reformatted code using new/updated Code Styling rules. -- Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer...[WIP] +- Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer +- Hardened error handling of json functions. - Updated Copyright year ### Fixed -- Issue in the test for NovaScotia that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. -- Issue in the test for Ontario that IslanderDay was considered for all years: it is only celebrated since 2009. -- Incorrect invocation of Fribourg::calculateBerchtoldsTag() and Fribourg::calculateDecember26th (Switzerland) +- The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. +- The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009. +- Typo for Estonian Day of Restoration of Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) + +- The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. +- Incorrect invocation of `Fribourg::calculateBerchtoldsTag()` and `Fribourg::calculateDecember26th` (Switzerland) - Use parameter and return type hinting +- Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. +- Some static functions were used as if they are object functions. ### Deprecated ### Removed +- Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer - PHP 7.2 Support (PHP 7.2 is EOL) - Faker library as it has been sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) +- Various undefined class references, unused imports, etc. ## [2.3.0] - 2020-06-22 From 788129c0d17d60bf647a67286e7850425e22081e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 23 Mar 2021 23:30:22 +0900 Subject: [PATCH 188/687] Formatting fixes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 85 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f981d9466..3d3de7f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Change Log + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org). @@ -6,13 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] ### Added -- Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov ](https://github.com/zsardarov)) + +- Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) - Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) - PHPStan to the dependencies allowing for local analysis. - `.gitattributes` file to reduce the size of a release package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) ### Changed + - Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) - Some improvements/refactoring of the Swiss holiday providers (including links to sources) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) @@ -20,10 +23,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Refactored removing the magic numbers for the lower and upper limits of the calendar year. - Reformatted code using new/updated Code Styling rules. - Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer -- Hardened error handling of json functions. +- Hardened error handling of json functions. - Updated Copyright year ### Fixed + - The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. - The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009. - Typo for Estonian Day of Restoration of Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) @@ -31,21 +35,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. - Incorrect invocation of `Fribourg::calculateBerchtoldsTag()` and `Fribourg::calculateDecember26th` (Switzerland) - Use parameter and return type hinting -- Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. +- Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. - Some static functions were used as if they are object functions. ### Deprecated ### Removed + - Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer - PHP 7.2 Support (PHP 7.2 is EOL) - Faker library as it has been sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) - Various undefined class references, unused imports, etc. - ## [2.3.0] - 2020-06-22 ### Added + - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) - Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) - Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) @@ -63,6 +68,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added missing return (correct) and parameter types in various methods. ### Changed + - Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) - Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) @@ -80,6 +86,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Updated third party dependencies. ### Fixed + - Fixed Ukraine holidays on weekends. These days need to be substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) - Fix locale fallback for substitute holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) @@ -88,17 +95,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Fixed compound conditions that are always true by simplifying the condition steps. ### Deprecated + - Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor of accessor methods [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) ### Removed + - PHP 7.1 Support, as it has reached its end of life. - Removed the assertion of the instance type in some functions as it is already defined by the return type. - Removed unused variables, namespaces, brackets, empty tests, etc. - ## [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)) - Translation for the Easter holiday for the 'fr_FR' locale [\#146](https://github.com/azuyalabs/yasumi/pull/146) ([pioc92](https://github.com/pioc92)) @@ -110,6 +119,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Included extra requirement for some PHP Extensions in the composer file. ### 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)) - 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)) @@ -117,7 +127,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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. +- 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. 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. @@ -127,6 +137,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) - 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)) @@ -138,22 +149,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Good Friday is not official in Brazil [\#174](https://github.com/azuyalabs/yasumi/pull/174) ([c960657](https://github.com/c960657)) ### Removed -- Unused constants. +- Unused constants. ## [2.1.0] - 2019-03-29 ### Added + - As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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/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)) @@ -163,12 +177,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) +- Duplicate definition of newYearsDay [\#125](https://github.com/azuyalabs/yasumi/pull/125) ([c960657](https://github.com/c960657)) ## [2.0.0] - 2019-01-11 ### Added + - 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)) @@ -179,6 +194,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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 + - Upgraded entirely to PHP version 7 with PHP 7.1 being the minimum required version. Base code and all unit tests have been reworked to compatibility with PHP 7. - Upgraded to PHPUnit to version 7.5. - Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports Day. [\#113](https://github.com/azuyalabs/yasumi/pull/113) ([cookie-maker](https://github.com/cookie-maker)) @@ -193,6 +209,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Changed individual added International Women's Day for Ukraine and Russia to common holiday. [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) ### Fixed + - Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place. - Fixed issue for summer time in Denmark in 1980. By default summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th. - Fixed spelling issue in the Swedish translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) @@ -203,19 +220,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Removed - ## [1.8.0] - 2018-02-21 ### Added + - Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This function can be helpful in cases where an existing holiday provider class can be extended but some holidays are not part of the original (extended) provider. -- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and objects of the DateTimeImmutable type. +- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and objects of the DateTimeImmutable type. - Added support for countries where the weekend definition (start and end day) differs from the global definition (Saturday and Sunday). - Holiday Provider for Russia. [\#72](https://github.com/azuyalabs/yasumi/pull/72) ([lukosius](https://github.com/lukosius)) - Holiday Provider for Estonia. [\#71](https://github.com/azuyalabs/yasumi/pull/71) ([lukosius](https://github.com/lukosius)) - Added Scrutinizer integration. ### Changed -- Locale List updated based on CLDR version 32. + +- Locale List updated based on CLDR version 32. - Added PHPStan static analysis tool to Travis CI [\#88](https://github.com/azuyalabs/yasumi/pull/88) ([lukosius](https://github.com/lukosius)) - Various inline documentation enhancements. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) - Removed unnecessary typecasts and if-construct. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) @@ -223,19 +241,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Removed unnecessary NULL checks. ### Fixed + - Fixed Brazilian Carnival Day and added Ash Wednesday to Brazilian Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) - Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix made that recognizes Easter Sunday as being observed (in all regions). [\#86](https://github.com/azuyalabs/yasumi/pull/86) ([Bastian Konetzny](https://github.com/bkonetzny)) - Corrected reference to the Holiday Provider's ID to be static. -- Changed weekend data property into constant as it is not dynamic (runtime). +- Changed weekend data property into constant as it is not dynamic (runtime). - Corrected the name translation test for the Restoration of Independence Day (Portugal). The test didn't account for the fact that this holiday was abolished and reinstated at some time. - Corrected unit test for Geneva (Switzerland) as the jeune Genevois day was incorrectly asserted as a regional holiday. - Corrected the count logic so that in case a holiday is substituted (or observed), it is only counted once. - Dropped unnecessary arguments of some methods in various Holiday Providers. - Corrected Japanese "Green Day" and "Children's Day" to use "Hiragana" instead of Kanji. [\#80](https://github.com/azuyalabs/yasumi/pull/80) ([cookie-maker](https://github.com/cookie-maker)) - ## [1.7.0] - 2017-12-11 + ### Added + - 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)) @@ -245,36 +265,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Holiday Provider for Switzerland. [\#56](https://github.com/azuyalabs/yasumi/pull/56) ([qligier](https://github.com/qligier)) ### Changed + - Made `calculate` method public and use of proper camel casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) - Upgraded Faker Library to version 1.7 - Renamed the holiday type NATIONAL to OFFICIAL. Sub regions may have official holidays, and the name NATIONAL doesn't suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) - Upgraded PHP-CS-Fixer to version 2.6 ### Fixed + - Corrected Geneva (Switzerland) unit test to ensure some holidays that are established at a particular year are handled as such. - Repentance Day is an official holiday in Saxony (Germany) [\#63](https://github.com/azuyalabs/yasumi/issues/63) - Corrected the Easter Sunday translation for Austria (de_AT) [\#66](https://github.com/azuyalabs/yasumi/issues/66) - Corrected Hungary unit test to ensure holidays that are established at a particular year are handled as such. - Added missing Summer Bank Holiday for the United Kingdom. [\#64](https://github.com/azuyalabs/yasumi/issues/64) - ## [1.6.1] - 2017-02-07 + ### Added + - Added missing unit tests for Reformation Day as in 2017 it is celebrated in all German states for its 500th anniversary. - Added missing unit tests for the German Unit Day for each German state. - Created fallback calculation of the easter_days function in case the PHP extension 'calendar' is not loaded. [\#55](https://github.com/azuyalabs/yasumi/pull/55) ([stelgenhof](https://github.com/stelgenhof)) ### Changed + - Moved Reformation Day to Christian Holidays as it is not only celebrated in Germany. - Changed Travis configuration to use Composer-installed phpunit to avoid if any issues arise with globally installed phpunit. ### Fixed + - Fixed Christmas Day and Boxing Day for the United Kingdom. A substitute bank holiday is now created for both Christmas and Boxing Day when either of those days fall on a weekend. [\#48](https://github.com/azuyalabs/yasumi/issues/48) ([joshuabaker](https://github.com/joshuabaker)) - Renamed 'en_US' translation for the Second Christmas Day (from ‘Boxing Day’ to ‘Second Christmas Day’: Boxing Day concept does not exist in the US). [\#53](https://github.com/azuyalabs/yasumi/pull/53) ([AngelinCalu](https://github.com/AngelinCalu)) - ## [1.6.0] - 2017-01-06 + ### Added + - Added Holiday Provider for Romania. [\#52](https://github.com/azuyalabs/yasumi/pull/52) ([AngelinCalu](https://github.com/AngelinCalu)) - Added Holiday Provider for Ireland. [stelgenhof](https://github.com/stelgenhof) - Added Holiday Provider for South Africa. [stelgenhof](https://github.com/stelgenhof) @@ -282,14 +308,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added 'en_US' translations for the Polish Independence Day and Constitution Day. [\#45](https://github.com/azuyalabs/yasumi/pull/45) ([AngelinCalu](https://github.com/AngelinCalu)) ### Changed + - Refactored the calculation of Orthodox Easter using the function from ChristianHolidays.php. [\#47](https://github.com/azuyalabs/yasumi/pull/47) ([AngelinCalu](https://github.com/AngelinCalu)) ### Fixed -- The parameters of the `isHoliday` and `isWorkingDay` methods now allow for classes that derive from DateTime (like the very popular Carbon class). [\#49](https://github.com/azuyalabs/yasumi/issues/49) ([stelgenhof](https://github.com/stelgenhof)) +- The parameters of the `isHoliday` and `isWorkingDay` methods now allow for classes that derive from DateTime (like the very popular Carbon class). [\#49](https://github.com/azuyalabs/yasumi/issues/49) ([stelgenhof](https://github.com/stelgenhof)) ## [1.5.0] - 2016-11-25 + ### Added + - Added Holiday Provider for Australia (and the sub-region of Victoria). [\#38](https://github.com/azuyalabs/yasumi/pull/38) ([brucealdridge](https://github.com/brucealdridge)) - You can now also use your own holiday providers in addition to the included holiday providers. A very helpful improvement if Yasumi does not include your provider (yet), but you want to use yours! [\#29](https://github.com/azuyalabs/yasumi/pull/29) ([navarr](https://github.com/navarr)) @@ -300,12 +329,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Holiday Provider for Croatia. [\#32](https://github.com/azuyalabs/yasumi/pull/32) ([karlomikus](https://github.com/karlomikus)) ### Fixed + - Carnival Day in Brazil was incorrectly set to be 47 days after Easter. Carnival Day begins Friday before Ash Wednesday (51 days to Easter). [\#36](https://github.com/azuyalabs/yasumi/pull/36) ([icaroce](https://github.com/icaroce)) - All Saints Day for Finland was incorrectly set for November 1st. The correct date is Saturday between 31 Oct and 6 Nov, similar to Sweden. [\#43](https://github.com/azuyalabs/yasumi/issues/43) ([stelgenhof](https://github.com/stelgenhof)) - ## [1.4.0] - 2016-06-04 + ### Added + - Added Holiday Provider for Brazil. [\#21](https://github.com/azuyalabs/yasumi/pull/21) ([dorianneto](https://github.com/dorianneto)) - Added Holiday Provider for the Czech Republic. [\#26](https://github.com/azuyalabs/yasumi/pull/26) ([dfridrich](https://github.com/dfridrich)) - Added Holiday Provider for the United Kingdom. [\#23](https://github.com/azuyalabs/yasumi/pull/23) ([stelgenhof](https://github.com/stelgenhof)) @@ -313,18 +344,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - To determine a set of holidays between two dates you can now use the aptly named 'between()' method. ### Changed + - All Holiday Provider must now implement a code that will identify it. Typically, this is the ISO3166 code corresponding to the respective country or sub-region. This can help for purposes such as translations or interfacing with other API's for example. ### Fixed + - Fixed an issue with the unit test for the 'getProviders' method failing on Windows. Hardcoded unix-style directory separators have been replaced by DIRECTORY_SEPARATOR. [\#30](https://github.com/azuyalabs/yasumi/pull/30) ([navarr](https://github.com/navarr)) - Corrected a typo in the English translation for 敬老の日 (Japan) [\#22](https://github.com/azuyalabs/yasumi/pull/22) ([navarr](https://github.com/navarr)) - Fixed issue that the unit tests in 'YasumiTest' (methods 'next' and 'previous') did not cover the situations that the limits are exceeded. [\#28](https://github.com/azuyalabs/yasumi/issues/28) - ## [1.3.0] - 2016-05-02 + ### Added + - Added Holiday Provider for Poland. [\#18](https://github.com/azuyalabs/yasumi/pull/18) ([mpdx](https://github.com/mpdx)) - Added Holiday Provider for New Zealand. [\#13](https://github.com/azuyalabs/yasumi/pull/13) ([badams](https://github.com/badams)) - Added Holiday Provider for Greece. [\#10](https://github.com/azuyalabs/yasumi/pull/10) ([sebdesign](https://github.com/sebdesign)) @@ -335,10 +369,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Test Interface class to ensure the unit tests contain a some minimal assertions. ### Changed + - Sorted all translations in the translation files alphabetically (descending). - Refactoring and cleanup of all unit tests. ### Fixed + - Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However the holiday has always been celebrated on a Saturday (between October 31 and November 6th). - Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) regions [\#5879133](https://github.com/azuyalabs/yasumi/commit/58791330ccf5c13b1626885921534c32866b7faf) ([R2c](https://github.com/R2c)) @@ -361,9 +397,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, since 1955, the holiday has always been celebrated on a Saturday (between June 20 and June 26). - ## [1.2.0] - 2016-04-04 + ### Added + - Added Holiday Provider for Denmark - Added Holiday Provider for Norway - Added Holiday Provider for Sweden @@ -372,17 +409,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this a date that is neither a holiday nor falls into the weekend. ### Changed + - Refactoring and cleanup of unit tests ### Fixed + - The Vernal Equinox Day and Autumnal Equinox Day in Japan were excluded from having it substituted for another day in case these days would fall on the weekend. - Fixed tests for some holiday providers as some holidays have been established only in a particular year, causing false failures in the unit tests. - ## [1.1.0] - 2016-03-10 + ### Added + - Added Spain Holiday Provider (including the autonomous communities Andalusia, Aragon, Asturias, Balearic Islands, Basque Country, Canary Islands, Cantabria, Castile and León, Castilla-La Mancha, Ceuta, Community of Madrid, Extremadura, Galicia, La Rioja, Melilla, Navarre, Region of Murcia, Valencian Community) @@ -394,16 +434,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added test to check whether all holidays for a Holiday Provider are defined by the respective provider class. ### Changed + - Updated some English, Italian, French and Dutch translations. - Moved all other holiday calculations in Netherlands and France to individual methods. ### Fixed + - For Japan substituted holidays had same date as the original holidays. ### Removed + - Removed support for PHP 5.4. The minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still allowed to fail. - ## [1.0.0] - 2015-04-21 + - Initial Release From e69779b32c3f06616ca0417a245a725e3553c9dd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 25 Mar 2021 00:06:06 +0900 Subject: [PATCH 189/687] Add PHP7.3 (still supporting it even though soon it will be EOL) Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/mutation-tests.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 45a425f86..2aedc7bab 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.3', '7.4', '8.0' ] steps: - name: Set git to use LF diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index 19e0d0b17..3e4fb3eee 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.3', '7.4', '8.0' ] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 81def0986..cfffb2fe2 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.3', '7.4', '8.0' ] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 945e33fff..38cb568fc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.3', '7.4', '8.0' ] steps: - name: Set git to use LF From 14d4701e7edcc6e25a373889d4a1f9ab469e4e8b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 25 Mar 2021 18:33:28 +0900 Subject: [PATCH 190/687] Allow for earlier version of infection so it can be used with PHP7.3 Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index df5f31c33..14e135f2c 100755 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "mikey179/vfsstream": "^1.6", "phpstan/phpstan": "^0.12.66", "phpunit/phpunit": "^8.5 | ^9.4", - "infection/infection": "^0.21.0", + "infection/infection": "^0.17 | ^0.21.0", "vimeo/psalm": "^4" }, "autoload": { From 7e910b11d7c46b5ad942a2a54062b9ccff9e0e51 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Apr 2021 23:30:22 +0900 Subject: [PATCH 191/687] Added missing return type Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Georgia.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index a40e53a50..6168c17e7 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -135,7 +135,7 @@ private function addMothersDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay() + private function addVictoryDay(): void { $date = new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)); From c1cfe34b399195b681024b37a29c3e4c5a75ff60 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 21 Apr 2021 00:05:31 +0900 Subject: [PATCH 192/687] Added value type for iterable type array. Corrected documentation for nullable return type. Signed-off-by: Sacha Telgenhof --- .phan/config.php | 365 +++++++++++++++++++++++ src/Yasumi/Provider/AbstractProvider.php | 10 +- 2 files changed, 370 insertions(+), 5 deletions(-) create mode 100644 .phan/config.php diff --git a/.phan/config.php b/.phan/config.php new file mode 100644 index 000000000..9cb5506a2 --- /dev/null +++ b/.phan/config.php @@ -0,0 +1,365 @@ +=7.3" + 'target_php_version' => '7.3', + + // If enabled, missing properties will be created when + // they are first seen. If false, we'll report an + // error message if there is an attempt to write + // to a class property that wasn't explicitly + // defined. + 'allow_missing_properties' => false, + + // If enabled, null can be cast to any type and any + // type can be cast to null. Setting this to true + // will cut down on false positives. + 'null_casts_as_any_type' => false, + + // If enabled, allow null to be cast as any array-like type. + // + // This is an incremental step in migrating away from `null_casts_as_any_type`. + // If `null_casts_as_any_type` is true, this has no effect. + 'null_casts_as_array' => true, + + // If enabled, allow any array-like type to be cast to null. + // This is an incremental step in migrating away from `null_casts_as_any_type`. + // If `null_casts_as_any_type` is true, this has no effect. + 'array_casts_as_null' => true, + + // If enabled, scalars (int, float, bool, string, null) + // are treated as if they can cast to each other. + // This does not affect checks of array keys. See `scalar_array_key_cast`. + 'scalar_implicit_cast' => false, + + // If enabled, any scalar array keys (int, string) + // are treated as if they can cast to each other. + // E.g. `array` can cast to `array` and vice versa. + // Normally, a scalar type such as int could only cast to/from int and mixed. + 'scalar_array_key_cast' => true, + + // If this has entries, scalars (int, float, bool, string, null) + // are allowed to perform the casts listed. + // + // E.g. `['int' => ['float', 'string'], 'float' => ['int'], 'string' => ['int'], 'null' => ['string']]` + // allows casting null to a string, but not vice versa. + // (subset of `scalar_implicit_cast`) + 'scalar_implicit_partial' => [], + + // If enabled, Phan will warn if **any** type in a method invocation's object + // is definitely not an object, + // or if **any** type in an invoked expression is not a callable. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_method_checking' => false, + + // If enabled, Phan will warn if **any** type of the object expression for a property access + // does not contain that property. + 'strict_object_checking' => false, + + // If enabled, Phan will warn if **any** type in the argument's union type + // cannot be cast to a type in the parameter's expected union type. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_param_checking' => false, + + // If enabled, Phan will warn if **any** type in a property assignment's union type + // cannot be cast to a type in the property's declared union type. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_property_checking' => false, + + // If enabled, Phan will warn if **any** type in a returned value's union type + // cannot be cast to the declared return type. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_return_checking' => false, + + // If true, seemingly undeclared variables in the global + // scope will be ignored. + // + // This is useful for projects with complicated cross-file + // globals that you have no hope of fixing. + 'ignore_undeclared_variables_in_global_scope' => true, + + // Set this to false to emit `PhanUndeclaredFunction` issues for internal functions that Phan has signatures for, + // but aren't available in the codebase, or from Reflection. + // (may lead to false positives if an extension isn't loaded) + // + // If this is true(default), then Phan will not warn. + // + // Even when this is false, Phan will still infer return values and check parameters of internal functions + // if Phan has the signatures. + 'ignore_undeclared_functions_with_known_signatures' => true, + + // Backwards Compatibility Checking. This is slow + // and expensive, but you should consider running + // it before upgrading your version of PHP to a + // new version that has backward compatibility + // breaks. + // + // If you are migrating from PHP 5 to PHP 7, + // you should also look into using + // [php7cc (no longer maintained)](https://github.com/sstalle/php7cc) + // and [php7mar](https://github.com/Alexia/php7mar), + // which have different backwards compatibility checks. + // + // If you are still using versions of php older than 5.6, + // `PHP53CompatibilityPlugin` may be worth looking into if you are not running + // syntax checks for php 5.3 through another method such as + // `InvokePHPNativeSyntaxCheckPlugin` (see .phan/plugins/README.md). + 'backward_compatibility_checks' => false, + + // If true, check to make sure the return type declared + // in the doc-block (if any) matches the return type + // declared in the method signature. + 'check_docblock_signature_return_type_match' => false, + + // This setting maps case-insensitive strings to union types. + // + // This is useful if a project uses phpdoc that differs from the phpdoc2 standard. + // + // If the corresponding value is the empty string, + // then Phan will ignore that union type (E.g. can ignore 'the' in `@return the value`) + // + // If the corresponding value is not empty, + // then Phan will act as though it saw the corresponding UnionTypes(s) + // when the keys show up in a UnionType of `@param`, `@return`, `@var`, `@property`, etc. + // + // This matches the **entire string**, not parts of the string. + // (E.g. `@return the|null` will still look for a class with the name `the`, but `@return the` will be ignored with the below setting) + // + // (These are not aliases, this setting is ignored outside of doc comments). + // (Phan does not check if classes with these names exist) + // + // Example setting: `['unknown' => '', 'number' => 'int|float', 'char' => 'string', 'long' => 'int', 'the' => '']` + 'phpdoc_type_mapping' => [], + + // Set to true in order to attempt to detect dead + // (unreferenced) code. Keep in mind that the + // results will only be a guess given that classes, + // properties, constants and methods can be referenced + // as variables (like `$class->$property` or + // `$class->$method()`) in ways that we're unable + // to make sense of. + // + // To more aggressively detect dead code, + // you may want to set `dead_code_detection_prefer_false_negative` to `false`. + 'dead_code_detection' => false, + + // Set to true in order to attempt to detect unused variables. + // `dead_code_detection` will also enable unused variable detection. + // + // This has a few known false positives, e.g. for loops or branches. + 'unused_variable_detection' => false, + + // Set to true in order to attempt to detect redundant and impossible conditions. + // + // This has some false positives involving loops, + // variables set in branches of loops, and global variables. + 'redundant_condition_detection' => false, + + // If enabled, Phan will act as though it's certain of real return types of a subset of internal functions, + // even if those return types aren't available in reflection (real types were taken from php 7.3 or 8.0-dev, depending on target_php_version). + // + // Note that with php 7 and earlier, php would return null or false for many internal functions if the argument types or counts were incorrect. + // As a result, enabling this setting with target_php_version 8.0 may result in false positives for `--redundant-condition-detection` when codebases also support php 7.x. + 'assume_real_types_for_internal_functions' => false, + + // If true, this runs a quick version of checks that takes less + // time at the cost of not running as thorough + // of an analysis. You should consider setting this + // to true only when you wish you had more **undiagnosed** issues + // to fix in your code base. + // + // In quick-mode the scanner doesn't rescan a function + // or a method's code block every time a call is seen. + // This means that the problem here won't be detected: + // + // ```php + // false, + + // Override to hardcode existence and types of (non-builtin) globals in the global scope. + // Class names should be prefixed with `\`. + // + // (E.g. `['_FOO' => '\FooClass', 'page' => '\PageClass', 'userId' => 'int']`) + 'globals_type_map' => [], + + // The minimum severity level to report on. This can be + // set to `Issue::SEVERITY_LOW`, `Issue::SEVERITY_NORMAL` or + // `Issue::SEVERITY_CRITICAL`. Setting it to only + // critical issues is a good place to start on a big + // sloppy mature code base. + 'minimum_severity' => Issue::SEVERITY_LOW, + + // Add any issue types (such as `'PhanUndeclaredMethod'`) + // to this list to inhibit them from being reported. + 'suppress_issue_types' => [], + + // A regular expression to match files to be excluded + // from parsing and analysis and will not be read at all. + // + // This is useful for excluding groups of test or example + // directories/files, unanalyzable files, or files that + // can't be removed for whatever reason. + // (e.g. `'@Test\.php$@'`, or `'@vendor/.*/(tests|Tests)/@'`) + 'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@', + + // A list of files that will be excluded from parsing and analysis + // and will not be read at all. + // + // This is useful for excluding hopelessly unanalyzable + // files that can't be removed for whatever reason. + 'exclude_file_list' => [], + + // A directory list that defines files that will be excluded + // from static analysis, but whose class and method + // information should be included. + // + // Generally, you'll want to include the directories for + // third-party code (such as "vendor/") in this list. + // + // n.b.: If you'd like to parse but not analyze 3rd + // party code, directories containing that code + // should be added to the `directory_list` as well as + // to `exclude_analysis_directory_list`. + 'exclude_analysis_directory_list' => [ + 'vendor/', + ], + + // Enable this to enable checks of require/include statements referring to valid paths. + // The settings `include_paths` and `warn_about_relative_include_statement` affect the checks. + 'enable_include_path_checks' => true, + + // The number of processes to fork off during the analysis + // phase. + 'processes' => 1, + + // List of case-insensitive file extensions supported by Phan. + // (e.g. `['php', 'html', 'htm']`) + 'analyzed_file_extensions' => [ + 'php', + ], + + // You can put paths to stubs of internal extensions in this config option. + // If the corresponding extension is **not** loaded, then Phan will use the stubs instead. + // Phan will continue using its detailed type annotations, + // but load the constants, classes, functions, and classes (and their Reflection types) + // from these stub files (doubling as valid php files). + // Use a different extension from php to avoid accidentally loading these. + // The `tools/make_stubs` script can be used to generate your own stubs (compatible with php 7.0+ right now) + // + // (e.g. `['xdebug' => '.phan/internal_stubs/xdebug.phan_php']`) + 'autoload_internal_extension_signatures' => [], + + // A list of plugin files to execute. + // + // Plugins which are bundled with Phan can be added here by providing their name (e.g. `'AlwaysReturnPlugin'`) + // + // Documentation about available bundled plugins can be found [here](https://github.com/phan/phan/tree/master/.phan/plugins). + // + // Alternately, you can pass in the full path to a PHP file with the plugin's implementation (e.g. `'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'`) + 'plugins' => [ + 'AlwaysReturnPlugin', + 'PregRegexCheckerPlugin', + 'UnreachableCodePlugin', + ], + + // A list of directories that should be parsed for class and + // method information. After excluding the directories + // defined in `exclude_analysis_directory_list`, the remaining + // files will be statically analyzed for errors. + // + // Thus, both first-party and third-party code being used by + // your application should be included in this list. + 'directory_list' => [ + 'src/Yasumi', + 'vendor/friendsofphp/php-cs-fixer/src', + 'vendor/infection/infection/src', + 'vendor/mikey179/vfsstream/src/main/php', + 'vendor/phpunit/phpunit/src', + 'vendor/vimeo/psalm/src/Psalm', + ], + + // A list of individual files to include in analysis + // with a path relative to the root directory of the + // project. + 'file_list' => [ + 'vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractFixerTestCase.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractIntegrationCaseFactory.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractIntegrationTestCase.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/Assert/AssertTokensTrait.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/IntegrationCase.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/IntegrationCaseFactory.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/IntegrationCaseFactoryInterface.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/InternalIntegrationCaseFactory.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/IsIdenticalConstraint.php', + 'vendor/friendsofphp/php-cs-fixer/tests/Test/TokensWithObservedTransformers.php', + 'vendor/friendsofphp/php-cs-fixer/tests/TestCase.php', + ], +]; diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 45190dde2..434ac7491 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -40,9 +40,9 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato public const ID = 'US'; /** - * @var array list of the days of the week (the index of the weekdays) that are considered weekend days. - * This list only concerns those countries that deviate from the global common definition, - * where the weekend starts on Saturday and ends on Sunday (0 = Sunday, 1 = Monday, etc.). + * @var array list of the days of the week (the index of the weekdays) that are considered weekend days. + * This list only concerns those countries that deviate from the global common definition, + * where the weekend starts on Saturday and ends on Sunday (0 = Sunday, 1 = Monday, etc.). */ public const WEEKEND_DATA = [ // Thursday and Friday @@ -292,7 +292,7 @@ public function getHolidays(): array /** * Gets all of the holiday names defined by this holiday provider (for the given year). * - * @return array list of all holiday names defined for the given year + * @return array list of all holiday names defined for the given year */ public function getHolidayNames(): array { @@ -379,7 +379,7 @@ public function previous(string $key): ?Holiday * * @param \DateTimeInterface $startDate Start date of the time frame to check against * @param \DateTimeInterface $endDate 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 ?bool $equals indicate whether the start and end dates should be included in the * comparison * * @throws InvalidArgumentException an InvalidArgumentException is thrown if the start date is set after the end From 2aba04139ed38bb5700be1d1366cca9f60e9072a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 21 Apr 2021 08:58:24 +0900 Subject: [PATCH 193/687] Re-initialized config. Bumped number of processes Signed-off-by: Sacha Telgenhof --- .phan/config.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index 9cb5506a2..ea52c9511 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -9,7 +9,7 @@ * * - Go through this file and verify that there are no missing/unnecessary files/directories. * (E.g. this only includes direct composer dependencies - You may have to manually add indirect composer dependencies to 'directory_list') - * - Look at 'plugins' and add or remove plugins if appropriate (see https://github.com/phan/phan/tree/master/.phan/plugins#plugins) + * - Look at 'plugins' and add or remove plugins if appropriate (see https://github.com/phan/phan/tree/v4/.phan/plugins#plugins) * - Add global suppressions for pre-existing issues to suppress_issue_types (https://github.com/phan/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base) * - Consider setting up a baseline if there are a large number of pre-existing issues (see `phan --extended-help`) * @@ -18,7 +18,7 @@ * after this file is read. * * @see https://github.com/phan/phan/wiki/Phan-Config-Settings for all configurable options - * @see https://github.com/phan/phan/tree/master/src/Phan/Config.php + * @see https://github.com/phan/phan/tree/v4/src/Phan/Config.php * * A Note About Paths * ================== @@ -298,7 +298,7 @@ // The number of processes to fork off during the analysis // phase. - 'processes' => 1, + 'processes' => 2, // List of case-insensitive file extensions supported by Phan. // (e.g. `['php', 'html', 'htm']`) @@ -321,7 +321,7 @@ // // Plugins which are bundled with Phan can be added here by providing their name (e.g. `'AlwaysReturnPlugin'`) // - // Documentation about available bundled plugins can be found [here](https://github.com/phan/phan/tree/master/.phan/plugins). + // Documentation about available bundled plugins can be found [here](https://github.com/phan/phan/tree/v4/.phan/plugins). // // Alternately, you can pass in the full path to a PHP file with the plugin's implementation (e.g. `'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'`) 'plugins' => [ @@ -342,6 +342,7 @@ 'vendor/friendsofphp/php-cs-fixer/src', 'vendor/infection/infection/src', 'vendor/mikey179/vfsstream/src/main/php', + 'vendor/phan/phan/src/Phan', 'vendor/phpunit/phpunit/src', 'vendor/vimeo/psalm/src/Psalm', ], From 668aa74c56a49a1b8ea225186064820556a16e97 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 21 Apr 2021 08:59:20 +0900 Subject: [PATCH 194/687] Added Phan for static analysis. Signed-off-by: Sacha Telgenhof --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 14e135f2c..77e1384e0 100755 --- a/composer.json +++ b/composer.json @@ -40,10 +40,11 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": "^0.17 | ^0.21.0", "mikey179/vfsstream": "^1.6", + "phan/phan": "^4.0", "phpstan/phpstan": "^0.12.66", "phpunit/phpunit": "^8.5 | ^9.4", - "infection/infection": "^0.17 | ^0.21.0", "vimeo/psalm": "^4" }, "autoload": { @@ -60,6 +61,7 @@ "format": "./vendor/bin/php-cs-fixer fix", "phpstan": "vendor/bin/phpstan --level=5 analyse src tests", "psalm": "vendor/bin/psalm --threads=2", + "phan": "vendor/bin/phan", "test": "vendor/bin/phpunit", "infection": "vendor/bin/infection run -j 2", "analyse": [ From 539dfff781290615603c793c53cf691f2c789f0b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 10:57:54 +0900 Subject: [PATCH 195/687] Updated infection library Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 77e1384e0..1ecf7d4c9 100755 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", - "infection/infection": "^0.17 | ^0.21.0", + "infection/infection": "^0.17 | ^0.22", "mikey179/vfsstream": "^1.6", "phan/phan": "^4.0", "phpstan/phpstan": "^0.12.66", From 6443b7449324b810871ab649967dd6669b9790a0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:02:37 +0900 Subject: [PATCH 196/687] Corrected deprecated options Signed-off-by: Sacha Telgenhof --- .php_cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.php_cs b/.php_cs index e789bf0bb..3fb658160 100644 --- a/.php_cs +++ b/.php_cs @@ -23,11 +23,11 @@ return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([ 'self_accessor' => true, 'dir_constant' => true, 'ordered_class_elements' => true, - 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'no_unused_imports' => true, 'single_quote' => true, 'space_after_semicolon' => true, - 'trailing_comma_in_multiline_array' => true, + 'trailing_comma_in_multiline' => true, 'cast_spaces' => ['space' => 'single'], 'declare_strict_types' => true, - ])->setLineEnding("\n")->setFinder($finder); \ No newline at end of file + ])->setLineEnding("\n")->setFinder($finder); From e0433eeb523844c243aba41f642aba234ceaf1ea Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:03:30 +0900 Subject: [PATCH 197/687] Renamed PHP CS configuration file (.php_cs is deprecated) Signed-off-by: Sacha Telgenhof --- .php_cs => .php-cs-fixer.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .php_cs => .php-cs-fixer.php (100%) diff --git a/.php_cs b/.php-cs-fixer.php similarity index 100% rename from .php_cs rename to .php-cs-fixer.php From 59e3834a467d37caff0f414183c5dcc9c5bd53ef Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:11:59 +0900 Subject: [PATCH 198/687] Reformatting Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 3fb658160..1690163c4 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,4 +1,5 @@ */ - $finder = PhpCsFixer\Finder::create()->in(__DIR__); -return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([ - '@PSR2' => true, - '@Symfony' => true, - 'array_syntax' => ['syntax' => 'short'], - 'native_function_invocation' => true, - 'blank_line_after_opening_tag' => true, - 'is_null' => true, - 'modernize_types_casting' => true, - 'self_accessor' => true, - 'dir_constant' => true, - 'ordered_class_elements' => true, - 'ordered_imports' => ['sort_algorithm' => 'alpha'], - 'no_unused_imports' => true, - 'single_quote' => true, - 'space_after_semicolon' => true, - 'trailing_comma_in_multiline' => true, - 'cast_spaces' => ['space' => 'single'], - 'declare_strict_types' => true, - ])->setLineEnding("\n")->setFinder($finder); +$config = new PhpCsFixer\Config(); +$config->setRiskyAllowed(true)->setRules([ + '@PSR2' => true, + '@Symfony' => true, + 'array_syntax' => ['syntax' => 'short'], + 'native_function_invocation' => true, + 'blank_line_after_opening_tag' => true, + 'is_null' => true, + 'modernize_types_casting' => true, + 'self_accessor' => true, + 'dir_constant' => true, + 'ordered_class_elements' => true, + 'ordered_imports' => ['sort_algorithm' => 'alpha'], + 'no_unused_imports' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'trailing_comma_in_multiline' => true, + 'cast_spaces' => ['space' => 'single'], + 'declare_strict_types' => true, +])->setLineEnding("\n")->setFinder($finder); + +return $config; From 3e20b395d9b7bc698bd92e5963aa985adbeb3576 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:20:30 +0900 Subject: [PATCH 199/687] Removed unnecessary continue in while loop. Reformatting. --- src/Yasumi/Provider/Japan.php | 1 - src/Yasumi/Provider/SouthKorea.php | 1 - src/Yasumi/Yasumi.php | 8 ++++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index ddd0f779d..0e6c3b237 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -563,7 +563,6 @@ private function calculateSubstituteHolidays(): void // Find next week day (not being another holiday) while (\in_array($date, $dates, false)) { $date->add(new DateInterval('P1D')); - continue; } } elseif ($holiday >= '1973-04-12') { $date->add(new DateInterval('P1D')); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 032a9eeee..4d96877ba 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -506,7 +506,6 @@ public function calculateSubstituteHolidays(): void || (6 === (int) $date->format('w') && 'childrensDay' === $key) || \in_array($date, $holidayDates, false)) { $date->add(new DateInterval('P1D')); - continue; } // Add a new holiday that is substituting the original holiday diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 9cbd46829..77ee6c245 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -227,10 +227,10 @@ public static function getProviders(): array foreach ($filesIterator as $file) { if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( - $file->getBasename('.php'), - self::$ignoredProvider, - true - )) { + $file->getBasename('.php'), + self::$ignoredProvider, + true + )) { continue; } From 40a970b97de550179382c1636e9d8f6bc4c4a43a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:27:32 +0900 Subject: [PATCH 200/687] Removed unnecessary curly braces Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Estonia.php | 6 +++--- src/Yasumi/Provider/Georgia.php | 20 ++++++++++---------- src/Yasumi/Provider/Germany/Hamburg.php | 2 +- src/Yasumi/Provider/Latvia.php | 6 +++--- src/Yasumi/Provider/Lithuania.php | 6 +++--- src/Yasumi/Provider/Russia.php | 14 +++++++------- src/Yasumi/Yasumi.php | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index 6c3a8c62e..fe6216cef 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -61,7 +61,7 @@ public function initialize(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', 'bs_Latn' => 'Pravoslavni Božić', - ], new DateTime("{$this->year}-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); + ], new DateTime("$this->year-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); /* * Independence Day diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 7d2a78084..7b75c8478 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -74,7 +74,7 @@ private function addIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'et' => 'Iseseisvuspäev', - ], new \DateTime("{$this->year}-02-24", new \DateTimeZone($this->timezone)))); + ], new \DateTime("$this->year-02-24", new \DateTimeZone($this->timezone)))); } } @@ -88,7 +88,7 @@ private function addVictoryDay(): void $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', 'et' => 'Võidupüha', - ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); + ], new \DateTime("$this->year-06-23", new \DateTimeZone($this->timezone)))); } } @@ -102,7 +102,7 @@ private function addRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ 'en' => 'Day of Restoration of Independence', 'et' => 'Taasiseseisvumispäev', - ], new \DateTime("{$this->year}-08-20", new \DateTimeZone($this->timezone)))); + ], new \DateTime("$this->year-08-20", new \DateTimeZone($this->timezone)))); } } } diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 6168c17e7..8f513eadb 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -77,7 +77,7 @@ public function calculateEaster(int $year, string $timezone): \DateTime */ private function addOrthodoxChristmasDay(): void { - $date = new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-01-07", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', @@ -92,7 +92,7 @@ private function addOrthodoxChristmasDay(): void private function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { - $date = new \DateTime("{$this->year}-05-26", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-05-26", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', @@ -108,7 +108,7 @@ private function addIndependenceDay(): void private function addUnityDay(): void { if ($this->year >= self::APRIL_NINE_TRAGEDY_YEAR) { - $date = new \DateTime("{$this->year}-04-09", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-04-09", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('unityDay', [ 'en' => 'National Unity Day', @@ -123,7 +123,7 @@ private function addUnityDay(): void */ private function addMothersDay(): void { - $date = new \DateTime("{$this->year}-03-03", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-03-03", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mothersDay', [ 'en' => 'Mothers Day', @@ -137,7 +137,7 @@ private function addMothersDay(): void */ private function addVictoryDay(): void { - $date = new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Day of Victory over Fascism', @@ -151,7 +151,7 @@ private function addVictoryDay(): void */ private function addStAndrewsDay(): void { - $date = new \DateTime("{$this->year}-05-12", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-05-12", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('stAndrewsDay', [ 'en' => 'Saint Andrew the First-Called Day', @@ -165,7 +165,7 @@ private function addStAndrewsDay(): void */ private function addOrthodoxEpiphanyDay(): void { - $date = new \DateTime("{$this->year}-01-19", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-01-19", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('orthodoxEpiphanyDay', [ 'en' => 'Orthodox Epiphany Day', @@ -179,7 +179,7 @@ private function addOrthodoxEpiphanyDay(): void */ private function addStMarysDay(): void { - $date = new \DateTime("{$this->year}-08-28", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-08-28", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('stMarysDay', [ 'en' => 'Saint Marys Day', @@ -193,7 +193,7 @@ private function addStMarysDay(): void */ private function addMtskhetobaDay(): void { - $date = new \DateTime("{$this->year}-10-14", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-10-14", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mtskhetobaDay', [ 'en' => 'Day of Svetitskhoveli Cathedral', @@ -207,7 +207,7 @@ private function addMtskhetobaDay(): void */ private function addStGeorgesDay(): void { - $date = new \DateTime("{$this->year}-11-23", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-11-23", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('stGeorgesDay', [ 'en' => 'Saint Georges Day', diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index 30ca0ccde..8627abaca 100755 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -71,7 +71,7 @@ private function calculateDayOfReformation(): void new Holiday( 'dayOfReformation', [], - new \DateTime("{$this->year}-10-31", new \DateTimeZone($this->timezone)), + new \DateTime("$this->year-10-31", new \DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL ) diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 0828d62a5..3c4899155 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -73,7 +73,7 @@ public function initialize(): void private function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { - $date = new \DateTime("{$this->year}-05-04", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-05-04", new \DateTimeZone($this->timezone)); if (!$this->isWorkingDay($date)) { $date->modify('next monday'); @@ -95,7 +95,7 @@ private function addMidsummerEveDay(): void $this->addHoliday(new Holiday('midsummerEveDay', [ 'en' => 'Midsummer Eve', 'lv' => 'Līgo Diena', - ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); + ], new \DateTime("$this->year-06-23", new \DateTimeZone($this->timezone)))); } /** @@ -108,7 +108,7 @@ private function addMidsummerEveDay(): void private function addProclamationDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { - $date = new \DateTime("{$this->year}-11-18", new \DateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-11-18", new \DateTimeZone($this->timezone)); if (!$this->isWorkingDay($date)) { $date->modify('next monday'); diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index de4f422ad..4564cc0bb 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -92,7 +92,7 @@ private function addRestorationOfTheStateDay(): void $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ '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)))); + ], new \DateTime("$this->year-02-16", new \DateTimeZone($this->timezone)))); } } @@ -108,7 +108,7 @@ private function addRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ '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)))); + ], new \DateTime("$this->year-03-11", new \DateTimeZone($this->timezone)))); } } @@ -125,7 +125,7 @@ private function addStatehoodDay(): void $this->addHoliday(new Holiday('statehoodDay', [ '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)); + ], new \DateTime("$this->year-07-06", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 901bc92fa..e5d0846e9 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -71,7 +71,7 @@ private function addNewYearsHolidays(): void $this->addHoliday(new Holiday('newYearHolidaysDay'.$day, [ 'en' => 'New Year’s holidays', 'ru' => 'Новогодние каникулы', - ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-01-$day", new \DateTimeZone($this->timezone)), $this->locale)); } } @@ -84,7 +84,7 @@ private function addOrthodoxChristmasDay(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', 'ru' => 'Рождество', - ], new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-01-07", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -100,7 +100,7 @@ private function addDefenceOfTheFatherlandDay(): void $this->addHoliday(new Holiday('defenceOfTheFatherlandDay', [ 'en' => 'Defence of the Fatherland Day', 'ru' => 'День защитника Отечества', - ], new \DateTime("{$this->year}-02-23", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-02-23", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -121,7 +121,7 @@ private function addSpringAndLabourDay(): void $this->addHoliday(new Holiday('springAndLabourDay', [ 'en' => 'Spring and Labour Day', 'ru' => 'Праздник Весны и Труда', - ], new \DateTime("{$this->year}-05-01", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-05-01", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -133,7 +133,7 @@ private function addVictoryDay(): void $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', 'ru' => 'День Победы', - ], new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -149,7 +149,7 @@ private function addRussiaDay(): void $this->addHoliday(new Holiday('russiaDay', [ 'en' => 'Russia Day', 'ru' => 'День России', - ], new \DateTime("{$this->year}-06-12", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-06-12", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -165,6 +165,6 @@ private function addUnityDay(): void $this->addHoliday(new Holiday('unityDay', [ 'en' => 'Unity Day', 'ru' => 'День народного единства', - ], new \DateTime("{$this->year}-11-04", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-11-04", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 77ee6c245..9931ee6f0 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -235,7 +235,7 @@ public static function getProviders(): array } $quotedDs = \preg_quote(DIRECTORY_SEPARATOR, ''); - $provider = \preg_replace("#^.+{$quotedDs}Provider{$quotedDs}(.+)\\.php$#", '$1', $file->getPathName()); + $provider = \preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); $class = new ReflectionClass(\sprintf('Yasumi\Provider\%s', \str_replace('/', '\\', $provider))); From e61adf8cd99cdbeb29cb4c0531b4139e67318610 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:36:32 +0900 Subject: [PATCH 201/687] Removed unnecessary continue in while loop. Removed unnecessary typecasting. Simplified construct using null coalesce operator. --- tests/Estonia/IndependenceDayTest.php | 2 +- tests/Estonia/RestorationOfIndependenceDayTest.php | 2 +- tests/Estonia/VictoryDayTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Lithuania/AllSoulsDayTest.php | 2 +- .../RestorationOfIndependenceOfLithuaniaDayTest.php | 2 +- tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- tests/Russia/DefenceOfTheFatherlandDayTest.php | 2 +- tests/Russia/RussiaDayTest.php | 2 +- tests/Russia/UnityDayTest.php | 2 +- tests/Switzerland/Fribourg/December26thTest.php | 2 +- tests/YasumiBase.php | 6 +++--- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index 696796224..cb74c3b05 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-02-24", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-02-24", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index c825fa931..77e9bad70 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-08-20", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-08-20", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index f615a1703..6f480e9ba 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-06-23", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-06-23", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index 83e568b52..d5966bdb3 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -40,7 +40,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-05-26", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-05-26", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index d015b3a82..c4d58af95 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -40,7 +40,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-04-09", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-04-09", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index 9665f5d30..5a4600ae9 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -61,7 +61,7 @@ public function testHolidayAfterAnnounce(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-11-02", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-11-02", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 6feda6348..9d092252d 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-03-11", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-03-11", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 322dd08d8..d8872f6da 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-02-16", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-02-16", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index f94cc498c..47e9f6f4c 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-07-06", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-07-06", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index 9d178317d..235b2145b 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -62,7 +62,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-02-23", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-02-23", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index b9c294f07..26ee145aa 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-06-12", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-06-12", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index 475ea2a65..d69970f0b 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -63,7 +63,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new DateTime("{$year}-11-04", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-11-04", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index 917edf061..31ed3e19f 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -44,7 +44,7 @@ public function testDecember26th(): void self::REGION, self::HOLIDAY, $year, - new DateTime("${year}-12-26", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index b6b3476d3..adde715ec 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -517,7 +517,7 @@ public function generateRandomDatesWithModifier( for ($i = 1; $i <= $iterations; ++$i) { $year = $this->generateRandomYear($range); - $date = new DateTime("{$year}-{$month}-{$day}", new DateTimeZone($timezone ?? 'UTC')); + $date = new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC')); $callback($year, $date); @@ -539,7 +539,7 @@ public function generateRandomYear( int $lowerLimit = null, int $upperLimit = null ): int { - return (int) self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); + return self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } /** @@ -710,6 +710,6 @@ private static function setTimezone(DateTime $dt, ?string $timezone): DateTime private static function resolveTimezone(?string $timezone): ?string { - return (null === $timezone) ? ((null === static::$defaultTimezone) ? \date_default_timezone_get() : static::$defaultTimezone) : $timezone; + return $timezone ?? (static::$defaultTimezone ?? \date_default_timezone_get()); } } From a9548e9a741b90f4c304cbfc2dce2be8682899b9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:39:54 +0900 Subject: [PATCH 202/687] Added missing return type Signed-off-by: Sacha Telgenhof --- tests/Georgia/EasterTest.php | 4 ++-- tests/Georgia/IndependenceDayTest.php | 4 ++-- tests/Georgia/MtskhetobaDayTest.php | 4 ++-- tests/Georgia/NewYearsDayTest.php | 4 ++-- tests/Georgia/OrthodoxChristmasDayTest.php | 4 ++-- tests/Georgia/OrthodoxEpiphanyDayTest.php | 4 ++-- tests/Georgia/SecondNewYearDayTest.php | 4 ++-- tests/Georgia/StAndrewsDayTest.php | 4 ++-- tests/Georgia/StGeorgesDayTest.php | 4 ++-- tests/Georgia/StMarysDayTest.php | 4 ++-- tests/Georgia/UnityDayTest.php | 4 ++-- tests/Georgia/VictoryDayTest.php | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php index 5481a9a7e..e0cd81017 100644 --- a/tests/Georgia/EasterTest.php +++ b/tests/Georgia/EasterTest.php @@ -41,7 +41,7 @@ public function testHoliday(): void * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -56,7 +56,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index d5966bdb3..f16be6db1 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -49,7 +49,7 @@ public function testHoliday(): void * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $year = 2019; @@ -66,7 +66,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $year = 2019; diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index 1e20a9f49..a9fcb25ea 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 1709219f3..560afb995 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index 8b983b9e1..96de860c6 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index 459b727b5..118ae48dd 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 4c98273a0..0ac18f241 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index c0138c8fa..109c5cd26 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index 413a7c288..2c90ca7bf 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index 9e5d89687..3cc58c2e3 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index c4d58af95..a2a302fe0 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -49,7 +49,7 @@ public function testHoliday(): void * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $year = 2019; @@ -66,7 +66,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $year = 2019; diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index d50bf8da2..f1f1e0510 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -55,7 +55,7 @@ public function HolidayDataProvider(): array * * @throws ReflectionException */ - public function testTranslation() + public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation() * * @throws ReflectionException */ - public function testHolidayType() + public function testHolidayType(): void { $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } From 9655d19033775ae3d756bf661b9ab9df212a7da2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:43:54 +0900 Subject: [PATCH 203/687] Added missing return type. --- tests/YasumiTestCaseInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/YasumiTestCaseInterface.php b/tests/YasumiTestCaseInterface.php index e3a7059cf..bf9168e0b 100644 --- a/tests/YasumiTestCaseInterface.php +++ b/tests/YasumiTestCaseInterface.php @@ -26,10 +26,10 @@ interface YasumiTestCaseInterface /** * Tests the translated name of the holiday defined in this test. */ - public function testTranslation(); + public function testTranslation(): void; /** * Tests type of the holiday defined in this test. */ - public function testHolidayType(); + public function testHolidayType(): void; } From 7cfac2247bc2b799b5a8c31097cb1315669ead5d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 4 May 2021 11:47:10 +0900 Subject: [PATCH 204/687] Added value type Signed-off-by: Sacha Telgenhof --- src/Yasumi/Exception/MissingTranslationException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Exception/MissingTranslationException.php b/src/Yasumi/Exception/MissingTranslationException.php index 6405989ed..aaf7efe36 100644 --- a/src/Yasumi/Exception/MissingTranslationException.php +++ b/src/Yasumi/Exception/MissingTranslationException.php @@ -24,8 +24,8 @@ class MissingTranslationException extends BaseException implements Exception /** * Initializes the Exception instance. * - * @param string $key The holiday key - * @param array $locales The locales that was searched + * @param string $key The holiday key + * @param array $locales The locales that was searched */ public function __construct(string $key, array $locales) { From 738fd0f699d7b7e83114f762803ee24edfda530d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 12:20:04 +0900 Subject: [PATCH 205/687] Upgraded PHP CS Fixer to v3 Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1ecf7d4c9..7f0e646dd 100755 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "^3.0", "infection/infection": "^0.17 | ^0.22", "mikey179/vfsstream": "^1.6", "phan/phan": "^4.0", From fbc53524eaadf66e04f90ae445985fea9b4f9179 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 12:36:16 +0900 Subject: [PATCH 206/687] Migrated PHPUnit's configuration to latest version. Signed-off-by: Sacha Telgenhof --- phpunit.xml | 384 +++++++++++++++++++++++----------------------------- 1 file changed, 166 insertions(+), 218 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 97ddcf216..5f9ef9d04 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,222 +9,170 @@ ~ ~ @author Sacha Telgenhof --> - - - - - ./tests - - - - - ./tests/Base - - - - - ./tests/Australia - - - - - ./tests/Austria - - - - - ./tests/Belgium - - - - - ./tests/Bosnia - - - - - ./tests/Brazil - - - - - ./tests/Canada - - - - - ./tests/Croatia - - - - - ./tests/CzechRepublic - - - - - ./tests/Denmark - - - - - ./tests/Estonia - - - - - ./tests/Finland - - - - - ./tests/France - - - - - ./tests/Germany - - - - - ./tests/Greece - - - - - ./tests/Hungary - - - - - ./tests/Ireland - - - - - ./tests/Italy - - - - - ./tests/Japan - - - - - ./tests/Latvia - - - - - ./tests/Lithuania - - - - - ./tests/Luxembourg - - - - - ./tests/Netherlands - - - - - ./tests/NewZealand - - - - - ./tests/Norway - - - - - ./tests/Poland - - - - - ./tests/Portugal - - - - - ./tests/Romania - - - - - ./tests/Russia - - - - - ./tests/Slovakia - - - - - ./tests/SouthAfrica - - - - - ./tests/SouthKorea - - - - - ./tests/Spain - - - - - ./tests/Sweden - - - - - ./tests/Switzerland - - - - - ./tests/USA - - - - - ./tests/Ukraine - - - - - ./tests/UnitedKingdom - - - - - - ./src/Yasumi - - ./src/Yasumi/data - - - + + + + ./src/Yasumi + + + ./src/Yasumi/data + + + + + ./tests + + + + ./tests/Base + + + + ./tests/Australia + + + + ./tests/Austria + + + + ./tests/Belgium + + + + ./tests/Bosnia + + + + ./tests/Brazil + + + + ./tests/Canada + + + + ./tests/Croatia + + + + ./tests/CzechRepublic + + + + ./tests/Denmark + + + + ./tests/Estonia + + + + ./tests/Finland + + + + ./tests/France + + + + ./tests/Germany + + + + ./tests/Greece + + + + ./tests/Hungary + + + + ./tests/Ireland + + + + ./tests/Italy + + + + ./tests/Japan + + + + ./tests/Latvia + + + + ./tests/Lithuania + + + + ./tests/Luxembourg + + + + ./tests/Netherlands + + + + ./tests/NewZealand + + + + ./tests/Norway + + + + ./tests/Poland + + + + ./tests/Portugal + + + + ./tests/Romania + + + + ./tests/Russia + + + + ./tests/Slovakia + + + + ./tests/SouthAfrica + + + + ./tests/SouthKorea + + + + ./tests/Spain + + + + ./tests/Sweden + + + + ./tests/Switzerland + + + + ./tests/USA + + + + ./tests/Ukraine + + + + ./tests/UnitedKingdom + + From 856c2c4078063ae91735c8906515523dca5ea46d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 12:37:41 +0900 Subject: [PATCH 207/687] Replaced PHP CS cache file (naming was changed) Signed-off-by: Sacha Telgenhof --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 171281276..3107567d6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .idea/ vendor composer.lock -.php_cs.cache +.php-cs-fixer.cache bin/_* .phpunit.result.cache var From 0597332eabdce3f9ee47150dc49dce808718565c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 12:45:36 +0900 Subject: [PATCH 208/687] Removed some configuration options as these are default now. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 1690163c4..411de749a 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -16,8 +16,6 @@ $config->setRiskyAllowed(true)->setRules([ '@PSR2' => true, '@Symfony' => true, - 'array_syntax' => ['syntax' => 'short'], - 'native_function_invocation' => true, 'blank_line_after_opening_tag' => true, 'is_null' => true, 'modernize_types_casting' => true, From f82f0bae095ef7874b552de3edc6e18f081535c5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 13:29:21 +0900 Subject: [PATCH 209/687] Removed native function invocations. Signed-off-by: Sacha Telgenhof --- phpunit.xml.bak | 230 ++++++++++++++++++ src/Yasumi/Exception/InvalidDateException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 6 +- src/Yasumi/Holiday.php | 12 +- src/Yasumi/Provider/AbstractProvider.php | 14 +- src/Yasumi/Provider/ChristianHolidays.php | 4 +- src/Yasumi/Provider/CommonHolidays.php | 6 +- src/Yasumi/Provider/Japan.php | 16 +- src/Yasumi/Provider/SouthKorea.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 8 +- src/Yasumi/Yasumi.php | 22 +- tests/Base/HolidayBetweenFilterTest.php | 18 +- tests/Base/HolidayFiltersTest.php | 10 +- tests/Base/HolidayOnFilterTest.php | 4 +- tests/Base/HolidayTest.php | 4 +- tests/Base/SubstituteHolidayTest.php | 4 +- tests/Base/TypographyTest.php | 2 +- tests/Germany/PentecostTest.php | 6 +- tests/YasumiBase.php | 22 +- 20 files changed, 312 insertions(+), 82 deletions(-) create mode 100644 phpunit.xml.bak diff --git a/phpunit.xml.bak b/phpunit.xml.bak new file mode 100644 index 000000000..97ddcf216 --- /dev/null +++ b/phpunit.xml.bak @@ -0,0 +1,230 @@ + + + + + + + ./tests + + + + + ./tests/Base + + + + + ./tests/Australia + + + + + ./tests/Austria + + + + + ./tests/Belgium + + + + + ./tests/Bosnia + + + + + ./tests/Brazil + + + + + ./tests/Canada + + + + + ./tests/Croatia + + + + + ./tests/CzechRepublic + + + + + ./tests/Denmark + + + + + ./tests/Estonia + + + + + ./tests/Finland + + + + + ./tests/France + + + + + ./tests/Germany + + + + + ./tests/Greece + + + + + ./tests/Hungary + + + + + ./tests/Ireland + + + + + ./tests/Italy + + + + + ./tests/Japan + + + + + ./tests/Latvia + + + + + ./tests/Lithuania + + + + + ./tests/Luxembourg + + + + + ./tests/Netherlands + + + + + ./tests/NewZealand + + + + + ./tests/Norway + + + + + ./tests/Poland + + + + + ./tests/Portugal + + + + + ./tests/Romania + + + + + ./tests/Russia + + + + + ./tests/Slovakia + + + + + ./tests/SouthAfrica + + + + + ./tests/SouthKorea + + + + + ./tests/Spain + + + + + ./tests/Sweden + + + + + ./tests/Switzerland + + + + + ./tests/USA + + + + + ./tests/Ukraine + + + + + ./tests/UnitedKingdom + + + + + + ./src/Yasumi + + ./src/Yasumi/data + + + + diff --git a/src/Yasumi/Exception/InvalidDateException.php b/src/Yasumi/Exception/InvalidDateException.php index 1055b799b..8fd51cdbd 100644 --- a/src/Yasumi/Exception/InvalidDateException.php +++ b/src/Yasumi/Exception/InvalidDateException.php @@ -48,6 +48,6 @@ public function __construct($argumentValue) break; } - parent::__construct(\sprintf('\'%s\' is not a valid DateTime(Immutable) instance', $displayName)); + parent::__construct(sprintf('\'%s\' is not a valid DateTime(Immutable) instance', $displayName)); } } diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index b22a14d9e..4cf7c82af 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -33,14 +33,14 @@ abstract class AbstractFilter extends FilterIterator implements Countable */ public function count(): int { - $names = \array_map(static function ($holiday) { + $names = array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { return $holiday->getSubstitutedHoliday()->getKey(); } return $holiday->getKey(); - }, \iterator_to_array($this)); + }, iterator_to_array($this)); - return \count(\array_unique($names)); + return \count(array_unique($names)); } } diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index c4d512a51..58121d265 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -130,7 +130,7 @@ public function __construct( // Assert display locale input if (!\in_array($displayLocale, self::$locales, true)) { - throw new UnknownLocaleException(\sprintf('Locale "%s" is not a valid locale.', $displayLocale)); + throw new UnknownLocaleException(sprintf('Locale "%s" is not a valid locale.', $displayLocale)); } // Set additional attributes @@ -221,7 +221,7 @@ public function getName(array $locales = null): string public function mergeGlobalTranslations(TranslationsInterface $globalTranslations): void { $holidayGlobalTranslations = $globalTranslations->getTranslations($this->shortName); - $this->translations = \array_merge($holidayGlobalTranslations, $this->translations); + $this->translations = array_merge($holidayGlobalTranslations, $this->translations); } /** @@ -251,15 +251,15 @@ protected function getLocales(?array $locales): array } // Expand e.g. ['de_DE', 'en_GB'] into ['de_DE', 'de', 'en_GB', 'en']. - foreach (\array_reverse($locales) as $locale) { - $parent = \strtok($locale, '_'); - while ($child = \strtok('_')) { + foreach (array_reverse($locales) as $locale) { + $parent = strtok($locale, '_'); + while ($child = strtok('_')) { $expanded[] = $parent; $parent .= '_'.$child; } $expanded[] = $locale; } - return \array_reverse($expanded); + return array_reverse($expanded); } } diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 434ac7491..3e8c2bb3f 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -114,7 +114,7 @@ public function __construct( ) { $this->clearHolidays(); - $this->year = $year ?: \getdate()['year']; + $this->year = $year ?: getdate()['year']; $this->locale = $locale ?? 'en_US'; $this->globalTranslations = $globalTranslations; @@ -134,7 +134,7 @@ public function addHoliday(Holiday $holiday): void } $this->holidays[$holiday->getKey()] = $holiday; - \uasort($this->holidays, [__CLASS__, 'compareDates']); + uasort($this->holidays, [__CLASS__, 'compareDates']); } /** @@ -181,7 +181,7 @@ public function isWorkingDay(\DateTimeInterface $date): bool public function isHoliday(\DateTimeInterface $date): bool { // Check if given date is a holiday or not - if (\in_array($date->format('Y-m-d'), \array_values($this->getHolidayDates()), true)) { + if (\in_array($date->format('Y-m-d'), array_values($this->getHolidayDates()), true)) { return true; } @@ -195,7 +195,7 @@ public function isHoliday(\DateTimeInterface $date): bool */ public function getHolidayDates(): array { - return \array_map(static function ($holiday) { + return array_map(static function ($holiday) { return (string) $holiday; }, $this->holidays); } @@ -268,7 +268,7 @@ public function whatWeekDayIs(string $key): int */ public function count(): int { - $names = \array_map(static function ($holiday) { + $names = array_map(static function ($holiday) { if ($holiday instanceof SubstituteHoliday) { return $holiday->getSubstitutedHoliday()->getKey(); } @@ -276,7 +276,7 @@ public function count(): int return $holiday->getKey(); }, $this->getHolidays()); - return \count(\array_unique($names)); + return \count(array_unique($names)); } /** @@ -296,7 +296,7 @@ public function getHolidays(): array */ public function getHolidayNames(): array { - return \array_keys($this->holidays); + return array_keys($this->holidays); } /** diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index c5a09a1f1..c9684dc7a 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -749,7 +749,7 @@ public function calculateOrthodoxEaster(int $year, string $timezone): DateTime $c = $year % 19; $d = (19 * $c + 15) % 30; $e = (2 * $a + 4 * $b - $d + 34) % 7; - $month = \floor(($d + $e + 114) / 31); + $month = floor(($d + $e + 114) / 31); $day = (($d + $e + 114) % 31) + 1; return (new DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new DateInterval('P13D')); @@ -823,7 +823,7 @@ public function reformationDay( protected function calculateEaster(int $year, string $timezone): DateTime { if (\extension_loaded('calendar')) { - $easterDays = \easter_days($year); + $easterDays = easter_days($year); } else { $golden = ($year % 19) + 1; // The Golden Number diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index cdeeed2a4..8cf9bca40 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -510,14 +510,14 @@ protected function calculateSummerWinterTime( ): ?\DateTimeImmutable { $zone = DateTimeZoneFactory::getDateTimeZone($timezone); - $transitions = $zone->getTransitions(\mktime(0, 0, 0, 1, 1, $year), \mktime(23, 59, 59, 12, 31, $year)); + $transitions = $zone->getTransitions(mktime(0, 0, 0, 1, 1, $year), mktime(23, 59, 59, 12, 31, $year)); - $transition = \array_shift($transitions); + $transition = array_shift($transitions); $dst = $transition['isdst']; foreach ($transitions as $transition) { if ($transition['isdst'] !== $dst && $transition['isdst'] === $summer) { - return new \DateTimeImmutable(\substr($transition['time'], 0, 10), $zone); + return new \DateTimeImmutable(substr($transition['time'], 0, 10), $zone); } $dst = $transition['isdst']; } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 0e6c3b237..f4ab26d4f 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -271,18 +271,18 @@ private function calculateVernalEquinoxDay(): void { $day = null; if ($this->year >= 1948 && $this->year <= 1979) { - $day = \floor(self::VERNAL_EQUINOX_PARAM_1979 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1983) / 4)); + $day = floor(self::VERNAL_EQUINOX_PARAM_1979 + self::EQUINOX_GRADIENT * ($this->year - 1980) - floor(($this->year - 1983) / 4)); } elseif ($this->year <= 2099) { - $day = \floor(self::VERNAL_EQUINOX_PARAM_2099 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); + $day = floor(self::VERNAL_EQUINOX_PARAM_2099 + self::EQUINOX_GRADIENT * ($this->year - 1980) - floor(($this->year - 1980) / 4)); } elseif ($this->year <= 2150) { - $day = \floor(self::VERNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); + $day = floor(self::VERNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - floor(($this->year - 1980) / 4)); } if ($this->year < 1948 || $this->year > 2150) { $day = null; } - if (\is_numeric($day)) { + if (is_numeric($day)) { $this->addHoliday(new Holiday( 'vernalEquinoxDay', ['en' => 'Vernal Equinox Day', 'ja' => '春分の日'], @@ -516,18 +516,18 @@ private function calculateAutumnalEquinoxDay(): void { $day = null; if ($this->year >= 1948 && $this->year <= 1979) { - $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_1979 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1983) / 4)); + $day = floor(self::AUTUMNAL_EQUINOX_PARAM_1979 + self::EQUINOX_GRADIENT * ($this->year - 1980) - floor(($this->year - 1983) / 4)); } elseif ($this->year <= 2099) { - $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_2099 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); + $day = floor(self::AUTUMNAL_EQUINOX_PARAM_2099 + self::EQUINOX_GRADIENT * ($this->year - 1980) - floor(($this->year - 1980) / 4)); } elseif ($this->year <= 2150) { - $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); + $day = floor(self::AUTUMNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - floor(($this->year - 1980) / 4)); } if ($this->year < 1948 || $this->year > 2150) { $day = null; } - if (\is_numeric($day)) { + if (is_numeric($day)) { $this->addHoliday(new Holiday( 'autumnalEquinoxDay', ['en' => 'Autumnal Equinox Day', 'ja' => '秋分の日'], diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 4d96877ba..ad479a021 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -487,7 +487,7 @@ public function calculateSubstituteHolidays(): void // Loop through all holidays foreach ($holidays as $key => $holiday) { // Get list of holiday dates except this - $holidayDates = \array_map(static function ($holiday) use ($key) { + $holidayDates = array_map(static function ($holiday) use ($key) { return $holiday->getKey() === $key ? false : (string) $holiday; }, $holidays); diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index f9d9dcb09..effe48098 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -115,7 +115,7 @@ public function getName(array $locales = null): string foreach ($this->getLocales($locales) as $localeList) { $pattern = $this->substituteHolidayTranslations[$localeList] ?? null; if ($pattern) { - return \str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); + return str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); } } } diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index e373ae6e8..36d567534 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -54,11 +54,11 @@ 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; + $directoryPath = rtrim($directoryPath, '/\\').DIRECTORY_SEPARATOR; $extension = 'php'; foreach (new DirectoryIterator($directoryPath) as $file) { @@ -76,7 +76,7 @@ public function loadTranslations(string $directoryPath): void $translations = require $directoryPath.$filename; if (\is_array($translations)) { - foreach (\array_keys($translations) as $locale) { + foreach (array_keys($translations) as $locale) { $this->isValidLocale($locale); // Validate the given locale } @@ -152,7 +152,7 @@ public function getTranslations(string $key): array protected function isValidLocale(string $locale): bool { if (!\in_array($locale, $this->availableLocales, true)) { - throw new UnknownLocaleException(\sprintf('Locale "%s" is not a valid locale.', $locale)); + throw new UnknownLocaleException(sprintf('Locale "%s" is not a valid locale.', $locale)); } return true; diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 9931ee6f0..299a5fb7a 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -126,19 +126,19 @@ public static function nextWorkingDay( public static function create(string $class, int $year = 0, string $locale = self::DEFAULT_LOCALE): AbstractProvider { // Find and return holiday provider instance - $providerClass = \sprintf('Yasumi\Provider\%s', \str_replace('/', '\\', $class)); + $providerClass = sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $class)); - if (\class_exists($class) && (new ReflectionClass($class))->implementsInterface(ProviderInterface::class)) { + if (class_exists($class) && (new ReflectionClass($class))->implementsInterface(ProviderInterface::class)) { $providerClass = $class; } - if ('AbstractProvider' === $class || !\class_exists($providerClass)) { - throw new ProviderNotFoundException(\sprintf('Unable to find holiday provider "%s".', $class)); + if ('AbstractProvider' === $class || !class_exists($providerClass)) { + throw new ProviderNotFoundException(sprintf('Unable to find holiday provider "%s".', $class)); } // Assert year input if ($year < self::YEAR_LOWER_BOUND || $year > self::YEAR_UPPER_BOUND) { - throw new InvalidYearException(\sprintf('Year needs to be between %d and %d (%d given).', self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND, $year)); + throw new InvalidYearException(sprintf('Year needs to be between %d and %d (%d given).', self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND, $year)); } // Load internal locales variable @@ -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)) { - throw new UnknownLocaleException(\sprintf('Locale "%s" is not a valid locale.', $locale)); + throw new UnknownLocaleException(sprintf('Locale "%s" is not a valid locale.', $locale)); } return new $providerClass($year, $locale, self::$globalTranslations); @@ -198,7 +198,7 @@ public static function createByISO3166_2( $availableProviders = self::getProviders(); if (false === isset($availableProviders[$isoCode])) { - throw new ProviderNotFoundException(\sprintf('Unable to find holiday provider by ISO3166-2 "%s".', $isoCode)); + throw new ProviderNotFoundException(sprintf('Unable to find holiday provider by ISO3166-2 "%s".', $isoCode)); } return self::create($availableProviders[$isoCode], $year, $locale); @@ -234,14 +234,14 @@ public static function getProviders(): array continue; } - $quotedDs = \preg_quote(DIRECTORY_SEPARATOR, ''); - $provider = \preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); + $quotedDs = preg_quote(DIRECTORY_SEPARATOR, ''); + $provider = preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); - $class = new ReflectionClass(\sprintf('Yasumi\Provider\%s', \str_replace('/', '\\', $provider))); + $class = new ReflectionClass(sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $provider))); $key = 'ID'; if ($class->isSubclassOf(AbstractProvider::class) && $class->hasConstant($key)) { - $providers[\strtoupper($class->getConstant($key))] = $provider; + $providers[strtoupper($class->getConstant($key))] = $provider; } } diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index 88db3e716..508baa0c4 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -49,7 +49,7 @@ public function testHolidaysBetweenDateRange(): void new DateTime('07/25/2016', new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); self::assertArrayHasKey('goodFriday', $betweenHolidays); self::assertArrayHasKey('easter', $betweenHolidays); @@ -104,7 +104,7 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void new DateTimeImmutable('07/25/2016', new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); self::assertArrayHasKey('goodFriday', $betweenHolidays); self::assertArrayHasKey('easter', $betweenHolidays); @@ -187,7 +187,7 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void false ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); self::assertArrayHasKey('epiphany', $betweenHolidays); self::assertArrayHasKey('carnivalDay', $betweenHolidays); @@ -243,7 +243,7 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void new DateTime('05/17/'.$year, new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); self::assertArrayHasKey('newYearsDay', $betweenHolidays); self::assertArrayHasKey('maundyThursday', $betweenHolidays); @@ -283,7 +283,7 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void new DateTime('09/21/2021', new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); self::assertArrayNotHasKey('newYearsDay', $betweenHolidays); self::assertArrayNotHasKey('epiphany', $betweenHolidays); @@ -346,7 +346,7 @@ public function testCountBetweenWithSubstitutes(): void new DateTime('12/31/'.$year, new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); // Assert array definitions self::assertArrayHasKey('newYearsDay', $betweenHolidays); @@ -387,7 +387,7 @@ public function testCountBetweenExcludingSubstituteHoliday(): void new DateTime('03/20/'.$year, new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); // Assert array definitions self::assertArrayHasKey('newYearsDay', $betweenHolidays); @@ -432,7 +432,7 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid new DateTime('03/18/'.$year, new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); // Assert array definitions self::assertArrayHasKey('newYearsDay', $betweenHolidays); @@ -478,7 +478,7 @@ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): new DateTime('03/16/'.$year, new DateTimeZone($timezone)) ); - $betweenHolidays = \iterator_to_array($between); + $betweenHolidays = iterator_to_array($between); // Assert array definitions self::assertArrayHasKey('newYearsDay', $betweenHolidays); diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index 1d6c9d0a3..796f2b69f 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidaysFilter(): void $holidays = Yasumi::create('Ireland', 2018); $filteredHolidays = new OfficialHolidaysFilter($holidays->getIterator()); - $filteredHolidaysArray = \iterator_to_array($filteredHolidays); + $filteredHolidaysArray = iterator_to_array($filteredHolidays); // Assert array definitions self::assertArrayHasKey('newYearsDay', $filteredHolidaysArray); @@ -79,7 +79,7 @@ public function testObservedHolidaysFilter(): void $holidays = Yasumi::create('Ireland', 2018); $filteredHolidays = new ObservedHolidaysFilter($holidays->getIterator()); - $filteredHolidaysArray = \iterator_to_array($filteredHolidays); + $filteredHolidaysArray = iterator_to_array($filteredHolidays); // Assert array definitions self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); @@ -114,7 +114,7 @@ public function testBankHolidaysFilter(): void $holidays = Yasumi::create('Ireland', 2018); $filteredHolidays = new BankHolidaysFilter($holidays->getIterator()); - $filteredHolidaysArray = \iterator_to_array($filteredHolidays); + $filteredHolidaysArray = iterator_to_array($filteredHolidays); // Assert array definitions self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); @@ -148,7 +148,7 @@ public function testSeasonalHolidaysFilter(): void $holidays = Yasumi::create('Netherlands', 2017); $filteredHolidays = new SeasonalHolidaysFilter($holidays->getIterator()); - $filteredHolidaysArray = \iterator_to_array($filteredHolidays); + $filteredHolidaysArray = iterator_to_array($filteredHolidays); // Assert array definitions self::assertArrayHasKey('summerTime', $filteredHolidaysArray); @@ -197,7 +197,7 @@ public function testOtherHolidaysFilter(): void $holidays = Yasumi::create('Netherlands', 2017); $filteredHolidays = new OtherHolidaysFilter($holidays->getIterator()); - $filteredHolidaysArray = \iterator_to_array($filteredHolidays); + $filteredHolidaysArray = iterator_to_array($filteredHolidays); // Assert array definitions self::assertArrayHasKey('internationalWorkersDay', $filteredHolidaysArray); diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 48ccc61da..10a07534c 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -53,7 +53,7 @@ public function testHolidaysOnDate(): void $date ); - self::assertArrayHasKey($name, \iterator_to_array($holidaysOnDate)); + self::assertArrayHasKey($name, iterator_to_array($holidaysOnDate)); } } @@ -77,7 +77,7 @@ public function testHolidaysNotOnDate(): void $date ); - self::assertArrayNotHasKey($name, \iterator_to_array($holidaysOnDate)); + self::assertArrayNotHasKey($name, iterator_to_array($holidaysOnDate)); } } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 301305bc2..2c3863ba9 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -66,8 +66,8 @@ public function testCreateHolidayUnknownLocaleException(): void public function testHolidayIsJsonSerializable(): void { $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); - $json = \json_encode($holiday, JSON_THROW_ON_ERROR); - $instance = \json_decode($json, true, 512, JSON_THROW_ON_ERROR); + $json = json_encode($holiday, JSON_THROW_ON_ERROR); + $instance = json_decode($json, true, 512, JSON_THROW_ON_ERROR); self::assertIsArray($instance); self::assertNotNull($instance); diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 7ba1d2db0..5fedf420e 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -85,8 +85,8 @@ 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, JSON_THROW_ON_ERROR); - $instance = \json_decode($json, true, 512, JSON_THROW_ON_ERROR); + $json = json_encode($substitute, JSON_THROW_ON_ERROR); + $instance = json_decode($json, true, 512, JSON_THROW_ON_ERROR); self::assertIsArray($instance); self::assertNotNull($instance); diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 1eacbb9c2..4125e5941 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -67,6 +67,6 @@ public function translationProvider(): array } } - return \array_values($tests); + return array_values($tests); } } diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 317616686..dfd5e839b 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -40,10 +40,10 @@ class PentecostTest extends GermanyBaseTestCase implements YasumiTestCaseInterfa public function testHoliday(): void { $year = $this->generateRandomYear(); - $time_stamp = \strtotime( - $year.'-03-21'.\easter_days($year).' day + 49 day' + $time_stamp = strtotime( + $year.'-03-21'.easter_days($year).' day + 49 day' ); - $date = \date('Y-m-d', $time_stamp); + $date = date('Y-m-d', $time_stamp); $this->assertHoliday( self::REGION, diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index adde715ec..88ab1393e 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -86,7 +86,7 @@ public function assertDefinedHolidays( // Loop through all known holidays and assert they are defined by the provider class foreach ($expectedHolidays as $holiday) { - self::assertArrayHasKey($holiday, \iterator_to_array($holidays)); + self::assertArrayHasKey($holiday, iterator_to_array($holidays)); } } @@ -228,9 +228,9 @@ public function assertTranslatedHolidayName( if (\is_array($translations) && !empty($translations)) { foreach ($translations as $locale => $name) { $locales = [$locale]; - $parts = \explode('_', $locale); - while (\array_pop($parts) && $parts) { - $locales[] = \implode('_', $parts); + $parts = explode('_', $locale); + while (array_pop($parts) && $parts) { + $locales[] = implode('_', $parts); } $translation = null; @@ -570,7 +570,7 @@ public static function numberBetween($int1 = 0, $int2 = 2147483647): int $min = $int1 < $int2 ? $int1 : $int2; $max = $int1 < $int2 ? $int2 : $int1; - return \random_int($min, $max); + return random_int($min, $max); } /** @@ -588,14 +588,14 @@ public static function numberBetween($int1 = 0, $int2 = 2147483647): int */ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTime { - $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : \strtotime($startDate); + $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); $endTimestamp = static::getMaxTimestamp($endDate); if ($startTimestamp > $endTimestamp) { throw new \InvalidArgumentException('Start date must be anterior to end date.'); } - $timestamp = \random_int($startTimestamp, $endTimestamp); + $timestamp = random_int($startTimestamp, $endTimestamp); return static::setTimezone( new \DateTime('@'.$timestamp), @@ -630,7 +630,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now 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 @@ -689,7 +689,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime */ protected static function getMaxTimestamp($max = 'now') { - if (\is_numeric($max)) { + if (is_numeric($max)) { return (int) $max; } @@ -697,7 +697,7 @@ protected static function getMaxTimestamp($max = 'now') return $max->getTimestamp(); } - return \strtotime(empty($max) ? 'now' : $max); + return strtotime(empty($max) ? 'now' : $max); } /** @@ -710,6 +710,6 @@ private static function setTimezone(DateTime $dt, ?string $timezone): DateTime private static function resolveTimezone(?string $timezone): ?string { - return $timezone ?? (static::$defaultTimezone ?? \date_default_timezone_get()); + return $timezone ?? (static::$defaultTimezone ?? date_default_timezone_get()); } } From ca088295266e3233de0432402f4f972c25068215 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 13:31:18 +0900 Subject: [PATCH 210/687] Removed old backup file. Signed-off-by: Sacha Telgenhof --- phpunit.xml.bak | 230 ------------------------------------------------ 1 file changed, 230 deletions(-) delete mode 100644 phpunit.xml.bak diff --git a/phpunit.xml.bak b/phpunit.xml.bak deleted file mode 100644 index 97ddcf216..000000000 --- a/phpunit.xml.bak +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - ./tests - - - - - ./tests/Base - - - - - ./tests/Australia - - - - - ./tests/Austria - - - - - ./tests/Belgium - - - - - ./tests/Bosnia - - - - - ./tests/Brazil - - - - - ./tests/Canada - - - - - ./tests/Croatia - - - - - ./tests/CzechRepublic - - - - - ./tests/Denmark - - - - - ./tests/Estonia - - - - - ./tests/Finland - - - - - ./tests/France - - - - - ./tests/Germany - - - - - ./tests/Greece - - - - - ./tests/Hungary - - - - - ./tests/Ireland - - - - - ./tests/Italy - - - - - ./tests/Japan - - - - - ./tests/Latvia - - - - - ./tests/Lithuania - - - - - ./tests/Luxembourg - - - - - ./tests/Netherlands - - - - - ./tests/NewZealand - - - - - ./tests/Norway - - - - - ./tests/Poland - - - - - ./tests/Portugal - - - - - ./tests/Romania - - - - - ./tests/Russia - - - - - ./tests/Slovakia - - - - - ./tests/SouthAfrica - - - - - ./tests/SouthKorea - - - - - ./tests/Spain - - - - - ./tests/Sweden - - - - - ./tests/Switzerland - - - - - ./tests/USA - - - - - ./tests/Ukraine - - - - - ./tests/UnitedKingdom - - - - - - ./src/Yasumi - - ./src/Yasumi/data - - - - From cafc5a6d250a5e23e1cb6992ae0f86f2d1eee01b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 13:44:06 +0900 Subject: [PATCH 211/687] Revert back to v2 of PHP-CS-fixer as it and the infection package both rely on a different version of the xdebug-handler. Signed-off-by: Sacha Telgenhof --- .gitignore | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3107567d6..b71a1e059 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ vendor composer.lock .php-cs-fixer.cache +.php_cs.cache bin/_* .phpunit.result.cache var diff --git a/composer.json b/composer.json index 7f0e646dd..1ecf7d4c9 100755 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", + "friendsofphp/php-cs-fixer": "^2.16", "infection/infection": "^0.17 | ^0.22", "mikey179/vfsstream": "^1.6", "phan/phan": "^4.0", From 665f3d95fe1d90f1b10c812f0eb8873365b5feda Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 13:54:40 +0900 Subject: [PATCH 212/687] Updated the CHANGELOG with latest changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d3de7f2a..d85b4700d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) - Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) +- Infection PHP to perform mutation testing. - PHPStan to the dependencies allowing for local analysis. - `.gitattributes` file to reduce the size of a release package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) @@ -18,13 +19,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) - Some improvements/refactoring of the Swiss holiday providers (including links to sources) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) - + - Allow the `WEEKEND_DATA` constant in provider classes to be overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) +- Upgraded PHPUnit's XML configuration. - Refactored removing the magic numbers for the lower and upper limits of the calendar year. - Reformatted code using new/updated Code Styling rules. -- Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer - Hardened error handling of json functions. -- Updated Copyright year +- Updated Copyright year. ### Fixed @@ -34,7 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. - Incorrect invocation of `Fribourg::calculateBerchtoldsTag()` and `Fribourg::calculateDecember26th` (Switzerland) -- Use parameter and return type hinting +- Use proper parameter and return type hinting - Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. - Some static functions were used as if they are object functions. @@ -42,10 +43,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Removed -- Use Github Actions for CI replacing Travis/StyleCI/Scrutinizer +- Travis/StyleCI/Scrutinizer services replaced by Github Actions. - PHP 7.2 Support (PHP 7.2 is EOL) - Faker library as it has been sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) +- Native function invocations. - Various undefined class references, unused imports, etc. +- Unnecessary curly braces in strings, `continue` keyword in while loops, typecasting. ## [2.3.0] - 2020-06-22 From 25344ff93c4dbb626e3343cdde19c139a5d004e7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 14:23:50 +0900 Subject: [PATCH 213/687] Added links to different versions of the changelog (WIP). Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d85b4700d..51f15728c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -453,3 +453,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [1.0.0] - 2015-04-21 - Initial Release + +[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.3.0...HEAD +[2.3.0]: https://github.com/azuyalabs/yasumi/compare/2.2.0...2.3.0 +[1.0.0]: https://github.com/azuyalabs/yasumi/compare/releases/tag/1.0.0 From 29e8ed44cfe69dc9dd102777b823c4b728d79f81 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 14:31:05 +0900 Subject: [PATCH 214/687] Completed links to comparison of versions. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f15728c..cc33d9e6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -456,4 +456,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this [Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.3.0...HEAD [2.3.0]: https://github.com/azuyalabs/yasumi/compare/2.2.0...2.3.0 -[1.0.0]: https://github.com/azuyalabs/yasumi/compare/releases/tag/1.0.0 +[2.2.0]: https://github.com/azuyalabs/yasumi/compare/2.1.0...2.2.0 +[2.1.0]: https://github.com/azuyalabs/yasumi/compare/2.0.0...2.1.0 +[2.0.0]: https://github.com/azuyalabs/yasumi/compare/1.8.0...2.0.0 +[1.8.0]: https://github.com/azuyalabs/yasumi/compare/1.7.0...1.8.0 +[1.7.0]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.7.0 +[1.6.1]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.6.0 +[1.6.0]: https://github.com/azuyalabs/yasumi/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/azuyalabs/yasumi/compare/1.4.0...1.5.0 +[1.4.0]: https://github.com/azuyalabs/yasumi/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/azuyalabs/yasumi/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/azuyalabs/yasumi/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/azuyalabs/yasumi/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/azuyalabs/yasumi/releases/tag/1.0.0 From a082256f8f844fc4d5764e5be1e7c73fd7759a5e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 15:05:06 +0900 Subject: [PATCH 215/687] Fixed MarineDayTest (Japan) as the rescheduled day has moved to 2021 (due to the COVID-19 pandemic). Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 5 +---- tests/Japan/MarineDayTest.php | 22 +++++----------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index f4ab26d4f..6c8a79ecc 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -370,11 +370,8 @@ private function calculateMarineDay(): void { $date = null; if (2021 === $this->year) { - // For Olympic 2021 Tokyo (after COVID-19) + // For Olympic 2021 Tokyo (rescheduled due to the COVID-19 pandemic) $date = new DateTime("$this->year-7-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } elseif (2020 === $this->year) { - // For Olympic 2020 Tokyo - $date = new DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2003) { $date = new DateTime("third monday of july $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index a9abb8552..4e3484269 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -53,23 +53,6 @@ public function testMarineDayIn2021(): void ); } - /** - * Tests Marine Day in 2020. Marine Day in 2020 is July 23th for the Olympic Games. - * - * @throws Exception - * @throws ReflectionException - */ - public function testMarineDayIn2020(): void - { - $year = 2020; - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-7-23", new DateTimeZone(self::TIMEZONE)) - ); - } - /** * 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. @@ -80,6 +63,11 @@ public function testMarineDayIn2020(): void public function testMarineDayOnAfter2003(): void { $year = $this->generateRandomYear(2004); + + if (2021 === $year) { + $this->testMarineDayIn2021(); + } + $this->assertHoliday( self::REGION, self::HOLIDAY, From 042cb18ac94c166a3d06ba21ccbd6d2f0417d89b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 15:26:11 +0900 Subject: [PATCH 216/687] Corrected test as the National Indigenous Peoples Day is only celebrated since 1996. Signed-off-by: Sacha Telgenhof --- .../NorthwestTerritories/NorthwestTerritoriesTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index 1b0d599e3..ab2cea321 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -42,13 +42,18 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'civicHoliday', - 'nationalIndigenousPeoplesDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (1996 >= $this->year) { + $holidays[] = 'nationalIndigenousPeoplesDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From 5a8d7a5d20dc3c0eec31310445636cd7816321b7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 15:36:17 +0900 Subject: [PATCH 217/687] Updated CHANGELOG with latest changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc33d9e6d..3da7f56be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed +- The test for North West Territories (Canada) in that the National Indigenous Peoples Day was considered for all years: it is only celebrated since 1996. - The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. - The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009. +- The test for Marine Day (Japan) as the rescheduled day was moved to 2021 (due to the COVID-19 pandemic). - Typo for Estonian Day of Restoration of Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) - The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. From 8d607bc304aba2d294f8487decdab97cb606f6c0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 15:40:31 +0900 Subject: [PATCH 218/687] Reformatting using correct Markdown syntax. --- README.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 485f60ab6..ce84788c6 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,14 @@ ![Testing](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Testing?label=Testing&style=flat-square) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -Introduction ------------- +# Introduction + Yasumi (Japanese for 'Holiday'「休み」) is the easy PHP library that helps you retrieve the dates and names of holidays and other special celebrations from various countries/states. It is calculation and rule driven avoiding the need of a comprehensive database. Many services exist that can provide holiday information, however are either not entirely free or only offer limited information. In addition, no exhaustive PHP library exists today covering a wide range of holidays and countries. [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) library was a similar attempt, however it hasn't been updated for a long time. -Highlights ----------- +# Highlights + The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. Yasumi's calculation is provider-based (i.e. by country/state), making it easy to add new holiday providers that calculate holidays. - Straightforward API @@ -30,17 +30,15 @@ The goal of Yasumi is to be powerful while remaining lightweight, by utilizing P - Fully unit tested - [Composer](https://getcomposer.org) ready, [PSR-2](https://www.php-fig.org/psr/psr-2/) and [PSR-4](https://www.php-fig.org/psr/psr-4/) compliant - -Documentation -------------- +# Documentation Yasumi’s documentation is available on [https://www.yasumi.dev](https://www.yasumi.dev). You will find all the necessary information how to install Yasumi and also recipes how you can use Yasumi in your project. -Blog ----- +# Blog + Checkout the [blog](https://www.yasumi.dev/blog/) section on documentation site regularly for latest updates. Keeping you informed about any news, releases, etc. in a handy blog post format! -## Contributing +# 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. @@ -48,7 +46,6 @@ If you enjoy what I am making, an extra cup of coffee is very much appreciated : Buy Me A Coffee -License -------- +# License Yasumi is open-sourced software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more information. From 398203aac14cd0ab8895615c7e4ea916926cc1e2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 15:41:05 +0900 Subject: [PATCH 219/687] Removed extra new line. --- CODE_OF_CONDUCT.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 76ef2908f..9fc92d922 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -109,4 +109,3 @@ at [https://www.contributor-covenant.org/translations][translations]. [FAQ]: https://www.contributor-covenant.org/faq [translations]: https://www.contributor-covenant.org/translations - From 7cffb49a8d2d9bdfc79ca699cea63aaf86828346 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 5 May 2021 15:41:51 +0900 Subject: [PATCH 220/687] Removed trailing spaces. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3da7f56be..765ae0dfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) - Some improvements/refactoring of the Swiss holiday providers (including links to sources) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) - + - Allow the `WEEKEND_DATA` constant in provider classes to be overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) - Upgraded PHPUnit's XML configuration. - Refactored removing the magic numbers for the lower and upper limits of the calendar year. @@ -180,7 +180,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) From 07005333646e232769d8f4b55ebdba070764d202 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 7 May 2021 11:54:27 +0900 Subject: [PATCH 221/687] Added contributor's name. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 765ae0dfa..de4672d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added - Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) -- Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) +- Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) - Infection PHP to perform mutation testing. - PHPStan to the dependencies allowing for local analysis. From 5408c35b25f42eadf5b8c7af514e68276342acb5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 8 May 2021 21:51:18 +0900 Subject: [PATCH 222/687] Added PHP8 support entry. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de4672d13..6ab3f8235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) - Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) +- PHP8 Support [\238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) - Infection PHP to perform mutation testing. - PHPStan to the dependencies allowing for local analysis. - `.gitattributes` file to reduce the size of a release package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) From e32fb74b9788a77467991299109c7ba741275ac4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 9 May 2021 13:38:36 +0900 Subject: [PATCH 223/687] Increased the default timeout as some OS combinations are timing out. Signed-off-by: Sacha Telgenhof --- infection.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infection.json b/infection.json index 0a1d7d105..ae04957d1 100644 --- a/infection.json +++ b/infection.json @@ -4,6 +4,7 @@ "src\/Yasumi" ] }, + "timeout": 20, "logs": { "text": "var/infection.log", "summary": "var/summary.log", @@ -16,4 +17,4 @@ "mutators": { "@default": true } -} \ No newline at end of file +} From bde99e96d6f7327d19ba9a31e96757355de70d1e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 9 May 2021 17:23:36 +0900 Subject: [PATCH 224/687] Set release 2.4.0 version. Fixed some grammar mistakes. --- CHANGELOG.md | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ab3f8235..95f5cb478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added +### Changed + +### Fixed + +### Deprecated + +### Removed + + +## [2.4.0] - 2021-05-09 + +### Added + - Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) - Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) @@ -42,11 +55,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. - Some static functions were used as if they are object functions. -### Deprecated - ### Removed -- Travis/StyleCI/Scrutinizer services replaced by Github Actions. +- Travis/StyleCI/Scrutinizer services replaced by GitHub Actions. - PHP 7.2 Support (PHP 7.2 is EOL) - Faker library as it has been sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) - Native function invocations. @@ -80,7 +91,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Second International Workers Day in Ukraine was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Second International Workers' Day in Ukraine was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) - Changed the fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) @@ -118,7 +129,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) +- Late Summer Bank Holiday in the 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)) - Created a 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. @@ -175,7 +186,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### 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. +- 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)) @@ -217,7 +228,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed - Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place. -- Fixed issue for summer time in Denmark in 1980. By default summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th. +- Fixed issue for summertime in Denmark in 1980. By default, summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th. - Fixed spelling issue in the Swedish translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) - Fixed spelling issues in the Danish translation. [\#96](https://github.com/azuyalabs/yasumi/pull/96) ([c960657](https://github.com/c960657)) - Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg). [\#100](https://github.com/azuyalabs/yasumi/pull/100) ([TalonTR](https://github.com/TalonTR)) @@ -230,7 +241,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added -- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This function can be helpful in cases where an existing holiday provider class can be extended but some holidays are not part of the original (extended) provider. +- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This function can be helpful in cases where an existing holiday provider class can be extended, but some holidays are not part of the original (extended) provider. - Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and objects of the DateTimeImmutable type. - Added support for countries where the weekend definition (start and end day) differs from the global definition (Saturday and Sunday). - Holiday Provider for Russia. [\#72](https://github.com/azuyalabs/yasumi/pull/72) ([lukosius](https://github.com/lukosius)) @@ -274,7 +285,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Made `calculate` method public and use of proper camel casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) - Upgraded Faker Library to version 1.7 -- Renamed the holiday type NATIONAL to OFFICIAL. Sub regions may have official holidays, and the name NATIONAL doesn't suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) +- Renamed the holiday type NATIONAL to OFFICIAL. Sub-regions may have official holidays, and the name NATIONAL doesn't suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) - Upgraded PHP-CS-Fixer to version 2.6 ### Fixed @@ -381,7 +392,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed -- Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However the holiday has always +- Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However, the holiday has always been celebrated on a Saturday (between October 31 and November 6th). - Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) regions [\#5879133](https://github.com/azuyalabs/yasumi/commit/58791330ccf5c13b1626885921534c32866b7faf) ([R2c](https://github.com/R2c)) - Fixed issue that it was possible for the AbstractProvider class to be loaded as a Holiday Provider [\#9678bc4](https://github.com/azuyalabs/yasumi/commit/9678bc490e34980404ad5dc5b3d45a3c76a3ca0f) ([R2c](https://github.com/R2c)) @@ -442,11 +453,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Changed - Updated some English, Italian, French and Dutch translations. -- Moved all other holiday calculations in Netherlands and France to individual methods. +- Moved all other holiday calculations in the Netherlands and France to individual methods. ### Fixed -- For Japan substituted holidays had same date as the original holidays. +- For Japan substituted holidays had the same date as the original holidays. ### Removed From 6852267b519ea9842edb47adb338feb612f4351d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 9 May 2021 17:24:12 +0900 Subject: [PATCH 225/687] Fixed GitHub's name. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 882e2db80..9afca039c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Contributions are encouraged and welcome; we are always happy to get feedback or pull requests on [Github](https://github.com/azuyalabs/yasumi). +Contributions are encouraged and welcome; we are always happy to get feedback or pull requests on [GitHub](https://github.com/azuyalabs/yasumi). When contributing there are a few guidelines we'd like you to keep in mind: From 59812b20360b8c432a4c8065eff89d6af0fa8408 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 9 May 2021 17:25:17 +0900 Subject: [PATCH 226/687] Removed entries for Scrutinizer, StyleCI and Travis as these are not longer in use. --- .gitattributes | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index b6ce471a1..d66c7f948 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,9 +3,6 @@ /.gitattributes export-ignore /.gitignore export-ignore /.php_cs export-ignore -/.scrutinizer.yml export-ignore -/.styleci.yml export-ignore -/.travis.yml export-ignore /CHANGELOG.md export-ignore /CODE_OF_CONDUCT.md export-ignore /CONTRIBUTING.md export-ignore From b04df5813bec72a20c98f54f0354ff9169e01872 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 9 May 2021 18:02:07 +0900 Subject: [PATCH 227/687] Corrected hyperlink Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95f5cb478..4f5f6d22d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) - Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) -- PHP8 Support [\238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) +- PHP8 Support [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) - Infection PHP to perform mutation testing. - PHPStan to the dependencies allowing for local analysis. - `.gitattributes` file to reduce the size of a release package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) From 6bdf1fe459ebbbcbb6d586b42d170e8cd2ada7ef Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 21 May 2021 00:49:59 +0900 Subject: [PATCH 228/687] Add external sources (#249) All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. --- CHANGELOG.md | 5 + b.php | 91 ++++++++++++ src/Yasumi/Provider/Australia.php | 7 + src/Yasumi/Provider/Austria.php | 8 ++ src/Yasumi/Provider/Belgium.php | 7 + src/Yasumi/Provider/Bosnia.php | 8 ++ src/Yasumi/Provider/Brazil.php | 7 + src/Yasumi/Provider/Canada.php | 7 + src/Yasumi/Provider/Canada/Alberta.php | 2 +- .../Canada/NewfoundlandAndLabrador.php | 2 +- .../Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- src/Yasumi/Provider/Croatia.php | 9 ++ src/Yasumi/Provider/CzechRepublic.php | 8 ++ src/Yasumi/Provider/Denmark.php | 7 + src/Yasumi/Provider/Estonia.php | 8 ++ src/Yasumi/Provider/Finland.php | 8 ++ src/Yasumi/Provider/France.php | 8 ++ src/Yasumi/Provider/Georgia.php | 9 ++ src/Yasumi/Provider/Germany.php | 8 ++ src/Yasumi/Provider/Greece.php | 8 ++ src/Yasumi/Provider/Hungary.php | 8 ++ src/Yasumi/Provider/Ireland.php | 7 + src/Yasumi/Provider/Italy.php | 8 ++ src/Yasumi/Provider/Japan.php | 8 ++ src/Yasumi/Provider/Latvia.php | 8 ++ src/Yasumi/Provider/Lithuania.php | 8 ++ src/Yasumi/Provider/Luxembourg.php | 8 ++ src/Yasumi/Provider/Netherlands.php | 8 ++ src/Yasumi/Provider/NewZealand.php | 7 + src/Yasumi/Provider/Norway.php | 8 ++ src/Yasumi/Provider/Poland.php | 8 ++ src/Yasumi/Provider/Portugal.php | 10 +- src/Yasumi/Provider/Romania.php | 8 ++ src/Yasumi/Provider/Russia.php | 8 ++ src/Yasumi/Provider/Slovakia.php | 8 ++ src/Yasumi/Provider/SouthAfrica.php | 9 ++ src/Yasumi/Provider/SouthKorea.php | 8 ++ src/Yasumi/Provider/Spain.php | 7 + src/Yasumi/Provider/Sweden.php | 8 ++ src/Yasumi/Provider/Switzerland.php | 9 ++ src/Yasumi/Provider/USA.php | 7 + src/Yasumi/Provider/Ukraine.php | 9 +- src/Yasumi/Provider/UnitedKingdom.php | 7 + .../Provider/UnitedKingdom/Scotland.php | 7 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 7 + src/Yasumi/ProviderInterface.php | 8 ++ tests/Australia/AnzacDayTest.php | 4 +- tests/Australia/AustraliaDayTest.php | 4 +- tests/Australia/AustraliaTest.php | 11 +- .../AustralianCapitalTerritoryTest.php | 11 +- .../CanberraDayTest.php | 4 +- .../EasterSaturdayTest.php | 4 +- .../EasterSundayTest.php | 4 +- .../LabourDayTest.php | 4 +- .../QueensBirthdayTest.php | 4 +- .../ReconciliationDayTest.php | 4 +- tests/Australia/BoxingDayTest.php | 4 +- tests/Australia/ChristmasDayTest.php | 4 +- tests/Australia/EasterMondayTest.php | 4 +- tests/Australia/GoodFridayTest.php | 4 +- .../NewSouthWales/BankHolidayTest.php | 4 +- .../NewSouthWales/EasterSaturdayTest.php | 4 +- .../NewSouthWales/EasterSundayTest.php | 4 +- .../Australia/NewSouthWales/LabourDayTest.php | 4 +- .../NewSouthWales/NewSouthWalesTest.php | 11 +- .../NewSouthWales/QueensBirthdayTest.php | 4 +- tests/Australia/NewYearsDayTest.php | 4 +- .../NorthernTerritory/EasterSaturdayTest.php | 4 +- .../NorthernTerritory/MayDayTest.php | 4 +- .../NorthernTerritoryTest.php | 11 +- .../NorthernTerritory/PicnicDayTest.php | 4 +- .../NorthernTerritory/QueensBirthdayTest.php | 4 +- .../Queensland/Brisbane/BrisbaneTest.php | 11 +- .../Queensland/Brisbane/PeoplesDayTest.php | 4 +- tests/Australia/Queensland/LabourDayTest.php | 4 +- .../Queensland/QueensBirthdayTest.php | 4 +- tests/Australia/Queensland/QueenslandTest.php | 11 +- .../SouthAustralia/AdelaideCupDayTest.php | 4 +- .../SouthAustralia/ChristmasDayTest.php | 4 +- .../SouthAustralia/EasterSaturdayTest.php | 4 +- .../SouthAustralia/LabourDayTest.php | 4 +- .../SouthAustralia/ProclamationDayTest.php | 4 +- .../SouthAustralia/QueensBirthdayTest.php | 4 +- .../SouthAustralia/SouthAustraliaTest.php | 11 +- .../CentralNorth/CentralNorthTest.php | 11 +- .../CentralNorth/DevonportShowTest.php | 4 +- tests/Australia/Tasmania/EightHourDayTest.php | 4 +- .../FlindersIsland/FlindersIslandShowTest.php | 4 +- .../FlindersIsland/FlindersIslandTest.php | 11 +- .../KingIsland/KingIslandShowTest.php | 4 +- .../Tasmania/KingIsland/KingIslandTest.php | 11 +- .../Tasmania/Northeast/LauncestonShowTest.php | 4 +- .../Tasmania/Northeast/NortheastTest.php | 11 +- .../Tasmania/Northwest/BurnieShowTest.php | 4 +- .../Northwest/CircularHead/AGFESTTest.php | 4 +- .../Tasmania/Northwest/NorthwestTest.php | 11 +- .../Australia/Tasmania/QueensBirthdayTest.php | 4 +- .../Australia/Tasmania/RecreationDayTest.php | 4 +- .../Tasmania/South/HobartShowTest.php | 4 +- tests/Australia/Tasmania/South/SouthTest.php | 11 +- .../South/Southeast/HobartRegattaTest.php | 4 +- tests/Australia/Tasmania/TasmaniaTest.php | 11 +- .../Victoria/AFLGrandFinalFridayTest.php | 4 +- .../Australia/Victoria/EasterSaturdayTest.php | 4 +- tests/Australia/Victoria/EasterSundayTest.php | 4 +- tests/Australia/Victoria/LabourDayTest.php | 4 +- .../Victoria/MelbourneCupDayTest.php | 4 +- .../Australia/Victoria/QueensBirthdayTest.php | 4 +- tests/Australia/Victoria/VictoriaTest.php | 11 +- .../WesternAustralia/LabourDayTest.php | 4 +- .../WesternAustralia/QueensBirthdayTest.php | 4 +- .../WesternAustraliaDayTest.php | 4 +- .../WesternAustralia/WesternAustraliaTest.php | 11 +- tests/Austria/AllSaintsDayTest.php | 4 +- tests/Austria/AscensionDayTest.php | 4 +- tests/Austria/AssumptionOfMaryTest.php | 4 +- tests/Austria/AustriaTest.php | 11 +- tests/Austria/Burgenland/BurgenlandTest.php | 116 ++++++++++++++++ tests/Austria/Burgenland/stMartinsDayTest.php | 4 +- tests/Austria/Carinthia/CarinthiaTest.php | 120 ++++++++++++++++ tests/Austria/Carinthia/PlebisciteDayTest.php | 4 +- tests/Austria/Carinthia/StJosephsDayTest.php | 4 +- tests/Austria/ChristmasTest.php | 4 +- tests/Austria/CorpusChristiTest.php | 4 +- tests/Austria/EasterMondayTest.php | 4 +- tests/Austria/EasterTest.php | 4 +- tests/Austria/EpiphanyTest.php | 4 +- tests/Austria/ImmaculateConceptionTest.php | 4 +- tests/Austria/InternationalWorkersDayTest.php | 4 +- .../Austria/LowerAustria/LowerAustriaTest.php | 119 ++++++++++++++++ .../LowerAustria/StLeopoldsDayTest.php | 4 +- tests/Austria/NationalDayTest.php | 4 +- tests/Austria/NewYearsDayTest.php | 4 +- tests/Austria/PentecostMondayTest.php | 4 +- tests/Austria/PentecostTest.php | 4 +- tests/Austria/Salzburg/SalzburgTest.php | 119 ++++++++++++++++ tests/Austria/Salzburg/StRupertsDayTest.php | 4 +- tests/Austria/SecondChristmasDayTest.php | 4 +- tests/Austria/Styria/StJosephsDayTest.php | 4 +- tests/Austria/Styria/StyriaTest.php | 116 ++++++++++++++++ tests/Austria/Tyrol/StJosephsDayTest.php | 4 +- tests/Austria/Tyrol/TyrolTest.php | 116 ++++++++++++++++ .../UpperAustria/StFloriansDayTest.php | 4 +- .../Austria/UpperAustria/UpperAustriaTest.php | 119 ++++++++++++++++ tests/Austria/Vienna/StLeopoldsDayTest.php | 4 +- tests/Austria/Vienna/ViennaTest.php | 119 ++++++++++++++++ tests/Austria/Vorarlberg/StJosephsDayTest.php | 4 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 116 ++++++++++++++++ tests/Base/YasumiExternalProvider.php | 5 + tests/Belgium/AllSaintsDayTest.php | 4 +- tests/Belgium/ArmisticeDayTest.php | 4 +- tests/Belgium/AscensionDayTest.php | 4 +- tests/Belgium/AssumptionOfMaryTest.php | 4 +- tests/Belgium/BelgiumTest.php | 8 ++ tests/Belgium/ChristmasTest.php | 4 +- tests/Belgium/EasterMondayTest.php | 4 +- tests/Belgium/EasterTest.php | 4 +- tests/Belgium/InternationalWorkersDayTest.php | 4 +- tests/Belgium/NationalDayTest.php | 4 +- tests/Belgium/NewYearsDayTest.php | 4 +- tests/Belgium/PentecostTest.php | 4 +- tests/Belgium/pentecostMondayTest.php | 4 +- tests/Bosnia/BosniaTest.php | 11 +- tests/Bosnia/ChristmasDayTest.php | 4 +- tests/Bosnia/DayAfterNewYearsDay.php | 4 +- tests/Bosnia/EasterTest.php | 4 +- tests/Bosnia/IndependenceDayTest.php | 4 +- tests/Bosnia/InternationalWorkersDayTest.php | 4 +- tests/Bosnia/NewYearsDayTest.php | 4 +- tests/Bosnia/OrthodoxChristmasDay.php | 4 +- tests/Bosnia/SecondLabourDay.php | 4 +- tests/Bosnia/StatehoodDayTest.php | 4 +- tests/Brazil/AllSoulsDayTest.php | 4 +- tests/Brazil/AshWednesdayTest.php | 4 +- tests/Brazil/BrazilTest.php | 11 +- tests/Brazil/CarnavalMondayTest.php | 4 +- tests/Brazil/CarnavalTuesdayTest.php | 4 +- tests/Brazil/ChristmasDayTest.php | 4 +- tests/Brazil/CorpusChristiTest.php | 4 +- tests/Brazil/EasterTest.php | 4 +- tests/Brazil/GoodFridayTest.php | 4 +- tests/Brazil/IndependenceDayTest.php | 4 +- tests/Brazil/InternationalWorkersDayTest.php | 4 +- tests/Brazil/NewYearsDayTest.php | 4 +- tests/Brazil/OurLadyOfAparecidaDayTest.php | 4 +- .../Brazil/ProclamationOfRepublicDayTest.php | 4 +- tests/Brazil/TiradentesDayTest.php | 4 +- tests/Canada/Alberta/AlbertaTest.php | 11 +- .../BritishColumbia/BritishColumbiaTest.php | 11 +- tests/Canada/CanadaDayTest.php | 4 +- tests/Canada/CanadaTest.php | 11 +- tests/Canada/ChristmasDayTest.php | 4 +- tests/Canada/LabourDayTest.php | 4 +- tests/Canada/Manitoba/ManitobaTest.php | 11 +- .../Canada/NewBrunswick/NewBrunswickTest.php | 11 +- tests/Canada/NewYearsDayTest.php | 4 +- .../NewfoundlandAndLabradorTest.php | 11 +- .../NorthwestTerritoriesTest.php | 11 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 11 +- tests/Canada/Nunavut/NunavutTest.php | 11 +- tests/Canada/Ontario/OntarioTest.php | 11 +- .../PrinceEdwardIslandTest.php | 11 +- tests/Canada/Quebec/QuebecTest.php | 11 +- tests/Canada/RemembranceDayTest.php | 4 +- .../Canada/Saskatchewan/SaskatchewanTest.php | 11 +- tests/Canada/ThanksgivingDayTest.php | 4 +- tests/Canada/Yukon/YukonTest.php | 11 +- tests/Croatia/AllSaintsDayTest.php | 4 +- tests/Croatia/AntifascistStruggleDayTest.php | 4 +- tests/Croatia/AssumptionOfMaryTest.php | 4 +- tests/Croatia/ChristmasDayTest.php | 4 +- tests/Croatia/CorpusChristiTest.php | 4 +- tests/Croatia/CroatiaTest.php | 129 ++++++++++++++++++ tests/Croatia/EasterMondayTest.php | 4 +- tests/Croatia/EasterTest.php | 4 +- tests/Croatia/EpiphanyTest.php | 4 +- tests/Croatia/HomelandThanksgivingDayTest.php | 4 +- tests/Croatia/IndependenceDayTest.php | 4 +- tests/Croatia/InternationalWorkersDayTest.php | 4 +- tests/Croatia/NewYearsDayTest.php | 4 +- tests/Croatia/RemembranceDayTest.php | 4 +- tests/Croatia/StStephensDayTest.php | 4 +- tests/Croatia/StatehoodDayTest.php | 4 +- tests/CzechRepublic/ChristmasDayTest.php | 4 +- tests/CzechRepublic/ChristmasEveTest.php | 4 +- tests/CzechRepublic/CzechRepublicTest.php | 11 +- tests/CzechRepublic/CzechStateHoodDayTest.php | 4 +- tests/CzechRepublic/EasterMondayTest.php | 4 +- tests/CzechRepublic/GoodFridayTest.php | 4 +- .../IndependentCzechoslovakStateDayTest.php | 4 +- .../InternationalWorkersDayTest.php | 4 +- tests/CzechRepublic/JanHusDayTest.php | 4 +- tests/CzechRepublic/NewYearsDayTest.php | 4 +- .../RenewalOfIndependentCzechStateDayTest.php | 4 +- .../SaintsCyrilAndMethodiusDayTest.php | 4 +- .../CzechRepublic/SecondChristmasDayTest.php | 4 +- .../StruggleForFreedomAndDemocracyDayTest.php | 4 +- .../CzechRepublic/VictoryInEuropeDayTest.php | 4 +- tests/Denmark/AscensionDayTest.php | 4 +- tests/Denmark/ChristmasDayTest.php | 4 +- tests/Denmark/ChristmasEveTest.php | 4 +- tests/Denmark/ConstitutionDayTest.php | 4 +- tests/Denmark/DenmarkTest.php | 11 +- tests/Denmark/EasterMondayTest.php | 4 +- tests/Denmark/EasterTest.php | 4 +- tests/Denmark/GoodFridayTest.php | 4 +- tests/Denmark/GreatPrayerDayTest.php | 4 +- tests/Denmark/InternationalWorkersDayTest.php | 4 +- tests/Denmark/MaundyThursdayTest.php | 4 +- tests/Denmark/NewYearsDayTest.php | 4 +- tests/Denmark/NewYearsEveTest.php | 4 +- tests/Denmark/PentecostMondayTest.php | 4 +- tests/Denmark/PentecostTest.php | 4 +- tests/Denmark/SecondChristmasDayTest.php | 4 +- tests/Denmark/SummerTimeTest.php | 4 +- tests/Denmark/WinterTimeTest.php | 4 +- tests/Estonia/ChristmasDayTest.php | 4 +- tests/Estonia/ChristmasEveDayTest.php | 4 +- tests/Estonia/EasterDayTest.php | 4 +- tests/Estonia/EstoniaTest.php | 11 +- tests/Estonia/GoodFridayDayTest.php | 4 +- tests/Estonia/IndependenceDayTest.php | 4 +- tests/Estonia/InternationalWorkersDayTest.php | 4 +- tests/Estonia/NewYearsDayTest.php | 4 +- tests/Estonia/PentecostTest.php | 4 +- .../RestorationOfIndependenceDayTest.php | 4 +- tests/Estonia/SecondChristmasDayTest.php | 4 +- tests/Estonia/StJohnsDayTest.php | 4 +- tests/Estonia/VictoryDayTest.php | 4 +- tests/Finland/AllSaintsDayTest.php | 4 +- tests/Finland/AscensionDayTest.php | 4 +- tests/Finland/ChristmasDayTest.php | 4 +- tests/Finland/EasterMondayTest.php | 4 +- tests/Finland/EasterTest.php | 4 +- tests/Finland/EpiphanyTest.php | 4 +- tests/Finland/FinlandTest.php | 11 +- tests/Finland/GoodFridayTest.php | 4 +- tests/Finland/IndependenceDayTest.php | 4 +- tests/Finland/InternationalWorkersDayTest.php | 4 +- tests/Finland/NewYearsDayTest.php | 4 +- tests/Finland/PentecostTest.php | 4 +- tests/Finland/SecondChristmasDayTest.php | 4 +- tests/Finland/stJohnsDayTest.php | 4 +- tests/France/AllSaintsDayTest.php | 4 +- tests/France/ArmisticeDayTest.php | 4 +- tests/France/AscensionDayTest.php | 4 +- tests/France/AssumptionOfMaryTest.php | 4 +- tests/France/BasRhin/BasRhinTest.php | 11 +- tests/France/BasRhin/GoodFridayTest.php | 4 +- tests/France/BasRhin/stStephensDayTest.php | 4 +- tests/France/BastilleDayTest.php | 4 +- tests/France/ChristmasDayTest.php | 4 +- tests/France/EasterMondayTest.php | 4 +- tests/France/FranceTest.php | 11 +- tests/France/HautRhin/GoodFridayTest.php | 4 +- tests/France/HautRhin/HautRhinTest.php | 11 +- tests/France/HautRhin/stStephensDayTest.php | 4 +- tests/France/InternationalWorkersDayTest.php | 4 +- tests/France/Moselle/GoodFridayTest.php | 4 +- tests/France/Moselle/MoselleTest.php | 11 +- tests/France/Moselle/stStephensDayTest.php | 4 +- tests/France/NewYearsDayTest.php | 4 +- tests/France/PentecostMondayTest.php | 4 +- tests/France/VictoryInEuropeDayTest.php | 4 +- tests/Georgia/EasterTest.php | 4 +- tests/Georgia/GeorgiaTest.php | 11 +- tests/Georgia/IndependenceDayTest.php | 4 +- tests/Georgia/InternationalWomensDayTest.php | 4 +- tests/Georgia/MtskhetobaDayTest.php | 4 +- tests/Georgia/NewYearsDayTest.php | 4 +- tests/Georgia/OrthodoxChristmasDayTest.php | 4 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 4 +- tests/Georgia/SecondNewYearDayTest.php | 4 +- tests/Georgia/StAndrewsDayTest.php | 4 +- tests/Georgia/StGeorgesDayTest.php | 4 +- tests/Georgia/StMarysDayTest.php | 4 +- tests/Georgia/UnityDayTest.php | 4 +- tests/Georgia/VictoryDayTest.php | 4 +- tests/Germany/AscensionDayTest.php | 4 +- .../BadenWurttemberg/AllSaintsDayTest.php | 4 +- .../BadenWurttemberg/BadenWurttembergTest.php | 11 +- .../BadenWurttemberg/CorpusChristiTest.php | 4 +- .../Germany/BadenWurttemberg/EpiphanyTest.php | 4 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 4 +- tests/Germany/Bavaria/BavariaTest.php | 11 +- tests/Germany/Bavaria/CorpusChristiTest.php | 4 +- tests/Germany/Bavaria/EpiphanyTest.php | 4 +- tests/Germany/Berlin/BerlinTest.php | 11 +- .../Berlin/DayOfLiberation2020Test.php | 4 +- .../Berlin/InternationalWomensDay2019Test.php | 4 +- tests/Germany/Brandenburg/BrandenburgTest.php | 11 +- .../Brandenburg/ReformationDayTest.php | 4 +- tests/Germany/Bremen/BremenTest.php | 11 +- tests/Germany/Bremen/ReformationDayTest.php | 4 +- tests/Germany/ChristmasTest.php | 4 +- tests/Germany/EasterMondayTest.php | 4 +- tests/Germany/GermanUnityDayTest.php | 4 +- tests/Germany/GermanyTest.php | 11 +- tests/Germany/GoodFridayTest.php | 4 +- .../Germany/Hamburg/DayOfReformationTest.php | 4 +- tests/Germany/Hamburg/HamburgTest.php | 11 +- tests/Germany/Hesse/CorpusChristiTest.php | 4 +- tests/Germany/Hesse/HesseTest.php | 11 +- tests/Germany/InternationalWorkersDayTest.php | 4 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 11 +- .../LowerSaxony/ReformationDayTest.php | 4 +- .../MecklenburgWesternPomeraniaTest.php | 11 +- .../ReformationDayTest.php | 4 +- tests/Germany/NewYearsDayTest.php | 4 +- tests/Germany/NewYearsEveTest.php | 4 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 4 +- .../CorpusChristiTest.php | 4 +- .../NorthRhineWestphaliaTest.php | 11 +- tests/Germany/PentecostMondayTest.php | 4 +- tests/Germany/PentecostTest.php | 4 +- tests/Germany/ReformationDay2017Test.php | 4 +- .../RhinelandPalatinate/AllSaintsDayTest.php | 4 +- .../RhinelandPalatinate/CorpusChristiTest.php | 4 +- .../RhinelandPalatinateTest.php | 11 +- tests/Germany/Saarland/AllSaintsDayTest.php | 4 +- .../Germany/Saarland/AssumptionOfMaryTest.php | 4 +- tests/Germany/Saarland/CorpusChristiTest.php | 4 +- tests/Germany/Saarland/SaarlandTest.php | 11 +- tests/Germany/Saxony/ReformationDayTest.php | 4 +- .../Saxony/RepentanceAndPrayerDayTest.php | 4 +- tests/Germany/Saxony/SaxonyTest.php | 11 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 4 +- .../SaxonyAnhalt/ReformationDayTest.php | 4 +- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 11 +- .../SchleswigHolstein/ReformationDayTest.php | 4 +- .../SchleswigHolsteinTest.php | 11 +- tests/Germany/SecondChristmasDayTest.php | 4 +- .../Germany/Thuringia/ReformationDayTest.php | 4 +- tests/Germany/Thuringia/ThuringiaTest.php | 11 +- tests/Greece/AnnunciationTest.php | 4 +- tests/Greece/AscensionDayTest.php | 4 +- tests/Greece/AssumptionOfMaryTest.php | 4 +- tests/Greece/ChristmasDayTest.php | 4 +- tests/Greece/CleanMondayTest.php | 4 +- tests/Greece/EasterMondayTest.php | 4 +- tests/Greece/EasterTest.php | 4 +- tests/Greece/EpiphanyTest.php | 4 +- tests/Greece/GreeceTest.php | 11 +- tests/Greece/IndepencenceDayTest.php | 4 +- tests/Greece/InternationalWorkersDayTest.php | 4 +- tests/Greece/NewYearsDayTest.php | 4 +- tests/Greece/OhiDayTest.php | 4 +- tests/Greece/PentecostMondayTest.php | 4 +- tests/Greece/PentecostTest.php | 4 +- tests/Greece/PolytechnioTest.php | 4 +- tests/Greece/ThreeHolyHierarchsTest.php | 4 +- tests/Greece/goodFridayTest.php | 4 +- ...tCaseInterface.php => HolidayTestCase.php} | 2 +- tests/Hungary/AllSaintsDayTest.php | 4 +- tests/Hungary/ChristmasTest.php | 4 +- tests/Hungary/EasterMondayTest.php | 4 +- tests/Hungary/EasterTest.php | 4 +- tests/Hungary/HungaryTest.php | 11 +- tests/Hungary/InternationalWorkersDayTest.php | 4 +- tests/Hungary/MemorialDay1848Test.php | 4 +- tests/Hungary/MemorialDay1956Test.php | 4 +- tests/Hungary/NewYearsDayTest.php | 4 +- tests/Hungary/PentecostMondayTest.php | 4 +- tests/Hungary/PentecostTest.php | 4 +- tests/Hungary/SecondChristmasDayTest.php | 4 +- tests/Hungary/StateFoundationDayTest.php | 4 +- tests/Ireland/AugustHolidayTest.php | 4 +- tests/Ireland/ChristmasDayTest.php | 4 +- tests/Ireland/EasterMondayTest.php | 4 +- tests/Ireland/EasterTest.php | 4 +- tests/Ireland/GoodFridayTest.php | 4 +- tests/Ireland/IrelandTest.php | 11 +- tests/Ireland/JuneHolidayTest.php | 4 +- tests/Ireland/MayDayTest.php | 4 +- tests/Ireland/NewYearsDayTest.php | 4 +- tests/Ireland/OctoberHolidayTest.php | 4 +- tests/Ireland/PentecostTest.php | 4 +- tests/Ireland/StPatricksDayTest.php | 4 +- tests/Ireland/StStephensDayTest.php | 4 +- tests/Ireland/pentecostMondayTest.php | 4 +- tests/Italy/AllSaintsDayTest.php | 4 +- tests/Italy/AssumptionOfMaryTest.php | 4 +- tests/Italy/ChristmasTest.php | 4 +- tests/Italy/EasterMondayTest.php | 4 +- tests/Italy/EasterTest.php | 4 +- tests/Italy/EpiphanyTest.php | 4 +- tests/Italy/ImmaculateConceptionTest.php | 4 +- tests/Italy/InternationalWorkersDayTest.php | 4 +- tests/Italy/ItalyTest.php | 11 +- tests/Italy/LiberationDayTest.php | 4 +- tests/Italy/NewYearsDayTest.php | 4 +- tests/Italy/RepublicDayTest.php | 4 +- tests/Italy/stStephensDayTest.php | 4 +- tests/Japan/AutumnalEquinoxDayTest.php | 4 +- tests/Japan/ChildrensDayTest.php | 4 +- tests/Japan/ComingOfAgeDayTest.php | 4 +- tests/Japan/ConstitutionMemorialDayTest.php | 4 +- tests/Japan/CoronationDayTest.php | 4 +- tests/Japan/CultureDayTest.php | 4 +- tests/Japan/EmperorsBirthdayTest.php | 4 +- .../EnthronementProclamationCeremonyTest.php | 4 +- tests/Japan/GreeneryDayTest.php | 4 +- tests/Japan/JapanTest.php | 11 +- tests/Japan/LabourThanksgivingDayTest.php | 4 +- tests/Japan/MarineDayTest.php | 4 +- tests/Japan/MountainDayTest.php | 4 +- tests/Japan/NationalFoundationDayTest.php | 4 +- tests/Japan/NewYearsDayTest.php | 4 +- tests/Japan/PublicBridgeDayTest.php | 4 +- tests/Japan/RespectForTheAgedDayTest.php | 4 +- tests/Japan/ShowaDayTest.php | 4 +- tests/Japan/SportsDayTest.php | 4 +- tests/Japan/VernalEquinoxDayTest.php | 4 +- tests/Latvia/ChristmasDayTest.php | 4 +- tests/Latvia/ChristmasEveDayTest.php | 4 +- tests/Latvia/EasterDayTest.php | 4 +- tests/Latvia/EasterMondayDayTest.php | 4 +- tests/Latvia/GoodFridayDayTest.php | 4 +- tests/Latvia/InternationalWorkersDayTest.php | 4 +- tests/Latvia/LatviaTest.php | 11 +- tests/Latvia/MidsummerEveDayTest.php | 4 +- tests/Latvia/NewYearsDayTest.php | 4 +- tests/Latvia/NewYearsEveDayTest.php | 4 +- ...oclamationOfTheRepublicOfLatviaDayTest.php | 4 +- .../RestorationOfIndependenceDayTest.php | 4 +- tests/Latvia/SecondChristmasDayTest.php | 4 +- tests/Latvia/StJohnsDayTest.php | 4 +- tests/Lithuania/AllSaintsDayTest.php | 4 +- tests/Lithuania/AllSoulsDayTest.php | 4 +- tests/Lithuania/AssumptionOfMaryDayTest.php | 4 +- tests/Lithuania/ChristmasDayTest.php | 4 +- tests/Lithuania/ChristmasEveDayTest.php | 4 +- tests/Lithuania/EasterDayTest.php | 4 +- tests/Lithuania/EasterMondayDayTest.php | 4 +- .../Lithuania/InternationalWorkersDayTest.php | 4 +- tests/Lithuania/LithuaniaTest.php | 8 ++ tests/Lithuania/NewYearsDayTest.php | 4 +- ...rationOfIndependenceOfLithuaniaDayTest.php | 4 +- ...estorationOfTheStateOfLithuaniaDayTest.php | 4 +- tests/Lithuania/SecondChristmasDayTest.php | 4 +- tests/Lithuania/StJohnsDayTest.php | 4 +- tests/Lithuania/StatehoodDayTest.php | 4 +- tests/Luxembourg/AllSaintsDayTest.php | 4 +- tests/Luxembourg/AscensionDayTest.php | 4 +- tests/Luxembourg/AssumptionOfMaryTest.php | 4 +- tests/Luxembourg/ChristmasDayTest.php | 4 +- tests/Luxembourg/EasterMondayTest.php | 4 +- tests/Luxembourg/EuropeDayTest.php | 4 +- .../InternationalWorkersDayTest.php | 4 +- tests/Luxembourg/LuxembourgTest.php | 11 +- tests/Luxembourg/NationalDayTest.php | 4 +- tests/Luxembourg/NewYearsDayTest.php | 4 +- tests/Luxembourg/PentecostMondayTest.php | 4 +- tests/Luxembourg/SecondChristmasDayTest.php | 4 +- tests/Netherlands/AscensionDayTest.php | 4 +- tests/Netherlands/AshWednesdayTest.php | 4 +- tests/Netherlands/ChristmasDayTest.php | 4 +- tests/Netherlands/CommemorationDayTest.php | 4 +- tests/Netherlands/EasterMondayTest.php | 4 +- tests/Netherlands/EasterTest.php | 4 +- tests/Netherlands/EpiphanyTest.php | 4 +- tests/Netherlands/FathersDayTest.php | 4 +- tests/Netherlands/GoodFridayTest.php | 4 +- tests/Netherlands/HalloweenTest.php | 4 +- .../InternationalWorkersDayTest.php | 4 +- tests/Netherlands/KingsDayTest.php | 4 +- tests/Netherlands/LiberationDayTest.php | 4 +- tests/Netherlands/MothersDayTest.php | 4 +- tests/Netherlands/NetherlandsTest.php | 11 +- tests/Netherlands/NewYearsDayTest.php | 4 +- tests/Netherlands/PentecostTest.php | 4 +- tests/Netherlands/QueensDayTest.php | 4 +- tests/Netherlands/SummertimeTest.php | 4 +- tests/Netherlands/ValentinesDayTest.php | 4 +- tests/Netherlands/WintertimeTest.php | 4 +- tests/Netherlands/WorldAnimalDayTest.php | 4 +- tests/Netherlands/carnivalDayTest.php | 4 +- tests/Netherlands/pentecostMondayTest.php | 4 +- tests/Netherlands/princesDayTest.php | 4 +- tests/Netherlands/secondCarnivalDay.php | 4 +- tests/Netherlands/secondChristmasdayTest.php | 4 +- tests/Netherlands/stMartinsDayTest.php | 4 +- tests/Netherlands/stNicholasDayTest.php | 4 +- tests/Netherlands/thirdCarnivalDay.php | 4 +- tests/NewZealand/AnzacDayTest.php | 4 +- tests/NewZealand/BoxingDayTest.php | 4 +- tests/NewZealand/ChristmasDayTest.php | 4 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 4 +- tests/NewZealand/EasterMondayTest.php | 4 +- tests/NewZealand/GoodFridayTest.php | 4 +- tests/NewZealand/LabourDayTest.php | 4 +- tests/NewZealand/NewYearsDayTest.php | 4 +- tests/NewZealand/NewZealandTest.php | 11 +- tests/NewZealand/QueensBirthdayTest.php | 4 +- tests/NewZealand/WaitangiDayTest.php | 4 +- tests/Norway/AscensionDayTest.php | 4 +- tests/Norway/ChristmasDayTest.php | 4 +- tests/Norway/ConstitutionDayTest.php | 4 +- tests/Norway/EasterMondayTest.php | 4 +- tests/Norway/EasterTest.php | 4 +- tests/Norway/GoodFridayTest.php | 4 +- tests/Norway/InternationalWorkersDayTest.php | 4 +- tests/Norway/MaundyThursdayTest.php | 4 +- tests/Norway/NewYearsDayTest.php | 4 +- tests/Norway/NorwayTest.php | 11 +- tests/Norway/PentecostMondayTest.php | 4 +- tests/Norway/PentecostTest.php | 4 +- tests/Norway/SecondChristmasDayTest.php | 4 +- tests/Poland/AllSaintsDayTest.php | 4 +- tests/Poland/AssumptionOfMaryTest.php | 4 +- tests/Poland/ChristmasTest.php | 4 +- tests/Poland/ConstitutionDayTest.php | 4 +- tests/Poland/CorpusChristiTest.php | 4 +- tests/Poland/EasterMondayTest.php | 4 +- tests/Poland/EasterTest.php | 4 +- tests/Poland/EpiphanyTest.php | 4 +- tests/Poland/IndependenceDayTest.php | 4 +- tests/Poland/InternationalWorkersDayTest.php | 4 +- tests/Poland/NewYearsDayTest.php | 4 +- tests/Poland/PentecostTest.php | 4 +- tests/Poland/PolandTest.php | 11 +- tests/Poland/SecondChristmasDayTest.php | 4 +- tests/Portugal/AllSaintsDayTest.php | 4 +- tests/Portugal/AssumptionOfMaryTest.php | 4 +- tests/Portugal/CarnationRevolutionDayTest.php | 4 +- tests/Portugal/ChristmasTest.php | 4 +- tests/Portugal/CorpusChristiTest.php | 4 +- tests/Portugal/EasterTest.php | 4 +- tests/Portugal/GoodFridayTest.php | 4 +- tests/Portugal/ImmaculateConceptionTest.php | 4 +- .../Portugal/InternationalWorkersDayTest.php | 4 +- tests/Portugal/NewYearsDayTest.php | 4 +- tests/Portugal/PortugalDayTest.php | 4 +- tests/Portugal/PortugalTest.php | 11 +- tests/Portugal/PortugueseRepublicDayTest.php | 4 +- .../RestorationOfIndependenceTest.php | 4 +- tests/ProviderTestCase.php | 26 ++++ tests/Romania/AssumptionOfMaryTest.php | 4 +- tests/Romania/ChildrensDayTest.php | 4 +- tests/Romania/ChristmasDayTest.php | 4 +- tests/Romania/ConstantinBrancusiDayTest.php | 4 +- tests/Romania/DayAfterNewYearsDayTest.php | 4 +- tests/Romania/EasterMondayTest.php | 4 +- tests/Romania/EasterTest.php | 4 +- tests/Romania/InternationalWorkersDayTest.php | 4 +- tests/Romania/NationalDayTest.php | 4 +- tests/Romania/NewYearsDayTest.php | 4 +- tests/Romania/PentecostMondayTest.php | 4 +- tests/Romania/PentecostTest.php | 4 +- tests/Romania/RomaniaTest.php | 11 +- tests/Romania/SecondChristmasDayTest.php | 4 +- tests/Romania/StAndrewsDayTest.php | 4 +- tests/Romania/UnitedPrincipalitiesDayTest.php | 4 +- .../Russia/DefenceOfTheFatherlandDayTest.php | 4 +- tests/Russia/InternationalWomensDayTest.php | 4 +- tests/Russia/NewYearHolidaysDay2Test.php | 4 +- tests/Russia/NewYearHolidaysDay3Test.php | 4 +- tests/Russia/NewYearHolidaysDay4Test.php | 4 +- tests/Russia/NewYearHolidaysDay5Test.php | 4 +- tests/Russia/NewYearHolidaysDay6Test.php | 4 +- tests/Russia/NewYearHolidaysDay8Test.php | 4 +- tests/Russia/NewYearsDayTest.php | 4 +- tests/Russia/OrthodoxChristmasDayTest.php | 4 +- tests/Russia/RussiaDayTest.php | 4 +- tests/Russia/RussiaTest.php | 11 +- tests/Russia/SpringAndLabourDayTest.php | 4 +- tests/Russia/UnityDayTest.php | 4 +- tests/Russia/VictoryDayTest.php | 4 +- tests/Slovakia/AllSaintsDayTest.php | 4 +- tests/Slovakia/ChristmasDayTest.php | 4 +- tests/Slovakia/ChristmasEveTest.php | 4 +- tests/Slovakia/EasterMondayTest.php | 4 +- tests/Slovakia/EpiphanyTest.php | 4 +- tests/Slovakia/GoodFridayTest.php | 4 +- .../Slovakia/InternationalWorkersDayTest.php | 4 +- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 4 +- .../SaintsCyrilAndMethodiusDayTest.php | 4 +- tests/Slovakia/SecondChristmasDayTest.php | 4 +- tests/Slovakia/SlovakConstitutionDayTest.php | 4 +- tests/Slovakia/SlovakIndependeceDayTest.php | 4 +- .../SlovakNationalUprisingDayTest.php | 4 +- tests/Slovakia/SlovakiaTest.php | 11 +- .../StruggleForFreedomAndDemocracyDayTest.php | 4 +- tests/Slovakia/VictoryInEuropeDayTest.php | 4 +- tests/SouthAfrica/ChristmasDayTest.php | 4 +- tests/SouthAfrica/FamilyDayTest.php | 4 +- tests/SouthAfrica/FreedomDayTest.php | 4 +- tests/SouthAfrica/GoodFridayTest.php | 4 +- tests/SouthAfrica/HeritageDayTest.php | 4 +- tests/SouthAfrica/HumanRightsDayTest.php | 4 +- .../MunicipalElections2016DayTest.php | 4 +- tests/SouthAfrica/NationalWomensDayTest.php | 4 +- tests/SouthAfrica/NewYearsDayTest.php | 4 +- tests/SouthAfrica/ReconciliationDayTest.php | 4 +- tests/SouthAfrica/SecondChristmasDayTest.php | 4 +- tests/SouthAfrica/SouthAfricaTest.php | 11 +- .../SubstituteDayOfGoodwillTest.php | 4 +- tests/SouthAfrica/WorkersDayTest.php | 4 +- tests/SouthAfrica/YouthDayTest.php | 4 +- tests/SouthKorea/ArborDayTest.php | 4 +- tests/SouthKorea/ArmedForcesDayTest.php | 4 +- tests/SouthKorea/BuddhasBirthdayTest.php | 4 +- tests/SouthKorea/ChildrensDayTest.php | 4 +- tests/SouthKorea/ChristmasDayTest.php | 4 +- tests/SouthKorea/ChuseokTest.php | 4 +- tests/SouthKorea/ConstitutionDayTest.php | 4 +- tests/SouthKorea/GaecheonjeolTest.php | 4 +- tests/SouthKorea/HangulDayTest.php | 4 +- .../IndependenceMovementDayTest.php | 4 +- tests/SouthKorea/LiberationDayTest.php | 4 +- tests/SouthKorea/MemorialDayTest.php | 4 +- tests/SouthKorea/NewYearsDayTest.php | 4 +- tests/SouthKorea/SeollalTest.php | 4 +- tests/SouthKorea/SouthKoreaTest.php | 11 +- tests/Spain/AllSaintsDayTest.php | 4 +- tests/Spain/Andalusia/AndalusiaDayTest.php | 4 +- tests/Spain/Andalusia/AndalusiaTest.php | 11 +- tests/Spain/Aragon/AragonTest.php | 11 +- tests/Spain/Aragon/StGeorgesDayTest.php | 4 +- tests/Spain/AssumptionOfMaryTest.php | 4 +- tests/Spain/Asturias/AsturiasDayTest.php | 4 +- tests/Spain/Asturias/AsturiasTest.php | 11 +- .../BalearicIslandsDayTest.php | 4 +- .../BalearicIslands/BalearicIslandsTest.php | 11 +- .../BasqueCountry/BasqueCountryDayTest.php | 4 +- .../Spain/BasqueCountry/BasqueCountryTest.php | 11 +- .../CanaryIslands/CanaryIslandsDayTest.php | 4 +- .../Spain/CanaryIslands/CanaryIslandsTest.php | 11 +- tests/Spain/Cantabria/CantabriaDayTest.php | 4 +- tests/Spain/Cantabria/CantabriaTest.php | 11 +- .../CastileAndLeon/CastileAndLeonDayTest.php | 4 +- .../CastileAndLeon/CastileAndLeonTest.php | 11 +- .../CastillaLaManchaDayTest.php | 4 +- .../CastillaLaMancha/CastillaLaManchaTest.php | 11 +- tests/Spain/Catalonia/CataloniaTest.php | 11 +- .../Catalonia/nationalCataloniaDayTest.php | 4 +- tests/Spain/Catalonia/stJohnsDayTest.php | 4 +- tests/Spain/Ceuta/CeutaTest.php | 11 +- tests/Spain/Ceuta/ceutaDayTest.php | 4 +- tests/Spain/ChristmasTest.php | 4 +- .../CommunityOfMadridTest.php | 11 +- .../DosdeMayoUprisingDayTest.php | 4 +- tests/Spain/ConstitutionDayTest.php | 4 +- tests/Spain/EasterMondayTest.php | 4 +- tests/Spain/EpiphanyTest.php | 4 +- .../Spain/Extremadura/ExtremaduraDayTest.php | 4 +- tests/Spain/Extremadura/ExtremaduraTest.php | 11 +- tests/Spain/Galicia/GaliciaTest.php | 11 +- .../Galicia/GalicianLiteratureDayTest.php | 4 +- tests/Spain/Galicia/stJamesDayTest.php | 4 +- tests/Spain/GoodFridayTest.php | 4 +- tests/Spain/ImmaculateConceptionTest.php | 4 +- tests/Spain/InternationalWorkersDayTest.php | 4 +- tests/Spain/LaRioja/LaRiojaDayTest.php | 4 +- tests/Spain/LaRioja/LaRiojaTest.php | 11 +- tests/Spain/MaundyThursdayTest.php | 4 +- tests/Spain/Melilla/MelillaTest.php | 11 +- tests/Spain/NationalDayTest.php | 4 +- tests/Spain/Navarre/NavarreTest.php | 11 +- tests/Spain/NewYearsDayTest.php | 4 +- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 4 +- .../RegionOfMurcia/RegionOfMurciaTest.php | 11 +- tests/Spain/SpainTest.php | 11 +- .../ValencianCommunityDayTest.php | 4 +- .../ValencianCommunityTest.php | 11 +- tests/Spain/ValentinesDayTest.php | 4 +- tests/Spain/stJosephsDayTest.php | 4 +- tests/Sweden/AllSaintsDayTest.php | 4 +- tests/Sweden/AllSaintsEveTest.php | 4 +- tests/Sweden/AscensionDayTest.php | 4 +- tests/Sweden/ChristmasDayTest.php | 4 +- tests/Sweden/ChristmasEveTest.php | 4 +- tests/Sweden/EasterMondayTest.php | 4 +- tests/Sweden/EasterTest.php | 4 +- tests/Sweden/EpiphanyEveTest.php | 4 +- tests/Sweden/EpiphanyTest.php | 4 +- tests/Sweden/GoodFridayTest.php | 4 +- tests/Sweden/InternationalWorkersDayTest.php | 4 +- tests/Sweden/NationalDayTest.php | 4 +- tests/Sweden/NewYearsDayTest.php | 4 +- tests/Sweden/NewYearsEveTest.php | 4 +- tests/Sweden/PentecostTest.php | 4 +- tests/Sweden/SecondChristmasDayTest.php | 4 +- tests/Sweden/StJohnsDayTest.php | 4 +- tests/Sweden/StJohnsEveTest.php | 4 +- tests/Sweden/SwedenTest.php | 11 +- tests/Sweden/WalpurgisEveTest.php | 4 +- tests/Switzerland/Aargau/AargauTest.php | 11 +- tests/Switzerland/Aargau/AscensionDayTest.php | 4 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 4 +- tests/Switzerland/Aargau/GoodFridayTest.php | 4 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 4 +- .../AppenzellAusserrhodenTest.php | 11 +- .../AscensionDayTest.php | 4 +- .../ChristmasDayTest.php | 4 +- .../EasterMondayTest.php | 4 +- .../AppenzellAusserrhoden/GoodFridayTest.php | 4 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 4 +- .../PentecostMondayTest.php | 4 +- .../StStephensDayTest.php | 4 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 4 +- .../AppenzellInnerrhodenTest.php | 11 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 4 +- .../AssumptionOfMaryTest.php | 4 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 4 +- .../CorpusChristiTest.php | 4 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 4 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 4 +- .../ImmaculateConceptionTest.php | 4 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 4 +- .../PentecostMondayTest.php | 4 +- .../StStephensDayTest.php | 4 +- .../BaselLandschaft/AscensionDayTest.php | 4 +- .../BaselLandschaft/BaselLandschaftTest.php | 11 +- .../BaselLandschaft/ChristmasDayTest.php | 4 +- .../BaselLandschaft/EasterMondayTest.php | 4 +- .../BaselLandschaft/GoodFridayTest.php | 4 +- .../BaselLandschaft/NewYearsDayTest.php | 4 +- .../BaselLandschaft/PentecostMondayTest.php | 4 +- .../BaselLandschaft/StStephensDayTest.php | 4 +- .../BaselLandschaft/WorkersDayTest.php | 4 +- .../BaselStadt/AscensionDayTest.php | 4 +- .../Switzerland/BaselStadt/BaselStadtTest.php | 11 +- .../BaselStadt/ChristmasDayTest.php | 4 +- .../BaselStadt/EasterMondayTest.php | 4 +- .../Switzerland/BaselStadt/GoodFridayTest.php | 4 +- .../BaselStadt/NewYearsDayTest.php | 4 +- .../BaselStadt/PentecostMondayTest.php | 4 +- .../BaselStadt/StStephensDayTest.php | 4 +- .../Switzerland/BaselStadt/WorkersDayTest.php | 4 +- tests/Switzerland/Bern/AscensionDayTest.php | 4 +- tests/Switzerland/Bern/BerchtoldsTagTest.php | 4 +- tests/Switzerland/Bern/BernTest.php | 11 +- tests/Switzerland/Bern/ChristmasDayTest.php | 4 +- tests/Switzerland/Bern/EasterMondayTest.php | 4 +- tests/Switzerland/Bern/GoodFridayTest.php | 4 +- tests/Switzerland/Bern/NewYearsDayTest.php | 4 +- .../Switzerland/Bern/PentecostMondayTest.php | 4 +- tests/Switzerland/Bern/StStephensDayTest.php | 4 +- .../Switzerland/Fribourg/AllSaintsDayTest.php | 4 +- .../Switzerland/Fribourg/AscensionDayTest.php | 4 +- .../Fribourg/AssumptionOfMaryTest.php | 4 +- .../Fribourg/BerchtoldsTagTest.php | 4 +- .../Switzerland/Fribourg/ChristmasDayTest.php | 4 +- .../Fribourg/CorpusChristiTest.php | 4 +- .../Switzerland/Fribourg/December26thTest.php | 4 +- .../Switzerland/Fribourg/EasterMondayTest.php | 4 +- tests/Switzerland/Fribourg/FribourgTest.php | 11 +- tests/Switzerland/Fribourg/GoodFridayTest.php | 4 +- .../Fribourg/ImmaculateConceptionTest.php | 4 +- .../Switzerland/Fribourg/NewYearsDayTest.php | 4 +- .../Fribourg/PentecostMondayTest.php | 4 +- tests/Switzerland/Geneva/AscensionDayTest.php | 4 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 4 +- tests/Switzerland/Geneva/EasterMondayTest.php | 4 +- tests/Switzerland/Geneva/GenevaTest.php | 11 +- tests/Switzerland/Geneva/GoodFridayTest.php | 4 +- .../Switzerland/Geneva/JeuneGenevoisTest.php | 4 +- tests/Switzerland/Geneva/NewYearsDayTest.php | 4 +- .../Geneva/PentecostMondayTest.php | 4 +- .../Geneva/RestaurationGenevoiseTest.php | 4 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 4 +- tests/Switzerland/Glarus/AscensionDayTest.php | 4 +- .../Switzerland/Glarus/BerchtoldsTagTest.php | 4 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 4 +- tests/Switzerland/Glarus/EasterMondayTest.php | 4 +- tests/Switzerland/Glarus/GlarusTest.php | 11 +- tests/Switzerland/Glarus/GoodFridayTest.php | 4 +- .../Switzerland/Glarus/NafelserFahrtTest.php | 4 +- tests/Switzerland/Glarus/NewYearsDayTest.php | 4 +- .../Glarus/PentecostMondayTest.php | 4 +- .../Switzerland/Glarus/StStephensDayTest.php | 4 +- .../Switzerland/Grisons/AscensionDayTest.php | 4 +- .../Switzerland/Grisons/ChristmasDayTest.php | 4 +- .../Switzerland/Grisons/EasterMondayTest.php | 4 +- tests/Switzerland/Grisons/GoodFridayTest.php | 4 +- tests/Switzerland/Grisons/GrisonsTest.php | 11 +- tests/Switzerland/Grisons/NewYearsDayTest.php | 4 +- .../Grisons/PentecostMondayTest.php | 4 +- .../Switzerland/Grisons/StStephensDayTest.php | 4 +- tests/Switzerland/Jura/AllSaintsDayTest.php | 4 +- tests/Switzerland/Jura/AscensionDayTest.php | 4 +- .../Switzerland/Jura/AssumptionOfMaryTest.php | 4 +- tests/Switzerland/Jura/BerchtoldsTagTest.php | 4 +- tests/Switzerland/Jura/BettagsMontagTest.php | 4 +- tests/Switzerland/Jura/ChristmasDayTest.php | 4 +- tests/Switzerland/Jura/CorpusChristiTest.php | 4 +- tests/Switzerland/Jura/EasterMondayTest.php | 4 +- tests/Switzerland/Jura/EasterTest.php | 4 +- tests/Switzerland/Jura/GoodFridayTest.php | 4 +- tests/Switzerland/Jura/JuraTest.php | 11 +- tests/Switzerland/Jura/NewYearsDayTest.php | 4 +- .../Switzerland/Jura/PentecostMondayTest.php | 4 +- tests/Switzerland/Jura/PentecostTest.php | 4 +- .../Jura/PlebisciteJurassienTest.php | 4 +- tests/Switzerland/Jura/WorkersDayTest.php | 4 +- .../Switzerland/Lucerne/AllSaintsDayTest.php | 4 +- .../Switzerland/Lucerne/AscensionDayTest.php | 4 +- .../Lucerne/AssumptionOfMaryTest.php | 4 +- .../Switzerland/Lucerne/BerchtoldsTagTest.php | 4 +- .../Switzerland/Lucerne/ChristmasDayTest.php | 4 +- .../Switzerland/Lucerne/CorpusChristiTest.php | 4 +- .../Switzerland/Lucerne/EasterMondayTest.php | 4 +- tests/Switzerland/Lucerne/GoodFridayTest.php | 4 +- .../Lucerne/ImmaculateConceptionTest.php | 4 +- tests/Switzerland/Lucerne/LucerneTest.php | 11 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 4 +- .../Lucerne/PentecostMondayTest.php | 4 +- .../Switzerland/Lucerne/StStephensDayTest.php | 4 +- .../Neuchatel/AscensionDayTest.php | 4 +- .../Neuchatel/BettagsMontagTest.php | 4 +- .../Neuchatel/ChristmasDayTest.php | 4 +- .../Neuchatel/December26thTest.php | 4 +- .../Neuchatel/EasterMondayTest.php | 4 +- .../Switzerland/Neuchatel/GoodFridayTest.php | 4 +- .../Neuchatel/InstaurationRepubliqueTest.php | 4 +- .../Switzerland/Neuchatel/January2ndTest.php | 4 +- tests/Switzerland/Neuchatel/NeuchatelTest.php | 11 +- .../Switzerland/Neuchatel/NewYearsDayTest.php | 4 +- .../Neuchatel/PentecostMondayTest.php | 4 +- .../Switzerland/Neuchatel/WorkersDayTest.php | 4 +- .../Nidwalden/AllSaintsDayTest.php | 4 +- .../Nidwalden/AscensionDayTest.php | 4 +- .../Nidwalden/AssumptionOfMaryTest.php | 4 +- .../Nidwalden/ChristmasDayTest.php | 4 +- .../Nidwalden/CorpusChristiTest.php | 4 +- .../Nidwalden/EasterMondayTest.php | 4 +- .../Switzerland/Nidwalden/GoodFridayTest.php | 4 +- .../Nidwalden/ImmaculateConceptionTest.php | 4 +- .../Switzerland/Nidwalden/NewYearsDayTest.php | 4 +- tests/Switzerland/Nidwalden/NidwaldenTest.php | 11 +- .../Nidwalden/PentecostMondayTest.php | 4 +- .../Switzerland/Nidwalden/StJosephDayTest.php | 4 +- .../Nidwalden/StStephensDayTest.php | 4 +- .../Switzerland/Obwalden/AllSaintsDayTest.php | 4 +- .../Switzerland/Obwalden/AscensionDayTest.php | 4 +- .../Obwalden/AssumptionOfMaryTest.php | 4 +- .../Obwalden/BerchtoldsTagTest.php | 4 +- .../Obwalden/BruderKlausenFestTest.php | 4 +- .../Switzerland/Obwalden/ChristmasDayTest.php | 4 +- .../Obwalden/CorpusChristiTest.php | 4 +- .../Switzerland/Obwalden/EasterMondayTest.php | 4 +- tests/Switzerland/Obwalden/GoodFridayTest.php | 4 +- .../Obwalden/ImmaculateConceptionTest.php | 4 +- .../Switzerland/Obwalden/NewYearsDayTest.php | 4 +- tests/Switzerland/Obwalden/ObwaldenTest.php | 11 +- .../Obwalden/PentecostMondayTest.php | 4 +- .../Obwalden/StStephensDayTest.php | 4 +- .../Schaffhausen/AscensionDayTest.php | 4 +- .../Schaffhausen/BerchtoldsTagTest.php | 4 +- .../Schaffhausen/ChristmasDayTest.php | 4 +- .../Schaffhausen/EasterMondayTest.php | 4 +- .../Schaffhausen/GoodFridayTest.php | 4 +- .../Schaffhausen/NewYearsDayTest.php | 4 +- .../Schaffhausen/PentecostMondayTest.php | 4 +- .../Schaffhausen/SchaffhausenTest.php | 11 +- .../Schaffhausen/StStephensDayTest.php | 4 +- .../Schaffhausen/WorkersDayTest.php | 4 +- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 4 +- tests/Switzerland/Schwyz/AscensionDayTest.php | 4 +- .../Schwyz/AssumptionOfMaryTest.php | 4 +- tests/Switzerland/Schwyz/ChristmasDayTest.php | 4 +- .../Switzerland/Schwyz/CorpusChristiTest.php | 4 +- tests/Switzerland/Schwyz/EasterMondayTest.php | 4 +- tests/Switzerland/Schwyz/EpiphanyTest.php | 4 +- tests/Switzerland/Schwyz/GoodFridayTest.php | 4 +- .../Schwyz/ImmaculateConceptionTest.php | 4 +- tests/Switzerland/Schwyz/NewYearsDayTest.php | 4 +- .../Schwyz/PentecostMondayTest.php | 4 +- tests/Switzerland/Schwyz/SchwyzTest.php | 11 +- tests/Switzerland/Schwyz/StJosephDayTest.php | 4 +- .../Switzerland/Schwyz/StStephensDayTest.php | 4 +- .../Solothurn/AscensionDayTest.php | 4 +- .../Solothurn/BerchtoldsTagTest.php | 4 +- .../Solothurn/ChristmasDayTest.php | 4 +- .../Switzerland/Solothurn/GoodFridayTest.php | 4 +- .../Switzerland/Solothurn/NewYearsDayTest.php | 4 +- tests/Switzerland/Solothurn/SolothurnTest.php | 11 +- .../Switzerland/StGallen/AllSaintsDayTest.php | 4 +- .../Switzerland/StGallen/AscensionDayTest.php | 4 +- .../Switzerland/StGallen/ChristmasDayTest.php | 4 +- .../Switzerland/StGallen/EasterMondayTest.php | 4 +- tests/Switzerland/StGallen/GoodFridayTest.php | 4 +- .../Switzerland/StGallen/NewYearsDayTest.php | 4 +- .../StGallen/PentecostMondayTest.php | 4 +- tests/Switzerland/StGallen/StGallenTest.php | 11 +- .../StGallen/StStephensDayTest.php | 4 +- tests/Switzerland/SwissNationalDayTest.php | 4 +- tests/Switzerland/SwitzerlandTest.php | 11 +- .../Switzerland/Thurgau/AscensionDayTest.php | 4 +- .../Switzerland/Thurgau/BerchtoldsTagTest.php | 4 +- .../Switzerland/Thurgau/ChristmasDayTest.php | 4 +- .../Switzerland/Thurgau/EasterMondayTest.php | 4 +- tests/Switzerland/Thurgau/GoodFridayTest.php | 4 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 4 +- .../Thurgau/PentecostMondayTest.php | 4 +- .../Switzerland/Thurgau/StStephensDayTest.php | 4 +- tests/Switzerland/Thurgau/ThurgauTest.php | 11 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 4 +- tests/Switzerland/Ticino/AllSaintsDayTest.php | 4 +- tests/Switzerland/Ticino/AscensionDayTest.php | 4 +- .../Ticino/AssumptionOfMaryTest.php | 4 +- tests/Switzerland/Ticino/ChristmasDayTest.php | 4 +- .../Switzerland/Ticino/CorpusChristiTest.php | 4 +- tests/Switzerland/Ticino/EasterMondayTest.php | 4 +- tests/Switzerland/Ticino/EpiphanyTest.php | 4 +- .../Ticino/ImmaculateConceptionTest.php | 4 +- tests/Switzerland/Ticino/NewYearsDayTest.php | 4 +- .../Ticino/PentecostMondayTest.php | 4 +- tests/Switzerland/Ticino/StJosephDayTest.php | 4 +- tests/Switzerland/Ticino/StPeterPaulTest.php | 4 +- .../Switzerland/Ticino/StStephensDayTest.php | 4 +- tests/Switzerland/Ticino/TicinoTest.php | 11 +- tests/Switzerland/Ticino/WorkersDayTest.php | 4 +- tests/Switzerland/Uri/AllSaintsDayTest.php | 4 +- tests/Switzerland/Uri/AscensionDayTest.php | 4 +- .../Switzerland/Uri/AssumptionOfMaryTest.php | 4 +- tests/Switzerland/Uri/ChristmasDayTest.php | 4 +- tests/Switzerland/Uri/CorpusChristiTest.php | 4 +- tests/Switzerland/Uri/EasterMondayTest.php | 4 +- tests/Switzerland/Uri/EpiphanyTest.php | 4 +- tests/Switzerland/Uri/GoodFridayTest.php | 4 +- .../Uri/ImmaculateConceptionTest.php | 4 +- tests/Switzerland/Uri/NewYearsDayTest.php | 4 +- tests/Switzerland/Uri/PentecostMondayTest.php | 4 +- tests/Switzerland/Uri/StJosephDayTest.php | 4 +- tests/Switzerland/Uri/StStephensDayTest.php | 4 +- tests/Switzerland/Uri/UriTest.php | 11 +- tests/Switzerland/Valais/AllSaintsDayTest.php | 4 +- tests/Switzerland/Valais/AscensionDayTest.php | 4 +- .../Valais/AssumptionOfMaryTest.php | 4 +- tests/Switzerland/Valais/ChristmasDayTest.php | 4 +- .../Switzerland/Valais/CorpusChristiTest.php | 4 +- .../Valais/ImmaculateConceptionTest.php | 4 +- tests/Switzerland/Valais/NewYearsDayTest.php | 4 +- tests/Switzerland/Valais/StJosephDayTest.php | 4 +- tests/Switzerland/Valais/ValaisTest.php | 11 +- tests/Switzerland/Vaud/AscensionDayTest.php | 4 +- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 4 +- tests/Switzerland/Vaud/BettagsMontagTest.php | 4 +- tests/Switzerland/Vaud/ChristmasDayTest.php | 4 +- tests/Switzerland/Vaud/EasterMondayTest.php | 4 +- tests/Switzerland/Vaud/GoodFridayTest.php | 4 +- tests/Switzerland/Vaud/NewYearsDayTest.php | 4 +- .../Switzerland/Vaud/PentecostMondayTest.php | 4 +- tests/Switzerland/Vaud/VaudTest.php | 11 +- tests/Switzerland/Zug/AllSaintsDayTest.php | 4 +- tests/Switzerland/Zug/AscensionDayTest.php | 4 +- .../Switzerland/Zug/AssumptionOfMaryTest.php | 4 +- tests/Switzerland/Zug/BerchtoldsTagTest.php | 4 +- tests/Switzerland/Zug/ChristmasDayTest.php | 4 +- tests/Switzerland/Zug/CorpusChristiTest.php | 4 +- tests/Switzerland/Zug/EasterMondayTest.php | 4 +- tests/Switzerland/Zug/GoodFridayTest.php | 4 +- .../Zug/ImmaculateConceptionTest.php | 4 +- tests/Switzerland/Zug/NewYearsDayTest.php | 4 +- tests/Switzerland/Zug/PentecostMondayTest.php | 4 +- tests/Switzerland/Zug/StStephensDayTest.php | 4 +- tests/Switzerland/Zug/ZugTest.php | 11 +- tests/Switzerland/Zurich/AscensionDayTest.php | 4 +- tests/Switzerland/Zurich/ChristmasDayTest.php | 4 +- tests/Switzerland/Zurich/EasterMondayTest.php | 4 +- tests/Switzerland/Zurich/GoodFridayTest.php | 4 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 4 +- .../Zurich/PentecostMondayTest.php | 4 +- .../Switzerland/Zurich/StStephensDayTest.php | 4 +- tests/Switzerland/Zurich/WorkersDayTest.php | 4 +- tests/Switzerland/Zurich/ZurichTest.php | 11 +- tests/USA/ChristmasDayTest.php | 4 +- tests/USA/ColumbusDayTest.php | 4 +- tests/USA/IndependenceDayTest.php | 4 +- tests/USA/LabourDayTest.php | 4 +- tests/USA/MartinLutherKingDayTest.php | 4 +- tests/USA/MemorialDayTest.php | 4 +- tests/USA/NewYearsDayTest.php | 4 +- tests/USA/ThanksgivingDayTest.php | 4 +- tests/USA/USATest.php | 11 +- tests/USA/VeteransDayTest.php | 4 +- tests/USA/WashingtonsBirthdayTest.php | 4 +- tests/Ukraine/CatholicChristmasDayTest.php | 4 +- tests/Ukraine/ChristmasDayTest.php | 4 +- tests/Ukraine/ConstitutionDayTest.php | 4 +- tests/Ukraine/DefenderOfUkraineDayTest.php | 4 +- tests/Ukraine/EasterTest.php | 4 +- tests/Ukraine/IndependenceDayTest.php | 4 +- tests/Ukraine/InternationalWomensDayTest.php | 4 +- tests/Ukraine/InternationalWorkersDayTest.php | 4 +- tests/Ukraine/NewYearsDayTest.php | 4 +- tests/Ukraine/PentecostTest.php | 4 +- .../SecondInternationalWorkersDayTest.php | 4 +- tests/Ukraine/SubstitutedHolidayTest.php | 4 +- tests/Ukraine/UkraineTest.php | 11 +- tests/Ukraine/VictoryDayTest.php | 4 +- tests/UnitedKingdom/BoxingDayTest.php | 4 +- tests/UnitedKingdom/ChristmasDayTest.php | 4 +- tests/UnitedKingdom/EasterMondayTest.php | 4 +- tests/UnitedKingdom/England/BoxingDayTest.php | 4 +- .../England/ChristmasDayTest.php | 4 +- .../England/EasterMondayTest.php | 4 +- tests/UnitedKingdom/England/EnglandTest.php | 11 +- .../UnitedKingdom/England/GoodFridayTest.php | 4 +- .../England/MayDayBankHolidayTest.php | 4 +- .../UnitedKingdom/England/NewYearsDayTest.php | 4 +- .../England/SpringBankHolidayTest.php | 4 +- .../England/SummerBankHolidayTest.php | 4 +- tests/UnitedKingdom/GoodFridayTest.php | 4 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 4 +- tests/UnitedKingdom/NewYearsDayTest.php | 4 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 4 +- .../NorthernIreland/BoxingDayTest.php | 4 +- .../NorthernIreland/ChristmasDayTest.php | 4 +- .../NorthernIreland/EasterMondayTest.php | 4 +- .../NorthernIreland/GoodFridayTest.php | 4 +- .../NorthernIreland/MayDayBankHolidayTest.php | 4 +- .../NorthernIreland/NewYearsDayTest.php | 4 +- .../NorthernIreland/NorthernIrelandTest.php | 11 +- .../NorthernIreland/SpringBankHolidayTest.php | 4 +- .../NorthernIreland/StPatricksDayTest.php | 4 +- .../NorthernIreland/SummerBankHolidayTest.php | 4 +- .../UnitedKingdom/Scotland/BoxingDayTest.php | 4 +- .../Scotland/ChristmasDayTest.php | 4 +- .../UnitedKingdom/Scotland/GoodFridayTest.php | 4 +- .../Scotland/MayDayBankHolidayTest.php | 4 +- .../Scotland/NewYearsDayTest.php | 4 +- tests/UnitedKingdom/Scotland/ScotlandTest.php | 11 +- .../Scotland/SecondNewYearsDayTest.php | 4 +- .../Scotland/SpringBankHolidayTest.php | 4 +- .../Scotland/StAndrewsDayTest.php | 4 +- .../Scotland/SummerBankHolidayTest.php | 4 +- tests/UnitedKingdom/SpringBankHolidayTest.php | 4 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 4 +- tests/UnitedKingdom/UnitedKingdomTest.php | 11 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 4 +- .../UnitedKingdom/Wales/ChristmasDayTest.php | 4 +- .../UnitedKingdom/Wales/EasterMondayTest.php | 4 +- tests/UnitedKingdom/Wales/GoodFridayTest.php | 4 +- .../Wales/MayDayBankHolidayTest.php | 4 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 4 +- .../Wales/SpringBankHolidayTest.php | 4 +- .../Wales/SummerBankHolidayTest.php | 4 +- tests/UnitedKingdom/Wales/WalesTest.php | 11 +- tests/YasumiBase.php | 16 +++ 1084 files changed, 4760 insertions(+), 1920 deletions(-) create mode 100644 b.php create mode 100644 tests/Austria/Burgenland/BurgenlandTest.php create mode 100644 tests/Austria/Carinthia/CarinthiaTest.php create mode 100644 tests/Austria/LowerAustria/LowerAustriaTest.php create mode 100644 tests/Austria/Salzburg/SalzburgTest.php create mode 100644 tests/Austria/Styria/StyriaTest.php create mode 100644 tests/Austria/Tyrol/TyrolTest.php create mode 100644 tests/Austria/UpperAustria/UpperAustriaTest.php create mode 100644 tests/Austria/Vienna/ViennaTest.php create mode 100644 tests/Austria/Vorarlberg/VorarlbergTest.php create mode 100644 tests/Croatia/CroatiaTest.php rename tests/{YasumiTestCaseInterface.php => HolidayTestCase.php} (95%) create mode 100644 tests/ProviderTestCase.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f5f6d22d..a2c32eaca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added +- All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. + ### Changed +- Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. +- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. + ### Fixed ### Deprecated diff --git a/b.php b/b.php new file mode 100644 index 000000000..13e341db8 --- /dev/null +++ b/b.php @@ -0,0 +1,91 @@ + 'Test', $i], +// new DateTimeImmutable()); +// //$doc = new stdClass(); + + $doc = Yasumi::create('Australia', $i); + + $docs[] = $doc; +} + +$start = $finis = 0; + +$mem_empty = memory_get_usage(); + +// Load the SplObjectStorage +$start = microtime(true); +foreach ($docs as $d) { + $sos->attach($d); +} +$finis = microtime(true); + +$time_to_fill = $finis - $start; + +echo $sos->count(); +echo $sos->getInfo(); + +// Check membership on the object storage +$start = microtime(true); +foreach ($docs as $d) { + $sos->contains($d); +} + +$finis = microtime(true); + +$time_to_check = $finis - $start; + +$mem_spl = memory_get_usage(); + +$mem_used = $mem_spl - $mem_empty; + +printf("SplObjectStorage:\nTime to fill: %0.12f.\nTime to check: %0.12f.\nMemory: %d\n\n", $time_to_fill, $time_to_check, $mem_used); + +unset($sos); +$mem_empty = memory_get_usage(); + +// Test arrays: +$start = microtime(true); +$arr = []; + +// Load the array +foreach ($docs as $d) { + $arr[spl_object_hash($d)] = $d; +} +$finis = microtime(true); + +$time_to_fill = $finis - $start; + +// Check membership on the array +$start = microtime(true); +foreach ($docs as $d) { + //$arr[spl_object_hash($d)]; + isset($arr[spl_object_hash($d)]); +} + +$finis = microtime(true); + +$time_to_check = $finis - $start; +$mem_arr = memory_get_usage(); + +$mem_used = $mem_arr - $mem_empty; + +printf("Arrays:\nTime to fill: %0.12f.\nTime to check: %0.12f.\nMemory: %d\n\n", $time_to_fill, $time_to_check, $mem_used); diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 728b91d2c..05a8909b7 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -56,6 +56,13 @@ public function initialize(): void $this->calculateChristmasDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Australia', + ]; + } + /** * Holidays associated with the start of the modern Gregorian calendar. * diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 8e2ac0991..e3441614d 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -68,6 +68,14 @@ public function initialize(): void $this->calculateNationalDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Austria', + 'https://de.wikipedia.org/wiki/Feiertage_in_%C3%96sterreich', + ]; + } + /** * Saint Leopold's Day. * diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 2d0d3f6be..f6f14c3bf 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -71,4 +71,11 @@ public function initialize(): void 'nl' => 'nationale feestdag', ], new DateTime("$this->year-7-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Belgium', + ]; + } } diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index fe6216cef..34b903ccb 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -99,4 +99,12 @@ public function initialize(): void 'bs_Latn' => 'Praznik rada - drugi dan', ], new DateTime("$this->year-05-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Bosnia_and_Herzegovina', + 'https://bs.wikipedia.org/wiki/Praznici_i_blagdani_u_Bosni_i_Hercegovini', + ]; + } } diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 9dc235d32..19a55fbca 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -176,4 +176,11 @@ public function initialize(): void )); } } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Brazil', + ]; + } } diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index b80faf036..1f3997eac 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -62,6 +62,13 @@ public function initialize(): void $this->calculateRemembranceDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Canada', + ]; + } + /** * Family Day. * diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index ccc44e4e6..20da58d42 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -24,7 +24,7 @@ /** * Provider for all holidays in Alberta (Canada). * - * Manitoba is a province of Canada. + * Alberta is a province of Canada. * * @see https://en.wikipedia.org/wiki/Alberta */ diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index 9247a64df..53bd0b6a7 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -25,7 +25,7 @@ /** * Provider for all holidays in Newfoundland and Labrador (Canada). * - * Manitoba is a province of Canada. + * Newfoundland and Labrador is a province of Canada. * * @see https://en.wikipedia.org/wiki/Newfoundland_and_Labrador */ diff --git a/src/Yasumi/Provider/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php index aef33f195..6fbfaad67 100644 --- a/src/Yasumi/Provider/Canada/NorthwestTerritories.php +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -21,7 +21,7 @@ /** * Provider for all holidays in Northwest Territories (Canada). * - * Northwest Territories is a territory of Canada. + * Northwest Territories is a province of Canada. * * @see https://en.wikipedia.org/wiki/Northwest_Territories */ diff --git a/src/Yasumi/Provider/Canada/Nunavut.php b/src/Yasumi/Provider/Canada/Nunavut.php index 38998ee5d..13ab545d8 100644 --- a/src/Yasumi/Provider/Canada/Nunavut.php +++ b/src/Yasumi/Provider/Canada/Nunavut.php @@ -21,7 +21,7 @@ /** * Provider for all holidays in Nunavut (Canada). * - * Nunavut is a territory of Canada. + * Nunavut is a province of Canada. * * @see https://en.wikipedia.org/wiki/Nunavut */ diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index 46e705b69..795e88b2d 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -24,7 +24,7 @@ /** * Provider for all holidays in Yukon (Canada). * - * Manitoba is a territory of Canada. + * Yukon is a province of Canada. * * @see https://en.wikipedia.org/wiki/Yukon */ diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 1f7538ebf..518007e46 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -77,6 +77,15 @@ public function initialize(): void $this->calculateRemembranceDayForHomelandWarVictims(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Croatia', + 'https://sh.wikipedia.org/wiki/Praznici_u_Hrvatskoj', + 'https://hr.wikipedia.org/wiki/Blagdani_i_spomendani_u_Hrvatskoj', + ]; + } + /** * Starting from the year 2020. statehood day is celebrated at a new date * Source: https://narodne-novine.nn.hr/clanci/sluzbeni/2019_11_110_2212.html. diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 40ed77edc..5a8b34f9f 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -65,6 +65,14 @@ public function initialize(): void $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic', + 'https://cs.wikipedia.org/wiki/%C4%8Cesk%C3%BD_st%C3%A1tn%C3%AD_sv%C3%A1tek', + ]; + } + /** * Day of renewal of independent Czech state. * diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index d357f6c58..c4c07848e 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -76,6 +76,13 @@ public function initialize(): void } } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Denmark', + ]; + } + /** * Great Prayer Day. * diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 7b75c8478..0c792be89 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -64,6 +64,14 @@ public function initialize(): void $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Estonia', + 'https://et.wikipedia.org/wiki/Eesti_riigip%C3%BChad', + ]; + } + /** * @throws \InvalidArgumentException * @throws \Exception diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 378486cea..4c33d0d5b 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -65,6 +65,14 @@ public function initialize(): void $this->calculateIndependenceDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Finland', + 'https://fi.wikipedia.org/wiki/Suomen_juhlap%C3%A4iv%C3%A4t', + ]; + } + /** * St. John's Day / Midsummer. * diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 9e920545e..62ba882cc 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -70,6 +70,14 @@ public function initialize(): void $this->calculateBastilleDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_France', + 'https://fr.wikipedia.org/wiki/F%C3%AAtes_et_jours_f%C3%A9ri%C3%A9s_en_France', + ]; + } + /** * French National Day. * diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 8f513eadb..1b8831787 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -63,6 +63,15 @@ public function initialize(): void $this->addStGeorgesDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Georgia_(country)', + 'https://ka.wikipedia.org/wiki/%E1%83%A3%E1%83%A5%E1%83%9B%E1%83%94_%E1%83%93%E1%83%A6%E1%83%94%E1%83%94%E1%83%91%E1%83%98_%E1%83%A1%E1%83%90%E1%83%A5%E1%83%90%E1%83%A0%E1%83%97%E1%83%95%E1%83%94%E1%83%9A%E1%83%9D%E1%83%A8%E1%83%98', + 'https://xmf.wikipedia.org/wiki/%E1%83%9D%E1%83%A4%E1%83%98%E1%83%AA%E1%83%98%E1%83%90%E1%83%9A%E1%83%A3%E1%83%A0%E1%83%98_%E1%83%A3%E1%83%A5%E1%83%95%E1%83%98_%E1%83%93%E1%83%A6%E1%83%90%E1%83%9A%E1%83%94%E1%83%A4%E1%83%98_%E1%83%A1%E1%83%90%E1%83%A5%E1%83%9D%E1%83%A0%E1%83%97%E1%83%A3%E1%83%9D%E1%83%A1', + ]; + } + /** * @throws \Exception */ diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 249845502..23a2c89e1 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -69,6 +69,14 @@ public function initialize(): void } } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Germany', + 'https://de.wikipedia.org/wiki/Gesetzliche_Feiertage_in_Deutschland', + ]; + } + /** * German Unity Day. * diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 9bc3ac0bc..852f2244d 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -70,6 +70,14 @@ public function initialize(): void $this->calculatePolytechnio(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Greece', + 'https://el.wikipedia.org/wiki/%CE%95%CF%80%CE%AF%CF%83%CE%B7%CE%BC%CE%B5%CF%82_%CE%B1%CF%81%CE%B3%CE%AF%CE%B5%CF%82_%CF%83%CF%84%CE%B7%CE%BD_%CE%95%CE%BB%CE%BB%CE%AC%CE%B4%CE%B1', + ]; + } + /** * The Three Holy Hierarchs. * diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index 8835f3cbe..bf67d4be3 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -93,4 +93,12 @@ public function initialize(): void ], new DateTime("$this->year-10-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Hungary', + 'https://hu.wikipedia.org/wiki/Magyarorsz%C3%A1gi_%C3%BCnnepek_%C3%A9s_eml%C3%A9knapok_list%C3%A1ja', + ]; + } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 71d8cff59..fc8693937 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -77,6 +77,13 @@ public function initialize(): void $this->calculateOctoberHoliday(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Ireland', + ]; + } + /** * New Years Day. * diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 5307cda8a..f60d6f1cb 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -64,6 +64,14 @@ public function initialize(): void $this->calculateRepublicDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Italy', + 'https://it.wikipedia.org/wiki/Festivit%C3%A0_in_Italia', + ]; + } + /** * Liberation Day. * diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 6c8a79ecc..016cbf476 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -110,6 +110,14 @@ public function initialize(): void $this->calculateBridgeHolidays(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Japan', + 'https://ja.wikipedia.org/wiki/%E5%9B%BD%E6%B0%91%E3%81%AE%E7%A5%9D%E6%97%A5', + ]; + } + /** * National Foundation Day. National Foundation Day is held on February 11th and established since 1966. * diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 3c4899155..67cf025be 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -63,6 +63,14 @@ public function initialize(): void $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Latvia', + 'https://lt.wikipedia.org/wiki/S%C4%85ra%C5%A1as:Latvijos_%C5%A1vent%C4%97s', + ]; + } + /** * On 4 May 1990. Latvia proclaimed its independence from the USSR, and restoration of the Republic of Latvia. * If the day is on the weekend the next Monday is a holiday. diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 4564cc0bb..37870dbe0 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -80,6 +80,14 @@ public function initialize(): void $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Lithuania', + 'https://lt.wikipedia.org/wiki/S%C4%85ra%C5%A1as:Lietuvos_%C5%A1vent%C4%97s', + ]; + } + /** * The Act of Reinstating Independence of Lithuania was signed on February 16, 1918. * diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index a6f49fb33..ae9a6f28f 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -61,6 +61,14 @@ public function initialize(): void $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Luxembourg', + 'https://lb.wikipedia.org/wiki/Gesetzlech_Feierdeeg_zu_L%C3%ABtzebuerg', + ]; + } + /** * Europe Day. * diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 0e96f23d7..991edefd2 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -89,6 +89,14 @@ public function initialize(): void $this->calculateCommemorationLiberationDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_the_Netherlands', + 'https://nl.wikipedia.org/wiki/Feestdagen_in_Nederland', + ]; + } + /** * Carnival. * diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index da08603d4..158af79aa 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -59,6 +59,13 @@ public function initialize(): void $this->calculateChristmasHolidays(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_New_Zealand', + ]; + } + /** * Holidays associated with the start of the modern Gregorian calendar. * diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 85646b59a..ba08d33e3 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -64,6 +64,14 @@ public function initialize(): void $this->calculateConstitutionDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Norway', + 'https://no.wikipedia.org/wiki/Helligdager_i_Norge', + ]; + } + /** * Constitution Day. * diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index b1ad6110c..e04748308 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -65,6 +65,14 @@ public function initialize(): void $this->calculateConstitutionDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Poland', + 'https://pl.wikipedia.org/wiki/Dni_wolne_od_pracy_w_Polsce', + ]; + } + /** * Constitution Day. * diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 5c1ffe721..fc203cd5d 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -21,8 +21,6 @@ /** * Holidays for Portugal. - * - * @see https://pt.wikipedia.org/wiki/Feriados_em_Portugal */ class Portugal extends AbstractProvider { @@ -62,6 +60,14 @@ public function initialize(): void $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Portugal', + 'https://pt.wikipedia.org/wiki/Feriados_em_Portugal', + ]; + } + /** * Carnation Revolution (25th of April 1974) / Revolução dos Cravos (25 de Abril 1974). * diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 3a811a9a1..119341ddd 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -76,6 +76,14 @@ public function initialize(): void $this->calculateChildrensDay(); // Since 18.11.2016 (Law 220/2016), Celebrated on 1st of June } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Romania', + 'https://ro.wikipedia.org/wiki/S%C4%83rb%C4%83tori_publice_%C3%AEn_Rom%C3%A2nia', + ]; + } + /** * @throws \Exception */ diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index e5d0846e9..cc5eaacef 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -59,6 +59,14 @@ public function initialize(): void $this->addUnityDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Russia', + 'https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D0%B8', + ]; + } + /** * @throws \InvalidArgumentException * @throws \Exception diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index d42ea2f12..e79a5bfd6 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -107,6 +107,14 @@ public function initialize(): void $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Slovakia', + 'https://cs.wikipedia.org/wiki/St%C3%A1tn%C3%AD_sv%C3%A1tky_Slovenska', + ]; + } + /** * New Year's Day. * diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 86aab67f2..0b4f2fbfe 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -80,6 +80,15 @@ public function initialize(): void $this->calculateSubstituteHolidays(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_South_Africa', + 'https://af.wikipedia.org/wiki/Lys_van_openbare_vakansiedae_in_Suid-Afrika', + 'https://zu.wikipedia.org/wiki/Amaholide_omphakathi_eNingizimu_Afrika', + ]; + } + /** * Human Rights Day. * diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index ad479a021..40f80cf6a 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -152,6 +152,14 @@ public function initialize(): void $this->calculateSubstituteHolidays(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_South_Korea', + 'https://ko.wikipedia.org/wiki/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EC%9D%98_%EA%B3%B5%ED%9C%B4%EC%9D%BC', + ]; + } + /** * 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. diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 0894306ea..ebb5b792a 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -64,6 +64,13 @@ public function initialize(): void $this->calculateConstitutionDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Spain', + ]; + } + /** * National Day. * diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 9726d64d8..ee90cac4d 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -71,6 +71,14 @@ public function initialize(): void $this->calculateNationalDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Sweden', + 'https://sv.wikipedia.org/wiki/Helgdagar_i_Sverige', + ]; + } + /** * Epiphany Eve. * diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index 7380c8a31..dc641e24f 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -109,6 +109,15 @@ public function calculateBettagsMontag(): void } } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Switzerland', + 'https://fr.wikipedia.org/wiki/Jours_f%C3%A9ri%C3%A9s_en_Suisse', + 'https://it.wikipedia.org/wiki/Festivit%C3%A0_in_Svizzera', + ]; + } + /** * Swiss National Day. * diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index c65109ad0..92b7ee6bd 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -66,6 +66,13 @@ public function initialize(): void $this->calculateSubstituteHolidays(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_the_United_States', + ]; + } + /** * Dr. Martin Luther King Day. * diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index c90e7a321..5886a08bc 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -22,7 +22,6 @@ /** * Provider for all holidays in Ukraine. - * https://en.wikipedia.org/wiki/Public_holidays_in_Ukraine. * * Class Ukraine * @@ -71,6 +70,14 @@ public function initialize(): void $this->calculateCatholicChristmasDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Ukraine', + 'https://uk.wikipedia.org/wiki/%D0%9D%D0%B5%D1%80%D0%BE%D0%B1%D0%BE%D1%87%D1%96_%D0%B4%D0%BD%D1%96_%D0%B2_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%96', + ]; + } + /** * Adds a holiday to the holidays providers (i.e. country/state) list of holidays. * diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index c96875b7d..959b91ff1 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -60,6 +60,13 @@ public function initialize(): void $this->calculateChristmasHolidays(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom', + ]; + } + /** * 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 diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 05147b943..6d2367d8d 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -69,6 +69,11 @@ public function initialize(): void $this->calculateChristmasHolidays(Holiday::TYPE_BANK); } + public function getSources(): array + { + return ['https://en.wikipedia.org/wiki/Public_and_bank_holidays_in_Scotland']; + } + /** * 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 @@ -77,7 +82,6 @@ public function initialize(): void * 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. * - * @see https://en.wikipedia.org/wiki/Public_holidays_in_Scotland * @see https://www.timeanddate.com/holidays/uk/new-year-day * * @throws InvalidDateException @@ -139,7 +143,6 @@ protected function calculateNewYearsHolidays(): void * to have a day off work or school. In Scotland it falls on the first Monday of August. * * @see https://www.timeanddate.com/holidays/uk/summer-bank-holiday - * @see https://en.wikipedia.org/wiki/Public_holidays_in_Scotland * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/UnitedKingdom/Wales.php b/src/Yasumi/Provider/UnitedKingdom/Wales.php index 02a8251cc..b8da27bfc 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Wales.php +++ b/src/Yasumi/Provider/UnitedKingdom/Wales.php @@ -32,4 +32,11 @@ class Wales extends UnitedKingdom * country or sub-region. */ public const ID = 'GB-WLS'; + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Holidays_in_Wales', + ]; + } } diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index a88be0cf5..93a340460 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -27,4 +27,12 @@ interface ProviderInterface * Initialize country holidays. */ public function initialize(): void; + + /** + * Returns a list of sources (i.e. references to websites, books, scientific papers, etc.) that are + * used for determining the calculation logic of the providers' holidays. + * + * @return array a list of external sources (empty when no sources are defined) + */ + public function getSources(): array; } diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 3300b48b8..969c74e35 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing ANZAC day in Australia. */ -class AnzacDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class AnzacDayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 8c77ab378..6b0c79759 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Australia day in Australia. */ -class AustraliaDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class AustraliaDayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 5ae18ba29..bb5c270d3 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Australia. */ -class AustraliaTest extends AustraliaBaseTestCase +class AustraliaTest extends AustraliaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -92,4 +93,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], $this->region, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); // TODO: Investigate why not a constant is used for region. + } } diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index 024c4edc5..4b7d23ffd 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Australian Capital Territory (Australia). */ -class AustralianCapitalTerritoryTest extends AustralianCapitalTerritoryBaseTestCase +class AustralianCapitalTerritoryTest extends AustralianCapitalTerritoryBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -58,4 +59,12 @@ public function testOfficialHolidays(): void 'reconciliationDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index e015cc404..8e3ac4f76 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Canberra Day in Australian Capital Territory (Australia).. */ -class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface +class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index 3a776ba02..3308f62f6 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Saturday in Australian Capital Territory (Australia).. */ -class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index 59d795f3b..6524512ea 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Sunday in Australian Capital Territory (Australia).. */ -class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface +class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index 5d64777f2..0d7d895cf 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in Australian Capital Territory (Australia).. */ -class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index 7400a33cd..b70260403 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in Australian Capital Territory (Australia).. */ -class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index b14e066ed..d9c0f721c 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reconciliation Day in Australian Capital Territory (Australia).. */ -class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase implements YasumiTestCaseInterface +class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 651c3f70f..0ff4538a5 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in Australia. */ -class BoxingDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 60b6f2658..cd75a88fc 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Australia. */ -class ChristmasDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index cd7287728..2a28ed28a 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Monday in Australia. */ -class EasterMondayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index ef40913c1..95939662c 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in Australia. */ -class GoodFridayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index 07f54172f..aad26cc22 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Bank Holiday in New South Wales (Australia).. */ -class BankHolidayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface +class BankHolidayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index 64a7e3680..d8e667cf7 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Saturday in New South Wales (Australia).. */ -class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index 1385d7c35..c13e4a7a0 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Sunday in New South Wales (Australia).. */ -class EasterSundayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface +class EasterSundayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index 0e5cdf432..9379454b0 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in New South Wales (Australia).. */ -class LabourDayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index d6e1efbb1..ba65f0efd 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in New South Wales (Australia). */ -class NewSouthWalesTest extends NewSouthWalesBaseTestCase +class NewSouthWalesTest extends NewSouthWalesBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -68,4 +69,12 @@ public function testBankHolidays(): void 'bankHoliday', ], $this->region, $this->year, Holiday::TYPE_BANK); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index e8c134d0b..4b9b2d084 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in New South Wales (Australia).. */ -class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index c341155f7..e4e73121f 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Australia. */ -class NewYearsDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends AustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 64499bc49..edfa515e6 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Saturday in Northern Territory (Australia). */ -class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index 5e2e8d0e7..8fb90b9b7 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing May Day in Northern Territory (Australia). */ -class MayDayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface +class MayDayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index 2a03db0f8..36fdf3e7c 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Northern Territory (Australia). */ -class NorthernTerritoryTest extends NorthernTerritoryBaseTestCase +class NorthernTerritoryTest extends NorthernTerritoryBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'picnicDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index 67eece8aa..46656aa32 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Picnic Day in Northern Territory (Australia). */ -class PicnicDayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface +class PicnicDayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index a4e8bbf77..2c81a6030 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in Northern Territory (Australia). */ -class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 074f170f2..3bcedd702 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Queensland (Australia). */ -class BrisbaneTest extends BrisbaneBaseTestCase +class BrisbaneTest extends BrisbaneBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -55,4 +56,12 @@ public function testOfficialHolidays(): void 'peoplesDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 36032a64b..bbb8fc2ac 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ekka People's Day in Brisbane (Australia).. */ -class PeoplesDayTest extends BrisbaneBaseTestCase implements YasumiTestCaseInterface +class PeoplesDayTest extends BrisbaneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index ac6e3c17e..572ae2bcc 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in Queensland (Australia).. */ -class LabourDayTest extends QueenslandBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends QueenslandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index a15c02f3b..e65eb3b1c 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in Queensland (Australia).. */ -class QueensBirthdayTest extends QueenslandBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends QueenslandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index db10125de..61033b629 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Queensland (Australia). */ -class QueenslandTest extends QueenslandBaseTestCase +class QueenslandTest extends QueenslandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -54,4 +55,12 @@ public function testOfficialHolidays(): void 'labourDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index fd51be9ef..6c38de0e1 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Adelaide Cup Day in South Australia (Australia).. */ -class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface +class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 4335cef41..87cce2c6f 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in South Australia. */ -class ChristmasDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index 7de574be6..e12529967 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Saturday in South Australia (Australia).. */ -class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index fbb3f2a2a..8e01eee21 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in South Australia (Australia).. */ -class LabourDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index add6f2454..3a0723a40 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Proclamation Day in South Australia (Australia).. */ -class ProclamationDayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface +class ProclamationDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index 82bda8921..69c34060b 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in South Australia (Australia).. */ -class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index a89360dbf..ea474e451 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in South Australia (Australia). */ -class SouthAustraliaTest extends SouthAustraliaBaseTestCase +class SouthAustraliaTest extends SouthAustraliaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'adelaideCup', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 76ff838e2..600ac7bbb 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in central north Tasmania (Australia). */ -class CentralNorthTest extends CentralNorthBaseTestCase +class CentralNorthTest extends CentralNorthBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'devonportShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index a6aaaf31d..cf531467c 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Devonport Show Day in central north Tasmania (Australia).. */ -class DevonportShowTest extends CentralNorthBaseTestCase implements YasumiTestCaseInterface +class DevonportShowTest extends CentralNorthBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 87cec65e2..489822179 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Eight Hour Day in Tasmania (Australia).. */ -class EightHourDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseInterface +class EightHourDayTest extends TasmaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index f3109d846..80675d26f 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Flinders Island Show Day in Flinders Island (Australia).. */ -class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements YasumiTestCaseInterface +class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 9a39a64a2..5b6223935 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Flinders Island (Australia). */ -class FlindersIslandTest extends FlindersIslandBaseTestCase +class FlindersIslandTest extends FlindersIslandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'flindersIslandShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 2cd09626b..9e74c6c9c 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing King Island Show Day in King Island (Australia).. */ -class KingIslandShowTest extends KingIslandBaseTestCase implements YasumiTestCaseInterface +class KingIslandShowTest extends KingIslandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index dc322aa78..45da08d57 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Flinders Island (Australia). */ -class KingIslandTest extends KingIslandBaseTestCase +class KingIslandTest extends KingIslandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'kingIslandShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 42e3f270f..300efab48 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Launceston Show Day in northeastern Tasmania (Australia).. */ -class LauncestonShowTest extends NortheastBaseTestCase implements YasumiTestCaseInterface +class LauncestonShowTest extends NortheastBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index 7f4c3338e..1155b69e7 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in northeastern Tasmania (Australia). */ -class NortheastTest extends NortheastBaseTestCase +class NortheastTest extends NortheastBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'launcestonShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index ebf413777..dab09ccda 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Burnie Show Day in northwestern Tasmania (Australia).. */ -class BurnieShowTest extends NorthwestBaseTestCase implements YasumiTestCaseInterface +class BurnieShowTest extends NorthwestBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 312bdeb33..a09019031 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing AGFEST in northwestern Tasmania (Australia).. */ -class AGFESTTest extends CircularHeadBaseTestCase implements YasumiTestCaseInterface +class AGFESTTest extends CircularHeadBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index dcd6e62df..fe15d724c 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in northwestern Tasmania (Australia). */ -class NorthwestTest extends NorthwestBaseTestCase +class NorthwestTest extends NorthwestBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'burnieShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 71baaa6a7..5c8bdfdc9 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in Tasmania (Australia).. */ -class QueensBirthdayTest extends TasmaniaBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends TasmaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 582bfc3fa..e0e2b1bae 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Recreation Day in Tasmania (Australia).. */ -class RecreationDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseInterface +class RecreationDayTest extends TasmaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index ca8f85757..1b9481c56 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Royal Hobart Show Day in southern Tasmania (Australia).. */ -class HobartShowTest extends SouthBaseTestCase implements YasumiTestCaseInterface +class HobartShowTest extends SouthBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 29a10ca27..4c8e08970 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in southern Tasmania (Australia). */ -class SouthTest extends SouthBaseTestCase +class SouthTest extends SouthBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -56,4 +57,12 @@ public function testOfficialHolidays(): void 'hobartShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 996c8c3fb..9faf79ded 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Burnie Show Day in northwestern Tasmania (Australia).. */ -class HobartRegattaTest extends SoutheastBaseTestCase implements YasumiTestCaseInterface +class HobartRegattaTest extends SoutheastBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 3def2f1f3..c8ccc9d9d 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Tasmania (Australia). */ -class TasmaniaTest extends TasmaniaBaseTestCase +class TasmaniaTest extends TasmaniaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -55,4 +56,12 @@ public function testOfficialHolidays(): void 'recreationDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index ad3e6c909..3b99ae88c 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing AFL Grand Final Friday in Victoria (Australia).. */ -class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterface +class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index 28f5f2e06..292272fbe 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Saturday in Victoria (Australia).. */ -class EasterSaturdayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterface +class EasterSaturdayTest extends VictoriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index d06073f4d..7b1ab95eb 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Sunday in Victoria (Australia).. */ -class EasterSundayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterface +class EasterSundayTest extends VictoriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index bd87c7cd1..63f5d4744 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in Victoria (Australia).. */ -class LabourDayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends VictoriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index f8422b8ef..38703302a 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Melbourne cup Day in Victoria (Australia).. */ -class MelbourneCupDayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterface +class MelbourneCupDayTest extends VictoriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index f6424a1ec..a0504fda9 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in Victoria (Australia).. */ -class QueensBirthdayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends VictoriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 6b3a11c2a..fff3a38ba 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Victoria (Australia). */ -class VictoriaTest extends VictoriaBaseTestCase +class VictoriaTest extends VictoriaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -58,4 +59,12 @@ public function testOfficialHolidays(): void 'melbourneCup', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index b224e3bb6..b33c1e702 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in Western Australia (Australia).. */ -class LabourDayTest extends WesternAustraliaBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends WesternAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index 983e789cb..62f4b03b6 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Birthday in Western Australia (Australia).. */ -class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index 32e99069d..60d5a47c9 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Western Australia Day in Western Australia (Australia).. */ -class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements YasumiTestCaseInterface +class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index 535982c61..3e1537132 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Western Australia (Australia). */ -class WesternAustraliaTest extends WesternAustraliaBaseTestCase +class WesternAustraliaTest extends WesternAustraliaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -55,4 +56,12 @@ public function testOfficialHolidays(): void 'westernAustraliaDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources($this->region, 1); + } } diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 8f738da46..a37b73175 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Austria. */ -class AllSaintsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index 3e11d901b..61c5b9457 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Austria. */ -class AscensionDayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 8c76b086b..85811a5b3 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Austria. */ -class AssumptionOfMaryTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 9d1b9ba29..211fbf7e1 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Austria. */ -class AustriaTest extends AustriaBaseTestCase +class AustriaTest extends AustriaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Austria/Burgenland/BurgenlandTest.php b/tests/Austria/Burgenland/BurgenlandTest.php new file mode 100644 index 000000000..56f76db03 --- /dev/null +++ b/tests/Austria/Burgenland/BurgenlandTest.php @@ -0,0 +1,116 @@ + + */ + +namespace Yasumi\tests\Austria\Burgenland; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Burgenland (Austria). + */ +class BurgenlandTest extends BurgenlandBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Burgenland (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + 'stMartinsDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Burgenland (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Burgenland (Austria) 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 Burgenland (Austria) 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 Burgenland (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index ba8fe7fbd..7ee5599c2 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing st Martins Day in the Netherlands. */ -class stMartinsDayTest extends BurgenlandBaseTestCase implements YasumiTestCaseInterface +class stMartinsDayTest extends BurgenlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Carinthia/CarinthiaTest.php b/tests/Austria/Carinthia/CarinthiaTest.php new file mode 100644 index 000000000..f79fe9d7f --- /dev/null +++ b/tests/Austria/Carinthia/CarinthiaTest.php @@ -0,0 +1,120 @@ + + */ + +namespace Yasumi\tests\Austria\Carinthia; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Carinthia (Austria). + */ +class CarinthiaTest extends CarinthiaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Carinthia (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + 'stJosephsDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + if (1920 <= $this->year) { + $holidays[] = 'plebisciteDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Carinthia (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Carinthia (Austria) 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 Carinthia (Austria) 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 Carinthia (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 501292ac5..571aa2fcf 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Plebiscite Day in Carinthia (Austria). */ -class PlebisciteDayTest extends CarinthiaBaseTestCase implements YasumiTestCaseInterface +class PlebisciteDayTest extends CarinthiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index f1b37200e..3afb1ac1c 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Carinthia (Austria). */ -class StJosephsDayTest extends CarinthiaBaseTestCase implements YasumiTestCaseInterface +class StJosephsDayTest extends CarinthiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 3df78f979..8e2089efb 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Austria. */ -class ChristmasTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index aefba4d3b..aea376251 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Austria. */ -class CorpusChristiTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends AustriaBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index 32a66f53c..f84063af8 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Austria. */ -class EasterMondayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index a55641d5c..cdfef82b7 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Austria. */ -class EasterTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 5a8b76ce9..1fbb49789 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Austria. */ -class EpiphanyTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index 5f27d5380..e7fa0b184 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Austria. */ -class ImmaculateConceptionTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index 853b8f4e7..6005ad9c9 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Austria. */ -class InternationalWorkersDayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/LowerAustria/LowerAustriaTest.php b/tests/Austria/LowerAustria/LowerAustriaTest.php new file mode 100644 index 000000000..87fcad671 --- /dev/null +++ b/tests/Austria/LowerAustria/LowerAustriaTest.php @@ -0,0 +1,119 @@ + + */ + +namespace Yasumi\tests\Austria\LowerAustria; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Lower Austria (Austria). + */ +class LowerAustriaTest extends LowerAustriaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Lower Austria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + if (1136 <= $this->year) { + $holidays[] = 'stLeopoldsDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Lower Austria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Lower Austria (Austria) 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 Lower Austria (Austria) 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 Lower Austria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 1683bb5a6..5cf55c6fc 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Saint Leopold's Day in Lower Austria (Austria). */ -class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements YasumiTestCaseInterface +class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 86a519f8b..de73f0d9f 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for National Day in Austria. */ -class NationalDayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class NationalDayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 954601765..58f7e904c 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Austria. */ -class NewYearsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index eacb13c9a..036e8045e 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Austria. */ -class PentecostMondayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index adf374cc7..a45451233 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Austria. */ -class PentecostTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Salzburg/SalzburgTest.php b/tests/Austria/Salzburg/SalzburgTest.php new file mode 100644 index 000000000..1eaa1acc4 --- /dev/null +++ b/tests/Austria/Salzburg/SalzburgTest.php @@ -0,0 +1,119 @@ + + */ + +namespace Yasumi\tests\Austria\Salzburg; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Salzburg (Austria). + */ +class SalzburgTest extends SalzburgBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Salzburg (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + if (710 <= $this->year) { + $holidays[] = 'stRupertsDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Salzburg (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Salzburg (Austria) 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 Salzburg (Austria) 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 Salzburg (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index 4cd946b15..97a010473 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Saint Rupert's Day in Salzburg (Austria). */ -class StRupertsDayTest extends SalzburgBaseTestCase implements YasumiTestCaseInterface +class StRupertsDayTest extends SalzburgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index eb9c536ee..ffab6abbd 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Austria. */ -class SecondChristmasDayTest extends AustriaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends AustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index ed2db449b..45d700d39 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Styria (Austria). */ -class StJosephsDayTest extends StyriaBaseTestCase implements YasumiTestCaseInterface +class StJosephsDayTest extends StyriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Styria/StyriaTest.php b/tests/Austria/Styria/StyriaTest.php new file mode 100644 index 000000000..bb0a95c14 --- /dev/null +++ b/tests/Austria/Styria/StyriaTest.php @@ -0,0 +1,116 @@ + + */ + +namespace Yasumi\tests\Austria\Styria; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Styria (Austria). + */ +class StyriaTest extends StyriaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Styria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + 'stJosephsDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Styria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Styria (Austria) 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 Styria (Austria) 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 Styria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index f9475206d..6bb96d908 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Tyrol (Austria). */ -class StJosephsDayTest extends TyrolBaseTestCase implements YasumiTestCaseInterface +class StJosephsDayTest extends TyrolBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Tyrol/TyrolTest.php b/tests/Austria/Tyrol/TyrolTest.php new file mode 100644 index 000000000..66e6e1341 --- /dev/null +++ b/tests/Austria/Tyrol/TyrolTest.php @@ -0,0 +1,116 @@ + + */ + +namespace Yasumi\tests\Austria\Tyrol; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Tyrol (Austria). + */ +class TyrolTest extends TyrolBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Tyrol (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + 'stJosephsDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Tyrol (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Tyrol (Austria) 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 Tyrol (Austria) 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 Tyrol (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index 4921c4b5f..1e9162528 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Saint Florian's Day in Upper Austria (Austria). */ -class StFloriansDayTest extends UpperAustriaBaseTestCase implements YasumiTestCaseInterface +class StFloriansDayTest extends UpperAustriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/UpperAustria/UpperAustriaTest.php b/tests/Austria/UpperAustria/UpperAustriaTest.php new file mode 100644 index 000000000..30ce88360 --- /dev/null +++ b/tests/Austria/UpperAustria/UpperAustriaTest.php @@ -0,0 +1,119 @@ + + */ + +namespace Yasumi\tests\Austria\UpperAustria; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Upper Austria (Austria). + */ +class UpperAustriaTest extends UpperAustriaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Upper Austria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + if (304 <= $this->year) { + $holidays[] = 'stFloriansDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Upper Austria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Upper Austria (Austria) 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 Upper Austria (Austria) 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 Upper Austria (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index 463bd257a..20da28be6 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Saint Leopold's Day in Lower Austria (Austria). */ -class StLeopoldsDayTest extends ViennaBaseTestCase implements YasumiTestCaseInterface +class StLeopoldsDayTest extends ViennaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Vienna/ViennaTest.php b/tests/Austria/Vienna/ViennaTest.php new file mode 100644 index 000000000..f07dfef47 --- /dev/null +++ b/tests/Austria/Vienna/ViennaTest.php @@ -0,0 +1,119 @@ + + */ + +namespace Yasumi\tests\Austria\Vienna; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Vienna (Austria). + */ +class ViennaTest extends ViennaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Vienna (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + if (1136 <= $this->year) { + $holidays[] = 'stLeopoldsDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Vienna (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Vienna (Austria) 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 Vienna (Austria) 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 Vienna (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index eb0970866..ad29e0e20 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Vorarlberg (Austria). */ -class StJosephsDayTest extends VorarlbergBaseTestCase implements YasumiTestCaseInterface +class StJosephsDayTest extends VorarlbergBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Austria/Vorarlberg/VorarlbergTest.php b/tests/Austria/Vorarlberg/VorarlbergTest.php new file mode 100644 index 000000000..1990015f6 --- /dev/null +++ b/tests/Austria/Vorarlberg/VorarlbergTest.php @@ -0,0 +1,116 @@ + + */ + +namespace Yasumi\tests\Austria\Vorarlberg; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Vorarlberg (Austria). + */ +class VorarlbergTest extends VorarlbergBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1135); + } + + /** + * Tests if all official holidays in Vorarlberg (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'ascensionDay', + 'assumptionOfMary', + 'corpusChristi', + 'easter', + 'easterMonday', + 'epiphany', + 'allSaintsDay', + 'internationalWorkersDay', + 'newYearsDay', + 'pentecostMonday', + 'christmasDay', + 'secondChristmasDay', + 'stJosephsDay', + ]; + + if (1955 <= $this->year) { + $holidays[] = 'nationalDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Vorarlberg (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays(['pentecost'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Vorarlberg (Austria) 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 Vorarlberg (Austria) 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 Vorarlberg (Austria) are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Base/YasumiExternalProvider.php b/tests/Base/YasumiExternalProvider.php index a17d94d8d..f6249af91 100644 --- a/tests/Base/YasumiExternalProvider.php +++ b/tests/Base/YasumiExternalProvider.php @@ -30,4 +30,9 @@ public function initialize(): void { // We don't actually have to do anything here. } + + public function getSources(): array + { + return []; + } } diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index c256acb54..29b0ff6bc 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Belgium. */ -class AllSaintsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * TThe name of the holiday to be tested. diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index d1e29e1de..0f834ebe4 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Armistice Day in Belgium. */ -class ArmisticeDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class ArmisticeDayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index 879222acb..bc3aba028 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Belgium. */ -class AscensionDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index bf7be9839..ca5d695db 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Belgium. */ -class AssumptionOfMaryTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index e983a693d..1942c3513 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -97,4 +97,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index a5a418959..6175e31a4 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Belgium. */ -class ChristmasTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index ef13904e7..ecb79d929 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in the Belgium. */ -class EasterMondayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 0cfa484a7..8bba24b4f 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter in Belgium. */ -class EasterTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index a4a3e5bcc..dc183b25d 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Belgium. */ -class InternationalWorkersDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index d4ca14fd6..4c35fd7a4 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Belgium. */ -class NationalDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class NationalDayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index cd67569d2..36921ad94 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Belgium. */ -class NewYearsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 8111ab7ce..0c9d79976 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in Belgium. */ -class PentecostTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 37ee8246e..e0018cbd5 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Belgium. */ -class pentecostMondayTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface +class pentecostMondayTest extends BelgiumBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index e26572e79..667a32d64 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Bosnia. */ -class BosniaTest extends BosniaBaseTestCase +class BosniaTest extends BosniaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index e1e8d4e1c..2a24f15a2 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Bosnia. */ -class ChristmasDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index 88c16ed9c..edcd6563e 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Day after New Years Day in Bosnia. */ -class DayAfterNewYearsDay extends BosniaBaseTestCase implements YasumiTestCaseInterface +class DayAfterNewYearsDay extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index e8974451f..81434c491 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Bosnia. */ -class EasterTest extends BosniaBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index 7442ce002..6e6b9bd1b 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Independence Day in Bosnia. */ -class IndependenceDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 11d783caf..2ad2acfb8 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Bosnia. */ -class InternationalWorkersDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index a94646f45..9d4fe16d8 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Bosnia. */ -class NewYearsDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index 45475decd..d3bb2fa9e 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Orthodox Christmas Day in Bosnia. */ -class OrthodoxChristmasDay extends BosniaBaseTestCase implements YasumiTestCaseInterface +class OrthodoxChristmasDay extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 4ed8ab77e..a066aa965 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for the Second International Workers' Day (i.e. Labour Day) in Bosnia. */ -class SecondLabourDay extends BosniaBaseTestCase implements YasumiTestCaseInterface +class SecondLabourDay extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index 71d047a92..2f2349132 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Statehood Day in Bosnia. */ -class StatehoodDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterface +class StatehoodDayTest extends BosniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index 1ccbfd842..0c291fc10 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Dia dos Finados in Brazil. */ -class AllSoulsDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class AllSoulsDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index f0aac2c28..f85f67523 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ash Wednesday in the Brazil. */ -class AshWednesdayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class AshWednesdayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 44fd05f83..693cb84bb 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Brazil. */ -class BrazilTest extends BrazilBaseTestCase +class BrazilTest extends BrazilBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index 6b1b8509c..0f7be8b18 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Carnaval Monday in Brazil. */ -class CarnavalMondayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class CarnavalMondayTest extends BrazilBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index 6979d4e5a..782cd3d9a 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Carnaval Tuesday in Brazil. */ -class CarnavalTuesdayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class CarnavalTuesdayTest extends BrazilBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index c116cbac1..82bb2bbb5 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Brazil. */ -class ChristmasDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index dd20924b1..62f804930 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Brazil. */ -class CorpusChristiTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends BrazilBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index 3ae9d468c..552ec9c56 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -18,12 +18,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter in Brazil. */ -class EasterTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends BrazilBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 477fd0a40..a013b98c3 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in Brazil. */ -class GoodFridayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends BrazilBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index ef73129c3..f605cc084 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Independence Day in Brazil. */ -class IndependenceDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index f8754533b..a720ce70b 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing International Workers' Day in Brazil. */ -class InternationalWorkersDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index 908c9829b..e2814d54b 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Brazil. */ -class NewYearsDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index 88616f772..df17d015a 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Our Lady Aparecida Day in Brazil. */ -class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index 8e772688b..78be2cdb2 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Proclamation of The Republic Day in Brazil. */ -class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index 3ea25168c..a23778eea 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Tiradentes' Day in Brazil. */ -class TiradentesDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterface +class TiradentesDayTest extends BrazilBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index 35c7bcbfd..3a74e4709 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Alberta. */ -class AlbertaTest extends AlbertaBaseTestCase +class AlbertaTest extends AlbertaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index 19aac9d09..5594677df 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in British Columbia. */ -class BritishColumbiaTest extends BritishColumbiaBaseTestCase +class BritishColumbiaTest extends BritishColumbiaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 206579094..77b8ac2ba 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Canada Day in Canada. */ -class CanadaDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +class CanadaDayTest extends CanadaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php index d6d64269d..4f86c7dd8 100644 --- a/tests/Canada/CanadaTest.php +++ b/tests/Canada/CanadaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Canada. */ -class CanadaTest extends CanadaBaseTestCase +class CanadaTest extends CanadaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index 3c316a6a7..a33548dba 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the USA. */ -class ChristmasDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends CanadaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index 7410ba70b..7d3d9c9b3 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in Canada. */ -class LabourDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends CanadaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index c627db978..f28ea0976 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Manitoba. */ -class ManitobaTest extends ManitobaBaseTestCase +class ManitobaTest extends ManitobaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -90,4 +91,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index 958b4050a..eca7cf4c7 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in New Brunswick. */ -class NewBrunswickTest extends NewBrunswickBaseTestCase +class NewBrunswickTest extends NewBrunswickBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 15a03003a..d34b89e7b 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Canada. */ -class NewYearsDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends CanadaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php index 70fcafcc9..7780daa8e 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Newfoundland and Labrador. */ -class NewfoundlandAndLabradorTest extends NewfoundlandAndLabradorBaseTestCase +class NewfoundlandAndLabradorTest extends NewfoundlandAndLabradorBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -91,4 +92,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index ab2cea321..a288460de 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Northwest Territories. */ -class NorthwestTerritoriesTest extends NorthwestTerritoriesBaseTestCase +class NorthwestTerritoriesTest extends NorthwestTerritoriesBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index 36eec2471..ee49c849b 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Nova Scotia. */ -class NovaScotiaTest extends NovaScotiaBaseTestCase +class NovaScotiaTest extends NovaScotiaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php index 9d4c5cd1c..b6130b492 100644 --- a/tests/Canada/Nunavut/NunavutTest.php +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Nunavut. */ -class NunavutTest extends NunavutBaseTestCase +class NunavutTest extends NunavutBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -89,4 +90,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index 76341070d..e41eda80c 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Ontario. */ -class OntarioTest extends OntarioBaseTestCase +class OntarioTest extends OntarioBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index 8916bf87c..4376b0c8f 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Prince Edward Island. */ -class PrinceEdwardIslandTest extends PrinceEdwardIslandBaseTestCase +class PrinceEdwardIslandTest extends PrinceEdwardIslandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index 5a410f7eb..7f77b8773 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Quebec. */ -class QuebecTest extends QuebecBaseTestCase +class QuebecTest extends QuebecBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index d6d27b6a3..071e545f4 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Remembrance Day in Canada. */ -class RemembranceDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +class RemembranceDayTest extends CanadaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index 62f362720..667d61601 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Saskatchewan. */ -class SaskatchewanTest extends SaskatchewanBaseTestCase +class SaskatchewanTest extends SaskatchewanBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index f20762ed8..f326f3f56 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Thanksgiving Day in Canada. */ -class ThanksgivingDayTest extends CanadaBaseTestCase implements YasumiTestCaseInterface +class ThanksgivingDayTest extends CanadaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index dc9ffa886..4aa9aa6ac 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Yukon. */ -class YukonTest extends YukonBaseTestCase +class YukonTest extends YukonBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -105,4 +106,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 6e1927631..a312e3b5b 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Croatia. */ -class AllSaintsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index 1a12dedbf..347c11190 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Day of Antifascist Struggle in Croatia. */ -class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index e91f9de85..ff196d598 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Croatia. */ -class AssumptionOfMaryTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index c45853c71..8beabe184 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Croatia. */ -class ChristmasDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index c2e7e2728..330d29291 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in the Croatia. */ -class CorpusChristiTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends CroatiaBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Croatia/CroatiaTest.php b/tests/Croatia/CroatiaTest.php new file mode 100644 index 000000000..7f7c10322 --- /dev/null +++ b/tests/Croatia/CroatiaTest.php @@ -0,0 +1,129 @@ + + */ + +namespace Yasumi\tests\Croatia; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Croatia. + */ +class CroatiaTest extends CroatiaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1941); + } + + /** + * Tests if all official holidays in Croatia are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'newYearsDay', + 'internationalWorkersDay', + 'epiphany', + 'easter', + 'easterMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'christmasDay', + 'stStephensDay', + ]; + + if ($this->year >= 1941) { + $holidays[] = 'antifascistStruggleDay'; + } + + if ($this->year >= 1991) { + $holidays[] = 'statehoodDay'; + } + + if ($this->year >= 1995) { + $holidays[] = 'homelandThanksgiving'; + } + + if ($this->year >= 1991 && $this->year < 2020) { + $holidays[] = 'independenceDay'; + } + + if ($this->year >= 2020) { + $holidays[] = 'remembranceDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Croatia 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 Croatia 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 Croatia 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 Croatia are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } +} diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 0c0004c08..0379fe80e 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Croatia. */ -class EasterMondayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index 7c432b00b..b46f27389 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Croatia. */ -class EasterTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 0dfa17a71..78e3749d2 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Croatia. */ -class EpiphanyTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 4182cde72..711f27881 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Homeland Thanksgiving Day in Croatia. */ -class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 46484cf29..e2836a05d 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Independece Day in Croatia. */ -class IndependenceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index c4ebd841b..17741da02 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Croatia. */ -class InternationalWorkersDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index 5099da169..2cb631a22 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Croatia. */ -class NewYearsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index cb6b1930a..905601286 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Statehood Day in Croatia. */ -class RemembranceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class RemembranceDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index 15c1c4e2d..641305eb0 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Croatia. */ -class StStephensDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 641b5cede..1958a6599 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Statehood Day in Croatia. */ -class StatehoodDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface +class StatehoodDayTest extends CroatiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 3ce8dbc24..bd6d39f89 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas day in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class ChristmasDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 6e4c71d4a..21f048211 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Eve in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class ChristmasEveTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index 11e48197a..7da183104 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -16,6 +16,7 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Czech Republic. @@ -24,7 +25,7 @@ * * @author Dennis Fridrich */ -class CzechRepublicTest extends CzechRepublicBaseTestCase +class CzechRepublicTest extends CzechRepublicBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -102,4 +103,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index ac1bbd284..e3a0490f3 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Czech State Hood Day in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index 434891a83..1c5da15fc 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in the Czech Republic. @@ -28,7 +28,7 @@ * * @author Dennis Fridrich */ -class EasterMondayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 101ef5545..4cd08c08d 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in the Czech Republic. @@ -28,7 +28,7 @@ * * @author Dennis Fridrich */ -class GoodFridayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 0b899e66c..916350660 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Independent Czechoslovak State Day in the Czech Republic. */ -class IndependentCzechoslovakStateDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class IndependentCzechoslovakStateDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index ce2c748ee..673f1422d 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index 05e1c664b..9bc80438e 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Jan Hus Day in the Czech Republic. */ -class JanHusDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class JanHusDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index f9e6f566d..a13c790c8 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class NewYearsDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index 69278c329..96d54caa2 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Day of renewal of independent czech state in Czechia. @@ -26,7 +26,7 @@ * @author Andrej Rypak (dakujem) * @author Jan Langer */ -class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index 1d197a107..d7ab4cb00 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Saints Cyril and Methodius Day in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class SaintsCyrilAndMethodiusDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class SaintsCyrilAndMethodiusDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 5fb60151c..c9487895e 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index 358d98d23..1aa8ad104 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Struggle for Freedom and Democracy Day in the Czech Republic. */ -class StruggleForFreedomAndDemocracyDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class StruggleForFreedomAndDemocracyDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index cf9c17d0f..e8ef13f25 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -18,7 +18,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Victory In Europe Day in the Czech Republic. @@ -27,7 +27,7 @@ * * @author Dennis Fridrich */ -class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index 2d1638a07..82eb05b47 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Denmark. */ -class AscensionDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 16d3de89a..f3f140e4d 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Denmark. */ -class ChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 9501e5e1e..c6793bcfd 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Eve in Denmark. */ -class ChristmasEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index ac1def997..3d1357335 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Constitution Day of Denmark. */ -class ConstitutionDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class ConstitutionDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index eecb58ccd..05d3a1362 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Denmark. */ -class DenmarkTest extends DenmarkBaseTestCase +class DenmarkTest extends DenmarkBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -102,4 +103,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index 37a20b84d..1af145232 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Denmark. */ -class EasterMondayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index cebd0049c..0ae5e14c0 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Denmark. */ -class EasterTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index dff36f556..01af94ab9 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Denmark. */ -class GoodFridayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index 5df5d4380..af4a89b3a 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Great Prayer Day in Denmark. */ -class GreatPrayerDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class GreatPrayerDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 0c3288421..fe0c1a6ef 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Denmark. */ -class InternationalWorkersDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index bc44da749..951206780 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Maundy Thursday in Denmark. */ -class MaundyThursdayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class MaundyThursdayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index c9dda3dfb..c18a48e01 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Denmark. */ -class NewYearsDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index 1dbc2e57e..464b083e2 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Eve in Denmark. */ -class NewYearsEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class NewYearsEveTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 738ffa98f..f37449676 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Denmark. */ -class PentecostMondayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index 7992afea2..043a258a5 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Denmark. */ -class PentecostTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index fb6ac432b..f8ea994b6 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Denmark. */ -class SecondChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 558721199..b99f60db7 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing summer time in Denmark. */ -class SummerTimeTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class SummerTimeTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index a302e2a33..fb6430860 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing winter time in Denmark. */ -class WinterTimeTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface +class WinterTimeTest extends DenmarkBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 9599ff701..14b0a0c60 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas day in Estonia. * * @author Gedas Lukošius */ -class ChristmasDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index 32db1bb28..758b10a8e 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas Eve day in Estonia. * * @author Gedas Lukošius */ -class ChristmasEveDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index 130a8c9d3..6fc9aa35a 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter day in Estonia. * * @author Gedas Lukošius */ -class EasterDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class EasterDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index a73ca9349..ddb755a37 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -18,13 +18,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Estonia. * * @author Gedas Lukošius */ -class EstoniaTest extends EstoniaBaseTestCase +class EstoniaTest extends EstoniaBaseTestCase implements ProviderTestCase { /** * Tests if all official holidays in Estonia are defined by the provider class. @@ -101,4 +102,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index bc950db82..0d61ab012 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Estonia's Good Friday day. * * @author Gedas Lukošius */ -class GoodFridayDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class GoodFridayDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index cb74c3b05..db4ad1b37 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Estonia's independence day. * * @author Gedas Lukošius */ -class IndependenceDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index d592526de..613d95542 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day in Estonia. * * @author Gedas Lukošius */ -class InternationalWorkersDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index 82f8ec19d..c64f7ddee 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's Day in Estonia. * * @author Gedas Lukošius */ -class NewYearsDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 203d025c3..beaa352e0 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Pentecost in Estonia. * * @author Gedas Lukošius */ -class PentecostTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index 77e9bad70..45bdfb55c 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Estonia's Restoration of Independence day. * * @author Gedas Lukošius */ -class RestorationOfIndependenceDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class RestorationOfIndependenceDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 3e514f7e7..070b6bbce 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Second Christmas day in Estonia. * * @author Gedas Lukošius */ -class SecondChristmasDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index 859a7d937..313c44e30 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for St. John's Day in Estonia. * * @author Gedas Lukošius */ -class StJohnsDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class StJohnsDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 6f480e9ba..b7fd9f055 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Estonia's Victory day. * * @author Gedas Lukošius */ -class VictoryDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterface +class VictoryDayTest extends EstoniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index e65c1b064..1d001bd84 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Finland. */ -class AllSaintsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index 4a2ac1238..9c4d1f7df 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Finland. */ -class AscensionDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 5f46c54c1..5f46db5fd 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Finland. */ -class ChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index 1ce1130ec..35ca3060d 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Finland. */ -class EasterMondayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 6cfee2467..3c92add4a 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Finland. */ -class EasterTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index 45c53993e..db12db94f 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Finland. */ -class EpiphanyTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 4fa0f5355..ab36b7bd2 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Finland. */ -class FinlandTest extends FinlandBaseTestCase +class FinlandTest extends FinlandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index 33bc95c78..43d196ab8 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Finland. */ -class GoodFridayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 4e8aac093..fd7e62b44 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Independence Day of Finland in Finland. */ -class IndependenceDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 953b0c07e..f5d42a852 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Finland. */ -class InternationalWorkersDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index 36704770b..020b97127 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Finland. */ -class NewYearsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index 34581c1a2..b96979ef2 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Finland. */ -class PentecostTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 125029f22..c00a9e921 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Finland. */ -class SecondChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index e9d441dda..7cb818d77 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** @@ -28,7 +28,7 @@ * Since 1955, the holiday has always been on a Saturday (between June 20 and June 26). Earlier it was always on * June 24. */ -class stJohnsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterface +class stJohnsDayTest extends FinlandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was adjusted. diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index de27fd1d1..52981c59b 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in France. */ -class AllSaintsDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index b6d5caad4..963d0856b 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Armistice Day in France. */ -class ArmisticeDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class ArmisticeDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index d48b182f0..ac8db98ff 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in France. */ -class AscensionDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index 847e0dc60..b1b22cf7d 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in France. */ -class AssumptionOfMaryTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index e23e5d264..ca9740ccd 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Bas-Rhin (France). */ -class BasRhinTest extends BasRhinBaseTestCase +class BasRhinTest extends BasRhinBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index 25966e480..f7487becd 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Bas-Rhin (France). */ -class GoodFridayTest extends BasRhinBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends BasRhinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index d7ea4ffe8..e7a4d3977 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Bas-Rhin (France). */ -class stStephensDayTest extends BasRhinBaseTestCase implements YasumiTestCaseInterface +class stStephensDayTest extends BasRhinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index b44df2dd2..54f30f82f 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Bastille Day in France. */ -class BastilleDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class BastilleDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index b0103af38..ea091eee5 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in France. */ -class ChristmasDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index e837fbbd8..947877d4e 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in France. */ -class EasterMondayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index 1c1f6ccea..0fd4dd2af 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in France. */ -class FranceTest extends FranceBaseTestCase +class FranceTest extends FranceBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -96,4 +97,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index 07f7e0594..ceaef8135 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Haut-Rhin (France). */ -class GoodFridayTest extends HautRhinBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends HautRhinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 51b3a2c42..afc5f6676 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Haut-Rhin (France). */ -class HautRhinTest extends HautRhinBaseTestCase +class HautRhinTest extends HautRhinBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 82422f732..61017ab2b 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Haut-Rhin (France). */ -class stStephensDayTest extends HautRhinBaseTestCase implements YasumiTestCaseInterface +class stStephensDayTest extends HautRhinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 058f61be5..1ecbe97d7 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in France. */ -class InternationalWorkersDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index 71a490cfc..873cbb64f 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Moselle (France). */ -class GoodFridayTest extends MoselleBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends MoselleBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index dc1960161..d92fc18da 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Moselle (France). */ -class MoselleTest extends MoselleBaseTestCase +class MoselleTest extends MoselleBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index a96aad0f8..ac9ed4956 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Moselle (France). */ -class stStephensDayTest extends MoselleBaseTestCase implements YasumiTestCaseInterface +class stStephensDayTest extends MoselleBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index 153d6e54e..0b68241f7 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in France. */ -class NewYearsDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index 0bdbea555..92892d695 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in France. */ -class PentecostMondayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 75c88dd7a..6a7df1e44 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Victory in Europe Day in France. */ -class VictoryInEuropeDayTest extends FranceBaseTestCase implements YasumiTestCaseInterface +class VictoryInEuropeDayTest extends FranceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php index e0cd81017..8a2801be8 100644 --- a/tests/Georgia/EasterTest.php +++ b/tests/Georgia/EasterTest.php @@ -9,9 +9,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class EasterTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php index 09a28589b..7b435fc3e 100644 --- a/tests/Georgia/GeorgiaTest.php +++ b/tests/Georgia/GeorgiaTest.php @@ -18,13 +18,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Georgia; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Georgia. * * @author Zurab Sardarov */ -class GeorgiaTest extends GeorgiaBaseTestCase +class GeorgiaTest extends GeorgiaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -110,4 +111,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index f16be6db1..6c511bf1b 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -20,9 +20,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class IndependenceDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index 895d35f03..dab120f4d 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class InternationalWomensDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class InternationalWomensDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index a9fcb25ea..44adda3b1 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class MtskhetobaDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class MtskhetobaDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 560afb995..b1dc24910 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class NewYearsDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index 96de860c6..87c6670f2 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class OrthodoxChristmasDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class OrthodoxChristmasDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index 118ae48dd..cb1ce03be 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class OrthodoxEpiphanyDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class OrthodoxEpiphanyDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 0ac18f241..b15824e8d 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class SecondNewYearDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class SecondNewYearDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index 109c5cd26..c17690191 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class StAndrewsDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class StAndrewsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index 2c90ca7bf..3ca6a1512 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class StGeorgesDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class StGeorgesDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index 3cc58c2e3..436c321cb 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class StMarysDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class StMarysDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index a2a302fe0..cc39b7459 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -20,9 +20,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class UnityDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class UnityDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index f1f1e0510..15ed44288 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -19,9 +19,9 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; -class VictoryDayTest extends GeorgiaBaseTestCase implements YasumiTestCaseInterface +class VictoryDayTest extends GeorgiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index cfa25dc1a..efe911e45 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Germany. */ -class AscensionDayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 2cef74a09..b7b4fad86 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Baden-Württemberg (Germany). */ -class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 9ff89caf6..84e3ee0ee 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Baden-Württemberg (Germany). */ -class BadenWurttembergTest extends BadenWurttembergBaseTestCase +class BadenWurttembergTest extends BadenWurttembergBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void Holiday::TYPE_OTHER ); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index bab7224bd..393df3970 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Baden-Württemberg (Germany). */ -class CorpusChristiTest extends BadenWurttembergBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends BadenWurttembergBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index ad4515f73..5d7e2698d 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Baden-Württemberg (Germany). */ -class EpiphanyTest extends BadenWurttembergBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends BadenWurttembergBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index 276ab1ca1..e83c09311 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Bavaria (Germany). */ -class AllSaintsDayTest extends BavariaBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends BavariaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index ca295ca9f..eaff104be 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Bavaria (Germany). */ -class BavariaTest extends BavariaBaseTestCase +class BavariaTest extends BavariaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void Holiday::TYPE_OTHER ); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index e83159741..6609bedb5 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Bavaria (Germany). */ -class CorpusChristiTest extends BavariaBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends BavariaBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index 04349505e..dc9c4e63c 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Bavaria (Germany). */ -class EpiphanyTest extends BavariaBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends BavariaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index d9e51af39..38ed9291e 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Berlin (Germany). */ -class BerlinTest extends BerlinBaseTestCase +class BerlinTest extends BerlinBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberation2020Test.php index 8c0531543..96eec3443 100644 --- a/tests/Germany/Berlin/DayOfLiberation2020Test.php +++ b/tests/Germany/Berlin/DayOfLiberation2020Test.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Day of Liberation 2020 in Berlin (Germany). */ -class DayOfLiberation2020Test extends BerlinBaseTestCase implements YasumiTestCaseInterface +class DayOfLiberation2020Test extends BerlinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index 4591817d1..2e5325134 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Reformation Day in Germany. */ -class InternationalWomensDay2019Test extends BerlinBaseTestCase implements YasumiTestCaseInterface +class InternationalWomensDay2019Test extends BerlinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index ba674b96a..4727f4c52 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Brandenburg (Germany). */ -class BrandenburgTest extends BrandenburgBaseTestCase +class BrandenburgTest extends BrandenburgBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -105,4 +106,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 06f28068c..1c2a1a04a 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Brandenburg (Germany). */ -class ReformationDayTest extends BrandenburgBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends BrandenburgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index 8fa93a215..e6da46a00 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Bremen (Germany). */ -class BremenTest extends BremenBaseTestCase +class BremenTest extends BremenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index bc776d6a7..9bc2bd3df 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Bremen (Germany). */ -class ReformationDayTest extends BremenBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends BremenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index 2ae262352..bab1adf11 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Germany. */ -class ChristmasTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 107e8a689..e2305d8c4 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Germany. */ -class EasterMondayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index b11e7cf9a..e22fc7d3b 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the German Unity Day in Germany. */ -class GermanUnityDayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class GermanUnityDayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 4d1df0213..1ba5606cb 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Germany. */ -class GermanyTest extends GermanyBaseTestCase +class GermanyTest extends GermanyBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index 569d3d9cc..b291d9d52 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in Germany. */ -class GoodFridayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index bbe8856bb..a5efbf7aa 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Hamburg (Germany). */ -class DayOfReformationTest extends HamburgBaseTestCase implements YasumiTestCaseInterface +class DayOfReformationTest extends HamburgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index cfb3557db..1659567cd 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Hamburg (Germany). */ -class HamburgTest extends HamburgBaseTestCase +class HamburgTest extends HamburgBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index c28b109a7..2c01f08fa 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Hesse (Germany). */ -class CorpusChristiTest extends HesseBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends HesseBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index 311fb5814..c36cab33f 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Hesse (Germany). */ -class HesseTest extends HesseBaseTestCase +class HesseTest extends HesseBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['corpusChristi'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index 996247381..e1aa6a0d9 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Germany. */ -class InternationalWorkersDayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index 80def5441..5d03fe4ed 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Lower Saxony (Germany). */ -class LowerSaxonyTest extends LowerSaxonyBaseTestCase +class LowerSaxonyTest extends LowerSaxonyBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 041ef0d94..f97c06543 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Lower Saxony (Germany). */ -class ReformationDayTest extends LowerSaxonyBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends LowerSaxonyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 8eade0c26..2ac5995a0 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Mecklenburg-Western Pomerania (Germany). */ -class MecklenburgWesternPomeraniaTest extends MecklenburgWesternPomeraniaBaseTestCase +class MecklenburgWesternPomeraniaTest extends MecklenburgWesternPomeraniaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -103,4 +104,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index 5e42bdd36..c706ddfd8 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Mecklenburg-Western Pomerania (Germany). */ -class ReformationDayTest extends MecklenburgWesternPomeraniaBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends MecklenburgWesternPomeraniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index 9e98647e2..8247b1120 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Germany. */ -class NewYearsDayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index 2ce6b9e0c..b508e5058 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Eve in Germany. */ -class NewYearsEveTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class NewYearsEveTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index e4cf03204..6d9d6b127 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in North Rhine-Westphalia (Germany). */ -class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index 29dfb8051..ca5735bb1 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in North Rhine-Westphalia (Germany). */ -class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index c99adc799..b5467a6fa 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in North Rhine-Westphalia (Germany). */ -class NorthRhineWestphaliaTest extends NorthRhineWestphaliaBaseTestCase +class NorthRhineWestphaliaTest extends NorthRhineWestphaliaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['corpusChristi', 'allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 435a28667..e2a215677 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Germany. */ -class PentecostMondayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index dfd5e839b..5b4b4140c 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in Germany. */ -class PentecostTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index f01cf6054..671b1e24a 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Reformation Day in Germany. */ -class ReformationDay2017Test extends GermanyBaseTestCase implements YasumiTestCaseInterface +class ReformationDay2017Test extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index bda615e0c..5723af26a 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Rhineland Palatinate (Germany). */ -class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index b0d475311..9777900f0 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Rhineland Palatinate (Germany). */ -class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index 75387b1e5..09f6af8f5 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Rhineland Palatinate (Germany). */ -class RhinelandPalatinateTest extends RhinelandPalatinateBaseTestCase +class RhinelandPalatinateTest extends RhinelandPalatinateBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['corpusChristi', 'allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index 84759ec02..942e0243d 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Saarland (Germany). */ -class AllSaintsDayTest extends SaarlandBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends SaarlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index f8e717ab7..05a652b27 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Saarland (Germany). */ -class AssumptionOfMaryTest extends SaarlandBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends SaarlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index 069f6bd48..b5762951d 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Saarland (Germany). */ -class CorpusChristiTest extends SaarlandBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends SaarlandBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index cfb3af898..ed31dbd90 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Saarland (Germany). */ -class SaarlandTest extends SaarlandBaseTestCase +class SaarlandTest extends SaarlandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index dd3a5eaee..a5730392b 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Saxony (Germany). */ -class ReformationDayTest extends SaxonyBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends SaxonyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index b420f47cc..ddcbe4b84 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Repentance And Prayer Day in Saxony (Germany). @@ -29,7 +29,7 @@ * Buß- und Bettag has undergone many changes as either a working or non-working holiday in Germany. At the moment, * Yasumi only considers (for now) the time it was established as non-working day in Saxony. */ -class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements YasumiTestCaseInterface +class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index 6e7f397fa..fad43ec92 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Saxony (Germany). */ -class SaxonyTest extends SaxonyBaseTestCase +class SaxonyTest extends SaxonyBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -107,4 +108,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index bd7478a16..5ddae6d43 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Saxony-Anhalt (Germany). */ -class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index c4b03c530..1b061ad13 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Saxony-Anhalt (Germany). */ -class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index cb0dd95f1..37f5c3fc0 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Saxony-Anhalt (Germany). */ -class SaxonyAnhaltTest extends SaxonyAnhaltBaseTestCase +class SaxonyAnhaltTest extends SaxonyAnhaltBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -103,4 +104,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['epiphany'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 0795a24bc..09bb093c6 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Schleswig-Holstein (Germany). */ -class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index c4f05013c..f2148e5a7 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Schleswig-Holstein (Germany). */ -class SchleswigHolsteinTest extends SchleswigHolsteinBaseTestCase +class SchleswigHolsteinTest extends SchleswigHolsteinBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index ad39a3cc7..153cfdba7 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Germany. */ -class SecondChristmasDayTest extends GermanyBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends GermanyBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 29c71922f..4db3b816e 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Reformation Day in Thuringia (Germany). */ -class ReformationDayTest extends ThuringiaBaseTestCase implements YasumiTestCaseInterface +class ReformationDayTest extends ThuringiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index 219045d2e..043dac8b1 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Thuringia (Germany). */ -class ThuringiaTest extends ThuringiaBaseTestCase +class ThuringiaTest extends ThuringiaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -103,4 +104,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 476f39d88..8aade4a65 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Annunciation in Greece. */ -class AnnunciationTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class AnnunciationTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index 1abae22db..6d5217371 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Greece. */ -class AscensionDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index d4e977cf6..77f8d8fb2 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Greece. */ -class AssumptionOfMaryTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 26cf64907..8af38f6d7 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Greece. */ -class ChristmasDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index 56c4b2444..6c79c2072 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Clean Monday in Greece. */ -class CleanMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class CleanMondayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 653cf324d..27bdedae8 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Greece. */ -class EasterMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 50a3405c3..79ed99f94 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Greece. */ -class EasterTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the first holiday of Easter. diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index 8847b52c0..8ca296857 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Greece. */ -class EpiphanyTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index d3198c12c..006c01a55 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Greece. */ -class GreeceTest extends GreeceBaseTestCase +class GreeceTest extends GreeceBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -105,4 +106,12 @@ public function testOtherHolidays(): void Holiday::TYPE_OTHER ); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index 2fe9cb246..d8bd2ae48 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Independence Day of Greece in Greece. */ -class IndepencenceDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class IndepencenceDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index f811bda83..4fc6963c9 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Greece. */ -class InternationalWorkersDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index 170b3f348..c511acc1b 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Greece. */ -class NewYearsDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index 36ae66cea..233016c96 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Ohi Day in Greece. */ -class OhiDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class OhiDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index db6fc265b..70ee8a5eb 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Greece. */ -class PentecostMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index f9cfcd6bf..7ecc723f0 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Greece. */ -class PentecostTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index 59d2b957f..55b0ed215 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Polytechnio in Greece. */ -class PolytechnioTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class PolytechnioTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 5ab5f09fa..964ac2f2d 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for The Three Holy Hierarchs in Greece. */ -class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index 3bcecf4ee..264cabea6 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Greece. */ -class goodFridayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface +class goodFridayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/YasumiTestCaseInterface.php b/tests/HolidayTestCase.php similarity index 95% rename from tests/YasumiTestCaseInterface.php rename to tests/HolidayTestCase.php index bf9168e0b..7776452de 100644 --- a/tests/YasumiTestCaseInterface.php +++ b/tests/HolidayTestCase.php @@ -21,7 +21,7 @@ * * @see AbstractProvider */ -interface YasumiTestCaseInterface +interface HolidayTestCase { /** * Tests the translated name of the holiday defined in this test. diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 51a9e7085..cbdd1dd61 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Hungary. */ -class AllSaintsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index 41e9dbdbd..c18901f33 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Hungary. */ -class ChristmasTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index 59d8225b0..cbc7091dc 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Hungary. */ -class EasterMondayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index ecb87874f..cc5d1e5e4 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Hungary. */ -class EasterTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index 0224d23b5..0937cdfe4 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Hungary. */ -class HungaryTest extends HungaryBaseTestCase +class HungaryTest extends HungaryBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -111,4 +112,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index af9df876a..852bc3e08 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Hungary. */ -class InternationalWorkersDayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 2443fcff9..59089ed3a 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Memorial Day of 1848 in Hungary. */ -class MemorialDay1848Test extends HungaryBaseTestCase implements YasumiTestCaseInterface +class MemorialDay1848Test extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index 53f668ad1..2fb2f017b 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Memorial Day of 1986 in Hungary. */ -class MemorialDay1956Test extends HungaryBaseTestCase implements YasumiTestCaseInterface +class MemorialDay1956Test extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 5c5f403a7..b90f8b26f 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Hungary. */ -class NewYearsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index 4f776c2d8..f0457abce 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Hungary. */ -class PentecostMondayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index e25c5398a..b3e6f1704 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Hungary. */ -class PentecostTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index caa87cad7..7eee7277a 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Hungary. */ -class SecondChristmasDayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 9c5b09caa..be8ffca5a 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for the State Foundation Day in Hungary. */ -class StateFoundationDayTest extends HungaryBaseTestCase implements YasumiTestCaseInterface +class StateFoundationDayTest extends HungaryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index e0d7efa07..7a2b58e6a 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the August Holiday in Ireland. */ -class AugustHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class AugustHolidayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index d17158295..55cf55339 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas Day in Ireland. */ -class ChristmasDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index 265c46e1f..dc28bb44a 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Ireland. */ -class EasterMondayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index 9c1fd90e8..a003c0e70 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Ireland. */ -class EasterTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index 044281160..3ca418d3a 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in Ireland. */ -class GoodFridayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index 6d9da4db3..9173632a2 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Ireland. */ -class IrelandTest extends IrelandBaseTestCase +class IrelandTest extends IrelandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -106,4 +107,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 31ebf2832..9a9ba2642 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the June Holiday in Ireland. */ -class JuneHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class JuneHolidayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 514395d53..840399f09 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing May Day in Ireland. */ -class MayDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class MayDayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 61fe36f2f..dec0b0b21 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Ireland. */ -class NewYearsDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index 38c709cc5..554a34b91 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the October Holiday in Ireland. */ -class OctoberHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class OctoberHolidayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 0926cca86..200d747e6 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in Ireland. */ -class PentecostTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index f270a249d..d17c90fdf 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Patrick's Day in Ireland. */ -class StPatricksDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class StPatricksDayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index d0f6ce5db..5ed013a78 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Ireland. */ -class StStephensDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index 15967f757..d3e9dbd62 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in Ireland. */ -class pentecostMondayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface +class pentecostMondayTest extends IrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 5933bba85..f099216e8 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Italy. */ -class AllSaintsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index 6be8af381..4b2f492a4 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Italy. */ -class AssumptionOfMaryTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 1d11d9cbe..9235a0574 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Italy. */ -class ChristmasTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 2a40029f1..bfe6af7c1 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in the Italy. */ -class EasterMondayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 8967326e8..265f7eb9c 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Italy. */ -class EasterTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the first holiday of Easter. diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 60617d552..dd0adeba2 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Italy. */ -class EpiphanyTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index c6bd62795..1320f4815 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Italy. */ -class ImmaculateConceptionTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 76e40f5f7..87e9e5ca3 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Italy. */ -class InternationalWorkersDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index c53d44b41..dbbef5acb 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Italy. */ -class ItalyTest extends ItalyBaseTestCase +class ItalyTest extends ItalyBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -97,4 +98,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 759431a4b..571da8b7a 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Liberation Day in Italy. @@ -31,7 +31,7 @@ * * @see https://en.wikipedia.org/wiki/Liberation_Day_%28Italy%29 */ -class LiberationDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class LiberationDayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index 0a1b917dd..dbe1ee934 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Italy. */ -class NewYearsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 4139954f5..f762ba775 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Republic Day in Italy. @@ -31,7 +31,7 @@ * * @see https://en.wikipedia.org/wiki/Festa_della_Repubblica */ -class RepublicDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class RepublicDayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 4d274d163..1a9239776 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Italy. */ -class stStephensDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface +class stStephensDayTest extends ItalyBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 8d270bed4..00c571d13 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Autumnal Equinox Day in Japan. */ -class AutumnalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class AutumnalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index ca11adb52..785a424a2 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing Children's Day in Japan. */ -class ChildrensDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class ChildrensDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index c3f096376..faf83b0b3 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Coming Of Age Day in Japan. */ -class ComingOfAgeDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class ComingOfAgeDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index 9849089ac..d52d6403e 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for teting Constitution Memorial Day in Japan. */ -class ConstitutionMemorialDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class ConstitutionMemorialDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 386a6d2e4..18c86454d 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing the Emperors Coronation day in Japan. */ -class CoronationDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class CoronationDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index 4edf1d43d..983153b4d 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Culture Day in Japan. */ -class CultureDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class CultureDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index b1da7b2da..51987c35c 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing the Emperors Birthday in Japan. */ -class EmperorsBirthdayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class EmperorsBirthdayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index edcbf87d7..a9af4f7f8 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing the Emperors Coronation day in Japan. */ -class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index c63b9b213..c11afa5b6 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing Greenery Day in Japan. */ -class GreeneryDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class GreeneryDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday defined in the test. diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index b1bf712a9..34cc69811 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Japan. */ -class JapanTest extends JapanBaseTestCase +class JapanTest extends JapanBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -129,4 +130,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 6be35b305..83d9e12e1 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labor Thanksgiving Day in Japan. */ -class LabourThanksgivingDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class LabourThanksgivingDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 4e3484269..55b6bae39 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Marine Day in Japan. */ -class MarineDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class MarineDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 8c43c269b..2f48c1e06 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Mountain Day in Japan. */ -class MountainDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class MountainDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 68b61c210..eede657be 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing National Foundation Day in Japan. */ -class NationalFoundationDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class NationalFoundationDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 5f9ace8c6..17e3f1f1f 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Japan. */ -class NewYearsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index 350fbf4dc..24df344c9 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing public bridge days in Japan. */ -class PublicBridgeDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class PublicBridgeDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 5ffb7a577..b78719492 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing Respect For The Aged Day in Japan. */ -class RespectForTheAgedDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class RespectForTheAgedDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index 6a9526fb7..0440d01dc 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing Showa Day in Japan. */ -class ShowaDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class ShowaDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday defined in the test. diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 143f53119..e7a862e19 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Health And Sports Day in Japan. */ -class SportsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class SportsDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 62a4b3172..799155bf0 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class testing Vernal Equinox Day in Japan. */ -class VernalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class VernalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 2833789e7..65bd647ac 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas day in Latvia. * * @author Gedas Lukošius */ -class ChristmasDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index 36344550d..8c517abee 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas Eve day in Latvia. * * @author Gedas Lukošius */ -class ChristmasEveDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index 434223792..5b20df494 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter day in Latvia. * * @author Gedas Lukošius */ -class EasterDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class EasterDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 93eb27a93..1bb901c22 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday day in Latvia. * * @author Gedas Lukošius */ -class EasterMondayDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index 1aeefa25f..5e8d5f01a 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Latvia. * * @author Gedas Lukošius */ -class GoodFridayDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class GoodFridayDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index 70d48467a..a14b1bef7 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day in Latvia. * * @author Gedas Lukošius */ -class InternationalWorkersDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index b52c93e28..9e1188c1d 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -18,13 +18,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Latvia. * * @author Gedas Lukošius */ -class LatviaTest extends LatviaBaseTestCase +class LatviaTest extends LatviaBaseTestCase implements ProviderTestCase { /** * Tests if all official holidays in Latvia are defined by the provider class. @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 9d976ebd2..aba0efbef 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Midsummer Eve day in Latvia. * * @author Gedas Lukošius */ -class MidsummerEveDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class MidsummerEveDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index a9ec5d778..9d94e6417 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's Day in Latvia. * * @author Gedas Lukošius */ -class NewYearsDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index bd3f3b077..d03ec21c6 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's Eve day in Latvia. * * @author Gedas Lukošius */ -class NewYearsEveDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class NewYearsEveDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 50b8e0adb..1179f627a 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Restoration of Independence of Latvia day. * * @author Gedas Lukošius */ -class ProclamationOfTheRepublicOfLatviaDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class ProclamationOfTheRepublicOfLatviaDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index 9b6adb31b..56afc639b 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Restoration of Independence of Latvia day. * * @author Gedas Lukošius */ -class RestorationOfIndependenceDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class RestorationOfIndependenceDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index ff2efc0ba..f3a738ef3 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Second Christmas day in Latvia. * * @author Gedas Lukošius */ -class SecondChristmasDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index 65547452b..629c3f711 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for St. John's Day in Latvia. * * @author Gedas Lukošius */ -class StJohnsDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterface +class StJohnsDayTest extends LatviaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index b580abecb..d535afb5b 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints' Day in Lithuania. * * @author Gedas Lukošius */ -class AllSaintsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index 5a4600ae9..f0f2c3923 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Souls' Day in Lithuania. * * @author Tomas Norkūnas */ -class AllSoulsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class AllSoulsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index b092b9643..83a006c16 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Assumption of Mary day in Lithuania. * * @author Gedas Lukošius */ -class AssumptionOfMaryDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 35fd9a43e..9858627f4 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas day in Lithuania. * * @author Gedas Lukošius */ -class ChristmasDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 8426d34a1..e96f0767a 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Christmas Eve day in Lithuania. * * @author Gedas Lukošius */ -class ChristmasEveDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index 3ec056cfe..cb2aa4286 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter day in Lithuania. * * @author Gedas Lukošius */ -class EasterDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class EasterDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index 5bf27c65b..4250a9e21 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday day in Lithuania. * * @author Gedas Lukošius */ -class EasterMondayDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index 66d69ffb1..7baafc574 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day in Lithuania. * * @author Gedas Lukošius */ -class InternationalWorkersDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index 810190552..388498948 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -102,4 +102,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 50fb2373c..f6899e526 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's Day in Lithuania. * * @author Gedas Lukošius */ -class NewYearsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 9d092252d..2694ed86a 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Restoration of Independence of Lithuania day. * * @author Gedas Lukošius */ -class RestorationOfIndependenceOfLithuaniaDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class RestorationOfIndependenceOfLithuaniaDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index d8872f6da..01974d2e2 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Restoration of the State of Lithuania day. * * @author Gedas Lukošius */ -class RestorationOfTheStateOfLithuaniaDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class RestorationOfTheStateOfLithuaniaDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 16044b5bf..c1639f59f 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Second Christmas day in Lithuania. * * @author Gedas Lukošius */ -class SecondChristmasDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index 889bf5a2e..230ef0eea 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for St. John's Day in Lithuania. * * @author Gedas Lukošius */ -class StJohnsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class StJohnsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index 47e9f6f4c..ec2ed1bf0 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Statehood Day day in Lithuania. * * @author Gedas Lukošius */ -class StatehoodDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInterface +class StatehoodDayTest extends LithuaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index bce089a93..7847843b7 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Luxembourg. */ -class AllSaintsDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index de439e0f1..04c22c5b1 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Luxembourg. */ -class AscensionDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index ff093d58e..2f9ef2de5 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Luxembourg. */ -class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index a41d87e43..9d3fb376d 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Luxembourg. */ -class ChristmasDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index 931190176..b95f06fdd 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Luxembourg. */ -class EasterMondayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index 06a723387..f1404eefc 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Europe Day in Luxembourg. */ -class EuropeDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class EuropeDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index 19ddea69e..ee6c430e5 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Luxembourg. */ -class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/LuxembourgTest.php b/tests/Luxembourg/LuxembourgTest.php index 99a39e48d..55ba10832 100644 --- a/tests/Luxembourg/LuxembourgTest.php +++ b/tests/Luxembourg/LuxembourgTest.php @@ -17,11 +17,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Luxembourg; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Luxembourg. */ -class LuxembourgTest extends LuxembourgBaseTestCase +class LuxembourgTest extends LuxembourgBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -96,4 +97,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index e4b0ee8af..1efb7dbc6 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Luxembourg. */ -class NationalDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class NationalDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index 725d44578..dfc02dae4 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in France. */ -class NewYearsDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index bd8dce57d..c5a22ce3d 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Luxembourg. */ -class PentecostMondayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index 2c5856ff7..e220e2fb5 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Luxembourg. */ -class SecondChristmasDayTest extends LuxembourgBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 3d7f6f112..412bed310 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in the Netherlands. */ -class AscensionDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index 03f699d8a..449ccc25d 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ash Wednesday in the Netherlands. */ -class AshWednesdayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class AshWednesdayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 7e8cfb6eb..caafcda85 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in the Netherlands. */ -class ChristmasDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 8422032e1..52315e7d9 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Commemoration Day in the Netherlands. */ -class CommemorationDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class CommemorationDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index 04617399b..9e9b17261 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in the Netherlands. */ -class EasterMondayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 89b02003c..36576e5a0 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter in the Netherlands. */ -class EasterTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index b1247ae2b..9fc8da80b 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Epiphany in the Netherlands. */ -class EpiphanyTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index bbad5053f..aba786b21 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Father's Day in the Netherlands. */ -class FathersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class FathersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index f9a214c0b..7ee728fb6 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in the Netherlands. */ -class GoodFridayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index 306432a6e..a5849e9d7 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Halloween in the Netherlands. */ -class HalloweenTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class HalloweenTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index c8c97fcff..defb09e73 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in the Netherlands. */ -class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index 26c6c8c6b..fabe4c1aa 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Kings Day in the Netherlands. */ -class KingsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class KingsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 1f8fe7fd9..67c2de618 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Liberation Day in the Netherlands. */ -class LiberationDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class LiberationDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index abb5a6be4..ab347dbd8 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Mother's Day in the Netherlands. */ -class MothersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class MothersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 8c9390b03..47f3f1b21 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Netherlands. */ -class NetherlandsTest extends NetherlandsBaseTestCase +class NetherlandsTest extends NetherlandsBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -114,4 +115,12 @@ public function testOtherHolidays(): void 'princesDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 794a2f78d..64620aaeb 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the Netherlands. */ -class NewYearsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index 913beed90..e128e394c 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in the Netherlands. */ -class PentecostTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 44ac83ed8..96d5b73a2 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queen's Day in the Netherlands. */ -class QueensDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class QueensDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index 0b880bbc7..721a378d4 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Summertime in the Netherlands. */ -class SummertimeTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class SummertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 8fad178a0..647edc8a9 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Valentines Day in the Netherlands. */ -class ValentinesDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class ValentinesDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index 987054370..7f142c754 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Wintertime in the Netherlands. */ -class WintertimeTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class WintertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index 8e45513d5..2679e553b 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing World Animal Day in the Netherlands. */ -class WorldAnimalDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class WorldAnimalDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index 4aa80d01c..144a28ce0 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Carnival in the Netherlands. */ -class carnivalDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class carnivalDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 9f528000c..b10e259ad 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in the Netherlands. */ -class pentecostMondayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class pentecostMondayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index 4726ca232..d5a871809 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Prince's Day in the Netherlands. */ -class princesDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class princesDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index 2caa167d1..094efb4fc 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -22,12 +22,12 @@ use RuntimeException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the second day of Carnival in the Netherlands. */ -class secondCarnivalDay extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class secondCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index 006a7374a..e8c5c7814 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the second day ofChristmas in the Netherlands. */ -class secondChristmasdayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class secondChristmasdayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 46b283d15..948e78b7b 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing st Martins Day in the Netherlands. */ -class stMartinsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class stMartinsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index f41fe9e8f..45fec9483 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing st Nicholas Day in the Netherlands. */ -class stNicholasDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class stNicholasDayTest extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index decbb7b17..c9a2ba415 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -22,12 +22,12 @@ use RuntimeException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Carnival in the Netherlands. */ -class thirdCarnivalDay extends NetherlandsBaseTestCase implements YasumiTestCaseInterface +class thirdCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index c7ec1b7c6..472c7c229 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing ANZAC day in the New Zealand. */ -class AnzacDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class AnzacDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index a0aa3f50c..dac058276 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in the New Zealand. */ -class BoxingDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index b5c6df7f9..43a6a3703 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in the New Zealand. */ -class ChristmasDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index f90e8107d..519bde9d8 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Day After New Years Day in the New Zealand. */ -class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index 001195093..a8c638469 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Monday in New Zealand. */ -class EasterMondayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index 841ed853a..bd5b75b38 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in New Zealand. */ -class GoodFridayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index 388e28dbb..e37dc49ee 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in the New Zealand. */ -class LabourDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index e86bf0078..99123b8e3 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the New Zealand. */ -class NewYearsDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index ec4ff59fd..1c5e2f5af 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in New Zealand. */ -class NewZealandTest extends NewZealandBaseTestCase +class NewZealandTest extends NewZealandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 93b40c92a..3f9018290 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Queens Birthday in the New Zealand. */ -class QueensBirthdayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class QueensBirthdayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 8d609ad52..fadaf348b 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Waitangi day in the New Zealand. */ -class WaitangiDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInterface +class WaitangiDayTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index 6e9cafef6..5b78f140c 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Norway. */ -class AscensionDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 89fa4ce1e..b5b506959 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Norway. */ -class ChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index 36b6111fa..30b2be170 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Norway. */ -class ConstitutionDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class ConstitutionDayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index dca0b2f44..8d2fe46ed 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Norway. */ -class EasterMondayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index 2893a73e6..fbbb1334f 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Norway. */ -class EasterTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index aac6a2c3f..06a87d389 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Norway. */ -class GoodFridayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 229623394..5aa69bc78 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Norway. */ -class InternationalWorkersDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index c0877a016..f3fb744ea 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Maundy Thursday in Norway. */ -class MaundyThursdayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class MaundyThursdayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index adc712f9d..f84b54ca0 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Norway. */ -class NewYearsDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index 9e40fb041..ab410cbea 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Norway. */ -class NorwayTest extends NorwayBaseTestCase +class NorwayTest extends NorwayBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -97,4 +98,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 693a34e6c..003b65afd 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Norway. */ -class PentecostMondayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index d0a5735d8..554cb50ce 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Norway. */ -class PentecostTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index 718143f69..5e1c66e80 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Norway. */ -class SecondChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index de5d51e04..c75884b63 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Poland. */ -class AllSaintsDayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index d10dc7b88..1edc6e2fc 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Poland. */ -class AssumptionOfMaryTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 9b4860896..c43293e26 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Poland. */ -class ChristmasTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index 114689102..a6a79832e 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Poland. */ -class ConstitutionDayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class ConstitutionDayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index aa24bb404..57060be8f 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Corpus Christi in Poland. */ -class CorpusChristiTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 359eecb55..3bc9a68f4 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Poland. */ -class EasterMondayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 352e05004..c8b7837c4 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Poland. */ -class EasterTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index 110dc5787..e2e27d260 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Poland. */ -class EpiphanyTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index 54d0e6883..28358cfc6 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Independence Day of Poland in Poland. */ -class IndependenceDayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index 8690cba07..0dd8cafff 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Poland. */ -class InternationalWorkersDayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index c1ee0cec7..5c917b0cd 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Poland. */ -class NewYearsDayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index 12c5f52a3..027026f1b 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Poland. */ -class PentecostTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index d87c4369f..d1f79ffdb 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Poland. */ -class PolandTest extends PolandBaseTestCase +class PolandTest extends PolandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -98,4 +99,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index 23ba199f9..c7465afed 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Poland. */ -class SecondChristmasDayTest extends PolandBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends PolandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index e28186dc3..417ae5433 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for All Saints Day in Portugal. */ -class AllSaintsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index 8bcbcb5db..003845919 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Portugal. */ -class AssumptionOfMaryTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index 41a81e0fe..d46140a08 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Portugal Day in Portugal. */ -class CarnationRevolutionDayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class CarnationRevolutionDayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was established. diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index d74fff213..32fa8f058 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Portugal. */ -class ChristmasTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 8e8f44e8a..82e119ed0 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Corpus Christi in Portugal. */ -class CorpusChristiTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index 5dda1e1e8..fb1c2fec3 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Norway. */ -class EasterTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index 058d4daa3..67b632f3a 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Norway. */ -class GoodFridayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index abd01f302..82ab35cbb 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Portugal. */ -class ImmaculateConceptionTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index ae101a05d..b3111aac4 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Portugal. */ -class InternationalWorkersDayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index 99b7bae3c..11d17e8f8 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Portugal. */ -class NewYearsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 0eae5942f..b60e49d12 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -20,12 +20,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Portugal; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Portugal Day in Portugal. */ -class PortugalDayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class PortugalDayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was abolished. diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index b8ff832db..ca0608c49 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Poland. */ -class PortugalTest extends PortugalBaseTestCase +class PortugalTest extends PortugalBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -103,4 +104,12 @@ public function testOtherHolidays(): void $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 9a3d2c457..ebff4c352 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Restoration of Independence Day in Portugal. */ -class PortugueseRepublicDayTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class PortugueseRepublicDayTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 7f4a49fdc..0da0c35c1 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Restoration of Independence Day in Portugal. */ -class RestorationOfIndependenceTest extends PortugalBaseTestCase implements YasumiTestCaseInterface +class RestorationOfIndependenceTest extends PortugalBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/ProviderTestCase.php b/tests/ProviderTestCase.php new file mode 100644 index 000000000..67d8bbfe4 --- /dev/null +++ b/tests/ProviderTestCase.php @@ -0,0 +1,26 @@ + + */ + +namespace Yasumi\tests; + +/** + * This interface class defines the standard functions that any holiday provider PHPUnit test case needs to define. + */ +interface ProviderTestCase +{ + /** + * Tests whether the expected number of sources are actually defined. + */ + public function testSources(): void; +} diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index fd8bf54da..af9f8f0d8 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Romania. */ -class AssumptionOfMaryTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index a89397ca0..9faaa408d 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Children's Day in Romania. */ -class ChildrensDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class ChildrensDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index c70a47edc..44fc792c5 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Romania. */ -class ChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index a5513b7cb..bd53ea700 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Constantin Brancusi Day in Romania. */ -class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index 964a27efa..87ef9ce90 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Day after New Years Day in Romania. */ -class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index d44b6267e..0ed94d429 100755 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class EasterMondayTest. */ -class EasterMondayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index eed87fc5b..700f23c58 100755 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class EasterTest. */ -class EasterTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 688e7ee0d..624e0aa27 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class InternationalWorkersDayTest. */ -class InternationalWorkersDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index c9ee575da..1179aa568 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing National Day in Romania. */ -class NationalDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class NationalDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 4cab65141..0d2015c5b 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Romania. */ -class NewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index 2bef8081f..60b71c5ed 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class PentecostMondayTest. */ -class PentecostMondayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index 37f653f48..f2143c4e6 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class PentecostTest. */ -class PentecostTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index c3f4595c7..56776e2cc 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -17,11 +17,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class RomaniaTest. */ -class RomaniaTest extends RomaniaBaseTestCase +class RomaniaTest extends RomaniaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -115,4 +116,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index b2476ca78..e60f322c4 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Romania. */ -class SecondChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index 9b32b95c5..f24d11a77 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Saint Andrew Day in Romania. */ -class StAndrewsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class StAndrewsDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index 03d447a6c..cea786bfd 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing United Principalities Day in Romania. */ -class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index 235b2145b..8bf31d9cd 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -20,14 +20,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Defence of the Fatherland day in Russia. * * @author Gedas Lukošius */ -class DefenceOfTheFatherlandDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class DefenceOfTheFatherlandDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index a3a15c250..3779dff64 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Women's day in Russia. * * @author Gedas Lukošius */ -class InternationalWomensDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class InternationalWomensDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index b29180a3f..52fd6aa64 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's holidays day 2 in Russia. * * @author Gedas Lukošius */ -class NewYearHolidaysDay2Test extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearHolidaysDay2Test extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 9e8217718..e9ad68672 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's holidays day 3 in Russia. * * @author Gedas Lukošius */ -class NewYearHolidaysDay3Test extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearHolidaysDay3Test extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index 0b97780ca..24c0d3486 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -18,14 +18,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's holidays day 4 in Russia. * * @author Gedas Lukošius */ -class NewYearHolidaysDay4Test extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearHolidaysDay4Test extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index 0b3f4384d..34f453167 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's holidays day 5 in Russia. * * @author Gedas Lukošius */ -class NewYearHolidaysDay5Test extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearHolidaysDay5Test extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 138645b48..9bd190c75 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's holidays day 6 in Russia. * * @author Gedas Lukošius */ -class NewYearHolidaysDay6Test extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearHolidaysDay6Test extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index 2a1f37119..69fa7d2c6 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -18,14 +18,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's holidays day 8 in Russia. * * @author Gedas Lukošius */ -class NewYearHolidaysDay8Test extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearHolidaysDay8Test extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 6519c5782..06e4c1eb6 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Year's Day in Russia. * * @author Gedas Lukošius */ -class NewYearsDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 77ec98b65..b890cbf9d 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Orthodox Christmas Day in Russia. * * @author Gedas Lukošius */ -class OrthodoxChristmasDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class OrthodoxChristmasDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index 26ee145aa..6e2549f9f 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Russia day. * * @author Gedas Lukošius */ -class RussiaDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class RussiaDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index ae27772e3..afe0b0952 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -18,13 +18,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Russia. * * @author Gedas Lukošius */ -class RussiaTest extends RussiaBaseTestCase +class RussiaTest extends RussiaBaseTestCase implements ProviderTestCase { /** * Tests if all official holidays in Russia are defined by the provider class. @@ -103,4 +104,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index a7c351524..74abdc267 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Spring and Labour day in Russia. * * @author Gedas Lukošius */ -class SpringAndLabourDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class SpringAndLabourDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index d69970f0b..6b77e9417 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -21,14 +21,14 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Unity day in Russia. * * @author Gedas Lukošius */ -class UnityDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class UnityDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index 58ad0c8d0..8aad7fd57 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Victory day in Russia. * * @author Gedas Lukošius */ -class VictoryDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface +class VictoryDayTest extends RussiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index a43f1eaed..c4b29c401 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class AllSaintsDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index eb3d54802..b4e679258 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas day in Slovakia. * * @author Andrej Rypak (dakujem) */ -class ChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index ea13cf812..87f318597 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas eve in Slovakia. * * @author Andrej Rypak (dakujem) */ -class ChristmasEveTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index 274779f4e..f35185dda 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class EasterMondayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 5f18bf8f3..763bc1580 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class EpiphanyTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 043a9c6c2..9df93248b 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -20,14 +20,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class GoodFridayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index c50f881c9..7e3d0fb84 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 58bf4047e..8646050c1 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index b9ab2362b..39795d58b 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a official holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index ede7354ce..9cfc1c791 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Second Christmas day in Slovakia. * * @author Andrej Rypak (dakujem) */ -class SecondChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 957072755..414ba3b1c 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing an official holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index be43ef326..c87cdf9fe 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Slovak independence day in Slovakia. @@ -27,7 +27,7 @@ * @author Andrej Rypak (dakujem) * @author Jan Langer */ -class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index 33ba8fdd9..25dba0cc0 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing an official holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 79e7cc653..b8a3fce92 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -17,13 +17,14 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Slovakia. * * @author Andrej Rypak (dakujem) */ -class SlovakiaTest extends SlovakiaBaseTestCase +class SlovakiaTest extends SlovakiaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -105,4 +106,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 2a3eef754..9019f2271 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing an official holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class StruggleForFreedomAndDemocracyDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class StruggleForFreedomAndDemocracyDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 848ffc0c9..30cbbecb3 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -19,14 +19,14 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing a holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ -class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 28f48996e..2ec4458b4 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class ChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 0d0132b74..d30abaed9 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Family Friday in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class FamilyDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class FamilyDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 75b3094eb..05d2c4115 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Freedom Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class FreedomDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class FreedomDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index e0260df53..9dda52f9f 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Good Friday in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class GoodFridayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 420a9a103..265553ab0 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Heritage Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class HeritageDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class HeritageDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index 78244bdb4..af76ea15d 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Human Rights Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class HumanRightsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class HumanRightsDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 261cb6a8d..975c7985f 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the public holiday in respect of the 2016 Municipal Elections in South Africa (August 3rd, 2016). @@ -28,7 +28,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class MunicipalElections2016DayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class MunicipalElections2016DayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index dea75b13d..96220dce7 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing National Women's Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class NationalWomensDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class NationalWomensDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index e27a1db44..422888172 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class NewYearsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index ebe434a9e..b84d5444a 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Day of Reconciliation in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class ReconciliationDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class ReconciliationDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index e357e7210..b50028c1c 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Day of Goodwill in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index 23c13ee5a..9b194b88f 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -17,13 +17,14 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in South Africa. * * @author Sacha Telgenhof */ -class SouthAfricaTest extends SouthAfricaBaseTestCase +class SouthAfricaTest extends SouthAfricaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -107,4 +108,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index b3c0e60a0..0f38ea876 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -19,7 +19,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the 2016 Substitute Day of Goodwill in South Africa. @@ -28,7 +28,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class SubstituteDayOfGoodwillTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class SubstituteDayOfGoodwillTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index 42d3c15c6..5ef8e9729 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class WorkersDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index ff29defa3..43be9451b 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -20,7 +20,7 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Youth Day in South Africa. @@ -29,7 +29,7 @@ * determines whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. * Yasumi currently implements all South African holidays based on this act. */ -class YouthDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInterface +class YouthDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 8c59430f8..cee0b5926 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing day after Arbor Day in South Korea. */ -class ArborDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class ArborDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was removed. diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index ec627c846..d0a1d02b0 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing day after Armed Forces Day in South Korea. */ -class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index a95a1794a..7209a626e 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -21,12 +21,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Buddha's Birthday in South Korea. */ -class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 85ca5c178..1d66b8630 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Children's Day in South Korea. */ -class ChildrensDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class ChildrensDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index acb8c79a6..ed4c76f28 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in South Korea. */ -class ChristmasDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index fd8f0701d..63556e27f 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -22,12 +22,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Chuseok in South Korea. */ -class ChuseokTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class ChuseokTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 385a67e13..ab21660bb 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing day after Constitution Day in South Korea. */ -class ConstitutionDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class ConstitutionDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index 29f1c2e61..a256cb0d9 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Gaecheonjeol (National Foundation Day) in South Korea. */ -class GaecheonjeolTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class GaecheonjeolTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index 3ab41747c..4e13dc0b7 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Hangul Day in South Korea. */ -class HangulDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class HangulDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index a8e78dd63..75b72da68 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Independence Movement Day in South Korea. */ -class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index 38dadf197..3f9701c44 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Independence Movement Day in South Korea. */ -class LiberationDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class LiberationDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 5c95c994c..017c1510f 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Memorial Day in South Korea. */ -class MemorialDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class MemorialDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index 0786c1231..3bce3cabc 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -21,12 +21,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Year's Day in South Korea. */ -class NewYearsDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 85b260967..30f356b51 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -22,12 +22,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Seollal (Korean New Year's Day) in South Korea. */ -class SeollalTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +class SeollalTest extends SouthKoreaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 01f3af4c4..ce0b2009b 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -18,11 +18,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in South Korea. */ -class SouthKoreaTest extends SouthKoreaBaseTestCase +class SouthKoreaTest extends SouthKoreaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -139,4 +140,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 94da57f7c..cab7d5deb 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Spain. */ -class AllSaintsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index 25e04cea1..a2f674243 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Andalusia Day in Andalusia (Spain). */ -class AndalusiaDayTest extends AndalusiaBaseTestCase implements YasumiTestCaseInterface +class AndalusiaDayTest extends AndalusiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index c2c455fc1..b6eb02413 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Andalusia (Spain). */ -class AndalusiaTest extends AndalusiaBaseTestCase +class AndalusiaTest extends AndalusiaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 7540d7f57..5ceb102f5 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Aragon (Spain). */ -class AragonTest extends AragonBaseTestCase +class AragonTest extends AragonBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index 97050e8c3..2138d83c4 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. George's Day in Aragon (Spain). */ -class StGeorgesDayTest extends AragonBaseTestCase implements YasumiTestCaseInterface +class StGeorgesDayTest extends AragonBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index b7a5065b9..fe2e45666 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Spain. */ -class AssumptionOfMaryTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index c028d99ce..5b4ab4776 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Asturias Day in Asturias (Spain). */ -class AsturiasDayTest extends AsturiasBaseTestCase implements YasumiTestCaseInterface +class AsturiasDayTest extends AsturiasBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index 59be226f0..43adc2732 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Asturias (Spain). */ -class AsturiasTest extends AsturiasBaseTestCase +class AsturiasTest extends AsturiasBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index b96137540..fdac2fd6b 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Day of the Balearic Islands in the Balearic Islands (Spain). */ -class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements YasumiTestCaseInterface +class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index f35c00c04..deb4da1ac 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Balearic Islands (Spain). */ -class BalearicIslandsTest extends BalearicIslandsBaseTestCase +class BalearicIslandsTest extends BalearicIslandsBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -102,4 +103,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index ec12befe7..00bff30d9 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Basque Country Day in Basque Country (Spain). */ -class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements YasumiTestCaseInterface +class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index 19a5b32ec..6e3d511ad 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Basque Country (Spain). */ -class BasqueCountryTest extends BasqueCountryBaseTestCase +class BasqueCountryTest extends BasqueCountryBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index be34f87c9..74bd27747 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Canary Islands Day in the Canary Islands (Spain). */ -class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements YasumiTestCaseInterface +class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index e7317b0ab..aad50e90b 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Canary Islands (Spain). */ -class CanaryIslandsTest extends CanaryIslandsBaseTestCase +class CanaryIslandsTest extends CanaryIslandsBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index 38b09437e..a9800974a 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Cantabria Day in Cantabria (Spain). */ -class CantabriaDayTest extends CantabriaBaseTestCase implements YasumiTestCaseInterface +class CantabriaDayTest extends CantabriaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index a5d26e774..f683034d4 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Cantabria (Spain). */ -class CantabriaTest extends CantabriaBaseTestCase +class CantabriaTest extends CantabriaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index 31dc2e330..2b1bd2c62 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Castile and León Day in Castile and León (Spain). */ -class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements YasumiTestCaseInterface +class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index 0018ba1be..cad250b37 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Castile And Leon (Spain). */ -class CastileAndLeonTest extends CastileAndLeonBaseTestCase +class CastileAndLeonTest extends CastileAndLeonBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index d0c6a2413..90e2c952c 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Castilla-La Mancha Day in Castilla-La Mancha (Spain). */ -class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements YasumiTestCaseInterface +class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 8e435396c..f6a06e8ac 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Castilla-La Mancha (Spain). */ -class CastillaLaManchaTest extends CastillaLaManchaBaseTestCase +class CastillaLaManchaTest extends CastillaLaManchaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 457a5149e..ea8f67212 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Catalonia (Spain). */ -class CataloniaTest extends CataloniaBaseTestCase +class CataloniaTest extends CataloniaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -101,4 +102,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index b04aa83c1..c3e64c67b 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Catalonia in Catalonia (Spain). */ -class nationalCataloniaDayTest extends CataloniaBaseTestCase implements YasumiTestCaseInterface +class nationalCataloniaDayTest extends CataloniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 821240622..df2f0f5cb 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. John's Day in Catalonia (Spain). */ -class stJohnsDayTest extends CataloniaBaseTestCase implements YasumiTestCaseInterface +class stJohnsDayTest extends CataloniaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index 41f01b58d..a5ee6b7c3 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Ceuta (Spain). */ -class CeutaTest extends CeutaBaseTestCase +class CeutaTest extends CeutaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index d4570a28d..916f89419 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Ceuta Day in Ceuta (Spain). */ -class ceutaDayTest extends CeutaBaseTestCase implements YasumiTestCaseInterface +class ceutaDayTest extends CeutaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index d512061b8..81e407368 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Spain. */ -class ChristmasTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class ChristmasTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 648594de9..2afcfe586 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Community of Madrid (Spain). */ -class CommunityOfMadridTest extends CommunityOfMadridBaseTestCase +class CommunityOfMadridTest extends CommunityOfMadridBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -101,4 +102,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index 60d50e636..5b02a2a83 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for the day of Dos de Mayo Uprising in the Community of Madrid (Spain). */ -class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements YasumiTestCaseInterface +class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index b146fc76d..6502db11c 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Day of the Constitution in Spain. */ -class ConstitutionDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class ConstitutionDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index bee0cd0a9..8a1403ef2 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Spain. */ -class EasterMondayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index b56444aea..4512228b0 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Spain. */ -class EpiphanyTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index fcbbccb48..9c8d63bdb 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Extremadura Day in Extremadura (Spain). */ -class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements YasumiTestCaseInterface +class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 2513034ed..9a26eb6be 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Extremadura (Spain). */ -class ExtremaduraTest extends ExtremaduraBaseTestCase +class ExtremaduraTest extends ExtremaduraBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index 22003a98b..138799415 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Galicia (Spain). */ -class GaliciaTest extends GaliciaBaseTestCase +class GaliciaTest extends GaliciaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -101,4 +102,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index dab06778b..9bad84227 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Galician Literature Day in Galicia (Spain). */ -class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements YasumiTestCaseInterface +class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index f5d7d3af8..08ea2abb4 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. James Day in Galicia (Spain). */ -class stJamesDayTest extends GaliciaBaseTestCase implements YasumiTestCaseInterface +class stJamesDayTest extends GaliciaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index 20b98ed7f..b70f2ee63 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Spain. */ -class GoodFridayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 697bbf03d..41423f109 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Spain. */ -class ImmaculateConceptionTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index a0c655d5c..b16e60335 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Spain. */ -class InternationalWorkersDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index 156798a23..cdd92159a 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing La Rioja Day in La Rioja (Spain). */ -class LaRiojaDayTest extends LaRiojaBaseTestCase implements YasumiTestCaseInterface +class LaRiojaDayTest extends LaRiojaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 3edd5b22c..4feff0c58 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in La Rioja (Spain). */ -class LaRiojaTest extends LaRiojaBaseTestCase +class LaRiojaTest extends LaRiojaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index 1bfd42b0e..36915feca 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Maundy Thursday in Spain. */ -class MaundyThursdayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class MaundyThursdayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index 7884bf8fb..b33b125b3 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Melilla (Spain). */ -class MelillaTest extends MelillaBaseTestCase +class MelillaTest extends MelillaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -99,4 +100,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index 415e98769..86a7f6aff 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Spain. */ -class NationalDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class NationalDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index 908838999..ccef4297d 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Navarre (Spain). */ -class NavarreTest extends NavarreBaseTestCase +class NavarreTest extends NavarreBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index 393b72851..c5bf4a3bb 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Spain. */ -class NewYearsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index 851089e71..7c69b5c94 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Murcia Day in the Region of Murcia (Spain). */ -class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements YasumiTestCaseInterface +class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index 7a2c945ac..aad234f96 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Region of Murcia (Spain). */ -class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase +class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index c59b9dce5..90745a165 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Spain. */ -class SpainTest extends SpainBaseTestCase +class SpainTest extends SpainBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index 5f6a0adf6..e9b8e4f53 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Valencian Community Day in the Valencian Community (Spain). */ -class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implements YasumiTestCaseInterface +class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index c716656c0..785b858ef 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the Valencian Community (Spain). */ -class ValencianCommunityTest extends ValencianCommunityBaseTestCase +class ValencianCommunityTest extends ValencianCommunityBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -100,4 +101,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays(['valentinesDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 237a31587..23395bbe6 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Valentines Day in the Spain. */ -class ValentinesDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class ValentinesDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index 76ce042fc..5529a60a9 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Spain. */ -class stJosephsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterface +class stJosephsDayTest extends SpainBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 5d03b3e59..367e4661f 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Sweden. */ -class AllSaintsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index db25a5880..9dc871380 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Eve in Sweden. */ -class AllSaintsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class AllSaintsEveTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 394bdf824..a54eb1e5e 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Sweden. */ -class AscensionDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 1d33eb996..f36019d45 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Sweden. */ -class ChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index e755b776e..b39794a84 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Eve in Sweden. */ -class ChristmasEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class ChristmasEveTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index 5cc8335dc..a808956f3 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Sweden. */ -class EasterMondayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index 17169e333..b78247487 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Sweden. */ -class EasterTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index 4accf2dd3..6ccec4b76 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany Eve in Sweden. */ -class EpiphanyEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class EpiphanyEveTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index a2fe43382..bf14ca796 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Sweden. */ -class EpiphanyTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 046fb35fa..fba36571f 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Sweden. */ -class GoodFridayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 77810543f..7f40a5cc0 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for International Workers' Day (i.e. Labour Day) in Sweden. */ -class InternationalWorkersDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index 4316f617c..f08716543 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the National Day of Sweden in Sweden. */ -class NationalDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class NationalDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index c7edbfce0..8229007b8 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Sweden. */ -class NewYearsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index fb6b06c71..deda77110 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Year's Eve in Sweden. */ -class NewYearsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class NewYearsEveTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index 4b102e9db..01f73a093 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Sweden. */ -class PentecostTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 9e43bb260..af7ce5e60 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Second Christmas Day in Sweden. */ -class SecondChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class SecondChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index d312eb7e4..3e3ebfa31 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -16,13 +16,13 @@ use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** * Class for testing St. John's Day / Midsummer's Day in Sweden. */ -class StJohnsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class StJohnsDayTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index 987e48382..7cf2c60e1 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -16,13 +16,13 @@ use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** * Class for testing St. John's Eve / Midsummer's Eve in Sweden. */ -class StJohnsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class StJohnsEveTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index 0dc3ecdd4..f7ae4b896 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Sweden. */ -class SwedenTest extends SwedenBaseTestCase +class SwedenTest extends SwedenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -105,4 +106,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index d597c7faa..f5cc918b4 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Walpurgis Night in Sweden. */ -class WalpurgisEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class WalpurgisEveTest extends SwedenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index b52e237c7..0aacc8c22 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Aargau (Switzerland). */ -class AargauTest extends AargauBaseTestCase +class AargauTest extends AargauBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -108,4 +109,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index d8d77c2fc..8d764a598 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Aargau (Switzerland). */ -class AscensionDayTest extends AargauBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends AargauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 4dc0fad9c..a447d93f6 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Aargau (Switzerland). */ -class ChristmasDayTest extends AargauBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends AargauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index e26720259..db4078d17 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Aargau (Switzerland). */ -class GoodFridayTest extends AargauBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends AargauBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index 7913309f7..7fd8bd8a3 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Aargau (Switzerland). */ -class NewYearsDayTest extends AargauBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends AargauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 0baea6a42..cc7e811f7 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Appenzell Ausserrhoden (Switzerland). */ -class AppenzellAusserrhodenTest extends AppenzellAusserrhodenBaseTestCase +class AppenzellAusserrhodenTest extends AppenzellAusserrhodenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -111,4 +112,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index 66e334af2..217b7c037 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Appenzell Ausserrhoden (Switzerland). */ -class AscensionDayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index e0d0dbbf5..a870d7050 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Appenzell Ausserrhoden (Switzerland). */ -class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index 1ddc61948..fefe22454 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Appenzell Ausserrhoden (Switzerland). */ -class EasterMondayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index cc4c71158..8f5da37f5 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Appenzell Ausserrhoden (Switzerland). */ -class GoodFridayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 28226cd27..1d8f4dc15 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Appenzell Ausserrhoden (Switzerland). */ -class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index 1c2e4aa74..b365f4b6b 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Appenzell Ausserrhoden (Switzerland). */ -class PentecostMondayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index 85adafcf4..51d379247 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Appenzell Ausserrhoden (Switzerland). */ -class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index 20e9f41e4..933c3349e 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Appenzell Innerrhoden (Switzerland). */ -class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index a3804cc1d..0fab156a0 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Appenzell Innerrhoden (Switzerland). */ -class AppenzellInnerrhodenTest extends AppenzellInnerrhodenBaseTestCase +class AppenzellInnerrhodenTest extends AppenzellInnerrhodenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -115,4 +116,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index 24cd56be2..a54e0804f 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Appenzell Innerrhoden (Switzerland). */ -class AscensionDayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index 0cd2ff15e..df21a2c58 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Appenzell Innerrhoden (Switzerland). */ -class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index f78518a5e..1ade7b5f1 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Appenzell Innerrhoden (Switzerland). */ -class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index c25d63485..c389455bc 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Appenzell Innerrhoden (Switzerland). */ -class CorpusChristiTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index cf721e0ac..d613038cf 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Appenzell Innerrhoden (Switzerland). */ -class EasterMondayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index c81bc8bea..cb6bc7734 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Appenzell Innerrhoden (Switzerland). */ -class GoodFridayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index c73cbc326..40e6a959b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Appenzell Innerrhoden (Switzerland). */ -class ImmaculateConceptionTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index 3ccb95a22..592014e10 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Appenzell Innerrhoden (Switzerland). */ -class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index a9db92d6d..b91de76a2 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Appenzell Innerrhoden (Switzerland). */ -class PentecostMondayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index cbc67b69c..187fddfad 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Appenzell Innerrhoden (Switzerland). */ -class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index fb9f294a5..1a5d74fa6 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Basel Landschaft (Switzerland). */ -class AscensionDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index fa2837ba7..85bdfe901 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Basel Landschaft (Switzerland). */ -class BaselLandschaftTest extends BaselLandschaftBaseTestCase +class BaselLandschaftTest extends BaselLandschaftBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index c284b8947..985b2f59b 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Basel Landschaft (Switzerland). */ -class ChristmasDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index 67ea922c3..5d7d516f2 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Basel Landschaft (Switzerland). */ -class EasterMondayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index 2d225f204..ac5cdded5 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Basel Landschaft (Switzerland). */ -class GoodFridayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 7bf8b2904..742b52080 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Basel Landschaft (Switzerland). */ -class NewYearsDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index d22b50701..fa443bd7b 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Basel Landschaft (Switzerland). */ -class PentecostMondayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index ad47ee2e3..e6c689e44 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Basel Landschaft (Switzerland). */ -class StStephensDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index c675de803..9884b092c 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in BaselLandschaft (Switzerland). */ -class WorkersDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends BaselLandschaftBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index 8727e005f..f39535c19 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Basel Stadt (Switzerland). */ -class AscensionDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index 4bdd58c16..b7e7f3f91 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Basel Stadt (Switzerland). */ -class BaselStadtTest extends BaselStadtBaseTestCase +class BaselStadtTest extends BaselStadtBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index 53c9d49a1..fc5b78eb9 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Basel Stadt (Switzerland). */ -class ChristmasDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index 849dd854e..6aa4ebf09 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Basel Stadt (Switzerland). */ -class EasterMondayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index fc78f20ef..27be0019a 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Basel Stadt (Switzerland). */ -class GoodFridayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index c68aa870b..ebf30e2d2 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Basel Stadt (Switzerland). */ -class NewYearsDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index c4299e9de..0f1b39a05 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Basel Stadt (Switzerland). */ -class PentecostMondayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 9ab12e5aa..1992882e8 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Basel Stadt (Switzerland). */ -class StStephensDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index e6c0e9322..ec19873b5 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Basel Stadt (Switzerland). */ -class WorkersDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends BaselStadtBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index e3d42c989..e2e414a53 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Bern (Switzerland). */ -class AscensionDayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index e2137db8f..ec5dc341d 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Bern (Switzerland). */ -class BerchtoldsTagTest extends BernBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index 0961343a3..902682aa7 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Bern (Switzerland). */ -class BernTest extends BernBaseTestCase +class BernTest extends BernBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index dc9a18494..b039a59c3 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Bern (Switzerland). */ -class ChristmasDayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 0e4ba4331..d6646d78a 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Bern (Switzerland). */ -class EasterMondayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index b560eb271..869f1eac6 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Bern (Switzerland). */ -class GoodFridayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index a690e2212..b931b72e4 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Bern (Switzerland). */ -class NewYearsDayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index 1f68c3d58..8f003265d 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Bern (Switzerland). */ -class PentecostMondayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index 8d769c7d4..d18d8e2a4 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Bern (Switzerland). */ -class StStephensDayTest extends BernBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends BernBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index b5faa175f..d8e92b5dc 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Fribourg (Switzerland). */ -class AllSaintsDayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index fa76a2776..f1fe6b552 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Fribourg (Switzerland). */ -class AscensionDayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 1994ee376..fb47c2d17 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Fribourg (Switzerland). */ -class AssumptionOfMaryTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php index 1f1068ec5..1e41a0219 100644 --- a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Fribourg (Switzerland). */ -class BerchtoldsTagTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 35c63d775..6afc14665 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Fribourg (Switzerland). */ -class ChristmasDayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/CorpusChristiTest.php b/tests/Switzerland/Fribourg/CorpusChristiTest.php index 9de8e4ac9..22566113c 100644 --- a/tests/Switzerland/Fribourg/CorpusChristiTest.php +++ b/tests/Switzerland/Fribourg/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Fribourg (Switzerland). */ -class CorpusChristiTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends FribourgBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index 31ed3e19f..b575bd0d0 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing December 26th in Fribourg (Switzerland). */ -class December26thTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class December26thTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index 632357691..5ce42b548 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Fribourg (Switzerland). */ -class EasterMondayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index dfef573aa..ab64f2f37 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Fribourg (Switzerland). */ -class FribourgTest extends FribourgBaseTestCase +class FribourgTest extends FribourgBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -116,4 +117,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index 76ece9716..0f8d29e7e 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Fribourg (Switzerland). */ -class GoodFridayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index f939f4189..53faf5543 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Fribourg (Switzerland). */ -class ImmaculateConceptionTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index b5a4f9e0d..8256ff47b 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Fribourg (Switzerland). */ -class NewYearsDayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index 8a37b15ee..72fafe92d 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Fribourg (Switzerland). */ -class PentecostMondayTest extends FribourgBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends FribourgBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index 3d2d18679..28bd80604 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Geneva (Switzerland). */ -class AscensionDayTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 8da50cce4..e57a1ff64 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Geneva (Switzerland). */ -class ChristmasDayTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index 12ee0189b..1dd2feab3 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Geneva (Switzerland). */ -class EasterMondayTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index 62a043b20..054255ae4 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Geneva (Switzerland). */ -class GenevaTest extends GenevaBaseTestCase +class GenevaTest extends GenevaBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -125,4 +126,12 @@ public function testOtherHolidays(): void $this->assertDefinedHolidays($otherHolidays, self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index 3a51d9d43..0c625e4a3 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Geneva (Switzerland). */ -class GoodFridayTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 7710f0f07..30810dcb0 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -21,12 +21,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Switzerland\Geneva; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Jeune Genevois in Geneva (Switzerland). */ -class JeuneGenevoisTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class JeuneGenevoisTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 9bb98490b..b1e5f45b4 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Geneva (Switzerland). */ -class NewYearsDayTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index 7e3cefa8a..2adcdd435 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Geneva (Switzerland). */ -class PentecostMondayTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index b0fdee2ff..cc79d1541 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Restauration Genevoise in Geneva (Switzerland). */ -class RestaurationGenevoiseTest extends GenevaBaseTestCase implements YasumiTestCaseInterface +class RestaurationGenevoiseTest extends GenevaBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index c53649cad..02a47c9b7 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Glarus (Switzerland). */ -class AllSaintsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index 31ef24f29..926720bbb 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Glarus (Switzerland). */ -class AscensionDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index 693fa43a9..49e215e94 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Glarus (Switzerland). */ -class BerchtoldsTagTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index 5f4853732..1e8420978 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Glarus (Switzerland). */ -class ChristmasDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index 9f4fb96e3..fd2f0360e 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Glarus (Switzerland). */ -class EasterMondayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index c541ea42b..f056612b3 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Glarus (Switzerland). */ -class GlarusTest extends GlarusBaseTestCase +class GlarusTest extends GlarusBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -114,4 +115,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index 2a3f3b005..56d63f645 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Glarus (Switzerland). */ -class GoodFridayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index cd1c2462b..63397fee8 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Näfelser Fahrt in Glarus (Switzerland). */ -class NafelserFahrtTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class NafelserFahrtTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 9ec3a2523..e95abe922 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Glarus (Switzerland). */ -class NewYearsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index ff2ee59b9..4ccd3079f 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Glarus (Switzerland). */ -class PentecostMondayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 7ad425634..45b6e482c 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Glarus (Switzerland). */ -class StStephensDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends GlarusBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index eeac5ad82..2bf2386b5 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Grisons (Switzerland). */ -class AscensionDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 8cebbbfa7..ec20faa9d 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Grisons (Switzerland). */ -class ChristmasDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index afe74f544..b0658d7dc 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Grisons (Switzerland). */ -class EasterMondayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index 5442cc877..15d95c9a3 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Grisons (Switzerland). */ -class GoodFridayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index b31a6fb1e..b61ee09df 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Grisons (Switzerland). */ -class GrisonsTest extends GrisonsBaseTestCase +class GrisonsTest extends GrisonsBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -111,4 +112,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index 4d3a3fd36..7c52cc978 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Grisons (Switzerland). */ -class NewYearsDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index 9cbf78104..bf3fbc0ef 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Grisons (Switzerland). */ -class PentecostMondayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index cefa58228..30c7a3982 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Grisons (Switzerland). */ -class StStephensDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends GrisonsBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index e60e6244b..d89a5717b 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Jura (Switzerland). */ -class AllSaintsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index 0d300e776..375be171b 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Jura (Switzerland). */ -class AscensionDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index 19409c2b0..963dbf05a 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Jura (Switzerland). */ -class AssumptionOfMaryTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/BerchtoldsTagTest.php b/tests/Switzerland/Jura/BerchtoldsTagTest.php index 3c2291b2f..1ecf2ca33 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Jura (Switzerland). */ -class BerchtoldsTagTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index 6345b84a7..8d3febfe4 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Bettags Montag in Jura (Switzerland). */ -class BettagsMontagTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class BettagsMontagTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index bf4a2c138..bc639d2f8 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Jura (Switzerland). */ -class ChristmasDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index bed53869c..f1d4b19bf 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Jura (Switzerland). */ -class CorpusChristiTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends JuraBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index 5ed45f4bd..446f73d93 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Jura (Switzerland). */ -class EasterMondayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php index fc687caee..9d9dc6e39 100644 --- a/tests/Switzerland/Jura/EasterTest.php +++ b/tests/Switzerland/Jura/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter in Jura (Switzerland). */ -class EasterTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index cf22b3d35..695eb6e4b 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Jura (Switzerland). */ -class GoodFridayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index 3db15efc4..116d6743a 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Jura (Switzerland). */ -class JuraTest extends JuraBaseTestCase +class JuraTest extends JuraBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -119,4 +120,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 8bf82d178..09242b181 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Jura (Switzerland). */ -class NewYearsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index fd07edba2..a41d94972 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Jura (Switzerland). */ -class PentecostMondayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php index 0fccfbfa9..ce8205e2a 100644 --- a/tests/Switzerland/Jura/PentecostTest.php +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost in Jura (Switzerland). */ -class PentecostTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index f2da414c7..0727a0749 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Plébiscite jurassien in Jura (Switzerland). */ -class PlebisciteJurassienTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class PlebisciteJurassienTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index 3e8521d2f..1475b8f2d 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Jura (Switzerland). */ -class WorkersDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends JuraBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index 08b48ae39..79b72c8bc 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Lucerne (Switzerland). */ -class AllSaintsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index 80351ac86..d865c4208 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Lucerne (Switzerland). */ -class AscensionDayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index 866cefc6d..0b34fca2c 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Lucerne (Switzerland). */ -class AssumptionOfMaryTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php index c4c67966e..44798709f 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Lucerne (Switzerland). */ -class BerchtoldsTagTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 55f1481f4..fbb9d4318 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Lucerne (Switzerland). */ -class ChristmasDayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index c634eab3e..aa47363fe 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Lucerne (Switzerland). */ -class CorpusChristiTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends LucerneBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index 3676a55ff..900d4d494 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Lucerne (Switzerland). */ -class EasterMondayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index b4b8e0f38..db6371346 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Lucerne (Switzerland). */ -class GoodFridayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 0218b9de4..213d0c66c 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Lucerne (Switzerland). */ -class ImmaculateConceptionTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index a21c7aa47..d2b94dd7c 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Lucerne (Switzerland). */ -class LucerneTest extends LucerneBaseTestCase +class LucerneTest extends LucerneBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -116,4 +117,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index 46877ee48..2cbb8c6fb 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Lucerne (Switzerland). */ -class NewYearsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index 980927813..e2b579320 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Lucerne (Switzerland). */ -class PentecostMondayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index d29574368..d9c05d872 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Lucerne (Switzerland). */ -class StStephensDayTest extends LucerneBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends LucerneBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index d917ed0fd..f153c4870 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Neuchatel (Switzerland). */ -class AscensionDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index ddd376640..9d109eb5b 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Bettags Montag in Neuchatel (Switzerland). */ -class BettagsMontagTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class BettagsMontagTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 124950756..249bb3c64 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Neuchatel (Switzerland). */ -class ChristmasDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/December26thTest.php b/tests/Switzerland/Neuchatel/December26thTest.php index c927fdb04..50a53813c 100644 --- a/tests/Switzerland/Neuchatel/December26thTest.php +++ b/tests/Switzerland/Neuchatel/December26thTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing December 26th in Neuchatel (Switzerland). */ -class December26thTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class December26thTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 63ec242f8..5ae4a2608 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Neuchatel (Switzerland). */ -class EasterMondayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 17af7c316..a106efcd8 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Neuchatel (Switzerland). */ -class GoodFridayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 18bad0c62..f28d27799 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Instauration de la République in Neuchatel (Switzerland). */ -class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/January2ndTest.php b/tests/Switzerland/Neuchatel/January2ndTest.php index 82476c765..626e3d790 100644 --- a/tests/Switzerland/Neuchatel/January2ndTest.php +++ b/tests/Switzerland/Neuchatel/January2ndTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing January 2nd in Neuchatel (Switzerland). */ -class January2ndTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class January2ndTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index e487797f8..3d59417cd 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Neuchatel (Switzerland). */ -class NeuchatelTest extends NeuchatelBaseTestCase +class NeuchatelTest extends NeuchatelBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -113,4 +114,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index 9020eca61..cb77b0bd1 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Neuchatel (Switzerland). */ -class NewYearsDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index afb017dfb..2c246d231 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Neuchatel (Switzerland). */ -class PentecostMondayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index 1e56abd54..c1c6dd855 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Neuchatel (Switzerland). */ -class WorkersDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends NeuchatelBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index 30a258aa0..a12a1c5d6 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Nidwalden (Switzerland). */ -class AllSaintsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index 9d11987d0..4fd3ce05d 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Nidwalden (Switzerland). */ -class AscensionDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index fdc943cd5..03e25f000 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Nidwalden (Switzerland). */ -class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 9e0e8d629..b832b551c 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Nidwalden (Switzerland). */ -class ChristmasDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index fa265571c..e6028d2ee 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Nidwalden (Switzerland). */ -class CorpusChristiTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends NidwaldenBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index b5ea2d7cd..204be3f64 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Nidwalden (Switzerland). */ -class EasterMondayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index 6c8b18f47..1c2de3b91 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Nidwalden (Switzerland). */ -class GoodFridayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index cd74a9c80..b35e26bf2 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Nidwalden (Switzerland). */ -class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 19760c69c..760f2ed48 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Nidwalden (Switzerland). */ -class NewYearsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index 4b97ab63f..fe780cdea 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Nidwalden (Switzerland). */ -class NidwaldenTest extends NidwaldenBaseTestCase +class NidwaldenTest extends NidwaldenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -116,4 +117,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index c3d9975fb..95e4ceb30 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Nidwalden (Switzerland). */ -class PentecostMondayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index e06ed84d9..b41c8f766 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Nidwalden (Switzerland). */ -class StJosephDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class StJosephDayTest extends NidwaldenBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 66c473001..628c4a2f7 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Nidwalden (Switzerland). */ -class StStephensDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends NidwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index e0d27278e..4f384651b 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Obwalden (Switzerland). */ -class AllSaintsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index ae39d5cd2..12fa11c8a 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Obwalden (Switzerland). */ -class AscensionDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index cc3086584..3f24fa2bf 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Obwalden (Switzerland). */ -class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php index f6f5b0f6c..9e5515ee7 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Obwalden (Switzerland). */ -class BerchtoldsTagTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index c4f4e0a7e..ca43820e3 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Bruder-Klausen-Fest in Obwalden (Switzerland). */ -class BruderKlausenFestTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class BruderKlausenFestTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index bfc5c24c1..dcdaa6330 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Obwalden (Switzerland). */ -class ChristmasDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index ef4804cfc..d87e7e487 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Obwalden (Switzerland). */ -class CorpusChristiTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends ObwaldenBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index 8da5d582e..46f6071f4 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Obwalden (Switzerland). */ -class EasterMondayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index 0bdaf188a..8e51abff2 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Obwalden (Switzerland). */ -class GoodFridayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index e9b9a5ef4..2d424f25c 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Obwalden (Switzerland). */ -class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index 2dd0f67e0..34158297a 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Obwalden (Switzerland). */ -class NewYearsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index f40b9c67b..b50ad9220 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Obwalden (Switzerland). */ -class ObwaldenTest extends ObwaldenBaseTestCase +class ObwaldenTest extends ObwaldenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -117,4 +118,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index b01d3c91d..a658e771f 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Obwalden (Switzerland). */ -class PentecostMondayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index dbb6e54fe..54dc739e1 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Obwalden (Switzerland). */ -class StStephensDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends ObwaldenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index 16f58a21a..2045ff1ff 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Schaffhausen (Switzerland). */ -class AscensionDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index ce54651e9..ecc3fd888 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Schaffhausen (Switzerland). */ -class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index e55d95943..51135524f 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Schaffhausen (Switzerland). */ -class ChristmasDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 1abbe2431..3eadfe5ba 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Schaffhausen (Switzerland). */ -class EasterMondayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index 8b0dd34b5..ee3760087 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Schaffhausen (Switzerland). */ -class GoodFridayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 3f758596e..12a376f98 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Schaffhausen (Switzerland). */ -class NewYearsDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index eb33cdd8f..ef60e9be0 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Schaffhausen (Switzerland). */ -class PentecostMondayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index b0193d812..2834fea75 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Schaffhausen (Switzerland). */ -class SchaffhausenTest extends SchaffhausenBaseTestCase +class SchaffhausenTest extends SchaffhausenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -113,4 +114,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 76c9dbfde..93401eb8f 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Schaffhausen (Switzerland). */ -class StStephensDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index c2e9aae14..88bca3876 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Schaffhausen (Switzerland). */ -class WorkersDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index 28e30ccf0..4ab986c2c 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Schwyz (Switzerland). */ -class AllSaintsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index c7ae223af..dbc471c16 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Schwyz (Switzerland). */ -class AscensionDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index 5379c2d9e..9d1f78f3b 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Schwyz (Switzerland). */ -class AssumptionOfMaryTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index 4d81fe803..98ae8598f 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Schwyz (Switzerland). */ -class ChristmasDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index e012e0e00..f2dc674de 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Schwyz (Switzerland). */ -class CorpusChristiTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends SchwyzBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index 74eda5a3e..256e3e96a 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Schwyz (Switzerland). */ -class EasterMondayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index ff135b35c..bdfcb87b5 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Schwyz (Switzerland). */ -class EpiphanyTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index b684b3f46..b1d4353cd 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Schwyz (Switzerland). */ -class GoodFridayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index eaa900e16..d37ad8e96 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Schwyz (Switzerland). */ -class ImmaculateConceptionTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index 0ad655bb2..6f9b77af2 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Schwyz (Switzerland). */ -class NewYearsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index ddff5ab8f..f66859490 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Schwyz (Switzerland). */ -class PentecostMondayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index 5740c57c4..4f063d504 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Schwyz (Switzerland). */ -class SchwyzTest extends SchwyzBaseTestCase +class SchwyzTest extends SchwyzBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -117,4 +118,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index 7a25db22b..e388a843b 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Schwyz (Switzerland). */ -class StJosephDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class StJosephDayTest extends SchwyzBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 317d80abe..e268ae0e9 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Schwyz (Switzerland). */ -class StStephensDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends SchwyzBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index 48f4c96d4..d8b368f95 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Solothurn (Switzerland). */ -class AscensionDayTest extends SolothurnBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends SolothurnBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index b072f86c3..97518b88d 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Solothurn (Switzerland). */ -class BerchtoldsTagTest extends SolothurnBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends SolothurnBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 787e5035b..3aea313ca 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Solothurn (Switzerland). */ -class ChristmasDayTest extends SolothurnBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends SolothurnBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 9961c1b45..b11ee5e1a 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Solothurn (Switzerland). */ -class GoodFridayTest extends SolothurnBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends SolothurnBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 848df49b0..0a99f55e5 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Solothurn (Switzerland). */ -class NewYearsDayTest extends SolothurnBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends SolothurnBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index 150d2781c..0424d2813 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Solothurn (Switzerland). */ -class SolothurnTest extends SolothurnBaseTestCase +class SolothurnTest extends SolothurnBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -110,4 +111,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index c9a165747..14faaa2e7 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in St. Gallen (Switzerland). */ -class AllSaintsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index 94d3aafcf..1dfdeb1bb 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in St. Gallen (Switzerland). */ -class AscensionDayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 2ed52e1c8..3abdfbc37 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in St. Gallen (Switzerland). */ -class ChristmasDayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index 317faa9a1..cf28a6fc5 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in St. Gallen (Switzerland). */ -class EasterMondayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index adf472fb4..cf9e3dbd6 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in St. Gallen (Switzerland). */ -class GoodFridayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index 50e0062f4..b1390d92f 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in St. Gallen (Switzerland). */ -class NewYearsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index 2be40ae92..bf2db4aad 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in St. Gallen (Switzerland). */ -class PentecostMondayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index d107c5eac..27dcd8557 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in St. Gallen (Switzerland). */ -class StGallenTest extends StGallenBaseTestCase +class StGallenTest extends StGallenBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 982c3a620..20cac3679 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in St. Gallen (Switzerland). */ -class StStephensDayTest extends StGallenBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends StGallenBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index b1b47b7e0..8dfef9735 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for National Day in Switzerland. */ -class SwissNationalDayTest extends SwitzerlandBaseTestCase implements YasumiTestCaseInterface +class SwissNationalDayTest extends SwitzerlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index f85690ada..55f87e6cc 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Switzerland. */ -class SwitzerlandTest extends SwitzerlandBaseTestCase +class SwitzerlandTest extends SwitzerlandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -93,4 +94,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index 7e98d1fc9..42468d996 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Thurgau (Switzerland). */ -class AscensionDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index 2a8020e70..703ef02a5 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Thurgau (Switzerland). */ -class BerchtoldsTagTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index 670c2a378..8a4f2ee13 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Thurgau (Switzerland). */ -class ChristmasDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index 657ad3fd1..81bc35125 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Thurgau (Switzerland). */ -class EasterMondayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index 0fec8684b..ec160a3d7 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Thurgau (Switzerland). */ -class GoodFridayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index f50cebab3..de197ebba 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Thurgau (Switzerland). */ -class NewYearsDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index 381606f9e..282d59424 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Thurgau (Switzerland). */ -class PentecostMondayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index 309894deb..e1d93d947 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Thurgau (Switzerland). */ -class StStephensDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 0f611046f..208ee6413 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Thurgau (Switzerland). */ -class ThurgauTest extends ThurgauBaseTestCase +class ThurgauTest extends ThurgauBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -113,4 +114,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index fd5b9e138..232e77be0 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Thurgau (Switzerland). */ -class WorkersDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends ThurgauBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index a8666ae5c..b0d1eb2c6 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Ticino (Switzerland). */ -class AllSaintsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index 9c4151577..ac8bd09ab 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Ticino (Switzerland). */ -class AscensionDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 323baa739..6138564a0 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Ticino (Switzerland). */ -class AssumptionOfMaryTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index 373917eea..cfdda4bac 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Ticino (Switzerland). */ -class ChristmasDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index 30170b966..73084d083 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Ticino (Switzerland). */ -class CorpusChristiTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends TicinoBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index f357c8a47..474c2200c 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Ticino (Switzerland). */ -class EasterMondayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index f590dfe90..e044af836 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Ticino (Switzerland). */ -class EpiphanyTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index a5d386dd3..400f875ce 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Ticino (Switzerland). */ -class ImmaculateConceptionTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index de74d2fd6..f3a3fcef9 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Ticino (Switzerland). */ -class NewYearsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index 002611c55..b451f35e3 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Ticino (Switzerland). */ -class PentecostMondayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 16c6245a9..93e2c2d7d 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Ticino (Switzerland). */ -class StJosephDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class StJosephDayTest extends TicinoBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index a83916f60..3ab96a6f0 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Feast of Saints Peter and Paul in Ticino (Switzerland). */ -class StPeterPaulTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class StPeterPaulTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index 14dd384a3..18340117c 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Ticino (Switzerland). */ -class StStephensDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index da7db31a3..a4b739ba2 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Ticino (Switzerland). */ -class TicinoTest extends TicinoBaseTestCase +class TicinoTest extends TicinoBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -118,4 +119,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index ce8f2ae7e..c4769cb39 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Ticino (Switzerland). */ -class WorkersDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends TicinoBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index 5d676715f..2c7537619 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Uri (Switzerland). */ -class AllSaintsDayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 602d88b9c..4cbd2bd18 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Uri (Switzerland). */ -class AscensionDayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 55cae3824..c19f9b9df 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Uri (Switzerland). */ -class AssumptionOfMaryTest extends UriBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index fc8ac810e..bcd61a57e 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Uri (Switzerland). */ -class ChristmasDayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index a2e6af8f3..1f8cab985 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Uri (Switzerland). */ -class CorpusChristiTest extends UriBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends UriBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index 0a0cfd833..a422bd121 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Uri (Switzerland). */ -class EasterMondayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 571a94152..0e95823d7 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Epiphany in Uri (Switzerland). */ -class EpiphanyTest extends UriBaseTestCase implements YasumiTestCaseInterface +class EpiphanyTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index 59b62a619..1475b4496 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Uri (Switzerland). */ -class GoodFridayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index abd21789a..40d08fb52 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Uri (Switzerland). */ -class ImmaculateConceptionTest extends UriBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 0e15444f1..97247f244 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Uri (Switzerland). */ -class NewYearsDayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index 7b9c207e4..d92c31e19 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Uri (Switzerland). */ -class PentecostMondayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 8ea7d3a0d..92ba949a4 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Uri (Switzerland). */ -class StJosephDayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class StJosephDayTest extends UriBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index ed490de7c..82267cd76 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Uri (Switzerland). */ -class StStephensDayTest extends UriBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends UriBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index e94264881..c79f9f272 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Uri (Switzerland). */ -class UriTest extends UriBaseTestCase +class UriTest extends UriBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -117,4 +118,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 53d1d7bbd..030babc98 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Valais (Switzerland). */ -class AllSaintsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends ValaisBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index 365507221..694651aa3 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Valais (Switzerland). */ -class AscensionDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends ValaisBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 7df54f035..b0a95493a 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Valais (Switzerland). */ -class AssumptionOfMaryTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends ValaisBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index 6d828e68c..015cd30c8 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Valais (Switzerland). */ -class ChristmasDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends ValaisBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index c85da1287..0597a3fa8 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Valais (Switzerland). */ -class CorpusChristiTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends ValaisBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index 906819e4e..8165af390 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Valais (Switzerland). */ -class ImmaculateConceptionTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends ValaisBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 6270e91e7..642ff9fa5 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Valais (Switzerland). */ -class NewYearsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ValaisBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index 56115951e..9fbb7ed9d 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Joseph's Day in Valais (Switzerland). */ -class StJosephDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterface +class StJosephDayTest extends ValaisBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index 68d00aa33..ddf122c81 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Valais (Switzerland). */ -class ValaisTest extends ValaisBaseTestCase +class ValaisTest extends ValaisBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index 6521ee0ce..3d2004e62 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Vaud (Switzerland). */ -class AscensionDayTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index f060be4ae..200179270 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Vaud (Switzerland). */ -class BerchtoldsTagTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 87e3a8cb4..a3005480c 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Bettags Montag in Vaud (Switzerland). */ -class BettagsMontagTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class BettagsMontagTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 1b484ddb3..ae7d0754e 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Vaud (Switzerland). */ -class ChristmasDayTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index d2c4e820e..d13a87834 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Vaud (Switzerland). */ -class EasterMondayTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index a2f8461ea..f4ce95ffb 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Vaud (Switzerland). */ -class GoodFridayTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 8fceb9d11..f49fa7e33 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Vaud (Switzerland). */ -class NewYearsDayTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index f5b5729a2..f8f804061 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Vaud (Switzerland). */ -class PentecostMondayTest extends VaudBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends VaudBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index 55b79280c..203ce9939 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Vaud (Switzerland). */ -class VaudTest extends VaudBaseTestCase +class VaudTest extends VaudBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 5f1ec29e1..db1f5c12d 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing All Saints' Day in Zug (Switzerland). */ -class AllSaintsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class AllSaintsDayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index a08cea5a8..cebd790bc 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Zug (Switzerland). */ -class AscensionDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 71bc23703..9d74e8cce 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of the Assumption of Mary in Zug (Switzerland). */ -class AssumptionOfMaryTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class AssumptionOfMaryTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/BerchtoldsTagTest.php b/tests/Switzerland/Zug/BerchtoldsTagTest.php index f36233ffd..4ea92e736 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing BerchtoldsTag in Zug (Switzerland). */ -class BerchtoldsTagTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class BerchtoldsTagTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 469699963..65e97be5d 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Zug (Switzerland). */ -class ChristmasDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index ed416a793..d488d0657 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -19,12 +19,12 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Corpus Christi in Zug (Switzerland). */ -class CorpusChristiTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class CorpusChristiTest extends ZugBaseTestCase implements HolidayTestCase { use ChristianHolidays; diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 9fddec903..d0c3fbc2d 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Zug (Switzerland). */ -class EasterMondayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index cac4a0d39..a064bd600 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Zug (Switzerland). */ -class GoodFridayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 61ae7dd59..32219fd56 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the day of Immaculate Conception in Zug (Switzerland). */ -class ImmaculateConceptionTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class ImmaculateConceptionTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index c31045f00..8edd7b87b 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Zug (Switzerland). */ -class NewYearsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index 3502b2475..3cd2136ce 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Zug (Switzerland). */ -class PentecostMondayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index a67f0176b..cb3c00d07 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Zug (Switzerland). */ -class StStephensDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends ZugBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 396f13141..da6939cec 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Zug (Switzerland). */ -class ZugTest extends ZugBaseTestCase +class ZugTest extends ZugBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -116,4 +117,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index a8dbedb7f..ea3992bbb 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Ascension Day in Zurich (Switzerland). */ -class AscensionDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class AscensionDayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index fa95d7961..79e7e6cdf 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas in Zurich (Switzerland). */ -class ChristmasDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index 4da88c872..87e61a26d 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Easter Monday in Zurich (Switzerland). */ -class EasterMondayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index 982790b36..f5b8a62c5 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Zurich (Switzerland). */ -class GoodFridayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 572601f93..e30d41a3a 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for New Years Day in Zurich (Switzerland). */ -class NewYearsDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index e6578d992..990c8aaeb 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in Zurich (Switzerland). */ -class PentecostMondayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class PentecostMondayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index 203724961..f1e82341b 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Stephen's Day in Zurich (Switzerland). */ -class StStephensDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class StStephensDayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index 85877eb5b..d97aa9587 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Workers' Day in Zurich (Switzerland). */ -class WorkersDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterface +class WorkersDayTest extends ZurichBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index 97870bc4c..61c001b71 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Zurich (Switzerland). */ -class ZurichTest extends ZurichBaseTestCase +class ZurichTest extends ZurichBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -112,4 +113,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } } diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index 283e9a830..3e25804e8 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the USA. */ -class ChristmasDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index dde24d6b2..10cbaf14f 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Columbus Day in the USA. */ -class ColumbusDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class ColumbusDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index 2d36dcdc0..73c29a4c3 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class to test Independence Day. */ -class IndependenceDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index fb4542e18..95737b163 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Labour Day in the USA. */ -class LabourDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class LabourDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index a275e0db4..e8c374e34 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class to test Dr. Martin Luther King Day. */ -class MartinLutherKingDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class MartinLutherKingDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index 3868262c2..4d75db7ab 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class to test Memorial Day. */ -class MemorialDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class MemorialDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index b944ec0d3..a5675910d 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the USA. */ -class NewYearsDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index a05a65bd0..b6669efdc 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Thanksgiving Day in the USA. */ -class ThanksgivingDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class ThanksgivingDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index e09e414bc..6aca90273 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the USA. */ -class USATest extends USABaseTestCase +class USATest extends USABaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -95,4 +96,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index 3a6d0aacf..5f89719d7 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -20,13 +20,13 @@ use ReflectionException; use Yasumi\Exception\MissingTranslationException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** * Class for testing Veterans Day in the USA. */ -class VeteransDayTest extends USABaseTestCase implements YasumiTestCaseInterface +class VeteransDayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index 0f71b5e44..84f06a921 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class to test Washington's Birthday. */ -class WashingtonsBirthdayTest extends USABaseTestCase implements YasumiTestCaseInterface +class WashingtonsBirthdayTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 107761775..10e85bfa6 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -19,13 +19,13 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** * Class CatholicChristmasDayTest. */ -class CatholicChristmasDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class CatholicChristmasDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index f74178395..9ab1e384a 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class ChristmasDayTest. */ -class ChristmasDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index 7af0807c8..5d88f9741 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class ConstitutionDayTest. */ -class ConstitutionDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class ConstitutionDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index 2423687bf..0d0a8d523 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class DefenderOfUkraineDayTest. */ -class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index 130414738..d601070be 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class EasterTest. */ -class EasterTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class EasterTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index 202860be7..835e60fff 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class IndependenceDayTest. */ -class IndependenceDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class IndependenceDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index 79cfb487a..a63301a2b 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class InternationalWomensDayTest. */ -class InternationalWomensDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class InternationalWomensDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 86116cff4..543f683f7 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class InternationalWorkersDayTest. */ -class InternationalWorkersDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class InternationalWorkersDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 0cea5170d..3f07b4665 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class NewYearsDayTest. */ -class NewYearsDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 0590b4fb8..034088a16 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class PentecostTest. */ -class PentecostTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class PentecostTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 1017de00e..d92f38390 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -18,13 +18,13 @@ use DateTime; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** * Class SecondInternationalWorkersDayTest. */ -class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 9a7ebfa31..0bda972bb 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -21,13 +21,13 @@ use ReflectionException; use Yasumi\Holiday; use Yasumi\SubstituteHoliday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; /** * Class SubstitutedHolidayTest. */ -class SubstitutedHolidayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class SubstitutedHolidayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * Tests the substitution of holidays on saturday (weekend). diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 905b57893..25c797384 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -17,11 +17,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class UkraineTest. */ -class UkraineTest extends UkraineBaseTestCase +class UkraineTest extends UkraineBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -120,4 +121,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } } diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index 58ebf35cc..49edf4e7a 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -18,12 +18,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class VictoryDayTest. */ -class VictoryDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterface +class VictoryDayTest extends UkraineBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 881a635a2..25828d52f 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in the United Kingdom. */ -class BoxingDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 7b5195987..97b19b5c0 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in the United Kingdom. */ -class ChristmasDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 9182b5ea7..e960d5d8f 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Monday in the United Kingdom. */ -class EasterMondayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index d2eb343ce..95d9554b1 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in England. */ -class BoxingDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 8b058207a..eee0b4d27 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in England. */ -class ChristmasDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index d34adc438..94dcdab7f 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Monday in England. */ -class EasterMondayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index 48db112b2..ec304b55a 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in England. */ -class EnglandTest extends EnglandBaseTestCase +class EnglandTest extends EnglandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -93,4 +94,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index dbf518fef..295bbb6f8 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in England. */ -class GoodFridayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index 861e26532..1ea2e8f07 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the May Day Bank Holiday in England. */ -class MayDayBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class MayDayBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 5f2a59ab1..6873cab69 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in England. */ -class NewYearsDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index 0a5907245..e8bdc8eb1 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Spring Bank Holiday in England. */ -class SpringBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class SpringBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index ee86838e8..2765ddfa9 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -17,12 +17,12 @@ use DateTime; use DateTimeZone; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Summer Bank Holiday England. */ -class SummerBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +class SummerBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index 1e5aa862f..038f43e88 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in the United Kingdom. */ -class GoodFridayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index f53b69108..043622ac4 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the May Day Bank Holiday in the United Kingdom. */ -class MayDayBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class MayDayBankHolidayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 7dfdf6fb1..824866865 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in the United Kingdom. */ -class NewYearsDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index 0a77f89dc..6f9e103d0 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Batthe of the Boyne in Northern Ireland. */ -class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index ea28d22be..80253987b 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in Northern Ireland. */ -class BoxingDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index e207747e4..ccd4c2c6e 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Northern Ireland. */ -class ChristmasDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index 4972a9e4a..7a17c7520 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Monday in Northern Ireland. */ -class EasterMondayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index 9e7010520..e9f484940 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Northern Ireland. */ -class GoodFridayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index 31ec8ab99..56c0a4f6a 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the May Day Bank Holiday in Northern Ireland. */ -class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index 4993a8096..097257646 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Northern Ireland. */ -class NewYearsDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index bed9e9251..1cd27abde 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Northern Ireland. */ -class NorthernIrelandTest extends NorthernIrelandBaseTestCase +class NorthernIrelandTest extends NorthernIrelandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -94,4 +95,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index 3bc47c47e..e1e73e75a 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Spring Bank Holiday in Northern Ireland. */ -class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 39c60cede..92108068b 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Patrick's Day in Northern Ireland. */ -class StPatricksDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class StPatricksDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index d2a80487f..27014d86c 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Summer Bank Holiday in Northern Ireland. */ -class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index ec3ea7426..bb7a74a37 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in Scotland. */ -class BoxingDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 67b636583..81dd31322 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Scotland. */ -class ChristmasDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index 9cfdb6e17..38f528e23 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Scotland. */ -class GoodFridayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index 419cfddf1..f6366e633 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the May Day Bank Holiday in Scotland. */ -class MayDayBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class MayDayBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index fb3ad8a1b..30d172313 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Scotland. */ -class NewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 805a18e48..7cefa542f 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Scotland. */ -class ScotlandTest extends ScotlandBaseTestCase +class ScotlandTest extends ScotlandBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -92,4 +93,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index a40208165..55b7bdf7d 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Scotland. */ -class SecondNewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class SecondNewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index e47f297b6..05f1c2578 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Spring Bank Holiday in Scotland. */ -class SpringBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class SpringBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index e691f9254..6e99ed8a6 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing St. Patrick's Day in Scotland. */ -class StAndrewsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class StAndrewsDayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index 467b04c83..9df4b564d 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the August Bank Holiday in Scotland. */ -class SummerBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +class SummerBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 906b765fa..635c62a33 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Spring Bank Holiday in the United Kingdom. */ -class SpringBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class SpringBankHolidayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index 7216d970c..da0371b9f 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Summer Bank Holiday in the United Kingdom. */ -class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseInterface +class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 3cc9493b8..b1a8cd945 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in the United Kingdom. */ -class UnitedKingdomTest extends UnitedKingdomBaseTestCase +class UnitedKingdomTest extends UnitedKingdomBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -93,4 +94,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index f4222bae3..249f95a1a 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Boxing Day in Wales. */ -class BoxingDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class BoxingDayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index c41082f4b..ba4816fea 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Christmas Day in Wales. */ -class ChristmasDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class ChristmasDayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index dc5d9f0b9..abd8bcc30 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -20,12 +20,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing Easter Monday in Wales. */ -class EasterMondayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class EasterMondayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index eacd0f56a..500e6f67c 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class containing tests for Good Friday in Wales. */ -class GoodFridayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class GoodFridayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index 442f855f6..a0a2423f7 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the May Day Bank Holiday in Wales. */ -class MayDayBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class MayDayBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index e305448f7..7f8373648 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing New Years Day in Wales. */ -class NewYearsDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class NewYearsDayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 77f67597a..07c644438 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Spring Bank Holiday in Wales. */ -class SpringBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class SpringBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index f86fd9fbb..f22006f6d 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class for testing the Summer Bank Holiday in Wales. */ -class SummerBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +class SummerBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase { /** * The name of the holiday. diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index d925a148d..0de38bdce 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -16,11 +16,12 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; /** * Class for testing holidays in Wales. */ -class WalesTest extends WalesBaseTestCase +class WalesTest extends WalesBaseTestCase implements ProviderTestCase { /** * @var int year random year number used for all tests in this Test Case @@ -93,4 +94,12 @@ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 88ab1393e..ffa9bcaa2 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -303,6 +303,22 @@ public function assertDayOfWeek( self::assertEquals($expectedDayOfWeek, $holiday->format('l')); } + /** + * Asserts that the holiday provider has the number of expected sources defined. + * + * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be + * tested + * @param int $expectedSourceCount the expected number of sources + * + * @throws ReflectionException + */ + public function assertSources(string $provider, int $expectedSourceCount): void + { + $holidayProvider = Yasumi::create($provider, $this->generateRandomYear()); + + self::assertCount($expectedSourceCount, $holidayProvider->getSources()); + } + /** * Returns a list of random test dates used for assertion of holidays. * From 7010b91fac487fc73e89eb0dd99946037350ebda Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 21 May 2021 00:53:25 +0900 Subject: [PATCH 229/687] Fixed text and links to the unreleased and 2.4.0 version. --- CHANGELOG.md | 3 ++- tests/HolidayTestCase.php | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2c32eaca..60b3fa216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -473,7 +473,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Initial Release -[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.3.0...HEAD +[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.4.0...HEAD +[2.4.0]: https://github.com/azuyalabs/yasumi/compare/2.3.0...2.4.0 [2.3.0]: https://github.com/azuyalabs/yasumi/compare/2.2.0...2.3.0 [2.2.0]: https://github.com/azuyalabs/yasumi/compare/2.1.0...2.2.0 [2.1.0]: https://github.com/azuyalabs/yasumi/compare/2.0.0...2.1.0 diff --git a/tests/HolidayTestCase.php b/tests/HolidayTestCase.php index 7776452de..ba87f3042 100644 --- a/tests/HolidayTestCase.php +++ b/tests/HolidayTestCase.php @@ -15,9 +15,7 @@ namespace Yasumi\tests; /** - * Interface YasumiTestCaseInterface - Yasumi TestCase Interface. - * - * This interface class defines the standard functions that any holiday provider PHPUnit test case needs to define. + * This interface class defines the standard functions that any holiday PHPUnit test case needs to define. * * @see AbstractProvider */ From f17270d4a5872860b6f46e33dace3723644f3d90 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 21 May 2021 22:06:49 +0900 Subject: [PATCH 230/687] Louis Riel Day is only celebrated from 2008. --- tests/Canada/Manitoba/ManitobaTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index f28ea0976..b5fc470ec 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -43,13 +43,18 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'christmasDay', 'victoriaDay', 'terryFoxDay', - 'louisRielDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2008 <= $this->year) { + $holidays[] = 'louisRielDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From d2f5b324c5012241528e7d2acde5ae1d01507641 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 25 May 2021 23:38:47 +0900 Subject: [PATCH 231/687] Corrected the evaluation for the establishment year (expression was reversed). Signed-off-by: Sacha Telgenhof --- tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php | 2 +- tests/Canada/Yukon/YukonTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index a288460de..d862e7176 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -50,7 +50,7 @@ public function testOfficialHolidays(): void 'civicHoliday', ]; - if (1996 >= $this->year) { + if (1996 <= $this->year) { $holidays[] = 'nationalIndigenousPeoplesDay'; } diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index 4aa9aa6ac..0f6fa2754 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -52,7 +52,7 @@ public function testOfficialHolidays(): void $holidays[] = 'yukonHeritageDay'; } - if (1996 >= $this->year) { + if (1996 <= $this->year) { $holidays[] = 'nationalIndigenousPeoplesDay'; } From 6ade29d5154f60887872707ee44b7f12b6577793 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 26 May 2021 09:19:48 +0900 Subject: [PATCH 232/687] Fixed Portuguese Republic Day tests where the period it was suspended wouldn't be checked correctly. Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugalTest.php | 11 +- tests/Portugal/PortugueseRepublicDayTest.php | 121 +++++++++---------- 2 files changed, 65 insertions(+), 67 deletions(-) diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index ca0608c49..be9443d2c 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -43,7 +43,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'internationalWorkersDay', 'easter', @@ -53,10 +53,15 @@ public function testOfficialHolidays(): void 'immaculateConception', 'christmasDay', '25thApril', - 'portugueseRepublic', 'restorationOfIndependence', 'portugalDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { + $holidays[] = 'portugueseRepublic'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index ebff4c352..5d83606b0 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -21,119 +21,112 @@ use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; -/** - * Class for testing Restoration of Independence Day in Portugal. - */ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements HolidayTestCase { - /** - * The year in which the holiday was first established. - */ public const ESTABLISHMENT_YEAR = 1910; - /** - * Holiday was restored by the portuguese government in 2016. - */ + public const HOLIDAY_YEAR_SUSPENDED = 2013; + 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(): void { - $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); + foreach (function () { + yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + yield self::HOLIDAY_YEAR_RESTORED; + } as $year) { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)) + ); + } } /** - * Test that the holiday did not happen in 2013-2015. - * * @throws ReflectionException */ public function testNotHolidayDuringAbolishment(): void { - $year = $this->generateRandomYear(2013, 2015); - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::HOLIDAY_YEAR_SUSPENDED, self::HOLIDAY_YEAR_RESTORED - 1) + ); } /** - * Tests the holiday defined in this test on or after establishment. - * - * @throws ReflectionException - * @throws Exception * @throws ReflectionException * @throws Exception */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - - $expected = new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)); - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - - $year = self::ESTABLISHMENT_YEAR; - $expected = new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)); - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + foreach (function () { + yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + yield self::ESTABLISHMENT_YEAR; + } as $year) { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)) + ); + } } /** - * Tests the holiday defined in this test before establishment. - * * @throws ReflectionException */ public function testHolidayBeforeEstablishment(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); - - $year = self::ESTABLISHMENT_YEAR - 1; - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + foreach (function () { + yield $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + yield self::ESTABLISHMENT_YEAR - 1; + } as $year) { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $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 => 'Implantação da República Portuguesa'] - ); + foreach ($this->randomEstablishedYear() as $year) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Implantação da República Portuguesa'] + ); + } } /** - * 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 - ); + foreach ($this->randomEstablishedYear() as $year) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + } + } + + private function randomEstablishedYear(): \Generator + { + yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); + yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); } } From 9b06458b67845be27dc335fc35013edae130644f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 26 May 2021 11:19:41 +0900 Subject: [PATCH 233/687] Turkey (#250) This will add Turkey as a new Holiday Provider. Note that Islamic holidays are not yet included. Islamic holidays are a bit more complex and will need some time to implement these at a later stage. --- composer.json | 2 +- phpstan.neon | 9 + phpunit.xml | 4 + src/Yasumi/Provider/Turkey.php | 187 +++++++++++++++++++ src/Yasumi/data/translations/labourDay.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + tests/Turkey/CommemorationOfAtaturkTest.php | 75 ++++++++ tests/Turkey/DemocracyDayTest.php | 80 ++++++++ tests/Turkey/LabourDayTest.php | 75 ++++++++ tests/Turkey/NationalSovereigntyDayTest.php | 92 +++++++++ tests/Turkey/NewYearsDayTest.php | 70 +++++++ tests/Turkey/RepublicDayTest.php | 80 ++++++++ tests/Turkey/TurkeyBaseTestCase.php | 29 +++ tests/Turkey/TurkeyTest.php | 117 ++++++++++++ tests/Turkey/VictoryDayTest.php | 95 ++++++++++ 15 files changed, 916 insertions(+), 1 deletion(-) create mode 100644 phpstan.neon create mode 100755 src/Yasumi/Provider/Turkey.php create mode 100644 tests/Turkey/CommemorationOfAtaturkTest.php create mode 100644 tests/Turkey/DemocracyDayTest.php create mode 100644 tests/Turkey/LabourDayTest.php create mode 100644 tests/Turkey/NationalSovereigntyDayTest.php create mode 100644 tests/Turkey/NewYearsDayTest.php create mode 100644 tests/Turkey/RepublicDayTest.php create mode 100755 tests/Turkey/TurkeyBaseTestCase.php create mode 100755 tests/Turkey/TurkeyTest.php create mode 100644 tests/Turkey/VictoryDayTest.php diff --git a/composer.json b/composer.json index 1ecf7d4c9..385517ee1 100755 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ }, "scripts": { "format": "./vendor/bin/php-cs-fixer fix", - "phpstan": "vendor/bin/phpstan --level=5 analyse src tests", + "phpstan": "vendor/bin/phpstan analyse", "psalm": "vendor/bin/psalm --threads=2", "phan": "vendor/bin/phan", "test": "vendor/bin/phpunit", diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 000000000..e53975268 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,9 @@ +parameters: + level: 5 + paths: + - src + - tests + ignoreErrors: + - + message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' + path: src/Yasumi/Provider/Turkey.php \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 5f9ef9d04..79403bc72 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -162,6 +162,10 @@ ./tests/Switzerland + + + ./tests/Turkey + ./tests/USA diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php new file mode 100755 index 000000000..2fe7de239 --- /dev/null +++ b/src/Yasumi/Provider/Turkey.php @@ -0,0 +1,187 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Note: Any Islamic holidays are not part of this provider yet. Islamic holidays are quite complex and at first, + * only other holidays are implemented. + */ +class Turkey extends AbstractProvider +{ + use CommonHolidays; + + /** {@inheritdoc} */ + public const ID = 'TR'; + + /** + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Europe/Istanbul'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addNationalSovereigntyDay(); + $this->addLabourDay(); + $this->addCommemorationOfAtaturk(); + $this->addDemocracyDay(); + $this->addVictoryDay(); + $this->addRepublicDay(); + } + + /** {@inheritdoc} */ + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Turkey', + 'https://tr.wikipedia.org/wiki/T%C3%BCrkiye%27deki_resm%C3%AE_tatiller', + ]; + } + + /** + * @throws \Exception + */ + private function addLabourDay(): void + { + $this->addHoliday(new Holiday('labourDay', [ + 'tr' => 'Emek ve Dayanışma Günü', + ], new \DateTime("$this->year-05-01", new \DateTimeZone($this->timezone)), $this->locale)); + } + + /** + * Commemoration of the first opening of the Grand National Assembly of Turkey at Ankara in 1920. + * Dedicated to the children. + * + * Not sure if 1920 is the first year of celebration as above source mentions Law No. 3466 that "May 19" was + * made official June 20, 1938. + * + * @see https://en.wikipedia.org/wiki/Commemoration_of_Atat%C3%BCrk,_Youth_and_Sports_Day + * + * @throws \Exception + */ + private function addCommemorationOfAtaturk(): void + { + if (1920 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('commemorationAtaturk', [ + 'tr' => 'Atatürk’ü Anma, Gençlik ve Spor Bayramı', + ], new \DateTime("$this->year-05-19", new \DateTimeZone($this->timezone)), $this->locale)); + } + + /** + * National Sovereignty and Children's Day (Turkish: Ulusal Egemenlik ve Çocuk Bayramı) is a public holiday in + * Turkey commemorating the foundation of the Grand National Assembly of Turkey, on 23 April 1920. + * Since 1927, the holiday has also been celebrated as a children's day. + * + * @see https://en.wikipedia.org/wiki/National_Sovereignty_and_Children%27s_Day + * + * @throws \Exception + */ + private function addNationalSovereigntyDay(): void + { + if (1922 > $this->year) { + return; + } + + $holidayName = 'Ulusal Egemenlik Bayramı'; + + // In 1981 this day was officially named 'Ulusal Egemenlik ve Çocuk Bayramı' + if (1981 <= $this->year) { + $holidayName = 'Ulusal Egemenlik ve Çocuk Bayramı'; + } + + $this->addHoliday(new Holiday('nationalSovereigntyDay', [ + 'tr' => $holidayName, + ], new \DateTime("$this->year-04-23", new \DateTimeZone($this->timezone)), $this->locale)); + } + + /** + * The Democracy and National Unity Day of Turkey (Turkish: Demokrasi ve Milli Birlik Günü) is one of the public + * holidays in Turkey, commemorating the national unity against the coup d'état attempt for democracy in 2016. + * + * @see https://en.wikipedia.org/wiki/Democracy_and_National_Unity_Day + * + * @throws \Exception + */ + private function addDemocracyDay(): void + { + if (2017 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('democracyDay', [ + 'tr' => 'Demokrasi ve Millî Birlik Günü', + ], new \DateTime("$this->year-07-15", new \DateTimeZone($this->timezone)), $this->locale)); + } + + /** + * Victory Day (Turkish: Zafer Bayramı), also known as Turkish Armed Forces Day, is a public holiday in Turkey + * commemorating the decisive victory in the Battle of Dumlupınar, on 30 August 1922. + * + * @see https://en.wikipedia.org/wiki/Victory_Day_(Turkey) + * + * @throws \Exception + */ + private function addVictoryDay(): void + { + if (1923 > $this->year) { + return; + } + + $holidayType = Holiday::TYPE_OFFICIAL; + + // Victory Day has been celebrated as an official holiday since 1926, and was first celebrated on 30 August + // 1923. + if (1923 <= $this->year && 1926 > $this->year) { + $holidayType = Holiday::TYPE_OBSERVANCE; + } + + $this->addHoliday(new Holiday('victoryDay', [ + 'tr' => 'Zafer Bayramı', + ], new \DateTime("$this->year-08-30", new \DateTimeZone($this->timezone)), $this->locale, $holidayType)); + } + + /** + * Republic Day (Turkish: Cumhuriyet Bayramı) is a public holiday in Turkey commemorating the proclamation of the + * Republic of Turkey, on 29 October 1923. The annual celebrations start at 1:00 pm on 28 October and continue for + * 35 hours. + * + * Note: the start of the celebrations the preceding day at 1:00pm is not covered in this library. + * + * @see https://en.wikipedia.org/wiki/Republic_Day_(Turkey) + * + * @throws \Exception + */ + private function addRepublicDay(): void + { + if (1923 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('republicDay', [ + 'tr' => 'Cumhuriyet Bayramı', + ], new \DateTime("$this->year-10-29", new \DateTimeZone($this->timezone)), $this->locale)); + } +} diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 6e0718293..7fb192e56 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -22,4 +22,5 @@ 'nl' => 'Dag van de arbeid', 'sk' => 'Sviatok práce', 'fr' => 'Fête du travail', + 'tr' => 'Emek ve Dayanışma Günü', ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index d98a398b7..1548fdcaa 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -47,5 +47,6 @@ 'ru' => 'Новый год', 'sk' => 'Nový rok', 'sv' => 'nyårsdagen', + 'tr' => 'Yılbaşı', 'uk' => 'Новий Рік', ]; diff --git a/tests/Turkey/CommemorationOfAtaturkTest.php b/tests/Turkey/CommemorationOfAtaturkTest.php new file mode 100644 index 000000000..419eedf0c --- /dev/null +++ b/tests/Turkey/CommemorationOfAtaturkTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class CommemorationOfAtaturkTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'commemorationAtaturk'; + + public const ESTABLISHMENT_YEAR = 1920; + + /** + * @throws ReflectionException + */ + public function testHolidayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-5-19", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Atatürk’ü Anma, Gençlik ve Spor Bayramı'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Turkey/DemocracyDayTest.php b/tests/Turkey/DemocracyDayTest.php new file mode 100644 index 000000000..e3b427d06 --- /dev/null +++ b/tests/Turkey/DemocracyDayTest.php @@ -0,0 +1,80 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class DemocracyDayTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'democracyDay'; + + public const ESTABLISHMENT_YEAR = 2017; + + /** + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-7-15", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Demokrasi ve Millî Birlik Günü'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php new file mode 100644 index 000000000..a81bfbfd9 --- /dev/null +++ b/tests/Turkey/LabourDayTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class LabourDayTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'labourDay'; + + /** + * @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(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Emek ve Dayanışma Günü'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + Holiday::TYPE_OFFICIAL + ); + } + + /** + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(5, 1, self::TIMEZONE); + } +} diff --git a/tests/Turkey/NationalSovereigntyDayTest.php b/tests/Turkey/NationalSovereigntyDayTest.php new file mode 100644 index 000000000..c208ff0ee --- /dev/null +++ b/tests/Turkey/NationalSovereigntyDayTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class NationalSovereigntyDayTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nationalSovereigntyDay'; + + // National Sovereignty Day was declared a national holiday on May 1st, 1921, thus celebrating from 1922. + public const ESTABLISHMENT_YEAR = 1922; + + // In 1981 this day was officially named 'Ulusal Egemenlik ve Çocuk Bayramı' + public const NAME_CHANGED_YEAR = 1981; + + /** + * @throws ReflectionException + */ + public function testHolidayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-4-23", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::NAME_CHANGED_YEAR - 1), + [self::LOCALE => 'Ulusal Egemenlik Bayramı'] + ); + } + + /** + * @throws ReflectionException + */ + public function testTranslationOnAfterNameChange(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::NAME_CHANGED_YEAR), + [self::LOCALE => 'Ulusal Egemenlik ve Çocuk Bayramı'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php new file mode 100644 index 000000000..198141422 --- /dev/null +++ b/tests/Turkey/NewYearsDayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use DateTime; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class NewYearsDayTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'newYearsDay'; + + /** + * @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(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * @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); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Yılbaşı'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Turkey/RepublicDayTest.php b/tests/Turkey/RepublicDayTest.php new file mode 100644 index 000000000..dde7380ef --- /dev/null +++ b/tests/Turkey/RepublicDayTest.php @@ -0,0 +1,80 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class RepublicDayTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'republicDay'; + + public const ESTABLISHMENT_YEAR = 1924; + + /** + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-10-29", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Cumhuriyet Bayramı'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Turkey/TurkeyBaseTestCase.php b/tests/Turkey/TurkeyBaseTestCase.php new file mode 100755 index 000000000..fc07e3e9f --- /dev/null +++ b/tests/Turkey/TurkeyBaseTestCase.php @@ -0,0 +1,29 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +class TurkeyBaseTestCase extends TestCase +{ + use YasumiBase; + + public const REGION = 'Turkey'; + + public const TIMEZONE = 'Europe/Istanbul'; + + public const LOCALE = 'tr_TR'; +} diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php new file mode 100755 index 000000000..74fd8336b --- /dev/null +++ b/tests/Turkey/TurkeyTest.php @@ -0,0 +1,117 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +class TurkeyTest extends TurkeyBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + protected function setUp(): void + { + $this->year = $this->generateRandomYear(); + } + + /** + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'newYearsDay', + 'labourDay', + ]; + + /* + * Not sure if 1920 is the first year of celebration as above source mentions Law No. 3466 that "May 19" was + * made official June 20, 1938. + * @see: https://en.wikipedia.org/wiki/Commemoration_of_Atat%C3%BCrk,_Youth_and_Sports_Day + */ + if (1920 <= $this->year) { + $holidays[] = 'commemorationAtaturk'; + } + + if (1922 <= $this->year) { + $holidays[] = 'nationalSovereigntyDay'; + } + + if (2017 <= $this->year) { + $holidays[] = 'democracyDay'; + } + + if (1926 <= $this->year) { + $holidays[] = 'victoryDay'; + } + + if (1923 < $this->year) { + $holidays[] = 'republicDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $holidays = []; + + if (1923 <= $this->year && 1926 > $this->year) { + $holidays[] = 'victoryDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * @throws ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * @throws ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * @throws ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Turkey/VictoryDayTest.php b/tests/Turkey/VictoryDayTest.php new file mode 100644 index 000000000..30b83221b --- /dev/null +++ b/tests/Turkey/VictoryDayTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\Turkey; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class VictoryDayTest extends TurkeyBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'victoryDay'; + + public const ESTABLISHMENT_YEAR = 1926; + + public const CELEBRATION_YEAR = 1923; + + /** + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = $this->generateRandomYear(self::CELEBRATION_YEAR); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-8-30", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayBeforeCelebration(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::CELEBRATION_YEAR - 1) + ); + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::CELEBRATION_YEAR), + [self::LOCALE => 'Zafer Bayramı'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayTypeBeforeEstablishment(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::CELEBRATION_YEAR, self::ESTABLISHMENT_YEAR - 1), + Holiday::TYPE_OBSERVANCE + ); + } +} From 0d8a0503706a56db6490b8bf063813ef0a94fd77 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Jun 2021 08:42:47 +0900 Subject: [PATCH 234/687] Removed test benchmark file Signed-off-by: Sacha Telgenhof --- b.php | 91 ----------------------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 b.php diff --git a/b.php b/b.php deleted file mode 100644 index 13e341db8..000000000 --- a/b.php +++ /dev/null @@ -1,91 +0,0 @@ - 'Test', $i], -// new DateTimeImmutable()); -// //$doc = new stdClass(); - - $doc = Yasumi::create('Australia', $i); - - $docs[] = $doc; -} - -$start = $finis = 0; - -$mem_empty = memory_get_usage(); - -// Load the SplObjectStorage -$start = microtime(true); -foreach ($docs as $d) { - $sos->attach($d); -} -$finis = microtime(true); - -$time_to_fill = $finis - $start; - -echo $sos->count(); -echo $sos->getInfo(); - -// Check membership on the object storage -$start = microtime(true); -foreach ($docs as $d) { - $sos->contains($d); -} - -$finis = microtime(true); - -$time_to_check = $finis - $start; - -$mem_spl = memory_get_usage(); - -$mem_used = $mem_spl - $mem_empty; - -printf("SplObjectStorage:\nTime to fill: %0.12f.\nTime to check: %0.12f.\nMemory: %d\n\n", $time_to_fill, $time_to_check, $mem_used); - -unset($sos); -$mem_empty = memory_get_usage(); - -// Test arrays: -$start = microtime(true); -$arr = []; - -// Load the array -foreach ($docs as $d) { - $arr[spl_object_hash($d)] = $d; -} -$finis = microtime(true); - -$time_to_fill = $finis - $start; - -// Check membership on the array -$start = microtime(true); -foreach ($docs as $d) { - //$arr[spl_object_hash($d)]; - isset($arr[spl_object_hash($d)]); -} - -$finis = microtime(true); - -$time_to_check = $finis - $start; -$mem_arr = memory_get_usage(); - -$mem_used = $mem_arr - $mem_empty; - -printf("Arrays:\nTime to fill: %0.12f.\nTime to check: %0.12f.\nMemory: %d\n\n", $time_to_fill, $time_to_check, $mem_used); From f11a86658fbb1d296c95a5340af6766bff96a7be Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Jun 2021 22:16:24 +0900 Subject: [PATCH 235/687] Removed PSR rule as it is already included in the Symfony rule. Removed line ending as it is already the default. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 411de749a..c867162fb 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -14,7 +14,6 @@ $config = new PhpCsFixer\Config(); $config->setRiskyAllowed(true)->setRules([ - '@PSR2' => true, '@Symfony' => true, 'blank_line_after_opening_tag' => true, 'is_null' => true, @@ -29,6 +28,6 @@ 'trailing_comma_in_multiline' => true, 'cast_spaces' => ['space' => 'single'], 'declare_strict_types' => true, -])->setLineEnding("\n")->setFinder($finder); +])->setFinder($finder); return $config; From cf4711fdc88acedb8b98adc52e6c3c49fa424008 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Jun 2021 23:53:57 +0900 Subject: [PATCH 236/687] Upgraded PHP CS Fixer to v3 Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 385517ee1..57c78d22d 100755 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "^3.0", "infection/infection": "^0.17 | ^0.22", "mikey179/vfsstream": "^1.6", "phan/phan": "^4.0", From eac08063dd23eef5ff35514fe92288c89e5ad89c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Jun 2021 00:01:52 +0900 Subject: [PATCH 237/687] Revert PHP CS version as v3 has dependency conflicts with Infection Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 57c78d22d..385517ee1 100755 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", + "friendsofphp/php-cs-fixer": "^2.16", "infection/infection": "^0.17 | ^0.22", "mikey179/vfsstream": "^1.6", "phan/phan": "^4.0", From 03cc1131c231a1358f1098ee9697bc5d7d77126e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 26 Jun 2021 15:15:57 +0900 Subject: [PATCH 238/687] Renamed to a more meaningful name. --- tests/Base/YasumiWorkdayTest.php | 48 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index f504ca574..808636611 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -47,17 +47,17 @@ public function testNextWorkingDay(): void // Assertion using a DateTime instance $startDate = new DateTime($date, new DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate); + $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTime::class, $result); - self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTime::class, $nextWorkingDay); + self::assertEquals($expectedDate, $nextWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate); + $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTimeImmutable::class, $result); - self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTimeImmutable::class, $nextWorkingDay); + self::assertEquals($expectedDate, $nextWorkingDay->format(self::FORMAT_DATE)); } /** @@ -76,17 +76,17 @@ public function testPreviousWorkingDay(): void // Assertion using a DateTime instance $startDate = new DateTime($date, new DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate); + $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTime::class, $result); - self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTime::class, $previousWorkingDay); + self::assertEquals($expectedDate, $previousWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate); + $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTimeImmutable::class, $result); - self::assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); + self::assertInstanceOf(DateTimeImmutable::class, $previousWorkingDay); + self::assertEquals($expectedDate, $previousWorkingDay->format(self::FORMAT_DATE)); } /** @@ -124,23 +124,23 @@ public function testYearBoundary(): void // Assertion using a DateTime instance $startDate = new DateTime($start, new DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); + $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate, $interval); - self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); $startDate = new DateTime($expectedNext, new DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); - self::assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); + $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate, $interval); + self::assertEquals($expectedPrevious, $previousWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new DateTimeImmutable($start, new DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); + $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate, $interval); - self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); $startDate = new DateTimeImmutable($expectedNext, new DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); - self::assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); + $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate, $interval); + self::assertEquals($expectedPrevious, $previousWorkingDay->format(self::FORMAT_DATE)); } /** @@ -156,9 +156,9 @@ public function testWorkDayIsNextYear(string $start, int $workdays, string $expe $provider = 'USA'; $timezone = 'America/New_York'; $startDate = new DateTime($start, new DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate, $workdays); + $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate, $workdays); - self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); } public function dataProviderWorkDayNextYear(): array @@ -190,9 +190,9 @@ public function testWorkDayIsPreviousYear(string $start, int $workdays, string $ $provider = 'USA'; $timezone = 'America/New_York'; $startDate = new DateTime($start, new DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate, $workdays); + $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate, $workdays); - self::assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); + self::assertEquals($expectedNext, $previousWorkingDay->format(self::FORMAT_DATE)); } public function dataProviderWorkDayPreviousYear(): array From 2f417174f15e829712ec9ad530fb1269322f0a54 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 26 Jun 2021 15:45:06 +0900 Subject: [PATCH 239/687] Fixed test as Balearic Islands Day is only celebrated from 1983. Signed-off-by: Sacha Telgenhof --- tests/Spain/BalearicIslands/BalearicIslandsTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index deb4da1ac..60194ee08 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -43,10 +43,9 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'epiphany', - 'balearicIslandsDay', 'goodFriday', 'internationalWorkersDay', 'assumptionOfMary', @@ -55,7 +54,13 @@ public function testOfficialHolidays(): void 'constitutionDay', 'immaculateConception', 'christmasDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if ($this->year >= 1983) { + $holidays[] = 'balearicIslandsDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From fd9678962741da02f0142f57ec14fd807b0c90b0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 26 Jun 2021 15:53:41 +0900 Subject: [PATCH 240/687] Removed some configuration items as these are already provisioned by the Symfony ruleset. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index c867162fb..9af9bf18b 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -21,12 +21,6 @@ 'self_accessor' => true, 'dir_constant' => true, 'ordered_class_elements' => true, - 'ordered_imports' => ['sort_algorithm' => 'alpha'], - 'no_unused_imports' => true, - 'single_quote' => true, - 'space_after_semicolon' => true, - 'trailing_comma_in_multiline' => true, - 'cast_spaces' => ['space' => 'single'], 'declare_strict_types' => true, ])->setFinder($finder); From a933111427d8b01b6a02084aa3d09dc9add7a66f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 26 Jun 2021 16:49:12 +0900 Subject: [PATCH 241/687] Added more code styling rules. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 9af9bf18b..a78f5801e 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -22,6 +22,9 @@ 'dir_constant' => true, 'ordered_class_elements' => true, 'declare_strict_types' => true, + 'no_superfluous_elseif' => true, + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, ])->setFinder($finder); return $config; From 44b21c0e8610f2dfc7bfec7f29ffc176a16daacc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 26 Jun 2021 16:49:32 +0900 Subject: [PATCH 242/687] Made comparison more strict. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Croatia.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 518007e46..a9054cf4d 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -102,7 +102,7 @@ private function calculateStatehoodDay(): void $statehoodDayDate = new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if (null != $statehoodDayDate) { + if (null !== $statehoodDayDate) { $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'hr' => 'Dan državnosti', From 56b298962f7d27be37c4eeae20e8af176dd6f966 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 1 Jul 2021 23:35:40 +0900 Subject: [PATCH 243/687] The year of one of the dates for `Seollal` was incorrectly set to 2037 where it needs to be 2039. --- src/Yasumi/Provider/SouthKorea.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 40f80cf6a..efa998eeb 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -68,7 +68,7 @@ class SouthKorea extends AbstractProvider 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', + 2035 => '2035-2-8', 2036 => '2036-1-28', 2037 => '2037-2-15', 2038 => '2038-2-4', 2039 => '2039-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', From 1e751e2f0065c1222bcb02d5a4248ab5438ce6c7 Mon Sep 17 00:00:00 2001 From: Mark Heintz Date: Thu, 1 Jul 2021 09:39:07 -0500 Subject: [PATCH 244/687] Add new US federal holiday Juneteenth National Independence Day. (#253) --- CHANGELOG.md | 3 + src/Yasumi/Provider/USA.php | 22 ++++++ tests/USA/JuneteenthTest.php | 133 +++++++++++++++++++++++++++++++++++ tests/USA/USATest.php | 1 + 4 files changed, 159 insertions(+) create mode 100644 tests/USA/JuneteenthTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f5f6d22d..592ef5c78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added +- Added new Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) + + ### Changed ### Fixed diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index c65109ad0..064e57ea2 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -57,6 +57,7 @@ public function initialize(): void $this->calculateMartinLutherKingday(); $this->calculateWashingtonsBirthday(); $this->calculateMemorialDay(); + $this->calculateJuneteenth(); $this->calculateIndependenceDay(); $this->calculateLabourDay(); $this->calculateColumbusDay(); @@ -138,6 +139,27 @@ private function calculateMemorialDay(): void } } + /** + * Juneteenth National Independence Day. + * + * Juneteenth National Independence Day, commonly known simply as Juneteenth, is a federal holiday in the United + * States commemorating the end of slavery. Established as a federal holiday on June 17, 2021, Juneteenth is + * celebrated annually on June 19. In case Juneteenth 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. + * + * @see https://en.wikipedia.org/wiki/Juneteenth + * + * @throws \Exception + */ + private function calculateJuneteenth(): void + { + if ($this->year >= 2021) { + $this->addHoliday(new Holiday('juneteenth', [ + 'en' => 'Juneteenth', + ], new DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } + /** * Independence Day. * diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php new file mode 100644 index 000000000..8735e7482 --- /dev/null +++ b/tests/USA/JuneteenthTest.php @@ -0,0 +1,133 @@ + + */ + +namespace Yasumi\tests\USA; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class to test Juneteenth. + */ +class JuneteenthTest extends USABaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'juneteenth'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 2021; + + /** + * Tests Juneteenth on or after 2021. Juneteenth is celebrated since 2021 on June 19th. + * + * @throws Exception + * @throws ReflectionException + */ + public function testJuneteenthOnAfter2021(): void + { + $year = 2023; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-6-19", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Juneteenth on or after 2021 when substituted on Monday (when Juneteenth falls on Sunday). + * + * @throws Exception + * @throws ReflectionException + */ + public function testJuneteenthOnAfter2021SubstitutedMonday(): void + { + $year = 2022; + $this->assertHoliday( + self::REGION, + 'substituteHoliday:juneteenth', + $year, + new DateTime("$year-6-20", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Juneteenth on or after 2021 when substituted on Friday (when Juneteenth falls on Saturday). + * + * @throws Exception + * @throws ReflectionException + */ + public function testJuneteenthOnAfter2021SubstitutedFriday(): void + { + $year = 2021; + $this->assertHoliday( + self::REGION, + 'substituteHoliday:juneteenth', + $year, + new DateTime("$year-6-18", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Juneteenth before 2021. Juneteenth is celebrated since 2021 on June 19th. + * + * @throws ReflectionException + */ + public function testJuneteenthBefore2021(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests 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 => 'Juneteenth'] + ); + } + + /** + * 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/USA/USATest.php b/tests/USA/USATest.php index e09e414bc..c88e1d461 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -47,6 +47,7 @@ public function testOfficialHolidays(): void 'martinLutherKingDay', 'washingtonsBirthday', 'memorialDay', + 'juneteenth', 'independenceDay', 'labourDay', 'columbusDay', From 9c89b2e6ece055e804aac756b8f91f5404e01a89 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jul 2021 20:46:05 +0900 Subject: [PATCH 245/687] Bumped infection version Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 385517ee1..5835f6d80 100755 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", - "infection/infection": "^0.17 | ^0.22", + "infection/infection": "^0.17 | ^0.23", "mikey179/vfsstream": "^1.6", "phan/phan": "^4.0", "phpstan/phpstan": "^0.12.66", From d35d37708e11005059e0628c3170d24f8d44c37c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jul 2021 21:09:13 +0900 Subject: [PATCH 246/687] Reduced visibility of classes as public visibility is not strictly necessary. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 46 +++++++++++------------ src/Yasumi/Provider/CommonHolidays.php | 26 ++++++------- src/Yasumi/Provider/Georgia.php | 2 +- src/Yasumi/Provider/Germany/Berlin.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 4 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 28 +++++++------- src/Yasumi/Provider/Sweden.php | 4 +- src/Yasumi/Provider/Switzerland.php | 22 +++++------ src/Yasumi/Provider/Ukraine.php | 2 +- 12 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 3e8c2bb3f..4bd9b53ef 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -193,7 +193,7 @@ public function isHoliday(\DateTimeInterface $date): bool * * @return array list of all holiday dates defined for the given year */ - public function getHolidayDates(): array + protected function getHolidayDates(): array { return array_map(static function ($holiday) { return (string) $holiday; diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index 2c83f1e69..08eb3635b 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function saintJeanBaptisteDay( + protected function saintJeanBaptisteDay( int $year, string $timezone, string $locale, diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index c9684dc7a..dcd214d9c 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -47,7 +47,7 @@ trait ChristianHolidays * @throws \InvalidArgumentException * @throws \Exception */ - public function easter( + protected function easter( int $year, string $timezone, string $locale, @@ -76,7 +76,7 @@ public function easter( * @throws \InvalidArgumentException * @throws \Exception */ - public function easterMonday( + protected function easterMonday( int $year, string $timezone, string $locale, @@ -111,7 +111,7 @@ public function easterMonday( * @throws \InvalidArgumentException * @throws \Exception */ - public function ascensionDay( + protected function ascensionDay( int $year, string $timezone, string $locale, @@ -143,7 +143,7 @@ public function ascensionDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function pentecost( + protected function pentecost( int $year, string $timezone, string $locale, @@ -175,7 +175,7 @@ public function pentecost( * @throws \InvalidArgumentException * @throws \Exception */ - public function pentecostMonday( + protected function pentecostMonday( int $year, string $timezone, string $locale, @@ -210,7 +210,7 @@ public function pentecostMonday( * @throws \InvalidArgumentException * @throws \Exception */ - public function corpusChristi( + protected function corpusChristi( int $year, string $timezone, string $locale, @@ -246,7 +246,7 @@ public function corpusChristi( * @throws \InvalidArgumentException * @throws \Exception */ - public function christmasEve( + protected function christmasEve( int $year, string $timezone, string $locale, @@ -279,7 +279,7 @@ public function christmasEve( * @throws \InvalidArgumentException * @throws \Exception */ - public function christmasDay( + protected function christmasDay( int $year, string $timezone, string $locale, @@ -312,7 +312,7 @@ public function christmasDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function secondChristmasDay( + protected function secondChristmasDay( int $year, string $timezone, string $locale, @@ -348,7 +348,7 @@ public function secondChristmasDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function allSaintsDay( + protected function allSaintsDay( int $year, string $timezone, string $locale, @@ -377,7 +377,7 @@ public function allSaintsDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function assumptionOfMary( + protected function assumptionOfMary( int $year, string $timezone, string $locale, @@ -410,7 +410,7 @@ public function assumptionOfMary( * @throws \InvalidArgumentException * @throws \Exception */ - public function goodFriday( + protected function goodFriday( int $year, string $timezone, string $locale, @@ -447,7 +447,7 @@ public function goodFriday( * @throws \InvalidArgumentException * @throws \Exception */ - public function epiphany( + protected function epiphany( int $year, string $timezone, string $locale, @@ -476,7 +476,7 @@ public function epiphany( * @throws \InvalidArgumentException * @throws \Exception */ - public function ashWednesday( + protected function ashWednesday( int $year, string $timezone, string $locale, @@ -512,7 +512,7 @@ public function ashWednesday( * @throws \InvalidArgumentException * @throws \Exception */ - public function immaculateConception( + protected function immaculateConception( int $year, string $timezone, string $locale, @@ -549,7 +549,7 @@ public function immaculateConception( * @throws \InvalidArgumentException * @throws \Exception */ - public function stStephensDay( + protected function stStephensDay( int $year, string $timezone, string $locale, @@ -586,7 +586,7 @@ public function stStephensDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function stJosephsDay( + protected function stJosephsDay( int $year, string $timezone, string $locale, @@ -616,7 +616,7 @@ public function stJosephsDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function maundyThursday( + protected function maundyThursday( int $year, string $timezone, string $locale, @@ -652,7 +652,7 @@ public function maundyThursday( * @throws \InvalidArgumentException * @throws \Exception */ - public function stGeorgesDay( + protected function stGeorgesDay( int $year, string $timezone, string $locale, @@ -683,7 +683,7 @@ public function stGeorgesDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function stJohnsDay( + protected function stJohnsDay( int $year, string $timezone, string $locale, @@ -714,7 +714,7 @@ public function stJohnsDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function annunciation( + protected function annunciation( int $year, string $timezone, string $locale, @@ -742,7 +742,7 @@ public function annunciation( * @see https://en.wikipedia.org/wiki/Computus#Meeus.27s_Julian_algorithm * @see https://www.php.net/manual/en/function.easter-date.php#83794 */ - public function calculateOrthodoxEaster(int $year, string $timezone): DateTime + protected function calculateOrthodoxEaster(int $year, string $timezone): DateTime { $a = $year % 4; $b = $year % 7; @@ -781,7 +781,7 @@ public function calculateOrthodoxEaster(int $year, string $timezone): DateTime * @throws \InvalidArgumentException * @throws \Exception */ - public function reformationDay( + protected function reformationDay( int $year, string $timezone, string $locale, diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 8cf9bca40..e882e74e7 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -47,7 +47,7 @@ trait CommonHolidays * @throws \InvalidArgumentException * @throws \Exception */ - public function newYearsEve( + protected function newYearsEve( int $year, string $timezone, string $locale, @@ -79,7 +79,7 @@ public function newYearsEve( * @throws \InvalidArgumentException * @throws \Exception */ - public function newYearsDay( + protected function newYearsDay( int $year, string $timezone, string $locale, @@ -110,7 +110,7 @@ public function newYearsDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function internationalWorkersDay( + protected function internationalWorkersDay( int $year, string $timezone, string $locale, @@ -147,7 +147,7 @@ public function internationalWorkersDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function valentinesDay( + protected function valentinesDay( int $year, string $timezone, string $locale, @@ -182,7 +182,7 @@ public function valentinesDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function worldAnimalDay( + protected function worldAnimalDay( int $year, string $timezone, string $locale, @@ -219,7 +219,7 @@ public function worldAnimalDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function stMartinsDay( + protected function stMartinsDay( int $year, string $timezone, string $locale, @@ -255,7 +255,7 @@ public function stMartinsDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function fathersDay( + protected function fathersDay( int $year, string $timezone, string $locale, @@ -291,7 +291,7 @@ public function fathersDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function mothersDay( + protected function mothersDay( int $year, string $timezone, string $locale, @@ -327,7 +327,7 @@ public function mothersDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function victoryInEuropeDay( + protected function victoryInEuropeDay( int $year, string $timezone, string $locale, @@ -365,7 +365,7 @@ public function victoryInEuropeDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function armisticeDay( + protected function armisticeDay( int $year, string $timezone, string $locale, @@ -398,7 +398,7 @@ public function armisticeDay( * @throws \InvalidArgumentException * @throws \Exception */ - public function internationalWomensDay( + protected function internationalWomensDay( int $year, string $timezone, string $locale, @@ -426,7 +426,7 @@ public function internationalWomensDay( * * @throws \Exception */ - public function summerTime( + protected function summerTime( int $year, string $timezone, string $locale, @@ -460,7 +460,7 @@ public function summerTime( * * @throws \Exception */ - public function winterTime( + protected function winterTime( int $year, string $timezone, string $locale, diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 1b8831787..77be51d4b 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -75,7 +75,7 @@ public function getSources(): array /** * @throws \Exception */ - public function calculateEaster(int $year, string $timezone): \DateTime + protected function calculateEaster(int $year, string $timezone): \DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 04bdbdb6e..fec7b8221 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function dayOfLiberation( + private function dayOfLiberation( string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index ae9a6f28f..af6df89a5 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -85,7 +85,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - public function calculateEuropeDay(): void + private function calculateEuropeDay(): void { if ($this->year >= 2019) { $this->addHoliday(new Holiday('europeDay', [ @@ -111,7 +111,7 @@ public function calculateEuropeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 119341ddd..2004f080d 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -87,7 +87,7 @@ public function getSources(): array /** * @throws \Exception */ - public function calculateEaster(int $year, string $timezone): DateTime + protected function calculateEaster(int $year, string $timezone): DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index efa998eeb..4672d3c91 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -168,7 +168,7 @@ public function getSources(): array * * @throws \Exception */ - public function calculateNewYearsDay(): void + private function calculateNewYearsDay(): void { if ($this->year >= 1950) { $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); @@ -199,7 +199,7 @@ public function calculateNewYearsDay(): void * * @throws \Exception */ - public function calculateSeollal(): void + private function calculateSeollal(): void { if ($this->year >= 1985 && isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -237,7 +237,7 @@ public function calculateSeollal(): void * * @throws \Exception */ - public function calculateBuddhasBirthday(): void + private function calculateBuddhasBirthday(): void { if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { $this->addHoliday(new Holiday( @@ -259,7 +259,7 @@ public function calculateBuddhasBirthday(): void * * @throws \Exception */ - public function calculateChuseok(): void + private function calculateChuseok(): void { if ($this->year >= 1949 && isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { // Chuseok @@ -300,7 +300,7 @@ public function calculateChuseok(): void * * @throws \Exception */ - public function calculateIndependenceMovementDay(): void + private function calculateIndependenceMovementDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -319,7 +319,7 @@ public function calculateIndependenceMovementDay(): void * * @throws \Exception */ - public function calculateArborDay(): void + private function calculateArborDay(): void { if (($this->year >= 1949 && $this->year < 1960) || ($this->year > 1960 && $this->year < 2006)) { $this->addHoliday(new Holiday( @@ -338,7 +338,7 @@ public function calculateArborDay(): void * * @throws \Exception */ - public function calculateChildrensDay(): void + private function calculateChildrensDay(): void { if ($this->year >= 1970) { $this->addHoliday(new Holiday( @@ -357,7 +357,7 @@ public function calculateChildrensDay(): void * * @throws \Exception */ - public function calculateMemorialDay(): void + private function calculateMemorialDay(): void { if ($this->year >= 1966) { $this->addHoliday(new Holiday( @@ -379,7 +379,7 @@ public function calculateMemorialDay(): void * * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year >= 1949 && $this->year < 2008) { $this->addHoliday(new Holiday( @@ -398,7 +398,7 @@ public function calculateConstitutionDay(): void * * @throws \Exception */ - public function calculateLiberationDay(): void + private function calculateLiberationDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -417,7 +417,7 @@ public function calculateLiberationDay(): void * * @throws \Exception */ - public function calculateArmedForcesDay(): void + private function calculateArmedForcesDay(): void { if ($this->year >= 1956 && $this->year <= 1990) { $this->addHoliday(new Holiday( @@ -436,7 +436,7 @@ public function calculateArmedForcesDay(): void * * @throws \Exception */ - public function calculateNationalFoundationDay(): void + private function calculateNationalFoundationDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -455,7 +455,7 @@ public function calculateNationalFoundationDay(): void * * @throws \Exception */ - public function calculateHangulDay(): void + private function calculateHangulDay(): void { if (($this->year >= 1949 && $this->year <= 1990) || $this->year > 2012) { $this->addHoliday(new Holiday( @@ -478,7 +478,7 @@ public function calculateHangulDay(): void * * @throws \Exception */ - public function calculateSubstituteHolidays(): void + private function calculateSubstituteHolidays(): void { if ($this->year <= 2013) { return; diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index ee90cac4d..c231d4c47 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -95,7 +95,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateEpiphanyEve(): void + private function calculateEpiphanyEve(): void { $this->addHoliday(new Holiday( 'epiphanyEve', @@ -122,7 +122,7 @@ public function calculateEpiphanyEve(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateWalpurgisEve(): void + private function calculateWalpurgisEve(): void { $this->addHoliday(new Holiday( 'walpurgisEve', diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index dc641e24f..c921cb291 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -49,6 +49,15 @@ public function initialize(): void $this->calculateNationalDay(); } + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Switzerland', + 'https://fr.wikipedia.org/wiki/Jours_f%C3%A9ri%C3%A9s_en_Suisse', + 'https://it.wikipedia.org/wiki/Festivit%C3%A0_in_Svizzera', + ]; + } + /** * Berchtoldstag. * @@ -63,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - public function calculateBerchtoldsTag(): void + protected function calculateBerchtoldsTag(): void { $this->addHoliday(new Holiday( 'berchtoldsTag', @@ -93,7 +102,7 @@ public function calculateBerchtoldsTag(): void * @throws UnknownLocaleException * @throws \Exception */ - public function calculateBettagsMontag(): void + protected function calculateBettagsMontag(): void { if ($this->year >= 1832) { // Find third Sunday of September @@ -109,15 +118,6 @@ public function calculateBettagsMontag(): void } } - public function getSources(): array - { - return [ - 'https://en.wikipedia.org/wiki/Public_holidays_in_Switzerland', - 'https://fr.wikipedia.org/wiki/Jours_f%C3%A9ri%C3%A9s_en_Suisse', - 'https://it.wikipedia.org/wiki/Festivit%C3%A0_in_Svizzera', - ]; - } - /** * Swiss National Day. * diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 5886a08bc..8db966cf0 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -116,7 +116,7 @@ public function addHoliday(Holiday $holiday, bool $substitutable = true): void /** * @throws \Exception */ - public function calculateEaster(int $year, string $timezone): \DateTime + protected function calculateEaster(int $year, string $timezone): \DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } From 4021f79226098b5af51248bc9560a21a1b621122 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jul 2021 22:11:19 +0900 Subject: [PATCH 247/687] Reduced visibility of classes as protected visibility is not strictly necessary. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 50 +- src/Yasumi/Provider/Canada.php | 28 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- .../Provider/Canada/PrinceEdwardIsland.php | 4 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 4 +- src/Yasumi/Provider/ChristianHolidays.php | 740 +++++++++--------- src/Yasumi/Provider/CommonHolidays.php | 214 ++--- .../Provider/UnitedKingdom/Scotland.php | 54 +- 12 files changed, 552 insertions(+), 552 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 4bd9b53ef..1849a541b 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -188,18 +188,6 @@ public function isHoliday(\DateTimeInterface $date): bool return false; } - /** - * Gets all of the holiday dates defined by this holiday provider (for the given year). - * - * @return array list of all holiday dates defined for the given year - */ - protected function getHolidayDates(): array - { - return array_map(static function ($holiday) { - return (string) $holiday; - }, $this->holidays); - } - /** * Determines whether a date represents a weekend day or not. * @@ -424,11 +412,15 @@ public function on(\DateTimeInterface $date): OnFilter } /** - * Clear all holidays. + * Gets all of the holiday dates defined by this holiday provider (for the given year). + * + * @return array list of all holiday dates defined for the given year */ - protected function clearHolidays(): void + protected function getHolidayDates(): array { - $this->holidays = []; + return array_map(static function ($holiday) { + return (string) $holiday; + }, $this->holidays); } /** @@ -439,14 +431,21 @@ protected function clearHolidays(): void * @return true upon success, otherwise an InvalidArgumentException is thrown * * @throws InvalidArgumentException an InvalidArgumentException is thrown if the given holiday parameter is empty + * + * @deprecated deprecated in favor of isHolidayKeyNotEmpty() + * @deprecated see isHolidayKeyNotEmpty() */ - protected function isHolidayKeyNotEmpty(string $key): bool + protected function isHolidayNameNotEmpty(string $key): bool { - if (empty($key)) { - throw new InvalidArgumentException('Holiday key can not be blank.'); - } + return $this->isHolidayKeyNotEmpty($key); + } - return true; + /** + * Clear all holidays. + */ + private function clearHolidays(): void + { + $this->holidays = []; } /** @@ -457,13 +456,14 @@ protected function isHolidayKeyNotEmpty(string $key): bool * @return true upon success, otherwise an InvalidArgumentException is thrown * * @throws InvalidArgumentException an InvalidArgumentException is thrown if the given holiday parameter is empty - * - * @deprecated deprecated in favor of isHolidayKeyNotEmpty() - * @deprecated see isHolidayKeyNotEmpty() */ - protected function isHolidayNameNotEmpty(string $key): bool + private function isHolidayKeyNotEmpty(string $key): bool { - return $this->isHolidayKeyNotEmpty($key); + if (empty($key)) { + throw new InvalidArgumentException('Holiday key can not be blank.'); + } + + return true; } /** diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index 1f3997eac..b9e6c4d47 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -142,49 +142,49 @@ protected function calculateNationalIndigenousPeoplesDay(): void } /** - * Canada Day. + * Civic Holiday. * - * @see https://en.wikipedia.org/wiki/Canada_Day + * @see https://en.wikipedia.org/wiki/Civic_Holiday * * @throws InvalidDateException * @throws \InvalidArgumentException * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateCanadaDay(): void + protected function calculateCivicHoliday(): void { - if ($this->year < 1983) { + if ($this->year < 1879) { return; } $this->addHoliday(new Holiday( - 'canadaDay', + 'civicHoliday', [], - new DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } /** - * Civic Holiday. + * Canada Day. * - * @see https://en.wikipedia.org/wiki/Civic_Holiday + * @see https://en.wikipedia.org/wiki/Canada_Day * * @throws InvalidDateException * @throws \InvalidArgumentException * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateCivicHoliday(): void + private function calculateCanadaDay(): void { - if ($this->year < 1879) { + if ($this->year < 1983) { return; } $this->addHoliday(new Holiday( - 'civicHoliday', + 'canadaDay', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -199,7 +199,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateThanksgivingDay(): void + private function calculateThanksgivingDay(): void { if ($this->year < 1879) { return; @@ -223,7 +223,7 @@ protected function calculateThanksgivingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateRemembranceDay(): void + private function calculateRemembranceDay(): void { if ($this->year < 1919) { return; diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index 20da58d42..29786c6f1 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -65,7 +65,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateHeritageDay(): void + private function calculateHeritageDay(): void { if ($this->year < 1879) { return; diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index 039c80681..d5b8d4d6b 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -89,7 +89,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateLouisRielDay(): void + private function calculateLouisRielDay(): void { if ($this->year < 2008) { return; diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index 25f40016b..7861c80c8 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -89,7 +89,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateHeritageDay(): void + private function calculateHeritageDay(): void { if ($this->year < 2015) { return; diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index 0775045b4..4bf834147 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -65,7 +65,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateIslanderDay(): void + private function calculateIslanderDay(): void { if ($this->year < 2009) { return; @@ -89,7 +89,7 @@ protected function calculateIslanderDay(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateGoldCupParadeDay(): void + private function calculateGoldCupParadeDay(): void { if ($this->year < 1962) { return; diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index 08eb3635b..c3129ca02 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - protected function saintJeanBaptisteDay( + private function saintJeanBaptisteDay( int $year, string $timezone, string $locale, diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index d58b88fa4..f2b21b24d 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -65,7 +65,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateSaskatchewanDay(): void + private function calculateSaskatchewanDay(): void { if ($this->year < 1879) { return; diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index 795e88b2d..ddfb94bac 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -66,7 +66,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateDiscoveryDay(): void + private function calculateDiscoveryDay(): void { if ($this->year < 1897) { return; @@ -90,7 +90,7 @@ protected function calculateDiscoveryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateHeritageDay(): void + private function calculateHeritageDay(): void { if ($this->year < 2009) { return; diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index dcd214d9c..fda9c2026 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -28,17 +28,53 @@ trait ChristianHolidays { /** - * Easter. + * Corpus Christi. * - * 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. + * The Feast of Corpus Christi (Latin for Body of Christ), also known as Corpus Domini, is a Latin Rite liturgical + * solemnity celebrating the tradition and belief in the body and blood of Jesus Christ and his Real Presence in the + * Eucharist. The feast is liturgically celebrated on the Thursday after Trinity Sunday or, "where the Solemnity of + * 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. * - * @see https://en.wikipedia.org/wiki/Easter + * @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, + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default a type of 'other' is considered. * - * @param int $year the year for which Easter need to be created - * @param string $timezone the timezone in which Easter is celebrated - * @param string $locale the locale for which Easter need to be displayed in + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + protected function corpusChristi( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OTHER + ): Holiday { + return new Holiday( + 'corpusChristi', + [], + $this->calculateEaster($year, $timezone)->add(new DateInterval('P60D')), + $locale, + $type + ); + } + + /** + * All Saints' Day. + * + * All Saints' Day, also known as All Hallows, Solemnity of All Saints, or Feast of All Saints is a solemnity + * celebrated on 1 November by the Catholic Church and various Protestant denominations, and on the first Sunday + * 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. + * + * @see 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 + * @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. * @@ -47,27 +83,27 @@ trait ChristianHolidays * @throws \InvalidArgumentException * @throws \Exception */ - protected function easter( + protected function allSaintsDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('easter', [], $this->calculateEaster($year, $timezone), $locale, $type); + return new Holiday('allSaintsDay', [], new DateTime("$year-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** - * Easter Monday. + * Day of the Assumption of Mary. * - * 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. + * The Assumption of the Virgin Mary into Heaven, informally known as the Assumption, was the bodily taking up + * 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. * - * @see https://en.wikipedia.org/wiki/Easter + * @see https://en.wikipedia.org/wiki/Assumption_of_Mary * - * @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 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, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * @@ -76,33 +112,31 @@ protected function easter( * @throws \InvalidArgumentException * @throws \Exception */ - protected function easterMonday( + protected function assumptionOfMary( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'easterMonday', + 'assumptionOfMary', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P1D')), + new DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); } /** - * Ascension Day. - * - * Ascension Day commemorates the bodily Ascension of Jesus into heaven. It is one of the ecumenical feasts of - * 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. + * Good Friday. * - * @see https://en.wikipedia.org/wiki/Feast_of_the_Ascension + * Good Friday is a Christian religious holiday commemorating the crucifixion of Jesus Christ and his death at + * 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 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 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, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * @@ -111,30 +145,35 @@ protected function easterMonday( * @throws \InvalidArgumentException * @throws \Exception */ - protected function ascensionDay( + protected function goodFriday( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'ascensionDay', + 'goodFriday', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P39D')), + $this->calculateEaster($year, $timezone)->sub(new DateInterval('P2D')), $locale, $type ); } /** - * Pentecost (Whitsunday). + * Epiphany. * - * 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. + * 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. However, since 1970, the celebration is held in some countries + * on the Sunday after January 1. Eastern Churches following the Julian Calendar observe the Theophany feast on what + * for most countries is January 19 because of the 13-day difference today between that calendar and the generally + * used Gregorian calendar. * - * @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 + * @see 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 + * @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. * @@ -143,30 +182,29 @@ protected function ascensionDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function pentecost( + protected function epiphany( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday( - 'pentecost', - [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P49D')), - $locale, - $type - ); + return new Holiday('epiphany', [], new DateTime("$year-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** - * Pentecost (Whitmonday). + * St. Joseph's Day. * - * 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. + * Saint Joseph's Day, March 19, the Feast of St. Joseph is in Western Christianity the principal feast day of Saint + * Joseph, husband of the Blessed Virgin Mary. He is the foster-father of Jesus Christ. March 19 was dedicated to + * Saint Joseph in several Western calendars by the 10th century, and this custom was established in Rome by 1479. + * 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. * - * @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 + * @see 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 + * @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. * @@ -175,102 +213,264 @@ protected function pentecost( * @throws \InvalidArgumentException * @throws \Exception */ - protected function pentecostMonday( + protected function stJosephsDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday( - 'pentecostMonday', - [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P50D')), - $locale, - $type - ); + return new Holiday('stJosephsDay', [], new DateTime("$year-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** - * Corpus Christi. + * St. George's Day. * - * The Feast of Corpus Christi (Latin for Body of Christ), also known as Corpus Domini, is a Latin Rite liturgical - * solemnity celebrating the tradition and belief in the body and blood of Jesus Christ and his Real Presence in the - * Eucharist. The feast is liturgically celebrated on the Thursday after Trinity Sunday or, "where the Solemnity of - * 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. + * Saint George's Day is the feast day of Saint George. It is celebrated by various Christian Churches and by the + * several nations, kingdoms, countries, and cities of which Saint George is the patron saint. Saint George's Day is + * 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. * - * @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 + * @see 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 + * @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 a type of 'other' is considered. + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @throws InvalidDateException * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ - protected function corpusChristi( + protected function stGeorgesDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OTHER + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday('stGeorgesDay', [], new DateTime("$year-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + } + + /** + * Calculate the Easter date for Orthodox churches. + * + * @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 + * + * @throws \Exception + * + * @see https://en.wikipedia.org/wiki/Computus#Meeus.27s_Julian_algorithm + * @see https://www.php.net/manual/en/function.easter-date.php#83794 + */ + protected 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; + $month = floor(($d + $e + 114) / 31); + $day = (($d + $e + 114) % 31) + 1; + + return (new DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new DateInterval('P13D')); + } + + /** + * Calculates the day of the reformation. + * + * Reformation Day is a religious holiday celebrated on October 31, alongside All Hallows' Eve, in remembrance + * of the Reformation. It is celebrated among various Protestants, especially by Lutheran and Reformed church + * communities. + * It is a civic holiday in the German states of Brandenburg, Mecklenburg-Vorpommern, Saxony, Saxony-Anhalt and + * Thuringia. Slovenia celebrates it as well due to the profound contribution of the Reformation to that nation's + * cultural development, although Slovenes are mainly Roman Catholics. With the increasing influence of + * Protestantism in Latin America (particularly newer groups such as various Evangelical Protestants, Pentecostals + * or Charismatics), it has been declared a national holiday in Chile in 2009. + * + * @see https://en.wikipedia.org/wiki/Reformation_Day + * @see 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 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, + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. + * + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + protected function reformationDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'corpusChristi', + 'reformationDay', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P60D')), + new DateTime("$year-10-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); } /** - * Christmas Eve. + * Calculates the date for Easter. * - * Christmas Eve refers to the evening or entire day preceding Christmas Day, a widely celebrated festival - * commemorating the birth of Jesus of Nazareth.[4] Christmas Day is observed around the world, and Christmas Eve is - * widely observed as a full or partial holiday in anticipation of Christmas Day. Together, both days are considered - * one of the most culturally significant celebrations in Christendom and Western society. + * 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. * - * @see https://en.wikipedia.org/wiki/Christmas_Eve + * 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. * - * @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 + * 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 + * @see https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c + * @see http://www.gmarts.org/index.php?go=415#EasterMallen + * @see https://www.tondering.dk/claus/cal/easter.php + */ + protected function calculateEaster(int $year, string $timezone): DateTime + { + if (\extension_loaded('calendar')) { + $easterDays = 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; + } + + $easterDays = $pfm + $tmp + 1; // Easter as the number of days after 21st March + } + + $easter = new DateTime("$year-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); + $easter->add(new DateInterval('P'.$easterDays.'D')); + + return $easter; + } + + /** + * 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. 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. + * + * @see 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 + * @param string $locale the locale for which Easter 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. + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @throws InvalidDateException * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ - protected function christmasEve( + protected function easter( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OBSERVANCE + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday('easter', [], $this->calculateEaster($year, $timezone), $locale, $type); + } + + /** + * Pentecost (Whitsunday). + * + * 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 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, + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. + * + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + protected function pentecost( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'christmasEve', + 'pentecost', [], - new DateTime("$year-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + $this->calculateEaster($year, $timezone)->add(new DateInterval('P49D')), $locale, $type ); } /** - * Christmas Day. + * Easter Monday. * - * Christmas or Christmas Day (Old English: Crīstesmæsse, meaning "Christ's Mass") is an annual festival - * 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. + * 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. * - * @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 + * @see 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 + * @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. * @@ -279,31 +479,33 @@ protected function christmasEve( * @throws \InvalidArgumentException * @throws \Exception */ - protected function christmasDay( + private function easterMonday( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'christmasDay', + 'easterMonday', [], - new DateTime("$year-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), + $this->calculateEaster($year, $timezone)->add(new DateInterval('P1D')), $locale, $type ); } /** - * Second Christmas Day / Boxing Day. + * Ascension Day. * - * Christmas or Christmas Day (Old English: Crīstesmæsse, meaning "Christ's Mass") is an annual festival - * 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. + * Ascension Day commemorates the bodily Ascension of Jesus into heaven. It is one of the ecumenical feasts of + * 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. * - * @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 + * @see 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 + * @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. * @@ -312,34 +514,30 @@ protected function christmasDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function secondChristmasDay( + private function ascensionDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'secondChristmasDay', + 'ascensionDay', [], - new DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), + $this->calculateEaster($year, $timezone)->add(new DateInterval('P39D')), $locale, $type ); } /** - * All Saints' Day. - * - * All Saints' Day, also known as All Hallows, Solemnity of All Saints, or Feast of All Saints is a solemnity - * celebrated on 1 November by the Catholic Church and various Protestant denominations, and on the first Sunday - * 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. + * Pentecost (Whitmonday). * - * @see https://en.wikipedia.org/wiki/All_Saints%27_Day + * 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 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 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, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * @@ -348,60 +546,67 @@ protected function secondChristmasDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function allSaintsDay( + private function pentecostMonday( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('allSaintsDay', [], new DateTime("$year-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday( + 'pentecostMonday', + [], + $this->calculateEaster($year, $timezone)->add(new DateInterval('P50D')), + $locale, + $type + ); } /** - * Day of the Assumption of Mary. + * Christmas Eve. * - * The Assumption of the Virgin Mary into Heaven, informally known as the Assumption, was the bodily taking up - * 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. + * Christmas Eve refers to the evening or entire day preceding Christmas Day, a widely celebrated festival + * commemorating the birth of Jesus of Nazareth.[4] Christmas Day is observed around the world, and Christmas Eve is + * widely observed as a full or partial holiday in anticipation of Christmas Day. Together, both days are considered + * one of the most culturally significant celebrations in Christendom and Western society. * - * @see https://en.wikipedia.org/wiki/Assumption_of_Mary + * @see https://en.wikipedia.org/wiki/Christmas_Eve * - * @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 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, - * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default observance is considered. * * @throws InvalidDateException * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ - protected function assumptionOfMary( + private function christmasEve( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OBSERVANCE ): Holiday { return new Holiday( - 'assumptionOfMary', + 'christmasEve', [], - new DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), + new DateTime("$year-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); } /** - * Good Friday. + * Christmas Day. * - * Good Friday is a Christian religious holiday commemorating the crucifixion of Jesus Christ and his death at - * 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. + * Christmas or Christmas Day (Old English: Crīstesmæsse, meaning "Christ's Mass") is an annual festival + * 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 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 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, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * @@ -410,35 +615,31 @@ protected function assumptionOfMary( * @throws \InvalidArgumentException * @throws \Exception */ - protected function goodFriday( + private function christmasDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'goodFriday', + 'christmasDay', [], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P2D')), + new DateTime("$year-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); } /** - * Epiphany. - * - * 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. However, since 1970, the celebration is held in some countries - * on the Sunday after January 1. Eastern Churches following the Julian Calendar observe the Theophany feast on what - * for most countries is January 19 because of the 13-day difference today between that calendar and the generally - * used Gregorian calendar. + * Second Christmas Day / Boxing Day. * - * @see https://en.wikipedia.org/wiki/Epiphany_(holiday) + * Christmas or Christmas Day (Old English: Crīstesmæsse, meaning "Christ's Mass") is an annual festival + * 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 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 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, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * @@ -447,13 +648,19 @@ protected function goodFriday( * @throws \InvalidArgumentException * @throws \Exception */ - protected function epiphany( + private function secondChristmasDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('epiphany', [], new DateTime("$year-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday( + 'secondChristmasDay', + [], + new DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** @@ -476,7 +683,7 @@ protected function epiphany( * @throws \InvalidArgumentException * @throws \Exception */ - protected function ashWednesday( + private function ashWednesday( int $year, string $timezone, string $locale, @@ -512,7 +719,7 @@ protected function ashWednesday( * @throws \InvalidArgumentException * @throws \Exception */ - protected function immaculateConception( + private function immaculateConception( int $year, string $timezone, string $locale, @@ -549,7 +756,7 @@ protected function immaculateConception( * @throws \InvalidArgumentException * @throws \Exception */ - protected function stStephensDay( + private function stStephensDay( int $year, string $timezone, string $locale, @@ -564,37 +771,6 @@ protected function stStephensDay( ); } - /** - * St. Joseph's Day. - * - * Saint Joseph's Day, March 19, the Feast of St. Joseph is in Western Christianity the principal feast day of Saint - * Joseph, husband of the Blessed Virgin Mary. He is the foster-father of Jesus Christ. March 19 was dedicated to - * Saint Joseph in several Western calendars by the 10th century, and this custom was established in Rome by 1479. - * 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. - * - * @see 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 - * @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. - * - * @throws InvalidDateException - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - protected function stJosephsDay( - int $year, - string $timezone, - string $locale, - string $type = Holiday::TYPE_OFFICIAL - ): Holiday { - return new Holiday('stJosephsDay', [], new DateTime("$year-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); - } - /** * Maundy Thursday. * @@ -616,7 +792,7 @@ protected function stJosephsDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function maundyThursday( + private function maundyThursday( int $year, string $timezone, string $locale, @@ -631,36 +807,6 @@ protected function maundyThursday( ); } - /** - * St. George's Day. - * - * Saint George's Day is the feast day of Saint George. It is celebrated by various Christian Churches and by the - * several nations, kingdoms, countries, and cities of which Saint George is the patron saint. Saint George's Day is - * 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. - * - * @see 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 - * @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. - * - * @throws InvalidDateException - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - protected function stGeorgesDay( - int $year, - string $timezone, - string $locale, - string $type = Holiday::TYPE_OFFICIAL - ): Holiday { - return new Holiday('stGeorgesDay', [], new DateTime("$year-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); - } - /** * St. John's Day. * @@ -683,7 +829,7 @@ protected function stGeorgesDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function stJohnsDay( + private function stJohnsDay( int $year, string $timezone, string $locale, @@ -714,7 +860,7 @@ protected function stJohnsDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function annunciation( + private function annunciation( int $year, string $timezone, string $locale, @@ -728,150 +874,4 @@ protected function annunciation( $type ); } - - /** - * Calculate the Easter date for Orthodox churches. - * - * @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 - * - * @throws \Exception - * - * @see https://en.wikipedia.org/wiki/Computus#Meeus.27s_Julian_algorithm - * @see https://www.php.net/manual/en/function.easter-date.php#83794 - */ - protected 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; - $month = floor(($d + $e + 114) / 31); - $day = (($d + $e + 114) % 31) + 1; - - return (new DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new DateInterval('P13D')); - } - - /** - * Calculates the day of the reformation. - * - * Reformation Day is a religious holiday celebrated on October 31, alongside All Hallows' Eve, in remembrance - * of the Reformation. It is celebrated among various Protestants, especially by Lutheran and Reformed church - * communities. - * It is a civic holiday in the German states of Brandenburg, Mecklenburg-Vorpommern, Saxony, Saxony-Anhalt and - * Thuringia. Slovenia celebrates it as well due to the profound contribution of the Reformation to that nation's - * cultural development, although Slovenes are mainly Roman Catholics. With the increasing influence of - * Protestantism in Latin America (particularly newer groups such as various Evangelical Protestants, Pentecostals - * or Charismatics), it has been declared a national holiday in Chile in 2009. - * - * @see https://en.wikipedia.org/wiki/Reformation_Day - * @see 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 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, - * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. - * - * @throws InvalidDateException - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - protected function reformationDay( - int $year, - string $timezone, - string $locale, - string $type = Holiday::TYPE_OFFICIAL - ): Holiday { - return new Holiday( - 'reformationDay', - [], - new DateTime("$year-10-31", DateTimeZoneFactory::getDateTimeZone($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 - * @see https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c - * @see http://www.gmarts.org/index.php?go=415#EasterMallen - * @see https://www.tondering.dk/claus/cal/easter.php - */ - protected function calculateEaster(int $year, string $timezone): DateTime - { - if (\extension_loaded('calendar')) { - $easterDays = 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; - } - - $easterDays = $pfm + $tmp + 1; // Easter as the number of days after 21st March - } - - $easter = new DateTime("$year-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); - $easter->add(new DateInterval('P'.$easterDays.'D')); - - return $easter; - } } diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index e882e74e7..56f0f5631 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -26,36 +26,6 @@ */ trait CommonHolidays { - /** - * New Year's Eve. - * - * New Year's Eve is observed on December 31, the last day of the year on the modern Gregorian calendar as well as - * the Julian calendar. In present day, with most countries now using the Gregorian calendar as their de facto - * 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. - * - * @see 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 - * @param string $locale the locale for which New Year's 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 an official holiday is considered. - * - * @throws InvalidDateException - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - protected function newYearsEve( - int $year, - string $timezone, - string $locale, - string $type = Holiday::TYPE_OFFICIAL - ): Holiday { - return new Holiday('newYearsEve', [], new DateTime("$year-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); - } - /** * New Year's Day. * @@ -126,19 +96,19 @@ protected function internationalWorkersDay( } /** - * Valentine's Day. + * St. Martin's Day. * - * Valentine's Day, also known as Saint Valentine's Day or the Feast of Saint Valentine, is a celebration observed - * on February 14 each year. It is celebrated in many countries around the world, although it is not a public - * holiday in most of them. In 18th-century England, it evolved into an occasion in which lovers expressed their - * love for each other by presenting flowers, offering confectionery, and sending greeting cards (known as - * "valentines"). + * St. Martin's Day, also known as the Feast of St. Martin, Martinstag or Martinmas, the Feast of St Martin of Tours + * or Martin le Miséricordieux, is a time for feasting celebrations. This is the time when autumn wheat seeding was + * completed, and the annual slaughter of fattened cattle produced "Martinmas beef". Historically, hiring fairs were + * 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. * - * @see https://en.wikipedia.org/wiki/Valentine%27s_Day + * @see https://en.wikipedia.org/wiki/St._Martin%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 - * @param string $locale the locale for which Valentine's Day need to be displayed in + * @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 + * @param string $locale the locale for which St. Martin'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. * @@ -147,33 +117,31 @@ protected function internationalWorkersDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function valentinesDay( + protected function stMartinsDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'valentinesDay', + 'stMartinsDay', [], - new DateTime("$year-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), + new DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); } /** - * World Animal Day. + * International Women's Day. * - * World Animal Day is an international day of action for animal rights and welfare celebrated annually on October - * 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. + * International Women's Day (IWD) is celebrated on March 8 every year.[3] It is a focal point in the movement for women's rights. * - * @see https://en.wikipedia.org/wiki/World_Animal_Day + * @see https://en.wikipedia.org/wiki/International_Women%27s_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 - * @param string $locale the locale for which World Animal Day need to be displayed in + * @param int $year the year for which International Women's Day need to be created + * @param string $timezone the timezone in which International Women's Day is celebrated + * @param string $locale the locale for which International Women'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. * @@ -182,35 +150,34 @@ protected function valentinesDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function worldAnimalDay( + protected function internationalWomensDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'worldAnimalDay', + 'internationalWomensDay', [], - new DateTime("$year-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), + new DateTime("$year-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); } /** - * St. Martin's Day. + * New Year's Eve. * - * St. Martin's Day, also known as the Feast of St. Martin, Martinstag or Martinmas, the Feast of St Martin of Tours - * or Martin le Miséricordieux, is a time for feasting celebrations. This is the time when autumn wheat seeding was - * completed, and the annual slaughter of fattened cattle produced "Martinmas beef". Historically, hiring fairs were - * 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. + * New Year's Eve is observed on December 31, the last day of the year on the modern Gregorian calendar as well as + * the Julian calendar. In present day, with most countries now using the Gregorian calendar as their de facto + * 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. * - * @see https://en.wikipedia.org/wiki/St._Martin%27s_Day + * @see https://en.wikipedia.org/wiki/New_Year%27s_Eve * - * @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 - * @param string $locale the locale for which St. Martin's Day need to be displayed in. + * @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 + * @param string $locale the locale for which New Year's 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 an official holiday is considered. * @@ -219,16 +186,82 @@ protected function worldAnimalDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function stMartinsDay( + private function newYearsEve( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday('newYearsEve', [], new DateTime("$year-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + } + + /** + * Valentine's Day. + * + * Valentine's Day, also known as Saint Valentine's Day or the Feast of Saint Valentine, is a celebration observed + * on February 14 each year. It is celebrated in many countries around the world, although it is not a public + * holiday in most of them. In 18th-century England, it evolved into an occasion in which lovers expressed their + * love for each other by presenting flowers, offering confectionery, and sending greeting cards (known as + * "valentines"). + * + * @see 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 + * @param string $locale the locale for which Valentine'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. + * + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function valentinesDay( int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { return new Holiday( - 'stMartinsDay', + 'valentinesDay', [], - new DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), + new DateTime("$year-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * World Animal Day. + * + * World Animal Day is an international day of action for animal rights and welfare celebrated annually on October + * 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. + * + * @see 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 + * @param string $locale the locale for which World Animal 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. + * + * @throws InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function worldAnimalDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'worldAnimalDay', + [], + new DateTime("$year-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -255,7 +288,7 @@ protected function stMartinsDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function fathersDay( + private function fathersDay( int $year, string $timezone, string $locale, @@ -291,7 +324,7 @@ protected function fathersDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function mothersDay( + private function mothersDay( int $year, string $timezone, string $locale, @@ -327,7 +360,7 @@ protected function mothersDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function victoryInEuropeDay( + private function victoryInEuropeDay( int $year, string $timezone, string $locale, @@ -365,7 +398,7 @@ protected function victoryInEuropeDay( * @throws \InvalidArgumentException * @throws \Exception */ - protected function armisticeDay( + private function armisticeDay( int $year, string $timezone, string $locale, @@ -380,39 +413,6 @@ protected function armisticeDay( ); } - /** - * International Women's Day. - * - * International Women's Day (IWD) is celebrated on March 8 every year.[3] It is a focal point in the movement for women's rights. - * - * @see https://en.wikipedia.org/wiki/International_Women%27s_Day - * - * @param int $year the year for which International Women's Day need to be created - * @param string $timezone the timezone in which International Women's Day is celebrated - * @param string $locale the locale for which International Women'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. - * - * @throws InvalidDateException - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - protected function internationalWomensDay( - int $year, - string $timezone, - string $locale, - string $type = Holiday::TYPE_OFFICIAL - ): Holiday { - return new Holiday( - 'internationalWomensDay', - [], - new DateTime("$year-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), - $locale, - $type - ); - } - /** * The beginning of summer time. * @@ -426,7 +426,7 @@ protected function internationalWomensDay( * * @throws \Exception */ - protected function summerTime( + private function summerTime( int $year, string $timezone, string $locale, @@ -460,7 +460,7 @@ protected function summerTime( * * @throws \Exception */ - protected function winterTime( + private function winterTime( int $year, string $timezone, string $locale, @@ -503,7 +503,7 @@ protected function winterTime( * * @throws \Exception */ - protected function calculateSummerWinterTime( + private function calculateSummerWinterTime( int $year, string $timezone, bool $summer diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 6d2367d8d..8ebf11a14 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -74,6 +74,32 @@ public function getSources(): array return ['https://en.wikipedia.org/wiki/Public_and_bank_holidays_in_Scotland']; } + /** + * 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. + * + * @see https://www.timeanddate.com/holidays/uk/summer-bank-holiday + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateSummerBankHoliday(): void + { + if ($this->year < 1871) { + return; + } + + $this->addHoliday(new Holiday( + 'summerBankHoliday', + ['en' => 'August Bank Holiday'], + new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + 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 @@ -89,7 +115,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateNewYearsHolidays(): void + private function calculateNewYearsHolidays(): void { // Before 1871 it was not an observed or statutory holiday if ($this->year < 1871) { @@ -138,32 +164,6 @@ protected function calculateNewYearsHolidays(): 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. In Scotland it falls on the first Monday of August. - * - * @see https://www.timeanddate.com/holidays/uk/summer-bank-holiday - * - * @throws InvalidDateException - * @throws \InvalidArgumentException - * @throws UnknownLocaleException - * @throws \Exception - */ - protected function calculateSummerBankHoliday(): void - { - if ($this->year < 1871) { - return; - } - - $this->addHoliday(new Holiday( - 'summerBankHoliday', - ['en' => 'August Bank Holiday'], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale, - Holiday::TYPE_BANK - )); - } - /** * St. Andrew's Day. * From 65790fa8207b61b51bba9dadfcbcac5014946b1f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jul 2021 22:19:45 +0900 Subject: [PATCH 248/687] Changed function's name and signature as its return value was never used. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Translations.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 36d567534..7310a97ec 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -77,7 +77,7 @@ public function loadTranslations(string $directoryPath): void if (\is_array($translations)) { foreach (array_keys($translations) as $locale) { - $this->isValidLocale($locale); // Validate the given locale + $this->checkLocale($locale); } $this->translations[$key] = $translations; @@ -96,7 +96,7 @@ public function loadTranslations(string $directoryPath): void */ public function addTranslation(string $key, string $locale, string $translation): void { - $this->isValidLocale($locale); // Validate the given locale + $this->checkLocale($locale); if (!\array_key_exists($key, $this->translations)) { $this->translations[$key] = []; @@ -139,22 +139,10 @@ public function getTranslations(string $key): array return $this->translations[$key]; } - /** - * Checks whether the given locale is a valid/available locale. - * - * @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 - */ - protected function isValidLocale(string $locale): bool + private function checkLocale(string $locale): void { if (!\in_array($locale, $this->availableLocales, true)) { throw new UnknownLocaleException(sprintf('Locale "%s" is not a valid locale.', $locale)); } - - return true; } } From 7f2488468ff6d22a2aa98fc2192422b814a64afc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 18 Jul 2021 11:42:15 +0900 Subject: [PATCH 249/687] Reduced visibility as current one is not necessary. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/UnitedKingdom.php | 188 +++++++++--------- .../Provider/UnitedKingdom/Scotland.php | 2 +- 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 959b91ff1..b4e4da33a 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -67,45 +67,6 @@ public function getSources(): array ]; } - /** - * 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. - * - * If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) - * Before 1871 it was not an observed or statutory holiday, after 1871 only an observed holiday. - * Since 1974 (by Royal Proclamation) it was established as a bank holiday. - * - * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom - * @see https://www.timeanddate.com/holidays/uk/new-year-day - * - * @throws InvalidDateException - * @throws \InvalidArgumentException - * @throws UnknownLocaleException - * @throws \Exception - */ - protected function calculateNewYearsDay(): void - { - // Before 1871 it was not an observed or statutory holiday - if ($this->year < 1871) { - return; - } - - $type = Holiday::TYPE_BANK; - if ($this->year <= 1974) { - $type = Holiday::TYPE_OBSERVANCE; - } - - $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - - // If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) - if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { - $newYearsDay->modify('next monday'); - } - - $this->addHoliday(new Holiday('newYearsDay', [], $newYearsDay, $this->locale, $type)); - } - /** * The first Monday of May is a bank holiday in the United Kingdom. It is called May Day in England, Wales and * Northern Ireland. It is known as the Early May Bank Holiday in Scotland. It probably originated as a Roman @@ -198,6 +159,99 @@ protected function calculateSpringBankHoliday(): void )); } + /** + * Christmas Day is celebrated in the United Kingdom on December 25. It traditionally celebrates Jesus Christ's + * birth but many aspects of this holiday have pagan origins. Christmas is a time for many people to give and + * receive gifts and prepare special festive meals. + * + * Boxing Day in the United Kingdom is the day after Christmas Day and falls on December 26. Traditionally, it was + * a + * day when employers distributed money, food, cloth (material) or other valuable goods to their employees. + * In modern times, it is an important day for sporting events and the start of the post-Christmas sales. + * + * Boxing Day is a bank holiday. If Boxing Day falls on a Saturday, the following Monday is a bank holiday. + * 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. + * + * @see https://www.timeanddate.com/holidays/uk/christmas-day + * @see https://www.timeanddate.com/holidays/uk/boxing-day + * + * @param string|null $type the Holiday Type (e.g. Official, Seasonal, etc.) + * + * @throws \Exception + */ + protected function calculateChristmasHolidays(?string $type = null): void + { + $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); + $this->addHoliday($secondChristmasDay); + + if (\in_array((int) $christmasDay->format('w'), [0, 6], true)) { + $date = clone $christmasDay; + $date->add(new DateInterval('P2D')); + $this->addHoliday(new SubstituteHoliday( + $christmasDay, + [], + $date, + $this->locale, + Holiday::TYPE_BANK + )); + } + + if (\in_array((int) $secondChristmasDay->format('w'), [0, 6], true)) { + $date = clone $secondChristmasDay; + $date->add(new DateInterval('P2D')); + $this->addHoliday(new SubstituteHoliday( + $secondChristmasDay, + [], + $date, + $this->locale, + 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. + * + * If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) + * Before 1871 it was not an observed or statutory holiday, after 1871 only an observed holiday. + * Since 1974 (by Royal Proclamation) it was established as a bank holiday. + * + * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom + * @see https://www.timeanddate.com/holidays/uk/new-year-day + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateNewYearsDay(): void + { + // Before 1871 it was not an observed or statutory holiday + if ($this->year < 1871) { + return; + } + + $type = Holiday::TYPE_BANK; + if ($this->year <= 1974) { + $type = Holiday::TYPE_OBSERVANCE; + } + + $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + + // If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) + if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { + $newYearsDay->modify('next monday'); + } + + $this->addHoliday(new Holiday('newYearsDay', [], $newYearsDay, $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. It falls on the last Monday of August replacing the first Monday in August @@ -214,7 +268,7 @@ protected function calculateSpringBankHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateSummerBankHoliday(): void + private function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; @@ -255,58 +309,4 @@ protected function calculateSummerBankHoliday(): void Holiday::TYPE_BANK )); } - - /** - * Christmas Day is celebrated in the United Kingdom on December 25. It traditionally celebrates Jesus Christ's - * birth but many aspects of this holiday have pagan origins. Christmas is a time for many people to give and - * receive gifts and prepare special festive meals. - * - * Boxing Day in the United Kingdom is the day after Christmas Day and falls on December 26. Traditionally, it was - * a - * day when employers distributed money, food, cloth (material) or other valuable goods to their employees. - * In modern times, it is an important day for sporting events and the start of the post-Christmas sales. - * - * Boxing Day is a bank holiday. If Boxing Day falls on a Saturday, the following Monday is a bank holiday. - * 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. - * - * @see https://www.timeanddate.com/holidays/uk/christmas-day - * @see https://www.timeanddate.com/holidays/uk/boxing-day - * - * @param string|null $type the Holiday Type (e.g. Official, Seasonal, etc.) - * - * @throws \Exception - */ - protected function calculateChristmasHolidays(?string $type = null): void - { - $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); - $this->addHoliday($secondChristmasDay); - - if (\in_array((int) $christmasDay->format('w'), [0, 6], true)) { - $date = clone $christmasDay; - $date->add(new DateInterval('P2D')); - $this->addHoliday(new SubstituteHoliday( - $christmasDay, - [], - $date, - $this->locale, - Holiday::TYPE_BANK - )); - } - - if (\in_array((int) $secondChristmasDay->format('w'), [0, 6], true)) { - $date = clone $secondChristmasDay; - $date->add(new DateInterval('P2D')); - $this->addHoliday(new SubstituteHoliday( - $secondChristmasDay, - [], - $date, - $this->locale, - Holiday::TYPE_BANK - )); - } - } } diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 8ebf11a14..da8cdcc0e 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -85,7 +85,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - protected function calculateSummerBankHoliday(): void + private function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; From 2f95f6c17b9e47a0ebff3342dfc1c131d0ccea25 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 18 Jul 2021 11:54:03 +0900 Subject: [PATCH 250/687] Changed default year as zero is never going to be used given the boundaries. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 299a5fb7a..e7f0601d6 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -123,7 +123,7 @@ public static function nextWorkingDay( * @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): AbstractProvider + public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, string $locale = self::DEFAULT_LOCALE): AbstractProvider { // Find and return holiday provider instance $providerClass = sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $class)); @@ -192,7 +192,7 @@ public static function getAvailableLocales(): array */ public static function createByISO3166_2( string $isoCode, - int $year = 0, + int $year = self::YEAR_LOWER_BOUND, string $locale = self::DEFAULT_LOCALE ): AbstractProvider { $availableProviders = self::getProviders(); From 905a9d2cbe5398c245b053f07b53c2a3e3c21f9f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 19 Jul 2021 08:45:13 +0900 Subject: [PATCH 251/687] Casting is not necessary. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 4672d3c91..4079715c6 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -496,7 +496,7 @@ private function calculateSubstituteHolidays(): void foreach ($holidays as $key => $holiday) { // Get list of holiday dates except this $holidayDates = array_map(static function ($holiday) use ($key) { - return $holiday->getKey() === $key ? false : (string) $holiday; + return $holiday->getKey() === $key ? false : $holiday; }, $holidays); // Only process accepted holidays and conditions From 478ac3af26456ca2aaeaf2f2d4553e6c3b9b784d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 19 Jul 2021 08:56:52 +0900 Subject: [PATCH 252/687] Casting is not necessary. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index e7f0601d6..1834f600d 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -92,7 +92,7 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int) $date->format('Y')) { + if (!$provider instanceof ProviderInterface || $provider->getYear() !== $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } if ($provider->isWorkingDay($date)) { @@ -280,8 +280,8 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== (int) $date->format('Y')) { - $provider = self::create($class, (int) $date->format('Y')); + if (!$provider instanceof ProviderInterface || $provider->getYear() !== $date->format('Y')) { + $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { --$workingDays; From c13fe1564ffe730e1e17027afb17f9bcdc5d01f4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 19 Jul 2021 09:01:54 +0900 Subject: [PATCH 253/687] Reformatting. 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 1834f600d..71ab9f77f 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -281,7 +281,7 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); if (!$provider instanceof ProviderInterface || $provider->getYear() !== $date->format('Y')) { - $provider = self::create($class, (int)$date->format('Y')); + $provider = self::create($class, (int) $date->format('Y')); } if ($provider->isWorkingDay($date)) { --$workingDays; From ed4d4e8fb83ba40dd44939814231cc8dd7a8478f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 17:31:50 +0900 Subject: [PATCH 254/687] Upgraded Phan to v5. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5835f6d80..d7959759b 100755 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "friendsofphp/php-cs-fixer": "^2.16", "infection/infection": "^0.17 | ^0.23", "mikey179/vfsstream": "^1.6", - "phan/phan": "^4.0", + "phan/phan": "^5.0", "phpstan/phpstan": "^0.12.66", "phpunit/phpunit": "^8.5 | ^9.4", "vimeo/psalm": "^4" From 3193ce1e06b1c97d650efb8de2feeda0059a03cd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 17:32:45 +0900 Subject: [PATCH 255/687] Cleaned up PHPUnit xml configuration by removing redundant attributes (having already a default value). Reformatted. --- phpunit.xml | 343 ++++++++++++++++++++++++++-------------------------- 1 file changed, 173 insertions(+), 170 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 79403bc72..cb80b6443 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,174 +9,177 @@ ~ ~ @author Sacha Telgenhof --> - - - - ./src/Yasumi - - - ./src/Yasumi/data - - - - - ./tests - - - - ./tests/Base - - - - ./tests/Australia - - - - ./tests/Austria - - - - ./tests/Belgium - - - - ./tests/Bosnia - - - - ./tests/Brazil - - - - ./tests/Canada - - - - ./tests/Croatia - - - - ./tests/CzechRepublic - - - - ./tests/Denmark - - - - ./tests/Estonia - - - - ./tests/Finland - - - - ./tests/France - - - - ./tests/Germany - - - - ./tests/Greece - - - - ./tests/Hungary - - - - ./tests/Ireland - - - - ./tests/Italy - - - - ./tests/Japan - - - - ./tests/Latvia - - - - ./tests/Lithuania - - - - ./tests/Luxembourg - - - - ./tests/Netherlands - - - - ./tests/NewZealand - - - - ./tests/Norway - - - - ./tests/Poland - - - - ./tests/Portugal - - - - ./tests/Romania - - - - ./tests/Russia - - - - ./tests/Slovakia - - - - ./tests/SouthAfrica - - - - ./tests/SouthKorea - - - - ./tests/Spain - - - - ./tests/Sweden - - - - ./tests/Switzerland - - - - ./tests/Turkey - - - - ./tests/USA - - - - ./tests/Ukraine - - - - ./tests/UnitedKingdom - - + + + + ./src/Yasumi + + + ./src/Yasumi/data + + + + + ./tests + + + + ./tests/Base + + + + ./tests/Australia + + + + ./tests/Austria + + + + ./tests/Belgium + + + + ./tests/Bosnia + + + + ./tests/Brazil + + + + ./tests/Canada + + + + ./tests/Croatia + + + + ./tests/CzechRepublic + + + + ./tests/Denmark + + + + ./tests/Estonia + + + + ./tests/Finland + + + + ./tests/France + + + + ./tests/Germany + + + + ./tests/Greece + + + + ./tests/Hungary + + + + ./tests/Ireland + + + + ./tests/Italy + + + + ./tests/Japan + + + + ./tests/Latvia + + + + ./tests/Lithuania + + + + ./tests/Luxembourg + + + + ./tests/Netherlands + + + + ./tests/NewZealand + + + + ./tests/Norway + + + + ./tests/Poland + + + + ./tests/Portugal + + + + ./tests/Romania + + + + ./tests/Russia + + + + ./tests/Slovakia + + + + ./tests/SouthAfrica + + + + ./tests/SouthKorea + + + + ./tests/Spain + + + + ./tests/Sweden + + + + ./tests/Switzerland + + + + ./tests/Turkey + + + + ./tests/USA + + + + ./tests/Ukraine + + + + ./tests/UnitedKingdom + + From 5705175a38ea3314dfc8abbf258c4ba32474a767 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 20:17:11 +0900 Subject: [PATCH 256/687] Clean up/Reorganized structure. --- composer.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index d7959759b..beba34b67 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,8 @@ { "name": "azuyalabs/yasumi", - "description": "The easy PHP Library for calculating holidays.", "type": "library", + "description": "The easy PHP Library for calculating holidays.", + "license": "MIT", "authors": [ { "name": "Sacha Telgenhof", @@ -10,7 +11,6 @@ } ], "homepage": "https://www.yasumi.dev", - "license": "MIT", "keywords": [ "holiday", "holidays", @@ -34,6 +34,7 @@ "url": "https://www.buymeacoffee.com/sachatelgenhof" } ], + "prefer-stable": true, "require": { "php": ">=7.3", "ext-json": "*" @@ -47,6 +48,9 @@ "phpunit/phpunit": "^8.5 | ^9.4", "vimeo/psalm": "^4" }, + "config": { + "sort-packages": true + }, "autoload": { "psr-4": { "Yasumi\\": "src/Yasumi/" @@ -69,9 +73,6 @@ "@psalm" ] }, - "config": { - "sort-packages": true - }, "suggest": { "ext-calendar": "For calculating the date of Easter" } From 2748fbe9e4ed62feec3ba956628eef4a48ace1de Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 20:25:26 +0900 Subject: [PATCH 257/687] Renamed so we have a distributable that can be used as is or overridden. --- phpstan.neon => phpstan.neon.dist | 0 phpunit.xml => phpunit.xml.dist | 0 psalm.xml => psalm.xml.dist | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename phpstan.neon => phpstan.neon.dist (100%) rename phpunit.xml => phpunit.xml.dist (100%) rename psalm.xml => psalm.xml.dist (100%) diff --git a/phpstan.neon b/phpstan.neon.dist similarity index 100% rename from phpstan.neon rename to phpstan.neon.dist diff --git a/phpunit.xml b/phpunit.xml.dist similarity index 100% rename from phpunit.xml rename to phpunit.xml.dist diff --git a/psalm.xml b/psalm.xml.dist similarity index 100% rename from psalm.xml rename to psalm.xml.dist From 5c288e71e7d8b99140cfe1876e7dc8fc5a16274a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 20:37:17 +0900 Subject: [PATCH 258/687] Fixed some grammar mistakes. --- src/Yasumi/Filters/OtherHolidaysFilter.php | 2 +- src/Yasumi/Holiday.php | 4 ++-- src/Yasumi/Provider/AbstractProvider.php | 10 +++++----- src/Yasumi/Provider/Australia.php | 2 +- .../Provider/Australia/AustralianCapitalTerritory.php | 2 +- src/Yasumi/Provider/Australia/NewSouthWales.php | 2 +- src/Yasumi/Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- .../Provider/Australia/Tasmania/CentralNorth.php | 2 +- .../Provider/Australia/Tasmania/FlindersIsland.php | 2 +- src/Yasumi/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 | 2 +- src/Yasumi/Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Canada.php | 2 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/BritishColumbia.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NewBrunswick.php | 2 +- src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php | 2 +- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Ontario.php | 2 +- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- 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 | 2 +- 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/Georgia.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/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 +- .../Provider/Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 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 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- .../Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- .../Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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 | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/SubstituteHoliday.php | 4 ++-- src/Yasumi/Yasumi.php | 7 ++----- 150 files changed, 157 insertions(+), 160 deletions(-) diff --git a/src/Yasumi/Filters/OtherHolidaysFilter.php b/src/Yasumi/Filters/OtherHolidaysFilter.php index 7579ef8d6..d98ebd6ff 100644 --- a/src/Yasumi/Filters/OtherHolidaysFilter.php +++ b/src/Yasumi/Filters/OtherHolidaysFilter.php @@ -19,7 +19,7 @@ /** * OtherHolidaysFilter is a class for filtering all other type of holidays. * - * OtherHolidaysFilter is a class that returns all holidays that are considered an other type of holiday of any given + * OtherHolidaysFilter is a class that returns all holidays that are considered another type of holiday of any given * holiday provider. * * Example usage: diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 58121d265..09e727b92 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -94,7 +94,7 @@ class Holiday extends DateTime implements JsonSerializable * Creates a new 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. + * (DateTimeInterface) has the correct timezone set. Otherwise, the default system timezone is used. * * @param string $key Holiday key * @param array $names An array containing the name/description of this holiday in various @@ -103,7 +103,7 @@ class Holiday extends DateTime implements JsonSerializable * @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 + * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default, an * official holiday is considered. * * @throws InvalidDateException diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 1849a541b..4f85be40a 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -34,7 +34,7 @@ abstract class AbstractProvider implements ProviderInterface, Countable, IteratorAggregate { /** - * Code to identify the Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify the Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'US'; @@ -268,7 +268,7 @@ public function count(): int } /** - * Gets all of the holidays defined by this holiday provider (for the given year). + * Gets all the holidays defined by this holiday provider (for the given year). * * @return Holiday[] list of all holidays defined for the given year */ @@ -278,7 +278,7 @@ public function getHolidays(): array } /** - * Gets all of the holiday names defined by this holiday provider (for the given year). + * Gets all the holiday names defined by this holiday provider (for the given year). * * @return array list of all holiday names defined for the given year */ @@ -398,7 +398,7 @@ public function getIterator(): ArrayIterator /** * Retrieves a list of all holidays that happen on the given date. * - * Yasumi only calculates holidays for a single year, so a date outside of the given year will not appear to + * Yasumi only calculates holidays for a single year, so a date outside the given year will not appear to * contain any holidays. * * Please take care to use the appropriate timezone for the date parameters. If there is a different timezone used @@ -412,7 +412,7 @@ public function on(\DateTimeInterface $date): OnFilter } /** - * Gets all of the holiday dates defined by this holiday provider (for the given year). + * Gets all the holiday dates defined by this holiday provider (for the given year). * * @return array list of all holiday dates defined for the given year */ diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 05a8909b7..14c6de684 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -29,7 +29,7 @@ class Australia extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU'; diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 226eee295..d70748f49 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -27,7 +27,7 @@ class AustralianCapitalTerritory extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-ACT'; diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index cda9a84cc..332a434e4 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -27,7 +27,7 @@ class NewSouthWales extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-NSW'; diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index c2b46ac7b..2dd87b608 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -27,7 +27,7 @@ class NorthernTerritory extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-NT'; diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index e172507c8..f077862a2 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -26,7 +26,7 @@ class Queensland extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-QLD'; diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index 5a47e5b5d..9c36f4630 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -27,7 +27,7 @@ class Brisbane extends Queensland { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there isn't one specifically for Brisbane, * and I believe this is a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 45441fd9c..61429b963 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -27,7 +27,7 @@ class SouthAustralia extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-SA'; diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 6dfe62fa9..b5eab21fd 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -26,7 +26,7 @@ class Tasmania extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-TAS'; diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index ffdca75d5..2823ff61b 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -26,7 +26,7 @@ class CentralNorth extends Tasmania { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index ddabf49a8..e31d38709 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -27,7 +27,7 @@ class FlindersIsland extends Tasmania { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index 7f994c490..c5c649972 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -26,7 +26,7 @@ class KingIsland extends Tasmania { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 1ac16c1cd..cde5f0097 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -27,7 +27,7 @@ class Northeast extends Tasmania { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index 5007e6bef..97952850a 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -27,7 +27,7 @@ class Northwest extends Tasmania { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 9c73a58c8..3cd6870fa 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -27,7 +27,7 @@ class CircularHead extends Northwest { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index 0d1fc82ad..637584bb4 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -27,7 +27,7 @@ class South extends Tasmania { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index d1f6f5db3..3f01f9953 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -26,7 +26,7 @@ class Southeast extends South { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. This one is not a proper ISO3166 code, but there aren't any for areas within Tasmania, * and I believe it to be a logical extension. */ diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 017ac9669..302247af1 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -27,7 +27,7 @@ class Victoria extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-VIC'; diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index d57f7413e..0b004128e 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -26,7 +26,7 @@ class WesternAustralia extends Australia { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AU-WA'; diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index e3441614d..04e182bbd 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -29,7 +29,7 @@ class Austria extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT'; diff --git a/src/Yasumi/Provider/Austria/Burgenland.php b/src/Yasumi/Provider/Austria/Burgenland.php index d4322c31c..99c9a8578 100755 --- a/src/Yasumi/Provider/Austria/Burgenland.php +++ b/src/Yasumi/Provider/Austria/Burgenland.php @@ -26,7 +26,7 @@ class Burgenland extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-1'; diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php index 865406c4f..d0efdfc2a 100755 --- a/src/Yasumi/Provider/Austria/Carinthia.php +++ b/src/Yasumi/Provider/Austria/Carinthia.php @@ -28,7 +28,7 @@ class Carinthia extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-2'; diff --git a/src/Yasumi/Provider/Austria/LowerAustria.php b/src/Yasumi/Provider/Austria/LowerAustria.php index 5d5ecf680..f701fe948 100755 --- a/src/Yasumi/Provider/Austria/LowerAustria.php +++ b/src/Yasumi/Provider/Austria/LowerAustria.php @@ -26,7 +26,7 @@ class LowerAustria extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-3'; diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php index a945ba8d5..aed7a3b9f 100755 --- a/src/Yasumi/Provider/Austria/Salzburg.php +++ b/src/Yasumi/Provider/Austria/Salzburg.php @@ -28,7 +28,7 @@ class Salzburg extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-5'; diff --git a/src/Yasumi/Provider/Austria/Styria.php b/src/Yasumi/Provider/Austria/Styria.php index bddbbc3a2..ac91894d3 100755 --- a/src/Yasumi/Provider/Austria/Styria.php +++ b/src/Yasumi/Provider/Austria/Styria.php @@ -26,7 +26,7 @@ class Styria extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-6'; diff --git a/src/Yasumi/Provider/Austria/Tyrol.php b/src/Yasumi/Provider/Austria/Tyrol.php index 63e4bdb5e..3e2d81c6b 100755 --- a/src/Yasumi/Provider/Austria/Tyrol.php +++ b/src/Yasumi/Provider/Austria/Tyrol.php @@ -26,7 +26,7 @@ class Tyrol extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-7'; diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php index 903b0e69e..15aa73cfd 100755 --- a/src/Yasumi/Provider/Austria/UpperAustria.php +++ b/src/Yasumi/Provider/Austria/UpperAustria.php @@ -28,7 +28,7 @@ class UpperAustria extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-4'; diff --git a/src/Yasumi/Provider/Austria/Vienna.php b/src/Yasumi/Provider/Austria/Vienna.php index 3c789c373..dafb91710 100755 --- a/src/Yasumi/Provider/Austria/Vienna.php +++ b/src/Yasumi/Provider/Austria/Vienna.php @@ -26,7 +26,7 @@ class Vienna extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-9'; diff --git a/src/Yasumi/Provider/Austria/Vorarlberg.php b/src/Yasumi/Provider/Austria/Vorarlberg.php index a1e6c2f1c..c45a17fd2 100755 --- a/src/Yasumi/Provider/Austria/Vorarlberg.php +++ b/src/Yasumi/Provider/Austria/Vorarlberg.php @@ -26,7 +26,7 @@ class Vorarlberg extends Austria { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'AT-8'; diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index f6f14c3bf..7e457377d 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -28,7 +28,7 @@ class Belgium extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'BE'; diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index 34b903ccb..45d07093e 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -30,7 +30,7 @@ class Bosnia extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'BA'; diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 19a55fbca..43be2f404 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -29,7 +29,7 @@ class Brazil extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'BR'; diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index b9e6c4d47..07d34d26a 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -29,7 +29,7 @@ class Canada extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA'; diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index 29786c6f1..0be933f14 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -31,7 +31,7 @@ class Alberta extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-AB'; diff --git a/src/Yasumi/Provider/Canada/BritishColumbia.php b/src/Yasumi/Provider/Canada/BritishColumbia.php index 3930a4dff..ffcdc8ef0 100644 --- a/src/Yasumi/Provider/Canada/BritishColumbia.php +++ b/src/Yasumi/Provider/Canada/BritishColumbia.php @@ -28,7 +28,7 @@ class BritishColumbia extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-BC'; diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index d5b8d4d6b..c19ebfd76 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -31,7 +31,7 @@ class Manitoba extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-MB'; diff --git a/src/Yasumi/Provider/Canada/NewBrunswick.php b/src/Yasumi/Provider/Canada/NewBrunswick.php index 15f85b0df..4a573c612 100644 --- a/src/Yasumi/Provider/Canada/NewBrunswick.php +++ b/src/Yasumi/Provider/Canada/NewBrunswick.php @@ -28,7 +28,7 @@ class NewBrunswick extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-NB'; diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index 53bd0b6a7..4fc629bd4 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -32,7 +32,7 @@ class NewfoundlandAndLabrador extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-NL'; diff --git a/src/Yasumi/Provider/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php index 6fbfaad67..f58a43335 100644 --- a/src/Yasumi/Provider/Canada/NorthwestTerritories.php +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -28,7 +28,7 @@ class NorthwestTerritories extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-NT'; diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index 7861c80c8..1e2f29d73 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -31,7 +31,7 @@ class NovaScotia extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-NS'; diff --git a/src/Yasumi/Provider/Canada/Nunavut.php b/src/Yasumi/Provider/Canada/Nunavut.php index 13ab545d8..e86b173f7 100644 --- a/src/Yasumi/Provider/Canada/Nunavut.php +++ b/src/Yasumi/Provider/Canada/Nunavut.php @@ -28,7 +28,7 @@ class Nunavut extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-NU'; diff --git a/src/Yasumi/Provider/Canada/Ontario.php b/src/Yasumi/Provider/Canada/Ontario.php index e8a0aa6f5..dccc09448 100644 --- a/src/Yasumi/Provider/Canada/Ontario.php +++ b/src/Yasumi/Provider/Canada/Ontario.php @@ -28,7 +28,7 @@ class Ontario extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-ON'; diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index 4bf834147..aea699b1d 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -31,7 +31,7 @@ class PrinceEdwardIsland extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-PE'; diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index c3129ca02..d0923f10d 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -31,7 +31,7 @@ class Quebec extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-QC'; diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index f2b21b24d..d3194fa55 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -31,7 +31,7 @@ class Saskatchewan extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-SK'; diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index ddfb94bac..ca854eb5e 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -31,7 +31,7 @@ class Yukon extends Canada { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CA-YT'; diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index a9054cf4d..c3891d265 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -30,7 +30,7 @@ class Croatia extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'HR'; diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 5a8b34f9f..711721e02 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -32,7 +32,7 @@ class CzechRepublic extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CZ'; diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index c4c07848e..cc5dabdd3 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -29,7 +29,7 @@ class Denmark extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DK'; diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 0c792be89..d6a718dff 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -34,7 +34,7 @@ class Estonia extends AbstractProvider public const RESTORATION_OF_INDEPENDENCE_YEAR = 1991; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'EE'; diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 4c33d0d5b..3ebfbbbed 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -28,7 +28,7 @@ class Finland extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'FI'; diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 62ba882cc..f9da7e2d3 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -28,7 +28,7 @@ class France extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'FR'; diff --git a/src/Yasumi/Provider/France/BasRhin.php b/src/Yasumi/Provider/France/BasRhin.php index 3e27cac4f..46075df1b 100755 --- a/src/Yasumi/Provider/France/BasRhin.php +++ b/src/Yasumi/Provider/France/BasRhin.php @@ -33,7 +33,7 @@ class BasRhin extends France use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'FR-67'; diff --git a/src/Yasumi/Provider/France/HautRhin.php b/src/Yasumi/Provider/France/HautRhin.php index da81c1f33..64f660542 100755 --- a/src/Yasumi/Provider/France/HautRhin.php +++ b/src/Yasumi/Provider/France/HautRhin.php @@ -33,7 +33,7 @@ class HautRhin extends France use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'FR-68'; diff --git a/src/Yasumi/Provider/France/Moselle.php b/src/Yasumi/Provider/France/Moselle.php index 7d7239971..e6c265b31 100755 --- a/src/Yasumi/Provider/France/Moselle.php +++ b/src/Yasumi/Provider/France/Moselle.php @@ -34,7 +34,7 @@ class Moselle extends France use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'FR-57'; diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 77be51d4b..033afab58 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -31,7 +31,7 @@ class Georgia extends AbstractProvider public const APRIL_NINE_TRAGEDY_YEAR = 1989; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'GE'; diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 23a2c89e1..551d9bca1 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -29,7 +29,7 @@ class Germany extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE'; diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 7d7ce4c64..0d75f0788 100755 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -31,7 +31,7 @@ class BadenWurttemberg extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-BW'; diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index 1d3a91332..9f072e640 100755 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -32,7 +32,7 @@ class Bavaria extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-BY'; diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index fec7b8221..4c7955dd4 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -34,7 +34,7 @@ class Berlin extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-BE'; diff --git a/src/Yasumi/Provider/Germany/Brandenburg.php b/src/Yasumi/Provider/Germany/Brandenburg.php index 912609998..409501cfc 100755 --- a/src/Yasumi/Provider/Germany/Brandenburg.php +++ b/src/Yasumi/Provider/Germany/Brandenburg.php @@ -30,7 +30,7 @@ class Brandenburg extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-BB'; diff --git a/src/Yasumi/Provider/Germany/Bremen.php b/src/Yasumi/Provider/Germany/Bremen.php index bdf78feb5..dfea2a54b 100755 --- a/src/Yasumi/Provider/Germany/Bremen.php +++ b/src/Yasumi/Provider/Germany/Bremen.php @@ -30,7 +30,7 @@ class Bremen extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-HB'; diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index 8627abaca..97f370f17 100755 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -32,7 +32,7 @@ class Hamburg extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-HH'; diff --git a/src/Yasumi/Provider/Germany/Hesse.php b/src/Yasumi/Provider/Germany/Hesse.php index 196ed75be..12016d4f0 100755 --- a/src/Yasumi/Provider/Germany/Hesse.php +++ b/src/Yasumi/Provider/Germany/Hesse.php @@ -32,7 +32,7 @@ class Hesse extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-HE'; diff --git a/src/Yasumi/Provider/Germany/LowerSaxony.php b/src/Yasumi/Provider/Germany/LowerSaxony.php index 24def1ad8..edc085ee3 100755 --- a/src/Yasumi/Provider/Germany/LowerSaxony.php +++ b/src/Yasumi/Provider/Germany/LowerSaxony.php @@ -31,7 +31,7 @@ class LowerSaxony extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-NI'; diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php index d9d2c8fd5..e6cf89e13 100755 --- a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php +++ b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php @@ -31,7 +31,7 @@ class MecklenburgWesternPomerania extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-MV'; diff --git a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php index 1005aff57..0a13ec6f7 100755 --- a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php +++ b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php @@ -32,7 +32,7 @@ class NorthRhineWestphalia extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-NW'; diff --git a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php index 4b78ef757..aae8dec16 100755 --- a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php +++ b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php @@ -31,7 +31,7 @@ class RhinelandPalatinate extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-RP'; diff --git a/src/Yasumi/Provider/Germany/Saarland.php b/src/Yasumi/Provider/Germany/Saarland.php index 31830a77e..6ebd485de 100755 --- a/src/Yasumi/Provider/Germany/Saarland.php +++ b/src/Yasumi/Provider/Germany/Saarland.php @@ -32,7 +32,7 @@ class Saarland extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-SL'; diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index 959c321f9..20508a389 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -33,7 +33,7 @@ class Saxony extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-SN'; diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php index afd6c8b7e..7efbd782d 100755 --- a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php +++ b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php @@ -31,7 +31,7 @@ class SaxonyAnhalt extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-ST'; diff --git a/src/Yasumi/Provider/Germany/SchleswigHolstein.php b/src/Yasumi/Provider/Germany/SchleswigHolstein.php index ffd6be2c2..b5028f5a2 100755 --- a/src/Yasumi/Provider/Germany/SchleswigHolstein.php +++ b/src/Yasumi/Provider/Germany/SchleswigHolstein.php @@ -30,7 +30,7 @@ class SchleswigHolstein extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-SH'; diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index f7405c586..c0c7c5d3f 100755 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -31,7 +31,7 @@ class Thuringia extends Germany { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'DE-TH'; diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 852f2244d..b3ebcbd02 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -29,7 +29,7 @@ class Greece extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'GR'; diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index bf67d4be3..85cb3f903 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -30,7 +30,7 @@ class Hungary extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'HU'; diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index fc8693937..b1fdea9e9 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -35,7 +35,7 @@ class Ireland extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'IE'; diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index f60d6f1cb..bea1d6c96 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -28,7 +28,7 @@ class Italy extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'IT'; diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 016cbf476..fb1890d05 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -31,7 +31,7 @@ class Japan extends AbstractProvider use CommonHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'JP'; diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 67cf025be..4b71a9001 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -32,7 +32,7 @@ class Latvia extends AbstractProvider public const PROCLAMATION_OF_INDEPENDENCE_YEAR = 1918; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'LV'; diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 37870dbe0..3ad54b541 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -28,7 +28,7 @@ class Lithuania extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'LT'; diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index af6df89a5..6f0b28bae 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -30,7 +30,7 @@ class Luxembourg extends AbstractProvider public const EUROPE_DAY_START_YEAR = 2019; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'LU'; diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 991edefd2..b33ac7c2c 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -29,7 +29,7 @@ class Netherlands extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'NL'; diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 158af79aa..ad6cdd9af 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -29,7 +29,7 @@ class NewZealand extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'NZ'; diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index ba08d33e3..efc62513e 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -28,7 +28,7 @@ class Norway extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'NO'; diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index e04748308..1fb8e84b8 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -28,7 +28,7 @@ class Poland extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'PL'; diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index fc203cd5d..39f9aed25 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -28,7 +28,7 @@ class Portugal extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'PT'; diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 2004f080d..bd207175d 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -34,7 +34,7 @@ class Romania extends AbstractProvider /** * Code to identify this Holiday Provider. - * Typically this is the ISO3166 code corresponding to the respective country or sub-region. + * Typically, this is the ISO3166 code corresponding to the respective country or sub-region. */ public const ID = 'RO'; diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index cc5eaacef..84aaf0b94 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -32,7 +32,7 @@ class Russia extends AbstractProvider public const UNITY_DAY_START_YEAR = 2005; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'RU'; diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index e79a5bfd6..4aa838d02 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -53,7 +53,7 @@ class Slovakia extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'SK'; diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 0b4f2fbfe..3ce5ebb1b 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -35,7 +35,7 @@ class SouthAfrica extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ZA'; diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 4079715c6..1ed19bd37 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -33,7 +33,7 @@ class SouthKorea extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'KR'; diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index ebb5b792a..756974f21 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -28,7 +28,7 @@ class Spain extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES'; diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 6b530c0d0..a2d7c68ee 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -36,7 +36,7 @@ class Andalusia extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-AN'; diff --git a/src/Yasumi/Provider/Spain/Aragon.php b/src/Yasumi/Provider/Spain/Aragon.php index 3d3971b5f..bd9302820 100755 --- a/src/Yasumi/Provider/Spain/Aragon.php +++ b/src/Yasumi/Provider/Spain/Aragon.php @@ -35,7 +35,7 @@ class Aragon extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-AR'; diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 85d3444fe..061e4a410 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -37,7 +37,7 @@ class Asturias extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-AS'; diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 77ee6f947..a1784b95c 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -36,7 +36,7 @@ class BalearicIslands extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-IB'; diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index b6c5b3026..0b6674e07 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -35,7 +35,7 @@ class BasqueCountry extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-PV'; diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index 9e2bb10fe..afaf5a623 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -37,7 +37,7 @@ class CanaryIslands extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-CN'; diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index e3e7380a9..90510513c 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -37,7 +37,7 @@ class Cantabria extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-CB'; diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 5b1527373..416d09b09 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -38,7 +38,7 @@ class CastileAndLeon extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-CL'; diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index 7ec84e2e9..47ad5955c 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -38,7 +38,7 @@ class CastillaLaMancha extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-CM'; diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index ba94ef79d..8ac659960 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -39,7 +39,7 @@ class Catalonia extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-CT'; diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 20426bc21..0f23a4e8b 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -36,7 +36,7 @@ class Ceuta extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-CE'; diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 67deab199..5fe74bcee 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -38,7 +38,7 @@ class CommunityOfMadrid extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-MD'; diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index d90b8794b..af4e9a5aa 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -37,7 +37,7 @@ class Extremadura extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-EX'; diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 9f9ddfa30..31df85986 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -37,7 +37,7 @@ class Galicia extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-GA'; diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 11751b8e4..980128280 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -36,7 +36,7 @@ class LaRioja extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-RI'; diff --git a/src/Yasumi/Provider/Spain/Melilla.php b/src/Yasumi/Provider/Spain/Melilla.php index 4a066274c..2c788b4f7 100755 --- a/src/Yasumi/Provider/Spain/Melilla.php +++ b/src/Yasumi/Provider/Spain/Melilla.php @@ -34,7 +34,7 @@ class Melilla extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-ML'; diff --git a/src/Yasumi/Provider/Spain/Navarre.php b/src/Yasumi/Provider/Spain/Navarre.php index adb0ff2e7..ba7bff13f 100755 --- a/src/Yasumi/Provider/Spain/Navarre.php +++ b/src/Yasumi/Provider/Spain/Navarre.php @@ -34,7 +34,7 @@ class Navarre extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-NC'; diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index 146b21d33..62b75952d 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -36,7 +36,7 @@ class RegionOfMurcia extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-MC'; diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index dfcbc663c..256d0c2bf 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -39,7 +39,7 @@ class ValencianCommunity extends Spain use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'ES-VC'; diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index c231d4c47..b3ca3bd85 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -29,7 +29,7 @@ class Sweden extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'SE'; diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index c921cb291..4cf921a42 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -29,7 +29,7 @@ class Switzerland extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH'; diff --git a/src/Yasumi/Provider/Switzerland/Aargau.php b/src/Yasumi/Provider/Switzerland/Aargau.php index 7591136ba..11576d7b3 100644 --- a/src/Yasumi/Provider/Switzerland/Aargau.php +++ b/src/Yasumi/Provider/Switzerland/Aargau.php @@ -30,7 +30,7 @@ class Aargau extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-AG'; diff --git a/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php b/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php index ea5eadfc5..9d167e75a 100644 --- a/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php +++ b/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php @@ -30,7 +30,7 @@ class AppenzellAusserrhoden extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-AR'; diff --git a/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php b/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php index 93c47f791..74633648f 100644 --- a/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php +++ b/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php @@ -30,7 +30,7 @@ class AppenzellInnerrhoden extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-AI'; diff --git a/src/Yasumi/Provider/Switzerland/BaselLandschaft.php b/src/Yasumi/Provider/Switzerland/BaselLandschaft.php index 4d2fe6863..bab687d52 100644 --- a/src/Yasumi/Provider/Switzerland/BaselLandschaft.php +++ b/src/Yasumi/Provider/Switzerland/BaselLandschaft.php @@ -30,7 +30,7 @@ class BaselLandschaft extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-BL'; diff --git a/src/Yasumi/Provider/Switzerland/BaselStadt.php b/src/Yasumi/Provider/Switzerland/BaselStadt.php index 5234e9dca..a2233ba4d 100644 --- a/src/Yasumi/Provider/Switzerland/BaselStadt.php +++ b/src/Yasumi/Provider/Switzerland/BaselStadt.php @@ -30,7 +30,7 @@ class BaselStadt extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-BS'; diff --git a/src/Yasumi/Provider/Switzerland/Bern.php b/src/Yasumi/Provider/Switzerland/Bern.php index 4be44308b..554f158c7 100644 --- a/src/Yasumi/Provider/Switzerland/Bern.php +++ b/src/Yasumi/Provider/Switzerland/Bern.php @@ -31,7 +31,7 @@ class Bern extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-BE'; diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index 417cf0b0f..8f5521f28 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -33,7 +33,7 @@ class Fribourg extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-FR'; diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index c797ef82a..c1470a55d 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -34,7 +34,7 @@ class Geneva extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-GE'; diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 07fca361f..3c88ad328 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -32,7 +32,7 @@ class Glarus extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-GL'; diff --git a/src/Yasumi/Provider/Switzerland/Grisons.php b/src/Yasumi/Provider/Switzerland/Grisons.php index 433523b23..8d80e603b 100644 --- a/src/Yasumi/Provider/Switzerland/Grisons.php +++ b/src/Yasumi/Provider/Switzerland/Grisons.php @@ -30,7 +30,7 @@ class Grisons extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-GR'; diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index 6441985e9..f877d236c 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -33,7 +33,7 @@ class Jura extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-JU'; diff --git a/src/Yasumi/Provider/Switzerland/Lucerne.php b/src/Yasumi/Provider/Switzerland/Lucerne.php index d946a63be..c7791a7a3 100644 --- a/src/Yasumi/Provider/Switzerland/Lucerne.php +++ b/src/Yasumi/Provider/Switzerland/Lucerne.php @@ -30,7 +30,7 @@ class Lucerne extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-LU'; diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index f6aa000fe..e8d8c2721 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -34,7 +34,7 @@ class Neuchatel extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-NE'; diff --git a/src/Yasumi/Provider/Switzerland/Nidwalden.php b/src/Yasumi/Provider/Switzerland/Nidwalden.php index 0a40ad538..61b40b08e 100644 --- a/src/Yasumi/Provider/Switzerland/Nidwalden.php +++ b/src/Yasumi/Provider/Switzerland/Nidwalden.php @@ -30,7 +30,7 @@ class Nidwalden extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-NW'; diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index c34bfd948..5b27cd936 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -32,7 +32,7 @@ class Obwalden extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-OW'; diff --git a/src/Yasumi/Provider/Switzerland/Schaffhausen.php b/src/Yasumi/Provider/Switzerland/Schaffhausen.php index 5d7c60686..44ec936bb 100644 --- a/src/Yasumi/Provider/Switzerland/Schaffhausen.php +++ b/src/Yasumi/Provider/Switzerland/Schaffhausen.php @@ -30,7 +30,7 @@ class Schaffhausen extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-SH'; diff --git a/src/Yasumi/Provider/Switzerland/Schwyz.php b/src/Yasumi/Provider/Switzerland/Schwyz.php index dd9dafba0..6c2101ae2 100644 --- a/src/Yasumi/Provider/Switzerland/Schwyz.php +++ b/src/Yasumi/Provider/Switzerland/Schwyz.php @@ -30,7 +30,7 @@ class Schwyz extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-SZ'; diff --git a/src/Yasumi/Provider/Switzerland/Solothurn.php b/src/Yasumi/Provider/Switzerland/Solothurn.php index a5fc9e16a..a8bc57d49 100644 --- a/src/Yasumi/Provider/Switzerland/Solothurn.php +++ b/src/Yasumi/Provider/Switzerland/Solothurn.php @@ -30,7 +30,7 @@ class Solothurn extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-SO'; diff --git a/src/Yasumi/Provider/Switzerland/StGallen.php b/src/Yasumi/Provider/Switzerland/StGallen.php index 06cf03b9b..c440b7a56 100644 --- a/src/Yasumi/Provider/Switzerland/StGallen.php +++ b/src/Yasumi/Provider/Switzerland/StGallen.php @@ -30,7 +30,7 @@ class StGallen extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-SG'; diff --git a/src/Yasumi/Provider/Switzerland/Thurgau.php b/src/Yasumi/Provider/Switzerland/Thurgau.php index 4831a89a5..ced788732 100644 --- a/src/Yasumi/Provider/Switzerland/Thurgau.php +++ b/src/Yasumi/Provider/Switzerland/Thurgau.php @@ -30,7 +30,7 @@ class Thurgau extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-TG'; diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index d00eb26c9..95c4131cb 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -32,7 +32,7 @@ class Ticino extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-TI'; diff --git a/src/Yasumi/Provider/Switzerland/Uri.php b/src/Yasumi/Provider/Switzerland/Uri.php index 4559a43de..37d69ea49 100644 --- a/src/Yasumi/Provider/Switzerland/Uri.php +++ b/src/Yasumi/Provider/Switzerland/Uri.php @@ -30,7 +30,7 @@ class Uri extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-UR'; diff --git a/src/Yasumi/Provider/Switzerland/Valais.php b/src/Yasumi/Provider/Switzerland/Valais.php index a414d8320..f4c413287 100644 --- a/src/Yasumi/Provider/Switzerland/Valais.php +++ b/src/Yasumi/Provider/Switzerland/Valais.php @@ -31,7 +31,7 @@ class Valais extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-VS'; diff --git a/src/Yasumi/Provider/Switzerland/Vaud.php b/src/Yasumi/Provider/Switzerland/Vaud.php index 4d617fea3..55f52357f 100644 --- a/src/Yasumi/Provider/Switzerland/Vaud.php +++ b/src/Yasumi/Provider/Switzerland/Vaud.php @@ -31,7 +31,7 @@ class Vaud extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-VD'; diff --git a/src/Yasumi/Provider/Switzerland/Zug.php b/src/Yasumi/Provider/Switzerland/Zug.php index 331f9cab2..3b360aa40 100644 --- a/src/Yasumi/Provider/Switzerland/Zug.php +++ b/src/Yasumi/Provider/Switzerland/Zug.php @@ -30,7 +30,7 @@ class Zug extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-ZG'; diff --git a/src/Yasumi/Provider/Switzerland/Zurich.php b/src/Yasumi/Provider/Switzerland/Zurich.php index 10fd7550d..db328d234 100644 --- a/src/Yasumi/Provider/Switzerland/Zurich.php +++ b/src/Yasumi/Provider/Switzerland/Zurich.php @@ -31,7 +31,7 @@ class Zurich extends Switzerland use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'CH-ZH'; diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 92b7ee6bd..88ff73d3b 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -30,7 +30,7 @@ class USA extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'US'; diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 8db966cf0..293603e4e 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -34,7 +34,7 @@ class Ukraine extends AbstractProvider /** * Code to identify this Holiday Provider. - * Typically this is the ISO3166 code corresponding to the respective country or sub-region. + * Typically, this is the ISO3166 code corresponding to the respective country or sub-region. */ public const ID = 'UA'; diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index b4e4da33a..f4511a93e 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -31,7 +31,7 @@ class UnitedKingdom extends AbstractProvider use ChristianHolidays; /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective * country or sub-region. */ public const ID = 'GB'; diff --git a/src/Yasumi/Provider/UnitedKingdom/England.php b/src/Yasumi/Provider/UnitedKingdom/England.php index caa313714..ea4c89e3f 100644 --- a/src/Yasumi/Provider/UnitedKingdom/England.php +++ b/src/Yasumi/Provider/UnitedKingdom/England.php @@ -28,7 +28,7 @@ class England extends UnitedKingdom { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * 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 index a29a7bffc..6060c8a9b 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -34,7 +34,7 @@ class NorthernIreland extends UnitedKingdom { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * 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'; diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index da8cdcc0e..2dd889bf3 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -40,7 +40,7 @@ class Scotland extends UnitedKingdom { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * 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'; diff --git a/src/Yasumi/Provider/UnitedKingdom/Wales.php b/src/Yasumi/Provider/UnitedKingdom/Wales.php index b8da27bfc..7a43a5e82 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Wales.php +++ b/src/Yasumi/Provider/UnitedKingdom/Wales.php @@ -28,7 +28,7 @@ class Wales extends UnitedKingdom { /** - * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * 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/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index effe48098..f6f83d88d 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -46,7 +46,7 @@ class SubstituteHoliday extends Holiday * 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. + * (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 @@ -55,7 +55,7 @@ class SubstituteHoliday extends 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 + * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default, * an official holiday is considered. * * @throws InvalidDateException diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 71ab9f77f..212e009fd 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -71,7 +71,6 @@ class Yasumi * @param \DateTimeInterface $startDate Start date, defaults to today * @param int $workingDays Number of days to look ahead for the (first) next working day * - * @throws \ReflectionException * @throws UnknownLocaleException * @throws RuntimeException * @throws InvalidArgumentException @@ -85,7 +84,7 @@ public static function nextWorkingDay( \DateTimeInterface $startDate, int $workingDays = 1 ): \DateTimeInterface { - // Setup start date, if its an instance of \DateTime, clone to prevent modification to original + // Setup start date, if it's an instance of \DateTime, clone to prevent modification to original $date = $startDate instanceof \DateTime ? clone $startDate : $startDate; $provider = null; @@ -121,7 +120,6 @@ public static function nextWorkingDay( * @throws InvalidYearException if the year parameter is not between the defined lower and upper bounds * @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 = self::YEAR_LOWER_BOUND, string $locale = self::DEFAULT_LOCALE): AbstractProvider { @@ -259,7 +257,6 @@ public static function getProviders(): array * @param \DateTimeInterface $startDate Start date, defaults to today * @param int $workingDays Number of days to look back for the (first) previous working day * - * @throws \ReflectionException * @throws UnknownLocaleException * @throws RuntimeException * @throws InvalidArgumentException @@ -273,7 +270,7 @@ public static function prevWorkingDay( \DateTimeInterface $startDate, int $workingDays = 1 ): \DateTimeInterface { - // Setup start date, if its an instance of \DateTime, clone to prevent modification to original + // Setup start date, if it's an instance of \DateTime, clone to prevent modification to original $date = $startDate instanceof \DateTime ? clone $startDate : $startDate; $provider = null; From 260b00cb05c1361274d5488bb23b059993b60f25 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 20:42:47 +0900 Subject: [PATCH 259/687] Have coloured output with Phan. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index beba34b67..24d23d728 100755 --- a/composer.json +++ b/composer.json @@ -65,7 +65,7 @@ "format": "./vendor/bin/php-cs-fixer fix", "phpstan": "vendor/bin/phpstan analyse", "psalm": "vendor/bin/psalm --threads=2", - "phan": "vendor/bin/phan", + "phan": "vendor/bin/phan -C", "test": "vendor/bin/phpunit", "infection": "vendor/bin/infection run -j 2", "analyse": [ From 19c4ae7134d52b6bb51820c5570ca328aa45aeb2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 20:49:41 +0900 Subject: [PATCH 260/687] Updated config from v5. Set all parameters to level 1. Pruned directory and file list. --- .phan/config.php | 74 ++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index ea52c9511..84808a426 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -1,15 +1,17 @@ =7.3" + // Automatically inferred from composer.json requirement for "php" of "^7.4 || ^8.0" 'target_php_version' => '7.3', // If enabled, missing properties will be created when @@ -67,12 +69,12 @@ // // This is an incremental step in migrating away from `null_casts_as_any_type`. // If `null_casts_as_any_type` is true, this has no effect. - 'null_casts_as_array' => true, + 'null_casts_as_array' => false, // If enabled, allow any array-like type to be cast to null. // This is an incremental step in migrating away from `null_casts_as_any_type`. // If `null_casts_as_any_type` is true, this has no effect. - 'array_casts_as_null' => true, + 'array_casts_as_null' => false, // If enabled, scalars (int, float, bool, string, null) // are treated as if they can cast to each other. @@ -83,7 +85,7 @@ // are treated as if they can cast to each other. // E.g. `array` can cast to `array` and vice versa. // Normally, a scalar type such as int could only cast to/from int and mixed. - 'scalar_array_key_cast' => true, + 'scalar_array_key_cast' => false, // If this has entries, scalars (int, float, bool, string, null) // are allowed to perform the casts listed. @@ -98,36 +100,36 @@ // or if **any** type in an invoked expression is not a callable. // Setting this to true will introduce numerous false positives // (and reveal some bugs). - 'strict_method_checking' => false, + 'strict_method_checking' => true, // If enabled, Phan will warn if **any** type of the object expression for a property access // does not contain that property. - 'strict_object_checking' => false, + 'strict_object_checking' => true, // If enabled, Phan will warn if **any** type in the argument's union type // cannot be cast to a type in the parameter's expected union type. // Setting this to true will introduce numerous false positives // (and reveal some bugs). - 'strict_param_checking' => false, + 'strict_param_checking' => true, // If enabled, Phan will warn if **any** type in a property assignment's union type // cannot be cast to a type in the property's declared union type. // Setting this to true will introduce numerous false positives // (and reveal some bugs). - 'strict_property_checking' => false, + 'strict_property_checking' => true, // If enabled, Phan will warn if **any** type in a returned value's union type // cannot be cast to the declared return type. // Setting this to true will introduce numerous false positives // (and reveal some bugs). - 'strict_return_checking' => false, + 'strict_return_checking' => true, // If true, seemingly undeclared variables in the global // scope will be ignored. // // This is useful for projects with complicated cross-file // globals that you have no hope of fixing. - 'ignore_undeclared_variables_in_global_scope' => true, + 'ignore_undeclared_variables_in_global_scope' => false, // Set this to false to emit `PhanUndeclaredFunction` issues for internal functions that Phan has signatures for, // but aren't available in the codebase, or from Reflection. @@ -137,7 +139,7 @@ // // Even when this is false, Phan will still infer return values and check parameters of internal functions // if Phan has the signatures. - 'ignore_undeclared_functions_with_known_signatures' => true, + 'ignore_undeclared_functions_with_known_signatures' => false, // Backwards Compatibility Checking. This is slow // and expensive, but you should consider running @@ -160,7 +162,7 @@ // If true, check to make sure the return type declared // in the doc-block (if any) matches the return type // declared in the method signature. - 'check_docblock_signature_return_type_match' => false, + 'check_docblock_signature_return_type_match' => true, // This setting maps case-insensitive strings to union types. // @@ -198,20 +200,20 @@ // `dead_code_detection` will also enable unused variable detection. // // This has a few known false positives, e.g. for loops or branches. - 'unused_variable_detection' => false, + 'unused_variable_detection' => true, // Set to true in order to attempt to detect redundant and impossible conditions. // // This has some false positives involving loops, // variables set in branches of loops, and global variables. - 'redundant_condition_detection' => false, + 'redundant_condition_detection' => true, // If enabled, Phan will act as though it's certain of real return types of a subset of internal functions, // even if those return types aren't available in reflection (real types were taken from php 7.3 or 8.0-dev, depending on target_php_version). // // Note that with php 7 and earlier, php would return null or false for many internal functions if the argument types or counts were incorrect. // As a result, enabling this setting with target_php_version 8.0 may result in false positives for `--redundant-condition-detection` when codebases also support php 7.x. - 'assume_real_types_for_internal_functions' => false, + 'assume_real_types_for_internal_functions' => true, // If true, this runs a quick version of checks that takes less // time at the cost of not running as thorough @@ -321,13 +323,22 @@ // // Plugins which are bundled with Phan can be added here by providing their name (e.g. `'AlwaysReturnPlugin'`) // - // Documentation about available bundled plugins can be found [here](https://github.com/phan/phan/tree/v4/.phan/plugins). + // Documentation about available bundled plugins can be found [here](https://github.com/phan/phan/tree/v5/.phan/plugins). // // Alternately, you can pass in the full path to a PHP file with the plugin's implementation (e.g. `'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'`) 'plugins' => [ 'AlwaysReturnPlugin', + 'DollarDollarPlugin', + 'DuplicateArrayKeyPlugin', + 'DuplicateExpressionPlugin', 'PregRegexCheckerPlugin', + 'PrintfCheckerPlugin', + 'SleepCheckerPlugin', 'UnreachableCodePlugin', + 'UseReturnValuePlugin', + 'EmptyStatementListPlugin', + 'StrictComparisonPlugin', + 'LoopVariableReusePlugin', ], // A list of directories that should be parsed for class and @@ -338,29 +349,12 @@ // Thus, both first-party and third-party code being used by // your application should be included in this list. 'directory_list' => [ - 'src/Yasumi', - 'vendor/friendsofphp/php-cs-fixer/src', - 'vendor/infection/infection/src', - 'vendor/mikey179/vfsstream/src/main/php', - 'vendor/phan/phan/src/Phan', - 'vendor/phpunit/phpunit/src', - 'vendor/vimeo/psalm/src/Psalm', + 'src', ], // A list of individual files to include in analysis // with a path relative to the root directory of the // project. 'file_list' => [ - 'vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractFixerTestCase.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractIntegrationCaseFactory.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractIntegrationTestCase.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/Assert/AssertTokensTrait.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/IntegrationCase.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/IntegrationCaseFactory.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/IntegrationCaseFactoryInterface.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/InternalIntegrationCaseFactory.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/IsIdenticalConstraint.php', - 'vendor/friendsofphp/php-cs-fixer/tests/Test/TokensWithObservedTransformers.php', - 'vendor/friendsofphp/php-cs-fixer/tests/TestCase.php', ], ]; From 5a1ae4d804ed54e4c220fd2b89e6952cd0265360 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 24 Aug 2021 20:58:30 +0900 Subject: [PATCH 261/687] Exclude the tests from static analysis as they produce too many exceptions. Ultimately tests should be included with the source analysis. --- phpstan.neon.dist | 1 - psalm.xml.dist | 4 ---- 2 files changed, 5 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e53975268..ff0be1328 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,7 +2,6 @@ parameters: level: 5 paths: - src - - tests ignoreErrors: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' diff --git a/psalm.xml.dist b/psalm.xml.dist index 6e4e4cd7b..ae4fb6f41 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -18,9 +18,5 @@ > - - - - From e52cfb84bba8ab979c73ce3b19776a3b77e981fa Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 2 Sep 2021 00:12:52 +0900 Subject: [PATCH 262/687] Made checks a little less obscure. Only a bit more verbose. --- src/Yasumi/Yasumi.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 212e009fd..7fb5d0ae6 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -91,9 +91,13 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== $date->format('Y')) { + + if (!$provider instanceof ProviderInterface) { + $provider = self::create($class, (int) $date->format('Y')); + } elseif ($provider->getYear() !== $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } + if ($provider->isWorkingDay($date)) { --$workingDays; } @@ -225,10 +229,10 @@ public static function getProviders(): array foreach ($filesIterator as $file) { if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( - $file->getBasename('.php'), - self::$ignoredProvider, - true - )) { + $file->getBasename('.php'), + self::$ignoredProvider, + true + )) { continue; } @@ -277,9 +281,13 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface || $provider->getYear() !== $date->format('Y')) { + + if (!$provider instanceof ProviderInterface) { + $provider = self::create($class, (int) $date->format('Y')); + } elseif ($provider->getYear() !== $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } + if ($provider->isWorkingDay($date)) { --$workingDays; } From 4febc422a3856bf640c2475564283e2d75ebbed3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 2 Sep 2021 00:52:31 +0900 Subject: [PATCH 263/687] The modify method may return false. --- src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 2823ff61b..4e92bec76 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -55,6 +55,9 @@ private function calculateDevonportShow(): void { $date = new DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); - $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); + + if ($date instanceof \DateTimeInterface) { + $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); + } } } From b5d2a0f97d3a84022c1ea1a3e00415afac7bcdb7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 2 Sep 2021 00:57:33 +0900 Subject: [PATCH 264/687] Cast to string as the array_keys method may return integers (in other scenarios). --- src/Yasumi/Translations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 7310a97ec..15d084ba2 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -77,7 +77,7 @@ public function loadTranslations(string $directoryPath): void if (\is_array($translations)) { foreach (array_keys($translations) as $locale) { - $this->checkLocale($locale); + $this->checkLocale((string) $locale); } $this->translations[$key] = $translations; From 78c2bfdcbb6270d3fbe08e370dcd1ed764b2e425 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 2 Sep 2021 20:46:37 +0900 Subject: [PATCH 265/687] `YasumiTestCaseInterface` was renamed to `HolidayTestCase` --- tests/USA/JuneteenthTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index 8735e7482..5357bc789 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -19,12 +19,12 @@ use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\tests\HolidayTestCase; /** * Class to test Juneteenth. */ -class JuneteenthTest extends USABaseTestCase implements YasumiTestCaseInterface +class JuneteenthTest extends USABaseTestCase implements HolidayTestCase { /** * The name of the holiday. From dd9b31e240dd9cc463806a3b2c65ac9bd991d4cb Mon Sep 17 00:00:00 2001 From: ovgray Date: Fri, 3 Sep 2021 09:21:31 -0400 Subject: [PATCH 266/687] Update Canada - Correction for Canada Day - Add National Day For Truth and Reconciliation --- CHANGELOG.md | 2 + src/Yasumi/Provider/Canada.php | 38 ++++++- .../truthAndReconciliationDay.php | 20 ++++ tests/Canada/CanadaDayTest.php | 9 +- .../Canada/TruthAndReconciliationDayTest.php | 101 ++++++++++++++++++ 5 files changed, 166 insertions(+), 4 deletions(-) create mode 100644 src/Yasumi/data/translations/truthAndReconciliationDay.php create mode 100644 tests/Canada/TruthAndReconciliationDayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fc1d3639..8cc37cfa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added new Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) - All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. +- Added new National Day for Truth and Reconciliation to Canada [\#256](https://github.com/azuyalabs/yasumi/pull/256) ([Owen V. Gray](https://github.com/adrx)) ### Changed @@ -17,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. ### Fixed +- Corrected definition of Canada Day in Canada [\#256](https://github.com/azuyalabs/yasumi/pull/256) ([Owen V. Gray](https://github.com/adrx)) ### Deprecated diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index 07d34d26a..479da59bb 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -60,6 +60,7 @@ public function initialize(): void $this->calculateLabourDay(); $this->calculateThanksgivingDay(); $this->calculateRemembranceDay(); + $this->calculateNationalDayForTruthAndReconciliation(); } public function getSources(): array @@ -168,7 +169,11 @@ protected function calculateCivicHoliday(): void /** * Canada Day. * - * @see https://en.wikipedia.org/wiki/Canada_Day + * @see https://en.wikipedia.org/wiki/Canada_Day. + * @see Holidays Act, R.S.C., 1985, c. H-5, https://laws-lois.justice.gc.ca/eng/acts/h-5/page-1.html + * + * by statute, Canada Day is July 1 if that day is not Sunday, and July 2 if July 1 is a Sunday. + * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -180,11 +185,14 @@ private function calculateCanadaDay(): void if ($this->year < 1983) { return; } - + $date = new DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + if (7 === (int) $date->format('N')) { + $date = new DateTime($this->year.'-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + } $this->addHoliday(new Holiday( 'canadaDay', [], - new DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $date, $this->locale )); } @@ -260,4 +268,28 @@ private function calculateLabourDay(): void $this->locale )); } + + /** + * National Day For Truth And Reconciliation. + * + * @see https://parl.ca/Content/Bills/432/Government/C-5/C-5_4/C-5_4.PDF, S. C. 2021, C.11. + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateNationalDayForTruthAndReconciliation(): void + { + if ($this->year < 2021) { + return; + } + + $this->addHoliday(new Holiday( + 'truthAndReconciliationDay', + [], + new DateTime("last day of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } } diff --git a/src/Yasumi/data/translations/truthAndReconciliationDay.php b/src/Yasumi/data/translations/truthAndReconciliationDay.php new file mode 100644 index 000000000..db0fecb5f --- /dev/null +++ b/src/Yasumi/data/translations/truthAndReconciliationDay.php @@ -0,0 +1,20 @@ + + */ + +// Translations for Truth And Reconciliation Day +return [ + 'en' => 'National Day For Truth And Reconciliation', + 'fr' => 'la Journée nationale de la vérité et de la réconciliation', +]; diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 77b8ac2ba..a83eb5678 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -44,13 +44,20 @@ class CanadaDayTest extends CanadaBaseTestCase implements HolidayTestCase */ public function testCanadaDayOnAfter1983(): void { - $year = $this->generateRandomYear(1983); + $year = 2019; // July 1 is not Sunday $this->assertHoliday( self::REGION, self::HOLIDAY, $year, new DateTime("$year-07-01", new DateTimeZone(self::TIMEZONE)) ); + $year = 2018; // July 1 is Sunday + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-07-02", new DateTimeZone(self::TIMEZONE)) + ); } /** diff --git a/tests/Canada/TruthAndReconciliationDayTest.php b/tests/Canada/TruthAndReconciliationDayTest.php new file mode 100644 index 000000000..6b791d7c3 --- /dev/null +++ b/tests/Canada/TruthAndReconciliationDayTest.php @@ -0,0 +1,101 @@ + + */ + +namespace Yasumi\tests\Canada; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing National Day For Truth And Reconciliation in Canada. + */ +class TruthAndReconciliationDayTest extends CanadaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'truthAndReconciliationDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 2021; + + /** + * Tests TruthAndReconciliationDay on or after 2021. Thanksgiving Day is celebrated since 2021 on the last day + * of September. + * + * @throws Exception + * @throws ReflectionException + */ + public function testTruthAndReconciliationDayOnAfter2021(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("last day of september $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests TruthAndReconciliationDay before 2021. TruthAndReconciliationDay is celebrated since 2021 on the last day + * of September. + * + * @throws ReflectionException + */ + public function testTruthAndReconciliationDayBefore2021(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests 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 => 'National Day For Truth And Reconciliation'] + ); + } + + /** + * 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 + ); + } +} From 9d6dc3155ef07a213d6c6739842dabad41272311 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 4 Sep 2021 00:49:02 +0900 Subject: [PATCH 267/687] Reformatted and reordered items. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cc37cfa2..270a61a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,17 +8,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added -- Added new Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) -- All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. -- Added new National Day for Truth and Reconciliation to Canada [\#256](https://github.com/azuyalabs/yasumi/pull/256) ([Owen V. Gray](https://github.com/adrx)) +- New National Day for Truth and Reconciliation to + Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)) +- New Juneteenth National Independence Day to + USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) +- All providers now include a method that returns a list of external sources (i.e. references to websites, books, + scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. ### Changed - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. -- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. +- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` + interface. ### Fixed -- Corrected definition of Canada Day in Canada [\#256](https://github.com/azuyalabs/yasumi/pull/256) ([Owen V. Gray](https://github.com/adrx)) + +- Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 + if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)) ### Deprecated From df813ab99bc452e8f7fc9e2ab0abe62e3c062451 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 4 Sep 2021 01:05:11 +0900 Subject: [PATCH 268/687] Extracted common parts. --- .../Provider/Australia/SouthAustralia.php | 38 +++++-------------- src/Yasumi/Provider/ChristianHolidays.php | 10 ++--- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 61429b963..6dbcd9f5e 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -164,6 +164,7 @@ private function calculateAdelaideCupDay(): void private function calculateProclamationDay(): void { $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $this->addHoliday(new Holiday( 'christmasDay', [], @@ -171,6 +172,7 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); + switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P1D')); @@ -182,23 +184,9 @@ private function calculateProclamationDay(): void Holiday::TYPE_OFFICIAL )); $christmasDay->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday( - 'proclamationDay', - ['en' => 'Proclamation Day'], - $christmasDay, - $this->locale, - Holiday::TYPE_OFFICIAL - )); break; case 5: // friday $christmasDay->add(new DateInterval('P3D')); - $this->addHoliday(new Holiday( - 'proclamationDay', - ['en' => 'Proclamation Day'], - $christmasDay, - $this->locale, - Holiday::TYPE_OFFICIAL - )); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); @@ -210,24 +198,18 @@ private function calculateProclamationDay(): void Holiday::TYPE_OFFICIAL )); $christmasDay->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday( - 'proclamationDay', - ['en' => 'Proclamation Day'], - $christmasDay, - $this->locale, - Holiday::TYPE_OFFICIAL - )); break; default: // monday-thursday $christmasDay->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday( - 'proclamationDay', - ['en' => 'Proclamation Day'], - $christmasDay, - $this->locale, - Holiday::TYPE_OFFICIAL - )); break; } + + $this->addHoliday(new Holiday( + 'proclamationDay', + ['en' => 'Proclamation Day'], + $christmasDay, + $this->locale, + Holiday::TYPE_OFFICIAL + )); } } diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index fda9c2026..dd1a217e9 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -361,9 +361,6 @@ protected function calculateEaster(int $year, string $timezone): DateTime } $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) { @@ -374,9 +371,10 @@ protected function calculateEaster(int $year, string $timezone): DateTime $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; - } + } + + if ($pfm < 0) { + $pfm += 30; } // Corrected date of the Paschal full moon, - days after 21st March From eea41b86c947165b6622b8492b9a1c3b1dc27804 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 4 Sep 2021 01:07:57 +0900 Subject: [PATCH 269/687] Removed exception annotation as it never is thrown. --- src/Yasumi/Provider/AbstractProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 4f85be40a..cc31c2c5a 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -492,7 +492,6 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa * * @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 UnknownLocaleException * @throws \RuntimeException From 3ef3d02b7a13e89202a72355e070fbae248a2200 Mon Sep 17 00:00:00 2001 From: barami Date: Sun, 5 Sep 2021 12:34:16 +0900 Subject: [PATCH 270/687] Updated SouthKorea provider to apply the new substitute holidays changed in June 2021 Changes to alternative holiday rules under Presidential Decree, which took effect on August 4. --- CHANGELOG.md | 7 +- src/Yasumi/Provider/SouthKorea.php | 171 +++++++++++++----- tests/SouthKorea/ChildrensDayTest.php | 58 +++--- tests/SouthKorea/ChuseokTest.php | 70 ++++--- tests/SouthKorea/GaecheonjeolTest.php | 64 +++++++ tests/SouthKorea/HangulDayTest.php | 36 ++++ .../IndependenceMovementDayTest.php | 43 +++++ tests/SouthKorea/LiberationDayTest.php | 38 ++++ tests/SouthKorea/SeollalTest.php | 32 +++- tests/SouthKorea/SouthKoreaTest.php | 2 +- 10 files changed, 420 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 270a61a82..eb8f41ec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,14 +12,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)) - New Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) +- The Korea Tourism Organization's holiday guide link was added to the source of SouthKorea Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) - All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. ### Changed - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. -- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` - interface. +- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. +- Revised rules to calculate substitution holidays of SouthKorea to apply the newly enacted law on June 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) +- Seperate `calculateSubstituteHolidays` method of SouthKorea Provider to `calculateSubstituteHolidays` and `calculateOldSubstituteHolidays`. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) +- Refactored the tests of SouthKorea provider to testing substitution holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) ### Fixed diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 1ed19bd37..b1b6ecc65 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -157,6 +157,7 @@ public function getSources(): array return [ 'https://en.wikipedia.org/wiki/Public_holidays_in_South_Korea', 'https://ko.wikipedia.org/wiki/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EC%9D%98_%EA%B3%B5%ED%9C%B4%EC%9D%BC', + 'https://english.visitkorea.or.kr/enu/TRV/TV_ENG_1_1.jsp', ]; } @@ -468,7 +469,7 @@ private function calculateHangulDay(): void } /** - * Substitute Holidays. + * Substitute Holidays up to 2021. * 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. @@ -476,60 +477,144 @@ private function calculateHangulDay(): void * When public holidays fall on each other, the first non-public holiday after the holiday becomes a public holiday. * As an exception, Children's Day also applies on Saturday. * + * Since new legislation about public holiday was enacted in June 2021, + * this function is used to calculate the holidays up to 2021. + * + * @throws \Exception + */ + private function calculateOldSubstituteHolidays(): void + { + if ($this->year < 2014) { + return; + } + + // Add substitute holidays by fixed entries. + switch ($this->year) { + case 2014: + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$this->year-9-10"); + break; + case 2015: + $this->addSubstituteHoliday($this->getHoliday('chuseok'), "$this->year-9-29"); + break; + case 2016: + $this->addSubstituteHoliday($this->getHoliday('dayBeforeSeollal'), "$this->year-2-10"); + break; + case 2017: + $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$this->year-1-30"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$this->year-10-6"); + break; + case 2018: + $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$this->year-5-7"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$this->year-9-26"); + break; + case 2019: + $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$this->year-5-6"); + break; + case 2020: + $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$this->year-1-27"); + break; + case 2021: + $this->addSubstituteHoliday($this->getHoliday('liberationDay'), "$this->year-8-16"); + $this->addSubstituteHoliday($this->getHoliday('nationalFoundationDay'), "$this->year-10-4"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$this->year-10-11"); + break; + } + } + + /** + * Substitute Holidays. + * + * Since 2022, it has been applied for all public holidays. + * When public holidays overlap on each other or weekend, + * the first working day after the holiday becomes a substitute holiday. + * * @throws \Exception */ private function calculateSubstituteHolidays(): void { - if ($this->year <= 2013) { + if ($this->year < 2022) { + $this->calculateOldSubstituteHolidays(); + return; } - // Initialize holidays variable - $holidays = $this->getHolidays(); - $acceptedHolidays = [ + // Holiday list to allowed to substitute. + $accptedHolidays = []; + + // When deciding on alternative holidays, place lunar holidays first for consistent rules. + // These holidays will substitute for the sunday only. + $accptedHolidays += array_fill_keys([ 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', - 'childrensDay', - ]; - - // Loop through all holidays - foreach ($holidays as $key => $holiday) { - // Get list of holiday dates except this - $holidayDates = array_map(static function ($holiday) use ($key) { - return $holiday->getKey() === $key ? false : $holiday; - }, $holidays); - - // Only process accepted holidays and conditions - if (\in_array($key, $acceptedHolidays, true) - && ( - 0 === (int) $holiday->format('w') - || \in_array($holiday, $holidayDates, false) - || (6 === (int) $holiday->format('w') && 'childrensDay' === $key) - ) - ) { - $date = clone $holiday; - - // Find next week day (not being another holiday) - while (0 === (int) $date->format('w') - || (6 === (int) $date->format('w') && 'childrensDay' === $key) - || \in_array($date, $holidayDates, false)) { - $date->add(new DateInterval('P1D')); - } - - // Add a new holiday that is substituting the original holiday - $substitute = new SubstituteHoliday( - $holiday, - [], - $date, - $this->locale - ); + ], [0]); + + // These holidays will substitute for any weekend days (Sunday and Saturday). + $accptedHolidays += array_fill_keys([ + 'childrensDay', 'independenceMovementDay', 'liberationDay', + 'nationalFoundationDay', 'hangulDay', + ], [0, 6]); + + // Step 1. Build a temporary table that aggregates holidays by date. + $dates = []; + foreach ($this->getHolidayDates() as $name => $day) { + $holiday = $this->getHoliday($name); + $dates[$day][] = $name; + + if (!isset($accptedHolidays[$name])) { + continue; + } - // Add a new holiday that is substituting the original holiday - $this->addHoliday($substitute); + $dayOfWeek = (int) $holiday->format('w'); + if (in_array($dayOfWeek, $accptedHolidays[$name], true)) { + $dates[$day]['weekend:'.$day] = $name; + } + } - // Add substitute holiday to the list - $holidays[] = $substitute; + // Step 2. Add substitute holidays by referring to the temporary table. + $tz = DateTimeZoneFactory::getDateTimeZone($this->timezone); + foreach ($dates as $day => $names) { + $count = count($names); + if ($count < 2) { + continue; + } else { + // In a temporary table, public holidays are keyed by numeric number. + // And weekends are keyed by string start with 'weekend:'. + // For the substitute, we will use first item in queue. + $origin = $this->getHoliday($names[0]); + $workDay = $this->nextWorkingDay(DateTime::createFromFormat('Y-m-d', $day, $tz)); + $this->addSubstituteHoliday($origin, $workDay->format('Y-m-d')); } } } + + /** + * Helper method to find a first working day after specific date. + */ + private function nextWorkingDay(DateTime $date): DateTime + { + $interval = new DateInterval('P1D'); + $next = clone $date; + do { + $next->add($interval); + } while (!$this->isWorkingDay($next)); + + return $next; + } + + /** + * Helper method to add substitute holiday. + * + * Add a substitute holiday from origin holiday to different date. + * + * @throws \Exception + */ + private function addSubstituteHoliday(Holiday $origin, string $date_str): void + { + $this->addHoliday(new SubstituteHoliday( + $origin, + [], + new DateTime($date_str, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } } diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 1d66b8630..4392559a4 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -43,7 +43,7 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * @throws Exception * @throws ReflectionException */ - public function testMainHoliday(): void + public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( @@ -62,47 +62,57 @@ public function testMainHoliday(): void */ public function testSubstituteHolidayByBuddhasBirthday(): void { + $tz = new DateTimeZone(self::TIMEZONE); + foreach ([2025, 2044] as $year) { $this->assertHoliday( self::REGION, - 'substituteHoliday:childrensDay', + 'buddhasBirthday', + $year, + new DateTime("$year-5-5", $tz) + ); + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, $year, - new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + new DateTime("$year-5-6", $tz) ); } } /** - * Tests the substitute holiday defined in this test (conflict with Saturday). + * Tests the substitute holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySaturday(): void + public function testSubstituteHoliday(): void { - $year = 2029; - $this->assertHoliday( + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2013); + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:childrensDay', - $year, - new DateTime("$year-5-7", new DateTimeZone(self::TIMEZONE)) + self::HOLIDAY, + 2019, + new DateTime('2019-5-6', $tz) ); - } - /** - * Tests the substitute holiday defined in this test (conflict with Sunday). - * - * @throws Exception - * @throws ReflectionException - */ - public function testSubstituteHolidayBySunday(): void - { - $year = 2019; - $this->assertHoliday( + // By saturday + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:childrensDay', - $year, - new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + self::HOLIDAY, + 2029, + new DateTime('2029-5-7', $tz) + ); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2024, + new DateTime('2024-5-6', $tz) ); } diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 63556e27f..78d41fe74 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -84,23 +84,40 @@ public function testHoliday(): void */ public function testSubstituteHolidayByGaecheonjeol(): void { - $this->assertHoliday( + $tz = new DateTimeZone(self::TIMEZONE); + + foreach ([2017, 2028, 2036, 2039] as $year) { + $this->assertHoliday( + self::REGION, + 'nationalFoundationDay', + $year, + new DateTime("$year-10-3", $tz) + ); + } + + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:dayBeforeChuseok', + 'dayBeforeChuseok', 2017, - new DateTime('2017-10-6', new DateTimeZone(self::TIMEZONE)) + new DateTime('2017-10-6', $tz) ); - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:chuseok', + 'chuseok', 2028, - new DateTime('2028-10-5', new DateTimeZone(self::TIMEZONE)) + new DateTime('2028-10-5', $tz) ); - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:dayAfterChuseok', + 'dayBeforeChuseok', + 2036, + new DateTime('2036-10-6', $tz) + ); + $this->assertSubstituteHoliday( + self::REGION, + 'dayAfterChuseok', 2039, - new DateTime('2039-10-5', new DateTimeZone(self::TIMEZONE)) + new DateTime('2039-10-5', $tz) ); } @@ -110,25 +127,36 @@ public function testSubstituteHolidayByGaecheonjeol(): void * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySunday(): void + public function testSubstituteHoliday(): void { - $this->assertHoliday( + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:dayBeforeChuseok', + 'dayBeforeChuseok', 2014, - new DateTime('2014-9-10', new DateTimeZone(self::TIMEZONE)) + new DateTime('2014-9-10', $tz) + ); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + 'dayBeforeChuseok', + 2025, + new DateTime('2025-10-8', $tz) ); - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:chuseok', - 2039, - new DateTime('2039-10-4', new DateTimeZone(self::TIMEZONE)) + 'chuseok', + 2032, + new DateTime('2032-9-21', $tz) ); - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:dayAfterChuseok', - 2022, - new DateTime('2022-9-12', new DateTimeZone(self::TIMEZONE)) + 'dayAfterChuseok', + 2036, + new DateTime('2036-10-7', $tz) ); } diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index a256cb0d9..8fd727929 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -54,6 +54,70 @@ public function testHoliday(): void ); } + /** + * Tests the substitute holiday defined in this test (conflict with Chuseok). + * + * @throws Exception + * @throws ReflectionException + */ + public function testSubstituteByChuseok(): void + { + $tz = new DateTimeZone(self::TIMEZONE); + + $this->assertHoliday( + self::REGION, + 'chuseok', + 2028, + new DateTime('2028-10-3', $tz) + ); + $this->assertHoliday( + self::REGION, + 'dayBeforeChuseok', + 2036, + new DateTime('2036-10-3', $tz) + ); + // Chuseok will be substitute instead of Gaecheonjeol. + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2028); + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2036); + } + + /** + * Tests the substitute holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testSubstituteHoliday(): void + { + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2015); + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2020); + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2021, + new DateTime('2021-10-4', $tz) + ); + + // By saturday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2026, + new DateTime('2026-10-5', $tz) + ); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2032, + new DateTime('2032-10-4', $tz) + ); + } + /** * Tests the holiday defined in this test before establishment. * diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index 4e13dc0b7..8016901d6 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -62,6 +62,42 @@ public function testHoliday(): void } } + /** + * Tests the substitute holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testSubstituteHoliday(): void + { + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2016); + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2021, + new DateTime('2021-10-11', $tz) + ); + + // By saturday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2027, + new DateTime('2027-10-11', $tz) + ); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2022, + new DateTime('2022-10-10', $tz) + ); + } + /** * Tests the holiday defined in this test before establishment. * diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 75b72da68..78beaa851 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -54,6 +54,49 @@ public function testHoliday(): void ); } + /** + * Tests the substitute holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testSubstituteHoliday(): void + { + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2020); + + // By saturday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2025, + new DateTime('2025-3-3', $tz) + ); + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2031, + new DateTime('2031-3-3', $tz) + ); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2026, + new DateTime('2026-3-2', $tz) + ); + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2037, + new DateTime('2037-3-2', $tz) + ); + } + /** * Tests the holiday defined in this test before establishment. * diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index 3f9701c44..67804059e 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -54,6 +54,44 @@ public function testHoliday(): void ); } + /** + * Tests the substitute holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testSubstituteHoliday(): void + { + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2020); + + // Year 2021 + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2021, + new DateTime('2021-8-16', $tz) + ); + + // By saturday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2037, + new DateTime('2037-8-17', $tz) + ); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + 2027, + new DateTime('2027-8-16', $tz) + ); + } + /** * Tests the holiday defined in this test before establishment. * diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 30f356b51..d6c61f0f8 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -80,25 +80,37 @@ public function testHoliday(): void * @throws Exception * @throws ReflectionException */ - public function testSubstituteHolidayBySunday(): void + public function testSubstituteHoliday(): void { - $this->assertHoliday( + $tz = new DateTimeZone(self::TIMEZONE); + + // Before 2022 + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:dayBeforeSeollal', + 'dayBeforeSeollal', 2016, - new DateTime('2016-2-10', new DateTimeZone(self::TIMEZONE)) + new DateTime('2016-2-10', $tz) + ); + $this->assertNotSubstituteHoliday(self::REGION, 'dayAfterSeollal', 2021); + + // By sunday + $this->assertSubstituteHoliday( + self::REGION, + 'dayBeforeSeollal', + 2033, + new DateTime('2033-2-2', $tz) ); - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:seollal', + 'seollal', 2034, - new DateTime('2034-2-21', new DateTimeZone(self::TIMEZONE)) + new DateTime('2034-2-21', $tz) ); - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:dayAfterSeollal', + 'dayAfterSeollal', 2024, - new DateTime('2024-2-12', new DateTimeZone(self::TIMEZONE)) + new DateTime('2024-2-12', $tz) ); } diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index ce0b2009b..a6cf972a7 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -146,6 +146,6 @@ public function testOtherHolidays(): void */ public function testSources(): void { - $this->assertSources(self::REGION, 2); + $this->assertSources(self::REGION, 3); } } From fb96382655c73548eed76e277816141553e1d36c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 13:41:13 +0900 Subject: [PATCH 271/687] Cleanup/Reformatting. --- CHANGELOG.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb8f41ec4..e91dc44cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,17 +12,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)) - New Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) -- The Korea Tourism Organization's holiday guide link was added to the source of SouthKorea Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) +- The Korea Tourism Organization's holiday guide link was added to the source of SouthKorea + Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) - All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. ### Changed +- Revised rules to calculate substitution holidays of SouthKorea to apply the newly enacted law on June + 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) +- Separate `calculateSubstituteHolidays` method of SouthKorea Provider to `calculateSubstituteHolidays` + and `calculateOldSubstituteHolidays` + . [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) +- Refactored the tests of SouthKorea provider to testing substitution + holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. -- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. -- Revised rules to calculate substitution holidays of SouthKorea to apply the newly enacted law on June 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) -- Seperate `calculateSubstituteHolidays` method of SouthKorea Provider to `calculateSubstituteHolidays` and `calculateOldSubstituteHolidays`. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) -- Refactored the tests of SouthKorea provider to testing substitution holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) +- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` + interface. ### Fixed @@ -49,7 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Changed - Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) -- Some improvements/refactoring of the Swiss holiday providers (including links to sources) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) +- Some improvements/refactoring of the Swiss holiday providers (including source references) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) - Allow the `WEEKEND_DATA` constant in provider classes to be overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) - Upgraded PHPUnit's XML configuration. @@ -144,8 +150,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - 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)) +- 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 the 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)) - Created a special subclass of Holiday for substitute holidays [\#162](https://github.com/azuyalabs/yasumi/pull/162) ([c960657](https://github.com/c960657)) @@ -154,11 +160,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### 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)) -- 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)) +- 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)) - 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. @@ -168,7 +174,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Upgraded to PHPUnit 8. - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider is 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)) +- 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 @@ -397,8 +403,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Holiday Provider for New Zealand. [\#13](https://github.com/azuyalabs/yasumi/pull/13) ([badams](https://github.com/badams)) - Added Holiday Provider for Greece. [\#10](https://github.com/azuyalabs/yasumi/pull/10) ([sebdesign](https://github.com/sebdesign)) - Added Holiday Provider for Germany. [\#9](https://github.com/azuyalabs/yasumi/pull/9) ([eaglefsd](https://github.com/eaglefsd)) -- Added translations ('fr_FR', 'fr_BE') for Belgium National day [\#864d250](https://github.com/azuyalabs/yasumi/commit/864d25097abbeedbee15bcc37702a34c36a5b696) ([R2c](https://github.com/R2c)) -- Added missing English ('en_US') translations for the Christian holidays 'Immaculate Conception', 'Maundy Thursday', +- Added translations (`fr_FR`, `fr_BE`) for Belgium National day [\#864d250](https://github.com/azuyalabs/yasumi/commit/864d25097abbeedbee15bcc37702a34c36a5b696) ([R2c](https://github.com/R2c)) +- Added missing English (`en_US`) translations for the Christian holidays 'Immaculate Conception', 'Maundy Thursday', 'St. Georges Day', 'St. John's Day', 'St. Josephs Day' and 'St. Stephens Day'. - Added Test Interface class to ensure the unit tests contain a some minimal assertions. @@ -464,7 +470,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this Holidays. - Created separate tests for holidays that are substituted on different days. - Allow for namespaced holiday providers. -- Added test for translation of Ash Wednesday and Valentines day in the Netherlands. +- Added test for translation of Ash Wednesday and Valentine's Day in the Netherlands. - Added test to check whether all holidays for a Holiday Provider are defined by the respective provider class. ### Changed From 3977848e632c069f43cd4f1b6db8ea5508e377fe Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 13:53:55 +0900 Subject: [PATCH 272/687] Bumped package versions. --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 24d23d728..8168b3451 100755 --- a/composer.json +++ b/composer.json @@ -40,13 +40,13 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "^2.19", "infection/infection": "^0.17 | ^0.23", "mikey179/vfsstream": "^1.6", - "phan/phan": "^5.0", - "phpstan/phpstan": "^0.12.66", - "phpunit/phpunit": "^8.5 | ^9.4", - "vimeo/psalm": "^4" + "phan/phan": "^5.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.5 | ^9.5", + "vimeo/psalm": "^4.9" }, "config": { "sort-packages": true From 7336e9381af99a8bedecf22c0d6aba2914bb9404 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 13:54:40 +0900 Subject: [PATCH 273/687] Added value type information for iterable parameters. --- src/Yasumi/Filters/BetweenFilter.php | 11 ++++++----- src/Yasumi/Filters/OnFilter.php | 5 +++-- src/Yasumi/Holiday.php | 24 ++++++++++++------------ src/Yasumi/TranslationsInterface.php | 2 +- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 856b58fa5..6d093eb59 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -16,6 +16,7 @@ namespace Yasumi\Filters; use Iterator; +use Yasumi\Provider\AbstractProvider; /** * BetweenFilter is a class used for filtering holidays based on given date range. @@ -45,11 +46,11 @@ class BetweenFilter extends AbstractFilter /** * Construct the Between FilterIterator Object. * - * @param Iterator $iterator Iterator object of the Holidays Provider - * @param \DateTimeInterface $startDate Start date of the time frame to check against - * @param \DateTimeInterface $endDate End date of the time frame to check against - * @param bool $equal Indicate whether the start and end dates should be included in the - * comparison + * @param Iterator $iterator Iterator object of the Holidays Provider + * @param \DateTimeInterface $startDate Start date of the time frame to check against + * @param \DateTimeInterface $endDate End date of the time frame to check against + * @param bool $equal Indicate whether the start and end dates should be included in the + * comparison */ public function __construct( Iterator $iterator, diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 685768a14..ff9ef9322 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -16,6 +16,7 @@ namespace Yasumi\Filters; use Iterator; +use Yasumi\Provider\AbstractProvider; /** * OnFilter is a class used for filtering holidays based on a given date. @@ -34,8 +35,8 @@ class OnFilter extends AbstractFilter /** * Construct the On FilterIterator Object. * - * @param Iterator $iterator Iterator object of the Holidays Provider - * @param \DateTimeInterface $date Start date of the time frame to check against + * @param Iterator $iterator Iterator object of the Holidays Provider + * @param \DateTimeInterface $date Start date of the time frame to check against */ public function __construct( Iterator $iterator, diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 09e727b92..09cbb0e64 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -71,7 +71,7 @@ class Holiday extends DateTime implements JsonSerializable public $shortName; /** - * @var array list of translations of this holiday + * @var array list of translations of this holiday */ public $translations; @@ -86,7 +86,7 @@ class Holiday extends DateTime implements JsonSerializable protected $displayLocale; /** - * @var array list of all defined locales + * @var array list of all defined locales */ private static $locales = []; @@ -96,15 +96,15 @@ class Holiday extends DateTime implements JsonSerializable * 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 string $key Holiday key - * @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. + * @param string $key Holiday key + * @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 InvalidDateException * @throws UnknownLocaleException @@ -235,7 +235,7 @@ public function mergeGlobalTranslations(TranslationsInterface $globalTranslation * * If null is provided, return as if the display locale was provided as a string. * - * @param array|null $locales Array of locales, or null if the display locale should be used + * @param array|null $locales Array of locales, or null if the display locale should be used * * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY diff --git a/src/Yasumi/TranslationsInterface.php b/src/Yasumi/TranslationsInterface.php index 930bdd836..b5d3c9e63 100644 --- a/src/Yasumi/TranslationsInterface.php +++ b/src/Yasumi/TranslationsInterface.php @@ -34,7 +34,7 @@ public function getTranslation(string $key, string $locale): ?string; * * @param string $key holiday key * - * @return array holiday name translations ['' => '', ...] + * @return array holiday name translations ['' => '', ...] */ public function getTranslations(string $key): array; } From d932e3e23acab82d9e278922ea03007412dc1b8e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 14:15:42 +0900 Subject: [PATCH 274/687] Added value type information for iterable parameters. Updated Provider Interface with required methods. (Not sure if this is preferred; may consider reworking this interface in the future) --- src/Yasumi/Holiday.php | 4 ++- src/Yasumi/Provider/AbstractProvider.php | 32 +++------------------- src/Yasumi/ProviderInterface.php | 35 ++++++++++++++++++++++++ src/Yasumi/SubstituteHoliday.php | 22 +++++++-------- src/Yasumi/Translations.php | 8 +++--- src/Yasumi/Yasumi.php | 16 +++++------ 6 files changed, 65 insertions(+), 52 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 09cbb0e64..9a4b1364d 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -191,7 +191,7 @@ public function jsonSerialize(): self * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and * Holiday::LOCALE_KEY (the holiday key) was provided. * - * @param array|null $locales The locales to search for translations + * @param array|null $locales The locales to search for translations * * @throws MissingTranslationException * @@ -237,6 +237,8 @@ public function mergeGlobalTranslations(TranslationsInterface $globalTranslation * * @param array|null $locales Array of locales, or null if the display locale should be used * + * @return array an array of locales to check for translations + * * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY */ diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index cc31c2c5a..79338e321 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -150,19 +150,7 @@ public function removeHoliday(string $key): void unset($this->holidays[$key]); } - /** - * Determines whether a date represents a working day or not. - * - * A working day is defined as a day that is not a holiday nor falls in the weekend. The index of the weekdays of - * the defined date is used for establishing this (0 = Sunday, 1 = Monday, etc.) - * - * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, - * \DateTime) - * - * @return bool true if date represents a working day, otherwise false - * - * @throws InvalidDateException - */ + /** {@inheritdoc} */ public function isWorkingDay(\DateTimeInterface $date): bool { return !$this->isHoliday($date) && !$this->isWeekendDay($date); @@ -287,11 +275,7 @@ public function getHolidayNames(): array return array_keys($this->holidays); } - /** - * Returns the current year set for this Holiday calendar. - * - * @return int the year set for this Holiday calendar - */ + /** @inheritdoc */ public function getYear(): int { return $this->year; @@ -316,15 +300,7 @@ public function next(string $key): ?Holiday return $this->anotherTime($this->year + 1, $key); } - /** - * Retrieves the holiday object for the given holiday. - * - * @param string $key 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 - */ + /** {@inheritdoc} */ public function getHoliday(string $key): ?Holiday { $this->isHolidayNameNotEmpty($key); // Validate if key is not empty @@ -414,7 +390,7 @@ public function on(\DateTimeInterface $date): OnFilter /** * Gets all the holiday dates defined by this holiday provider (for the given year). * - * @return array list of all holiday dates defined for the given year + * @return array list of all holiday dates defined for the given year */ protected function getHolidayDates(): array { diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 93a340460..89d8f6c6f 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -14,6 +14,8 @@ namespace Yasumi; +use Yasumi\Exception\InvalidDateException; + /** * Interface ProviderInterface - Holiday provider interface. * @@ -35,4 +37,37 @@ public function initialize(): void; * @return array a list of external sources (empty when no sources are defined) */ public function getSources(): array; + + /** + * Returns the current year set for this Holiday calendar. + * + * @return int the year set for this Holiday calendar + */ + public function getYear(): int; + + /** + * Determines whether a date represents a working day or not. + * + * A working day is defined as a day that is not a holiday nor falls in the weekend. The index of the weekdays of + * the defined date is used for establishing this (0 = Sunday, 1 = Monday, etc.) + * + * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, + * \DateTime) + * + * @return bool true if date represents a working day, otherwise false + * + * @throws InvalidDateException + */ + public function isWorkingDay(\DateTimeInterface $date): bool; + + /** + * Retrieves the holiday object for the given holiday. + * + * @param string $key 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 + */ + public function getHoliday(string $key): ?Holiday; } diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index f6f83d88d..947e2f1f3 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -38,7 +38,7 @@ class SubstituteHoliday extends Holiday public $substitutedHoliday; /** - * @var array list of translations of the "{0} observed" pattern + * @var array list of translations of the "{0} observed" pattern */ public $substituteHolidayTranslations; @@ -48,15 +48,15 @@ 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 - * 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. + * @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 InvalidDateException * @throws UnknownLocaleException @@ -100,7 +100,7 @@ public function getSubstitutedHoliday(): Holiday * If no locale is provided, proceed as if an array containing the display locale, Holiday::DEFAULT_LOCALE ('en_US'), and * Holiday::LOCALE_KEY (the holiday key) was provided. * - * @param array|null $locales The locales to search for translations + * @param array|null $locales The locales to search for translations * * @throws MissingTranslationException * diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 15d084ba2..ca02885bf 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -25,19 +25,19 @@ class Translations implements TranslationsInterface { /** - * @var array translations array: ['' => ['' => 'translation', ...], ... ] + * @var array translations array: ['' => ['' => 'translation', ...], ... ] */ public $translations = []; /** - * @var array list of all defined locales + * @var array list of all defined locales */ private $availableLocales; /** * Constructor. * - * @param array $availableLocales list of all defined locales + * @param array $availableLocales list of all defined locales */ public function __construct(array $availableLocales) { @@ -128,7 +128,7 @@ public function getTranslation(string $key, string $locale): ?string * * @param string $key holiday key * - * @return array holiday name translations ['' => '', ...] + * @return array holiday name translations ['' => '', ...] */ public function getTranslations(string $key): array { diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 7fb5d0ae6..1c27b2c05 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -38,7 +38,7 @@ class Yasumi public const YEAR_UPPER_BOUND = 9999; /** - * @var array list of all defined locales + * @var array list of all defined locales */ private static $locales = []; @@ -52,7 +52,7 @@ class Yasumi /** * Provider class to be ignored (Abstract, trait, other). * - * @var array + * @var array */ private static $ignoredProvider = [ 'AbstractProvider.php', @@ -118,14 +118,14 @@ public static function nextWorkingDay( * between the defined lower and upper bounds. * @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 + * @return ProviderInterface 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 the defined lower and upper bounds * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given country does not exist */ - public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, string $locale = self::DEFAULT_LOCALE): AbstractProvider + public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, string $locale = self::DEFAULT_LOCALE): ProviderInterface { // Find and return holiday provider instance $providerClass = sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $class)); @@ -165,7 +165,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, /** * Returns a list of available locales. * - * @return array list of available locales + * @return array list of available locales */ public static function getAvailableLocales(): array { @@ -184,7 +184,7 @@ public static function getAvailableLocales(): array * integer between the defined lower and upper bounds. * @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 + * @return ProviderInterface 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 the defined lower and upper bounds @@ -196,7 +196,7 @@ public static function createByISO3166_2( string $isoCode, int $year = self::YEAR_LOWER_BOUND, string $locale = self::DEFAULT_LOCALE - ): AbstractProvider { + ): ProviderInterface { $availableProviders = self::getProviders(); if (false === isset($availableProviders[$isoCode])) { @@ -209,7 +209,7 @@ public static function createByISO3166_2( /** * Returns a list of available holiday providers. * - * @return array list of available holiday providers + * @return array list of available holiday providers * * @throws \ReflectionException */ From ca97bbfa4e7100de0ec90e430436977f5355213f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 14:18:28 +0900 Subject: [PATCH 275/687] Increased check level. --- phpstan.neon.dist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index ff0be1328..8f462e579 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,7 +1,8 @@ parameters: - level: 5 + level: 6 paths: - src + checkGenericClassInNonGenericObjectType: false ignoreErrors: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' From 7d3f0361c57e6f72794b183d390b7d1560cfa982 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 14:24:22 +0900 Subject: [PATCH 276/687] Removed exception annotation as it never is thrown. --- src/Yasumi/Provider/AbstractProvider.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 79338e321..c2728674f 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -288,7 +288,6 @@ public function getYear(): int * * @return Holiday|null a Holiday instance for the given holiday * - * @throws \ReflectionException * @throws UnknownLocaleException * @throws \RuntimeException * @throws InvalidArgumentException @@ -317,7 +316,6 @@ public function getHoliday(string $key): ?Holiday * * @return Holiday|null a Holiday instance for the given holiday * - * @throws \ReflectionException * @throws UnknownLocaleException * @throws \RuntimeException * @throws InvalidArgumentException From b23d5699a4e1fec86bf4a3377f0298e66d597cc2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 14:39:50 +0900 Subject: [PATCH 277/687] Use new method in favor of deprecated one. --- src/Yasumi/Provider/AbstractProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index c2728674f..4835125d7 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -212,7 +212,7 @@ public function isWeekendDay(\DateTimeInterface $date): bool */ public function whenIs(string $key): string { - $this->isHolidayNameNotEmpty($key); // Validate if key is not empty + $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty return (string) $this->holidays[$key]; } @@ -231,7 +231,7 @@ public function whenIs(string $key): string */ public function whatWeekDayIs(string $key): int { - $this->isHolidayNameNotEmpty($key); // Validate if key is not empty + $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty return (int) $this->holidays[$key]->format('w'); } @@ -302,7 +302,7 @@ public function next(string $key): ?Holiday /** {@inheritdoc} */ public function getHoliday(string $key): ?Holiday { - $this->isHolidayNameNotEmpty($key); // Validate if key is not empty + $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty $holidays = $this->getHolidays(); @@ -472,7 +472,7 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa */ private function anotherTime(int $year, string $key): ?Holiday { - $this->isHolidayNameNotEmpty($key); // Validate if key is not empty + $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty // Get calling class name $hReflectionClass = new \ReflectionClass(\get_class($this)); From 7c7440c8f7198fb746c65bc8c65717bd9c35cc36 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 14:43:16 +0900 Subject: [PATCH 278/687] Code cleanup. --- src/Yasumi/Provider/SouthKorea.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index b1b6ecc65..003af963a 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -538,18 +538,18 @@ private function calculateSubstituteHolidays(): void return; } - // Holiday list to allowed to substitute. - $accptedHolidays = []; + // List of holidays allowed for substitution. + $acceptedHolidays = []; // When deciding on alternative holidays, place lunar holidays first for consistent rules. // These holidays will substitute for the sunday only. - $accptedHolidays += array_fill_keys([ + $acceptedHolidays += array_fill_keys([ 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', ], [0]); // These holidays will substitute for any weekend days (Sunday and Saturday). - $accptedHolidays += array_fill_keys([ + $acceptedHolidays += array_fill_keys([ 'childrensDay', 'independenceMovementDay', 'liberationDay', 'nationalFoundationDay', 'hangulDay', ], [0, 6]); @@ -560,12 +560,12 @@ private function calculateSubstituteHolidays(): void $holiday = $this->getHoliday($name); $dates[$day][] = $name; - if (!isset($accptedHolidays[$name])) { + if (!isset($acceptedHolidays[$name])) { continue; } $dayOfWeek = (int) $holiday->format('w'); - if (in_array($dayOfWeek, $accptedHolidays[$name], true)) { + if (\in_array($dayOfWeek, $acceptedHolidays[$name], true)) { $dates[$day]['weekend:'.$day] = $name; } } @@ -573,17 +573,17 @@ private function calculateSubstituteHolidays(): void // Step 2. Add substitute holidays by referring to the temporary table. $tz = DateTimeZoneFactory::getDateTimeZone($this->timezone); foreach ($dates as $day => $names) { - $count = count($names); + $count = \count($names); if ($count < 2) { continue; - } else { - // In a temporary table, public holidays are keyed by numeric number. - // And weekends are keyed by string start with 'weekend:'. - // For the substitute, we will use first item in queue. - $origin = $this->getHoliday($names[0]); - $workDay = $this->nextWorkingDay(DateTime::createFromFormat('Y-m-d', $day, $tz)); - $this->addSubstituteHoliday($origin, $workDay->format('Y-m-d')); } + + // In a temporary table, public holidays are keyed by numeric number. + // And weekends are keyed by string start with 'weekend:'. + // For the substitute, we will use first item in queue. + $origin = $this->getHoliday($names[0]); + $workDay = $this->nextWorkingDay(DateTime::createFromFormat('Y-m-d', $day, $tz)); + $this->addSubstituteHoliday($origin, $workDay->format('Y-m-d')); } } From 29dd1924e3ba839cb361d8533216a422be3c25eb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 15:27:00 +0900 Subject: [PATCH 279/687] Added checks when objects may be null. --- src/Yasumi/Provider/SouthKorea.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 003af963a..e06046f0b 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -564,6 +564,10 @@ private function calculateSubstituteHolidays(): void continue; } + if (null === $holiday) { + continue; + } + $dayOfWeek = (int) $holiday->format('w'); if (\in_array($dayOfWeek, $acceptedHolidays[$name], true)) { $dates[$day]['weekend:'.$day] = $name; @@ -608,8 +612,12 @@ private function nextWorkingDay(DateTime $date): DateTime * * @throws \Exception */ - private function addSubstituteHoliday(Holiday $origin, string $date_str): void + private function addSubstituteHoliday(?Holiday $origin, string $date_str): void { + if (null === $origin) { + return; + } + $this->addHoliday(new SubstituteHoliday( $origin, [], From 9271f5dc9dbf7e186fda89d03a98546ae06d8e1a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 15:35:52 +0900 Subject: [PATCH 280/687] Check for possible errors. --- src/Yasumi/Provider/SouthKorea.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index e06046f0b..25f2d54e5 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -586,8 +586,11 @@ private function calculateSubstituteHolidays(): void // And weekends are keyed by string start with 'weekend:'. // For the substitute, we will use first item in queue. $origin = $this->getHoliday($names[0]); - $workDay = $this->nextWorkingDay(DateTime::createFromFormat('Y-m-d', $day, $tz)); - $this->addSubstituteHoliday($origin, $workDay->format('Y-m-d')); + $nextWorkingDay = DateTime::createFromFormat('Y-m-d', $day, $tz); + if ($nextWorkingDay instanceof DateTime) { + $workDay = $this->nextWorkingDay($nextWorkingDay); + $this->addSubstituteHoliday($origin, $workDay->format('Y-m-d')); + } } } From 166f91932bda5d7abdd6ba3982b06ab8320e1f7a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 15:45:46 +0900 Subject: [PATCH 281/687] Fixed the test for the USA in that juneteenth day was considered for all years: it is only celebrated since 2021. --- CHANGELOG.md | 1 + tests/USA/USATest.php | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e91dc44cf..c2e82cbeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed +- The test for the USA in that juneteenthDay was considered for all years: it is only celebrated since 2021. - Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)) diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 4b27ddec4..c577c3331 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -43,19 +43,24 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'martinLutherKingDay', 'washingtonsBirthday', 'memorialDay', - 'juneteenth', 'independenceDay', 'labourDay', 'columbusDay', 'veteransDay', 'thanksgivingDay', 'christmasDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2021 <= $this->year) { + $holidays[] = 'juneteenth'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** From 356c8c2303e782e8ed66c3d86eb5e5baf2e5e1f0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 15:48:14 +0900 Subject: [PATCH 282/687] Reformatted (120 column width). --- CHANGELOG.md | 502 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 341 insertions(+), 161 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2e82cbeb..e8d747c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org). +The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres +to [Semantic Versioning](https://semver.org). ## [Unreleased] @@ -20,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Changed - Revised rules to calculate substitution holidays of SouthKorea to apply the newly enacted law on June - 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) + 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) - Separate `calculateSubstituteHolidays` method of SouthKorea Provider to `calculateSubstituteHolidays` and `calculateOldSubstituteHolidays` . [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) @@ -40,25 +41,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Removed - ## [2.4.0] - 2021-05-09 ### Added -- Georgia Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) -- Pentecost (Sunday) to Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) +- Georgia + Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) +- Pentecost (Sunday) to + Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) - PHP8 Support [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) - Infection PHP to perform mutation testing. - PHPStan to the dependencies allowing for local analysis. -- `.gitattributes` file to reduce the size of a release package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) +- `.gitattributes` file to reduce the size of a release + package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) ### Changed -- Rescheduled exceptional Japanese holidays for Olympic Games 2020 after COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) -- Some improvements/refactoring of the Swiss holiday providers (including source references) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) +- Rescheduled exceptional Japanese holidays for Olympic Games 2020 after + COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) +- Some improvements/refactoring of the Swiss holiday providers (including source + references) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) -- Allow the `WEEKEND_DATA` constant in provider classes to be overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) +- Allow the `WEEKEND_DATA` constant in provider classes to be + overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) - Upgraded PHPUnit's XML configuration. - Refactored removing the magic numbers for the lower and upper limits of the calendar year. - Reformatted code using new/updated Code Styling rules. @@ -67,11 +73,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed -- The test for North West Territories (Canada) in that the National Indigenous Peoples Day was considered for all years: it is only celebrated since 1996. -- The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated since 2015. +- The test for North West Territories (Canada) in that the National Indigenous Peoples Day was considered for all years: + it is only celebrated since 1996. +- The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated + since 2015. - The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009. - The test for Marine Day (Japan) as the rescheduled day was moved to 2021 (due to the COVID-19 pandemic). -- Typo for Estonian Day of Restoration of Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) +- Typo for Estonian Day of Restoration of + Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) - The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. - Incorrect invocation of `Fribourg::calculateBerchtoldsTag()` and `Fribourg::calculateDecember26th` (Switzerland) @@ -83,7 +92,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Travis/StyleCI/Scrutinizer services replaced by GitHub Actions. - PHP 7.2 Support (PHP 7.2 is EOL) -- Faker library as it has been sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) +- Faker library as it has been + sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) - Native function invocations. - Various undefined class references, unused imports, etc. - Unnecessary curly braces in strings, `continue` keyword in while loops, typecasting. @@ -93,33 +103,55 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added - Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) -- Added Luxembourg Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) -- Holiday providers for states of Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) -- Added All Souls Day to Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) ([norkunas](https://github.com/norkunas)) -- Catholic Christmas Day is a new official holiday since 2017 in the Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) -- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) -- Substituted holidays (holidays that fall in the weekend) for Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) -- Added New Years Eve to Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) ([Patrick-Root](https://github.com/Patrick-Root)) +- Added Luxembourg + Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) +- Holiday providers for states of + Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) +- Added All Souls Day to + Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) ([norkunas](https://github.com/norkunas)) +- Catholic Christmas Day is a new official holiday since 2017 in the + Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Additional Dates for Australia/Victoria:AFL Grand Final + Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) +- Substituted holidays (holidays that fall in the weekend) for + Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) +- Added New Years Eve to + Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) ([Patrick-Root](https://github.com/Patrick-Root)) - Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). -- Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) +- Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and + Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) - Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) -- Added French translation for Second Christmas Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) +- Added French translation for Second Christmas + Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) -- Added accessor methods Holiday::getKey() and SubstituteHoliday::getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220)+[\#221](https://github.com/azuyalabs/yasumi/pull/221) ([c960657](https://github.com/c960657)) +- Added accessor methods Holiday::getKey() and SubstituteHoliday:: + getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220)+[\#221](https://github.com/azuyalabs/yasumi/pull/221) ([c960657](https://github.com/c960657)) - Added missing return (correct) and parameter types in various methods. ### Changed -- Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) -- Statehood Day is celebrated at a new date since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Independence Day is no longer an official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian Defenders" since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Second International Workers' Day in Ukraine was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) -- Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) - -- Changed the fallback from DEFAULT_LANGUAGE to 'en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) -- Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated DateTimezone, thus saving resources. [\#213](https://github.com/azuyalabs/yasumi/pull/213) ([pvgnd](https://github.com/pvgn)) +- Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday + Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) +- Statehood Day is celebrated at a new date since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Independence Day is no longer an official holiday since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian + Defenders" since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official + holiday since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Second International Workers' Day in Ukraine was an official holiday only until + 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Holiday names in Danish, Dutch, and Norwegian are no longer + capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) + +- Changed the fallback from DEFAULT_LANGUAGE to ' + en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) +- Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated + DateTimezone, thus saving + resources. [\#213](https://github.com/azuyalabs/yasumi/pull/213) ([pvgnd](https://github.com/pvgn)) - Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) - Explicitly set nullable parameters as such. - Refactored various conditional structures. @@ -128,16 +160,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed -- Fixed Ukraine holidays on weekends. These days need to be substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) -- Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) -- Fix locale fallback for substitute holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) -- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi instance) +- Fixed Ukraine holidays on weekends. These days need to be + substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi + instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) +- Fix locale fallback for substitute + holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) +- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi + instance) - Fixed compound conditions that are always true by simplifying the condition steps. ### Deprecated -- Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor of accessor methods [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) +- Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor + of accessor methods [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) ### Removed @@ -149,45 +186,71 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### 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 the 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)) -- Created a 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)) +- 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 the 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)) +- Created a 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. ### 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)) -- 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)) +- 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)) - 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. -- 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). +- 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. 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 is 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)) +- Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider is 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)) +- 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)) -- 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) ([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)) +- 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) ([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)) - 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)) +- Good Friday is not official in + Brazil [\#174](https://github.com/azuyalabs/yasumi/pull/174) ([c960657](https://github.com/c960657)) ### Removed @@ -197,67 +260,104 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added -- As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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)) +- As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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/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. +- 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)) +- "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). +- 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)) +- Duplicate definition of + newYearsDay [\#125](https://github.com/azuyalabs/yasumi/pull/125) ([c960657](https://github.com/c960657)) ## [2.0.0] - 2019-01-11 ### Added -- 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 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)) +- 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 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 -- Upgraded entirely to PHP version 7 with PHP 7.1 being the minimum required version. Base code and all unit tests have been reworked to compatibility with PHP 7. +- Upgraded entirely to PHP version 7 with PHP 7.1 being the minimum required version. Base code and all unit tests have + been reworked to compatibility with PHP 7. - Upgraded to PHPUnit to version 7.5. -- Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports Day. [\#113](https://github.com/azuyalabs/yasumi/pull/113) ([cookie-maker](https://github.com/cookie-maker)) -- Summer/winter time is now fetched from PHP's tz database. [\#103](https://github.com/azuyalabs/yasumi/pull/103) ([c960657](https://github.com/c960657)) -- Changed translation for Norway's national day. [\#98](https://github.com/azuyalabs/yasumi/pull/98) ([c960657](https://github.com/c960657)) +- Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports + Day. [\#113](https://github.com/azuyalabs/yasumi/pull/113) ([cookie-maker](https://github.com/cookie-maker)) +- Summer/winter time is now fetched from PHP's tz + database. [\#103](https://github.com/azuyalabs/yasumi/pull/103) ([c960657](https://github.com/c960657)) +- Changed translation for Norway's national + day. [\#98](https://github.com/azuyalabs/yasumi/pull/98) ([c960657](https://github.com/c960657)) - Applied proper null checks in the summer time and wintertime calculations for Denmark and The Netherlands. - Corrected some namespaces for Australia and Germany. - Updated copyright year. - Upgraded various dependency packages. - Internal locale list updated based on CLDR v34. -- Refactored the Japan and USA Holiday Provider by moving the holiday calculations to private methods. This reduced the complexity of the initialize method. -- Changed individual added International Women's Day for Ukraine and Russia to common holiday. [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) +- Refactored the Japan and USA Holiday Provider by moving the holiday calculations to private methods. This reduced the + complexity of the initialize method. +- Changed individual added International Women's Day for Ukraine and Russia to common + holiday. [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) ### Fixed - Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place. -- Fixed issue for summertime in Denmark in 1980. By default, summertime in Denmark is set for the last day of March since 1980, however in 1980 itself, it started on April, 6th. -- Fixed spelling issue in the Swedish translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) -- Fixed spelling issues in the Danish translation. [\#96](https://github.com/azuyalabs/yasumi/pull/96) ([c960657](https://github.com/c960657)) -- Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg). [\#100](https://github.com/azuyalabs/yasumi/pull/100) ([TalonTR](https://github.com/TalonTR)) -- Fixed BetweenFilter to ignore time part and timezone. [\#101](https://github.com/azuyalabs/yasumi/pull/101) ([c960657](https://github.com/c960657)) -- Fixed bug in provider list generation related to variable order of files returned by the filesystem [\#107](https://github.com/azuyalabs/yasumi/pull/107) ([leafnode](https://github.com/leafnode)) +- Fixed issue for summertime in Denmark in 1980. By default, summertime in Denmark is set for the last day of March + since 1980, however in 1980 itself, it started on April, 6th. +- Fixed spelling issue in the Swedish + translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) +- Fixed spelling issues in the Danish + translation. [\#96](https://github.com/azuyalabs/yasumi/pull/96) ([c960657](https://github.com/c960657)) +- Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg) + . [\#100](https://github.com/azuyalabs/yasumi/pull/100) ([TalonTR](https://github.com/TalonTR)) +- Fixed BetweenFilter to ignore time part and + timezone. [\#101](https://github.com/azuyalabs/yasumi/pull/101) ([c960657](https://github.com/c960657)) +- Fixed bug in provider list generation related to variable order of files returned by the + filesystem [\#107](https://github.com/azuyalabs/yasumi/pull/107) ([leafnode](https://github.com/leafnode)) ### Removed @@ -265,56 +365,81 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added -- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This function can be helpful in cases where an existing holiday provider class can be extended, but some holidays are not part of the original (extended) provider. -- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and objects of the DateTimeImmutable type. -- Added support for countries where the weekend definition (start and end day) differs from the global definition (Saturday and Sunday). -- Holiday Provider for Russia. [\#72](https://github.com/azuyalabs/yasumi/pull/72) ([lukosius](https://github.com/lukosius)) -- Holiday Provider for Estonia. [\#71](https://github.com/azuyalabs/yasumi/pull/71) ([lukosius](https://github.com/lukosius)) +- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This + function can be helpful in cases where an existing holiday provider class can be extended, but some holidays are not + part of the original (extended) provider. +- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and + objects of the DateTimeImmutable type. +- Added support for countries where the weekend definition (start and end day) differs from the global definition ( + Saturday and Sunday). +- Holiday Provider for + Russia. [\#72](https://github.com/azuyalabs/yasumi/pull/72) ([lukosius](https://github.com/lukosius)) +- Holiday Provider for + Estonia. [\#71](https://github.com/azuyalabs/yasumi/pull/71) ([lukosius](https://github.com/lukosius)) - Added Scrutinizer integration. ### Changed - Locale List updated based on CLDR version 32. -- Added PHPStan static analysis tool to Travis CI [\#88](https://github.com/azuyalabs/yasumi/pull/88) ([lukosius](https://github.com/lukosius)) -- Various inline documentation enhancements. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) -- Removed unnecessary typecasts and if-construct. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) +- Added PHPStan static analysis tool to Travis + CI [\#88](https://github.com/azuyalabs/yasumi/pull/88) ([lukosius](https://github.com/lukosius)) +- Various inline documentation + enhancements. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) +- Removed unnecessary typecasts and + if-construct. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) - Updated inline documentation to include correction Exception throws. - Removed unnecessary NULL checks. ### Fixed -- Fixed Brazilian Carnival Day and added Ash Wednesday to Brazilian Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) -- Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix made that recognizes Easter Sunday as being observed (in all regions). [\#86](https://github.com/azuyalabs/yasumi/pull/86) ([Bastian Konetzny](https://github.com/bkonetzny)) +- Fixed Brazilian Carnival Day and added Ash Wednesday to Brazilian + Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) +- Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix + made that recognizes Easter Sunday as being observed (in all regions) + . [\#86](https://github.com/azuyalabs/yasumi/pull/86) ([Bastian Konetzny](https://github.com/bkonetzny)) - Corrected reference to the Holiday Provider's ID to be static. - Changed weekend data property into constant as it is not dynamic (runtime). -- Corrected the name translation test for the Restoration of Independence Day (Portugal). The test didn't account for the fact that this holiday was abolished and reinstated at some time. +- Corrected the name translation test for the Restoration of Independence Day (Portugal). The test didn't account for + the fact that this holiday was abolished and reinstated at some time. - Corrected unit test for Geneva (Switzerland) as the jeune Genevois day was incorrectly asserted as a regional holiday. - Corrected the count logic so that in case a holiday is substituted (or observed), it is only counted once. - Dropped unnecessary arguments of some methods in various Holiday Providers. -- Corrected Japanese "Green Day" and "Children's Day" to use "Hiragana" instead of Kanji. [\#80](https://github.com/azuyalabs/yasumi/pull/80) ([cookie-maker](https://github.com/cookie-maker)) +- Corrected Japanese "Green Day" and "Children's Day" to use "Hiragana" instead of + Kanji. [\#80](https://github.com/azuyalabs/yasumi/pull/80) ([cookie-maker](https://github.com/cookie-maker)) ## [1.7.0] - 2017-12-11 ### Added -- 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)) -- Missing translations (de_DE) for Easter Sunday and Whitsunday. [\#60](https://github.com/azuyalabs/yasumi/pull/60) ([IceShack](https://github.com/IceShack)) -- Holiday Provider for Hungary. [\#57](https://github.com/azuyalabs/yasumi/pull/57) ([AronNovak](https://github.com/AronNovak)) -- Holiday Provider for Switzerland. [\#56](https://github.com/azuyalabs/yasumi/pull/56) ([qligier](https://github.com/qligier)) +- 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)) +- Missing translations (de_DE) for Easter Sunday and + Whitsunday. [\#60](https://github.com/azuyalabs/yasumi/pull/60) ([IceShack](https://github.com/IceShack)) +- Holiday Provider for + Hungary. [\#57](https://github.com/azuyalabs/yasumi/pull/57) ([AronNovak](https://github.com/AronNovak)) +- Holiday Provider for + Switzerland. [\#56](https://github.com/azuyalabs/yasumi/pull/56) ([qligier](https://github.com/qligier)) ### Changed -- Made `calculate` method public and use of proper camel casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) +- Made `calculate` method public and use of proper camel + casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) - Upgraded Faker Library to version 1.7 -- Renamed the holiday type NATIONAL to OFFICIAL. Sub-regions may have official holidays, and the name NATIONAL doesn't suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) +- Renamed the holiday type NATIONAL to OFFICIAL. Sub-regions may have official holidays, and the name NATIONAL doesn't + suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) - Upgraded PHP-CS-Fixer to version 2.6 ### Fixed -- Corrected Geneva (Switzerland) unit test to ensure some holidays that are established at a particular year are handled as such. +- Corrected Geneva (Switzerland) unit test to ensure some holidays that are established at a particular year are handled + as such. - Repentance Day is an official holiday in Saxony (Germany) [\#63](https://github.com/azuyalabs/yasumi/issues/63) - Corrected the Easter Sunday translation for Austria (de_AT) [\#66](https://github.com/azuyalabs/yasumi/issues/66) - Corrected Hungary unit test to ensure holidays that are established at a particular year are handled as such. @@ -324,64 +449,91 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Added -- Added missing unit tests for Reformation Day as in 2017 it is celebrated in all German states for its 500th anniversary. +- Added missing unit tests for Reformation Day as in 2017 it is celebrated in all German states for its 500th + anniversary. - Added missing unit tests for the German Unit Day for each German state. -- Created fallback calculation of the easter_days function in case the PHP extension 'calendar' is not loaded. [\#55](https://github.com/azuyalabs/yasumi/pull/55) ([stelgenhof](https://github.com/stelgenhof)) +- Created fallback calculation of the easter_days function in case the PHP extension 'calendar' is not + loaded. [\#55](https://github.com/azuyalabs/yasumi/pull/55) ([stelgenhof](https://github.com/stelgenhof)) ### Changed - Moved Reformation Day to Christian Holidays as it is not only celebrated in Germany. -- Changed Travis configuration to use Composer-installed phpunit to avoid if any issues arise with globally installed phpunit. +- Changed Travis configuration to use Composer-installed phpunit to avoid if any issues arise with globally installed + phpunit. ### Fixed -- Fixed Christmas Day and Boxing Day for the United Kingdom. A substitute bank holiday is now created for both Christmas and Boxing Day when either of those days fall on a weekend. [\#48](https://github.com/azuyalabs/yasumi/issues/48) ([joshuabaker](https://github.com/joshuabaker)) -- Renamed 'en_US' translation for the Second Christmas Day (from ‘Boxing Day’ to ‘Second Christmas Day’: Boxing Day concept does not exist in the US). [\#53](https://github.com/azuyalabs/yasumi/pull/53) ([AngelinCalu](https://github.com/AngelinCalu)) +- Fixed Christmas Day and Boxing Day for the United Kingdom. A substitute bank holiday is now created for both Christmas + and Boxing Day when either of those days fall on a + weekend. [\#48](https://github.com/azuyalabs/yasumi/issues/48) ([joshuabaker](https://github.com/joshuabaker)) +- Renamed 'en_US' translation for the Second Christmas Day (from ‘Boxing Day’ to ‘Second Christmas Day’: Boxing Day + concept does not exist in the US) + . [\#53](https://github.com/azuyalabs/yasumi/pull/53) ([AngelinCalu](https://github.com/AngelinCalu)) ## [1.6.0] - 2017-01-06 ### Added -- Added Holiday Provider for Romania. [\#52](https://github.com/azuyalabs/yasumi/pull/52) ([AngelinCalu](https://github.com/AngelinCalu)) +- Added Holiday Provider for + Romania. [\#52](https://github.com/azuyalabs/yasumi/pull/52) ([AngelinCalu](https://github.com/AngelinCalu)) - Added Holiday Provider for Ireland. [stelgenhof](https://github.com/stelgenhof) - Added Holiday Provider for South Africa. [stelgenhof](https://github.com/stelgenhof) - Added Holiday Provider for Austria. [stelgenhof](https://github.com/stelgenhof) -- Added 'en_US' translations for the Polish Independence Day and Constitution Day. [\#45](https://github.com/azuyalabs/yasumi/pull/45) ([AngelinCalu](https://github.com/AngelinCalu)) +- Added 'en_US' translations for the Polish Independence Day and Constitution + Day. [\#45](https://github.com/azuyalabs/yasumi/pull/45) ([AngelinCalu](https://github.com/AngelinCalu)) ### Changed -- Refactored the calculation of Orthodox Easter using the function from ChristianHolidays.php. [\#47](https://github.com/azuyalabs/yasumi/pull/47) ([AngelinCalu](https://github.com/AngelinCalu)) +- Refactored the calculation of Orthodox Easter using the function from + ChristianHolidays.php. [\#47](https://github.com/azuyalabs/yasumi/pull/47) ([AngelinCalu](https://github.com/AngelinCalu)) ### Fixed -- The parameters of the `isHoliday` and `isWorkingDay` methods now allow for classes that derive from DateTime (like the very popular Carbon class). [\#49](https://github.com/azuyalabs/yasumi/issues/49) ([stelgenhof](https://github.com/stelgenhof)) +- The parameters of the `isHoliday` and `isWorkingDay` methods now allow for classes that derive from DateTime (like the + very popular Carbon class) + . [\#49](https://github.com/azuyalabs/yasumi/issues/49) ([stelgenhof](https://github.com/stelgenhof)) ## [1.5.0] - 2016-11-25 ### Added -- Added Holiday Provider for Australia (and the sub-region of Victoria). [\#38](https://github.com/azuyalabs/yasumi/pull/38) ([brucealdridge](https://github.com/brucealdridge)) -- You can now also use your own holiday providers in addition to the included holiday providers. - A very helpful improvement if Yasumi does not include your provider (yet), but you want to use yours! [\#29](https://github.com/azuyalabs/yasumi/pull/29) ([navarr](https://github.com/navarr)) -- Added Holiday Provider for Portugal. [\#44](https://github.com/azuyalabs/yasumi/pull/44) ([rvelhote](https://github.com/rvelhote)) -- Added Holiday Provider for Ukraine. [\#41](https://github.com/azuyalabs/yasumi/pull/41) ([madmis](https://github.com/madmis)) -- Possibility to retrieve the next or previous working day within a defined number of days from today [\#39](https://github.com/azuyalabs/yasumi/pull/39) ([brucealdridge](https://github.com/brucealdridge)) -- Added Holiday Providers for all 16 German States. [\#34](https://github.com/azuyalabs/yasumi/pull/34) ([stelgenhof](https://github.com/stelgenhof)) -- Added Holiday Provider for Croatia. [\#32](https://github.com/azuyalabs/yasumi/pull/32) ([karlomikus](https://github.com/karlomikus)) +- Added Holiday Provider for Australia (and the sub-region of Victoria) + . [\#38](https://github.com/azuyalabs/yasumi/pull/38) ([brucealdridge](https://github.com/brucealdridge)) +- You can now also use your own holiday providers in addition to the included holiday providers. A very helpful + improvement if Yasumi does not include your provider (yet), but you want to use + yours! [\#29](https://github.com/azuyalabs/yasumi/pull/29) ([navarr](https://github.com/navarr)) +- Added Holiday Provider for + Portugal. [\#44](https://github.com/azuyalabs/yasumi/pull/44) ([rvelhote](https://github.com/rvelhote)) +- Added Holiday Provider for + Ukraine. [\#41](https://github.com/azuyalabs/yasumi/pull/41) ([madmis](https://github.com/madmis)) +- Possibility to retrieve the next or previous working day within a defined number of days from + today [\#39](https://github.com/azuyalabs/yasumi/pull/39) ([brucealdridge](https://github.com/brucealdridge)) +- Added Holiday Providers for all 16 German + States. [\#34](https://github.com/azuyalabs/yasumi/pull/34) ([stelgenhof](https://github.com/stelgenhof)) +- Added Holiday Provider for + Croatia. [\#32](https://github.com/azuyalabs/yasumi/pull/32) ([karlomikus](https://github.com/karlomikus)) ### Fixed -- Carnival Day in Brazil was incorrectly set to be 47 days after Easter. Carnival Day begins Friday before Ash Wednesday (51 days to Easter). [\#36](https://github.com/azuyalabs/yasumi/pull/36) ([icaroce](https://github.com/icaroce)) -- All Saints Day for Finland was incorrectly set for November 1st. The correct date is Saturday between 31 Oct and 6 Nov, similar to Sweden. [\#43](https://github.com/azuyalabs/yasumi/issues/43) ([stelgenhof](https://github.com/stelgenhof)) +- Carnival Day in Brazil was incorrectly set to be 47 days after Easter. Carnival Day begins Friday before Ash + Wednesday (51 days to Easter) + . [\#36](https://github.com/azuyalabs/yasumi/pull/36) ([icaroce](https://github.com/icaroce)) +- All Saints Day for Finland was incorrectly set for November 1st. The correct date is Saturday between 31 Oct and 6 + Nov, similar to + Sweden. [\#43](https://github.com/azuyalabs/yasumi/issues/43) ([stelgenhof](https://github.com/stelgenhof)) ## [1.4.0] - 2016-06-04 ### Added -- Added Holiday Provider for Brazil. [\#21](https://github.com/azuyalabs/yasumi/pull/21) ([dorianneto](https://github.com/dorianneto)) -- Added Holiday Provider for the Czech Republic. [\#26](https://github.com/azuyalabs/yasumi/pull/26) ([dfridrich](https://github.com/dfridrich)) -- Added Holiday Provider for the United Kingdom. [\#23](https://github.com/azuyalabs/yasumi/pull/23) ([stelgenhof](https://github.com/stelgenhof)) -- Add Welsh language (spoken in Wales, UK) translations for the holidays in the United Kingdom [\#25](https://github.com/azuyalabs/yasumi/pull/25) ([meigwilym](https://github.com/meigwilym)) +- Added Holiday Provider for + Brazil. [\#21](https://github.com/azuyalabs/yasumi/pull/21) ([dorianneto](https://github.com/dorianneto)) +- Added Holiday Provider for the Czech + Republic. [\#26](https://github.com/azuyalabs/yasumi/pull/26) ([dfridrich](https://github.com/dfridrich)) +- Added Holiday Provider for the United + Kingdom. [\#23](https://github.com/azuyalabs/yasumi/pull/23) ([stelgenhof](https://github.com/stelgenhof)) +- Add Welsh language (spoken in Wales, UK) translations for the holidays in the United + Kingdom [\#25](https://github.com/azuyalabs/yasumi/pull/25) ([meigwilym](https://github.com/meigwilym)) - To determine a set of holidays between two dates you can now use the aptly named 'between()' method. ### Changed @@ -392,19 +544,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Fixed -- Fixed an issue with the unit test for the 'getProviders' method failing on Windows. Hardcoded unix-style directory separators have been replaced by DIRECTORY_SEPARATOR. [\#30](https://github.com/azuyalabs/yasumi/pull/30) ([navarr](https://github.com/navarr)) -- Corrected a typo in the English translation for 敬老の日 (Japan) [\#22](https://github.com/azuyalabs/yasumi/pull/22) ([navarr](https://github.com/navarr)) -- Fixed issue that the unit tests in 'YasumiTest' (methods 'next' and 'previous') did not cover the situations that the limits are exceeded. [\#28](https://github.com/azuyalabs/yasumi/issues/28) +- Fixed an issue with the unit test for the 'getProviders' method failing on Windows. Hardcoded unix-style directory + separators have been replaced by + DIRECTORY_SEPARATOR. [\#30](https://github.com/azuyalabs/yasumi/pull/30) ([navarr](https://github.com/navarr)) +- Corrected a typo in the English translation for 敬老の日 ( + Japan) [\#22](https://github.com/azuyalabs/yasumi/pull/22) ([navarr](https://github.com/navarr)) +- Fixed issue that the unit tests in 'YasumiTest' (methods 'next' and 'previous') did not cover the situations that the + limits are exceeded. [\#28](https://github.com/azuyalabs/yasumi/issues/28) ## [1.3.0] - 2016-05-02 ### Added -- Added Holiday Provider for Poland. [\#18](https://github.com/azuyalabs/yasumi/pull/18) ([mpdx](https://github.com/mpdx)) -- Added Holiday Provider for New Zealand. [\#13](https://github.com/azuyalabs/yasumi/pull/13) ([badams](https://github.com/badams)) -- Added Holiday Provider for Greece. [\#10](https://github.com/azuyalabs/yasumi/pull/10) ([sebdesign](https://github.com/sebdesign)) -- Added Holiday Provider for Germany. [\#9](https://github.com/azuyalabs/yasumi/pull/9) ([eaglefsd](https://github.com/eaglefsd)) -- Added translations (`fr_FR`, `fr_BE`) for Belgium National day [\#864d250](https://github.com/azuyalabs/yasumi/commit/864d25097abbeedbee15bcc37702a34c36a5b696) ([R2c](https://github.com/R2c)) +- Added Holiday Provider for + Poland. [\#18](https://github.com/azuyalabs/yasumi/pull/18) ([mpdx](https://github.com/mpdx)) +- Added Holiday Provider for New + Zealand. [\#13](https://github.com/azuyalabs/yasumi/pull/13) ([badams](https://github.com/badams)) +- Added Holiday Provider for + Greece. [\#10](https://github.com/azuyalabs/yasumi/pull/10) ([sebdesign](https://github.com/sebdesign)) +- Added Holiday Provider for + Germany. [\#9](https://github.com/azuyalabs/yasumi/pull/9) ([eaglefsd](https://github.com/eaglefsd)) +- Added translations (`fr_FR`, `fr_BE`) for Belgium National + day [\#864d250](https://github.com/azuyalabs/yasumi/commit/864d25097abbeedbee15bcc37702a34c36a5b696) ([R2c](https://github.com/R2c)) - Added missing English (`en_US`) translations for the Christian holidays 'Immaculate Conception', 'Maundy Thursday', 'St. Georges Day', 'St. John's Day', 'St. Josephs Day' and 'St. Stephens Day'. - Added Test Interface class to ensure the unit tests contain a some minimal assertions. @@ -418,8 +579,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However, the holiday has always been celebrated on a Saturday (between October 31 and November 6th). -- Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) regions [\#5879133](https://github.com/azuyalabs/yasumi/commit/58791330ccf5c13b1626885921534c32866b7faf) ([R2c](https://github.com/R2c)) -- Fixed issue that it was possible for the AbstractProvider class to be loaded as a Holiday Provider [\#9678bc4](https://github.com/azuyalabs/yasumi/commit/9678bc490e34980404ad5dc5b3d45a3c76a3ca0f) ([R2c](https://github.com/R2c)) +- Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) + regions [\#5879133](https://github.com/azuyalabs/yasumi/commit/58791330ccf5c13b1626885921534c32866b7faf) ([R2c](https://github.com/R2c)) +- Fixed issue that it was possible for the AbstractProvider class to be loaded as a Holiday + Provider [\#9678bc4](https://github.com/azuyalabs/yasumi/commit/9678bc490e34980404ad5dc5b3d45a3c76a3ca0f) ([R2c](https://github.com/R2c)) - Corrected incorrect pathname reference \*BaseTestCase.php files ("Test" -> "test). - Fixed issue for France as Good Friday and St. Stephens Day were defined as official holidays. These aren't national holidays and are only observed in the French departments Moselle, Bas-Rhin and Haut-Rhin. With this fix, these @@ -428,13 +591,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Updated locales list based on CLDR version 29. Removed locales of which the region identifier is not specified. - Fixed issue for Sweden as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, the holiday has always been celebrated on a Saturday (between June 20 and June 26). -- Fixed base test for some Spain/LaRioja as some holidays have been established only in a particular year, causing - false failures in the unit tests. +- Fixed base test for some Spain/LaRioja as some holidays have been established only in a particular year, causing false + failures in the unit tests. - Running php-cs-fixer fix . --level=psr2 generated a massive list of changes, and broke unit tests. Added a custom .php_cs config file to adhere to the PSR-2 Coding Standards and resolve this issue. In addition, the php-cs-fixer - command has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be - PSR2 compliant before they can be merged. If any files do not pass, the build fails. [\#15](https://github.com/azuyalabs/yasumi/issues/15) [\#16](https://github.com/azuyalabs/yasumi/pull/16) ([badams](https://github.com/badams)) -- Accidentally the timezone for Norway was set to "Europe/Copenhagen". This has been corrected to "Europe/Oslo". [\#11](https://github.com/azuyalabs/yasumi/issues/11) [\#12](https://github.com/azuyalabs/yasumi/pull/12) ([badams](https://github.com/badams)) + command has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be PSR2 + compliant before they can be merged. If any files do not pass, the build + fails. [\#15](https://github.com/azuyalabs/yasumi/issues/15) [\#16](https://github.com/azuyalabs/yasumi/pull/16) ([badams](https://github.com/badams)) +- Accidentally the timezone for Norway was set to "Europe/Copenhagen". This has been corrected to "Europe/Oslo" + . [\#11](https://github.com/azuyalabs/yasumi/issues/11) [\#12](https://github.com/azuyalabs/yasumi/pull/12) ([badams](https://github.com/badams)) - Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, since 1955, the holiday has always been celebrated on a Saturday (between June 20 and June 26). @@ -446,8 +611,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - Added Holiday Provider for Norway - Added Holiday Provider for Sweden - Added Holiday Provider for Finland -- New function 'isWorkingDay' added that determines whether a date represents a working day or not. A working day is - a date that is neither a holiday nor falls into the weekend. +- New function 'isWorkingDay' added that determines whether a date represents a working day or not. A working day is a + date that is neither a holiday nor falls into the weekend. ### Changed @@ -457,8 +622,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this - The Vernal Equinox Day and Autumnal Equinox Day in Japan were excluded from having it substituted for another day in case these days would fall on the weekend. -- Fixed tests for some holiday providers as some holidays have been established only in a particular year, causing - false failures in the unit tests. +- Fixed tests for some holiday providers as some holidays have been established only in a particular year, causing false + failures in the unit tests. ## [1.1.0] - 2016-03-10 @@ -485,26 +650,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ### Removed -- Removed support for PHP 5.4. The minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still allowed - to fail. +- Removed support for PHP 5.4. The minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still + allowed to fail. ## [1.0.0] - 2015-04-21 - Initial Release [Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.4.0...HEAD + [2.4.0]: https://github.com/azuyalabs/yasumi/compare/2.3.0...2.4.0 + [2.3.0]: https://github.com/azuyalabs/yasumi/compare/2.2.0...2.3.0 + [2.2.0]: https://github.com/azuyalabs/yasumi/compare/2.1.0...2.2.0 + [2.1.0]: https://github.com/azuyalabs/yasumi/compare/2.0.0...2.1.0 + [2.0.0]: https://github.com/azuyalabs/yasumi/compare/1.8.0...2.0.0 + [1.8.0]: https://github.com/azuyalabs/yasumi/compare/1.7.0...1.8.0 + [1.7.0]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.7.0 + [1.6.1]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.6.0 + [1.6.0]: https://github.com/azuyalabs/yasumi/compare/1.5.0...1.6.0 + [1.5.0]: https://github.com/azuyalabs/yasumi/compare/1.4.0...1.5.0 + [1.4.0]: https://github.com/azuyalabs/yasumi/compare/1.3.0...1.4.0 + [1.3.0]: https://github.com/azuyalabs/yasumi/compare/1.2.0...1.3.0 + [1.2.0]: https://github.com/azuyalabs/yasumi/compare/1.1.0...1.2.0 + [1.1.0]: https://github.com/azuyalabs/yasumi/compare/1.0.0...1.1.0 + [1.0.0]: https://github.com/azuyalabs/yasumi/releases/tag/1.0.0 From 3ea644430edaf385f3b084aa0331b89bf4d7cc16 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 15:53:20 +0900 Subject: [PATCH 283/687] Reformatted (120 column width). Corrected GitHub's name. Updated coding style references from PSR-2 to PSR-12. --- CONTRIBUTING.md | 34 +++++++++++++++++++--------------- README.md | 35 +++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9afca039c..00537c625 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,37 +1,41 @@ # Contributing -Contributions are encouraged and welcome; we are always happy to get feedback or pull requests on [GitHub](https://github.com/azuyalabs/yasumi). +Contributions are encouraged and welcome; we are always happy to get feedback or pull requests +on [GitHub](https://github.com/azuyalabs/yasumi). When contributing there are a few guidelines we'd like you to keep in mind: - + ## Pull Requests -- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** +- **[PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** Please use the following command after you have completed your work: - + ``` bash $ composer format ``` - 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: + This will check/correct all the code for the PSR-12 Coding Standard using the + wonderful [php-cs-fixer](https://cs.symfony.com). + +- **Add unit tests!** - Your Pull Request won't be accepted if it does not have tests: 1. Ensure your new Holiday Provider contains all the necessary unit tests. - 2. Next to the file 'BaseTestCase.php', a file called 'Test.php' needs to be present. This file - needs to include region/country level tests and requires assertion of all expected holidays. + 2. Next to the file 'BaseTestCase.php', a file called 'Test.php' needs to be present. This + file needs to include region/country level tests and requires assertion of all expected holidays. 3. All the unit tests and the implementation Holiday Provider require to have the correct locale, timezone and - region/country name. - 4. As almost all of the tests use automatic iterations, make sure the year for which the test is executed is a valid - year. Some holidays are only established from a certain year and having the test year number smaller than the minimum - establishment year (amongst all holidays) can result in false errors. + region/country name. + 4. As almost all tests use automatic iterations, make sure the year for which the test is executed is a valid year. + Some holidays are only established from a certain year and having the test year number smaller than the minimum + establishment year (amongst all holidays) can result in false errors. - **Document any change** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. - **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](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_changing_multiple) 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 diff --git a/README.md b/README.md index ce84788c6..69d56fe9d 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,20 @@ # Introduction -Yasumi (Japanese for 'Holiday'「休み」) is the easy PHP library that helps you retrieve the dates and names of holidays and other special celebrations from various countries/states. It is calculation and rule driven avoiding the need of a comprehensive database. +Yasumi (Japanese for 'Holiday'「休み」) is the easy PHP library that helps you retrieve the dates and names of holidays and +other special celebrations from various countries/states. It is calculation and rule driven avoiding the need of a +comprehensive database. -Many services exist that can provide holiday information, however are either not entirely free or only offer limited information. In addition, no exhaustive PHP library exists today covering a wide range of holidays and countries. [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) library was a similar attempt, however it hasn't been updated for a long time. +Many services exist that can provide holiday information, however are either not entirely free or only offer limited +information. In addition, no exhaustive PHP library exists today covering a wide range of holidays and +countries. [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) library was a similar attempt, however it +hasn't been updated for a long time. # Highlights -The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. Yasumi's calculation is provider-based (i.e. by country/state), making it easy to add new holiday providers that calculate holidays. +The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. +Yasumi's calculation is provider-based (i.e. by country/state), making it easy to add new holiday providers that +calculate holidays. - Straightforward API - Framework-agnostic @@ -25,27 +32,35 @@ The goal of Yasumi is to be powerful while remaining lightweight, by utilizing P - Filters enabling to easily select certain holiday types (Official, Observed, Bank, Seasonal or Other) - Global Translations - Timezone aware -- Implements [ArrayIterator](https://www.php.net/manual/en/class.arrayiterator.php) to easily process a provider's holidays +- Implements [ArrayIterator](https://www.php.net/manual/en/class.arrayiterator.php) to easily process a provider's + holidays - Fully documented - Fully unit tested -- [Composer](https://getcomposer.org) ready, [PSR-2](https://www.php-fig.org/psr/psr-2/) and [PSR-4](https://www.php-fig.org/psr/psr-4/) compliant +- [Composer](https://getcomposer.org) ready, [PSR-12](https://www.php-fig.org/psr/psr-12/) + and [PSR-4](https://www.php-fig.org/psr/psr-4/) compliant # Documentation -Yasumi’s documentation is available on [https://www.yasumi.dev](https://www.yasumi.dev). You will find all the necessary information how to install Yasumi and also recipes how you can use Yasumi in your project. +Yasumi’s documentation is available on [https://www.yasumi.dev](https://www.yasumi.dev). You will find all the necessary +information how to install Yasumi and also recipes how you can use Yasumi in your project. # Blog -Checkout the [blog](https://www.yasumi.dev/blog/) section on documentation site regularly for latest updates. Keeping you informed about any news, releases, etc. in a handy blog post format! +Checkout the [blog](https://www.yasumi.dev/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. +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. +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 -Yasumi is open-sourced software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more information. +Yasumi is open-sourced software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more +information. From 0a64a4de67d15ac82c58327aecf07c349e132495 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 16:09:44 +0900 Subject: [PATCH 284/687] Removed parameter as it is already defined in the config. --- .github/workflows/coding-standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 2aedc7bab..54fc0af20 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -49,4 +49,4 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Check Code Style - run: vendor/bin/php-cs-fixer --allow-risky=yes --diff --dry-run -v fix + run: vendor/bin/php-cs-fixer --diff --dry-run -v fix From 635838701e81de8d4c1898f430729b2a049617e9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 16:10:08 +0900 Subject: [PATCH 285/687] Use composer's script entries so the same parameters are used. --- .github/workflows/static-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index cfffb2fe2..429d83d31 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -49,7 +49,7 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Run static analysis - PHPStan - run: vendor/bin/phpstan --level=5 analyse src + run: composer phpstan - name: Run static analysis - Psalm - run: vendor/bin/psalm + run: composer psalm From 2f85f1c217ce6498ff6989e188e6c403e42b472e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 16:55:43 +0900 Subject: [PATCH 286/687] Reverting command for Psalm as for Windows the pcntl extension is required. --- .github/workflows/static-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 429d83d31..ecf85684b 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -52,4 +52,4 @@ jobs: run: composer phpstan - name: Run static analysis - Psalm - run: composer psalm + run: vendor/bin/psalm From 30ae9f4481623319932780e5200b82f8d1b8738f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Sep 2021 17:34:45 +0900 Subject: [PATCH 287/687] Create SECURITY.md --- SECURITY.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..06417ba6e --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,27 @@ +# Security Policy + +## Supported Versions + +Please refer to the below table for the supported versions of Yasumi. + +| Version | Supported | +| ------- | ------------------ | +| 2.4 | :white_check_mark: | +| < 2.3 | :x: | +| < 1.8 | :x: | + +As for supported PHP versions, Yasumi supports only the actively supported versions of PHP. Currently that is PHP 7.3, 7.4 and 8.0. Please refer to the [supported versions](https://www.php.net/supported-versions.php) page, +to find more details. When a version of PHP becomes EOL, generally a new release of Yasumi will be issued that sunsets the support of that retired PHP version. + +## Reporting a Vulnerability + +If you would like to report a vulnerability or have any security concerns with Yasumi, please [open an issue](https://github.com/azuyalabs/yasumi/issues/new?labels=security). + +To investigate your request as good as possible, please include any of the following when reporting: + +- Proof of concept / Code example +- Any tools, including versions used +- Any relevant output + +I will take all disclosures very seriously and will do my best to rapidly respond and verify the vulnerability before taking the necessary steps to fix it. +After my initial reply to your disclosure, which should be directly after receiving it, I will periodically update you with the status of the fix. From e912bae721ceaedc0e76cce7dc431fd1b436f90c Mon Sep 17 00:00:00 2001 From: barami Date: Tue, 7 Sep 2021 21:31:44 +0900 Subject: [PATCH 288/687] Update CHANGELOG.md (#258) Fix mis type of incorrect PR link --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8d747c22..dde10b54f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,19 +14,19 @@ to [Semantic Versioning](https://semver.org). - New Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) - The Korea Tourism Organization's holiday guide link was added to the source of SouthKorea - Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) + Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. ### Changed - Revised rules to calculate substitution holidays of SouthKorea to apply the newly enacted law on June - 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) + 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Separate `calculateSubstituteHolidays` method of SouthKorea Provider to `calculateSubstituteHolidays` and `calculateOldSubstituteHolidays` - . [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) + . [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Refactored the tests of SouthKorea provider to testing substitution - holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/253) ([barami](https://github.com/barami)) + holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. - `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. From 91d79bcd587725a6ce04bde6f9860175de05eba0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 8 Sep 2021 23:14:51 +0900 Subject: [PATCH 289/687] Upgraded PHP CS Fixer to v3 Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8168b3451..2bb9c0136 100755 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", + "friendsofphp/php-cs-fixer": "^v3.1.0", "infection/infection": "^0.17 | ^0.23", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", From b369989f2d2956804f4ecc68d1e98ae26ea62cdd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 8 Sep 2021 23:27:03 +0900 Subject: [PATCH 290/687] Reducing OS to just Linux as the Mutation test is resource heavy. This will reduce the CI pipeline time. Signed-off-by: Sacha Telgenhof --- .github/workflows/mutation-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index 3e4fb3eee..6f1b67be8 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] + operating-system: [ ubuntu-latest ] php-versions: [ '7.3', '7.4', '8.0' ] steps: From 9528ad1d86470b63cca5038c9342d32f282dfda0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 8 Sep 2021 23:32:00 +0900 Subject: [PATCH 291/687] Removed older version requirement of PHP Infection. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2bb9c0136..e97d947d1 100755 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^v3.1.0", - "infection/infection": "^0.17 | ^0.23", + "infection/infection": "^0.23", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", "phpstan/phpstan": "^0.12", From e3edeb5c90a189d04711dbc34d9fc28edcf486b5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 8 Sep 2021 23:44:23 +0900 Subject: [PATCH 292/687] Reverted PHP CS Fixer as the latest Infection package is PHP7.4 or higher, andwould have lower-level dependency conflicts. Signed-off-by: Sacha Telgenhof --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e97d947d1..1357135e4 100755 --- a/composer.json +++ b/composer.json @@ -40,8 +40,8 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.1.0", - "infection/infection": "^0.23", + "friendsofphp/php-cs-fixer": "^2.19", + "infection/infection": "^0.17 | ^0.25", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", "phpstan/phpstan": "^0.12", From 3f99c2c7135c2be5bf4ecbcdb453fdf610eb9bc9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 4 Oct 2021 23:21:31 +0900 Subject: [PATCH 293/687] Simplified some boolean conditions. Removed unnecessary phpdoc comments. Use of DateTimeInterface instead of concrete DateTime objects. Added missing return type for closures. Check object type rather than nil. Use spaceship operator instead of multiple checks. --- src/Yasumi/Holiday.php | 2 -- src/Yasumi/Provider/AbstractProvider.php | 25 +++++-------------- .../Australia/Tasmania/CentralNorth.php | 4 +-- src/Yasumi/Provider/ChristianHolidays.php | 8 +++--- src/Yasumi/Provider/Georgia.php | 4 ++- src/Yasumi/Provider/Greece.php | 4 ++- src/Yasumi/Provider/Romania.php | 4 ++- src/Yasumi/Provider/SouthKorea.php | 4 +-- src/Yasumi/Provider/Ukraine.php | 4 ++- src/Yasumi/Yasumi.php | 2 +- tests/YasumiBase.php | 2 +- 11 files changed, 27 insertions(+), 36 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 9a4b1364d..310d2cacb 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -175,8 +175,6 @@ public function getType(): string /** * Serializes the object to a value that can be serialized natively by json_encode(). - * - * @return $this */ public function jsonSerialize(): self { diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 4835125d7..18c5fa634 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -169,11 +169,7 @@ public function isWorkingDay(\DateTimeInterface $date): bool public function isHoliday(\DateTimeInterface $date): bool { // Check if given date is a holiday or not - if (\in_array($date->format('Y-m-d'), array_values($this->getHolidayDates()), true)) { - return true; - } - - return false; + return \in_array($date->format('Y-m-d'), $this->getHolidayDates(), true); } /** @@ -189,16 +185,11 @@ public function isHoliday(\DateTimeInterface $date): bool public function isWeekendDay(\DateTimeInterface $date): bool { // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. - if (\in_array( + return \in_array( (int) $date->format('w'), static::WEEKEND_DATA[$this::ID] ?? [0, 6], true - ) - ) { - return true; - } - - return false; + ); } /** @@ -244,7 +235,7 @@ public function whatWeekDayIs(string $key): int */ public function count(): int { - $names = array_map(static function ($holiday) { + $names = array_map(static function ($holiday): string { if ($holiday instanceof SubstituteHoliday) { return $holiday->getSubstitutedHoliday()->getKey(); } @@ -392,7 +383,7 @@ public function on(\DateTimeInterface $date): OnFilter */ protected function getHolidayDates(): array { - return array_map(static function ($holiday) { + return array_map(static function ($holiday): string { return (string) $holiday; }, $this->holidays); } @@ -451,11 +442,7 @@ private function isHolidayKeyNotEmpty(string $key): bool */ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterface $dateB): int { - if ($dateA === $dateB) { - return 0; - } - - return $dateA < $dateB ? -1 : 1; + return $dateA <=> $dateB; } /** diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 4e92bec76..d5a397f26 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -56,8 +56,6 @@ private function calculateDevonportShow(): void $date = new DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); - if ($date instanceof \DateTimeInterface) { - $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); - } + $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index dd1a217e9..012e1c2aa 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -258,14 +258,14 @@ protected function stGeorgesDay( * @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|\DateTimeImmutable date of Orthodox Easter * * @throws \Exception * * @see https://en.wikipedia.org/wiki/Computus#Meeus.27s_Julian_algorithm * @see https://www.php.net/manual/en/function.easter-date.php#83794 */ - protected function calculateOrthodoxEaster(int $year, string $timezone): DateTime + protected function calculateOrthodoxEaster(int $year, string $timezone): \DateTimeInterface { $a = $year % 4; $b = $year % 7; @@ -334,7 +334,7 @@ protected function reformationDay( * @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|\DateTimeImmutable date of Easter * * @throws \Exception * @@ -343,7 +343,7 @@ protected function reformationDay( * @see http://www.gmarts.org/index.php?go=415#EasterMallen * @see https://www.tondering.dk/claus/cal/easter.php */ - protected function calculateEaster(int $year, string $timezone): DateTime + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { if (\extension_loaded('calendar')) { $easterDays = easter_days($year); diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 033afab58..a4735834f 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -74,8 +74,10 @@ public function getSources(): array /** * @throws \Exception + * + * @return \DateTime|\DateTimeImmutable */ - protected function calculateEaster(int $year, string $timezone): \DateTime + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index b3ebcbd02..fa4b32336 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -130,8 +130,10 @@ private function calculateCleanMonday(): void * Orthodox Easter. * * @throws \Exception + * + * @return \DateTime|\DateTimeImmutable */ - private function calculateEaster(int $year, string $timezone): DateTime + private function calculateEaster(int $year, string $timezone): \DateTimeInterface { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index bd207175d..9742704be 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -86,8 +86,10 @@ public function getSources(): array /** * @throws \Exception + * + * @return \DateTime|\DateTimeImmutable */ - protected function calculateEaster(int $year, string $timezone): DateTime + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 25f2d54e5..4756fc9a2 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -564,7 +564,7 @@ private function calculateSubstituteHolidays(): void continue; } - if (null === $holiday) { + if (!$holiday instanceof Holiday) { continue; } @@ -617,7 +617,7 @@ private function nextWorkingDay(DateTime $date): DateTime */ private function addSubstituteHoliday(?Holiday $origin, string $date_str): void { - if (null === $origin) { + if (!$origin instanceof Holiday) { return; } diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 293603e4e..7bcf84c72 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -115,8 +115,10 @@ public function addHoliday(Holiday $holiday, bool $substitutable = true): void /** * @throws \Exception + * + * @return \DateTime|\DateTimeImmutable */ - protected function calculateEaster(int $year, string $timezone): \DateTime + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { return $this->calculateOrthodoxEaster($year, $timezone); } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 1c27b2c05..689f496c6 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -199,7 +199,7 @@ public static function createByISO3166_2( ): ProviderInterface { $availableProviders = self::getProviders(); - if (false === isset($availableProviders[$isoCode])) { + if (!isset($availableProviders[$isoCode])) { throw new ProviderNotFoundException(sprintf('Unable to find holiday provider by ISO3166-2 "%s".', $isoCode)); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index ffa9bcaa2..7890ea08c 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -643,7 +643,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now * @see http://www.gmarts.org/index.php?go=415#EasterMallen * @see http://www.tondering.dk/claus/cal/easter.php */ - protected function calculateEaster(int $year, string $timezone): DateTime + protected function calculateEaster(int $year, string $timezone): DateTimeInterface { if (\extension_loaded('calendar')) { $easter_days = easter_days($year); From 52c9c59347a48dadbaa180f2d3c1ccb2dda3ca36 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 4 Oct 2021 23:58:01 +0900 Subject: [PATCH 294/687] Fixed test that was using incorrect holiday key. --- tests/SouthKorea/ChildrensDayTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 4392559a4..793e4e1ba 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -71,9 +71,10 @@ public function testSubstituteHolidayByBuddhasBirthday(): void $year, new DateTime("$year-5-5", $tz) ); + $this->assertSubstituteHoliday( self::REGION, - self::HOLIDAY, + 'buddhasBirthday', $year, new DateTime("$year-5-6", $tz) ); From 64ab366c4e86fa963db3e1ec351ce72a0ff189f5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Oct 2021 00:42:19 +0900 Subject: [PATCH 295/687] Added World Children's Day for Thuringia (Germany). Reformatting CHANGELOG.md --- CHANGELOG.md | 15 +-- src/Yasumi/Provider/Germany/Thuringia.php | 25 ++++ tests/Germany/Thuringia/ThuringiaTest.php | 4 + .../Thuringia/WorldChildrensDayTest.php | 116 ++++++++++++++++++ 4 files changed, 153 insertions(+), 7 deletions(-) create mode 100644 tests/Germany/Thuringia/WorldChildrensDayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index dde10b54f..6d2eccb83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,23 +9,24 @@ to [Semantic Versioning](https://semver.org). ### Added +- World Children's Day for Thuringia (Germany) [\#260](https://github.com/azuyalabs/yasumi/issues/260) - New National Day for Truth and Reconciliation to Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)) - New Juneteenth National Independence Day to USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) -- The Korea Tourism Organization's holiday guide link was added to the source of SouthKorea +- The Korea Tourism Organization's holiday guide link was added to the source of South Korea Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - All providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. ### Changed -- Revised rules to calculate substitution holidays of SouthKorea to apply the newly enacted law on June +- Revised rules to calculate substitution holidays of South Korea to apply the newly enacted law on June 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) -- Separate `calculateSubstituteHolidays` method of SouthKorea Provider to `calculateSubstituteHolidays` +- Separate `calculateSubstituteHolidays` method of South Korea Provider to `calculateSubstituteHolidays` and `calculateOldSubstituteHolidays` . [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) -- Refactored the tests of SouthKorea provider to testing substitution +- Refactored the tests of South Korea provider to testing substitution holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. - `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` @@ -143,7 +144,7 @@ to [Semantic Versioning](https://semver.org). holiday since 2020 in Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) - Second International Workers' Day in Ukraine was an official holiday only until - 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) + 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) - Holiday names in Danish, Dutch, and Norwegian are no longer capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) @@ -263,14 +264,14 @@ to [Semantic Versioning](https://semver.org). - As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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)) + 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/pull/129) ([cookie-maker](https://github.com/cookie-maker)) + 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 diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index c0c7c5d3f..bb73700b5 100755 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -16,6 +16,8 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\Provider\DateTimeZoneFactory; use Yasumi\Provider\Germany; /** @@ -50,6 +52,9 @@ public function initialize(): void // Add custom Christian holidays $this->calculateReformationDay(); + + // Other holidays + $this->calculateWorldChildrensDay(); } /** @@ -69,4 +74,24 @@ private function calculateReformationDay(): void $this->addHoliday($this->reformationDay($this->year, $this->timezone, $this->locale)); } + + /** + * For the German state of Thuringia, World Childrens's Day is celebrated since 2019. + * + * @throws \Exception + */ + private function calculateWorldChildrensDay(): void + { + if ($this->year < 2019) { + return; + } + + $this->addHoliday(new Holiday( + 'worldChildrensDay', + ['de' => 'Weltkindertag'], + new \DateTimeImmutable(sprintf('%s-09-20', $this->year), DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } } diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index 043dac8b1..d93bad0c3 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -62,6 +62,10 @@ public function testOfficialHolidays(): void $holidays[] = 'reformationDay'; } + if ($this->year >= 2019) { + $holidays[] = 'worldChildrensDay'; + } + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php new file mode 100644 index 000000000..43735502a --- /dev/null +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -0,0 +1,116 @@ + + */ + +namespace Yasumi\tests\Germany\Thuringia; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing World Children's Day in Thuringia (Germany). + */ +class WorldChildrensDayTest extends ThuringiaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'worldChildrensDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 2019; + + /** + * 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(int $year, DateTime $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $data[] = [$year, new DateTime("$year-09-20", new DateTimeZone(self::TIMEZONE))]; + } + + return $data; + } + + /** + * Tests the holiday defined in this test before establishment. + * + * @throws ReflectionException + */ + public function testHolidayBeforeEstablishment(): void + { + $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 => 'Weltkindertag'] + ); + } + + /** + * 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 + ); + } +} From f4a8f47a3bbe3a367d3127dd3de5034431c889cb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Oct 2021 23:45:48 +0900 Subject: [PATCH 296/687] Fronleichnam fix (#259) Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was incorrect and has been changed to `Official`. --- CHANGELOG.md | 2 ++ .../Provider/Germany/BadenWurttemberg.php | 6 +++--- src/Yasumi/Provider/Germany/Bavaria.php | 8 +++---- src/Yasumi/Provider/Germany/Hesse.php | 3 ++- .../Provider/Germany/NorthRhineWestphalia.php | 4 ++-- .../Provider/Germany/RhinelandPalatinate.php | 2 +- src/Yasumi/Provider/Germany/Saarland.php | 2 +- .../BadenWurttemberg/BadenWurttembergTest.php | 3 ++- .../BadenWurttemberg/CorpusChristiTest.php | 21 ++++++++----------- tests/Germany/Bavaria/BavariaTest.php | 3 ++- tests/Germany/Bavaria/CorpusChristiTest.php | 21 ++++++++----------- tests/Germany/Hesse/CorpusChristiTest.php | 21 ++++++++----------- tests/Germany/Hesse/HesseTest.php | 3 ++- .../CorpusChristiTest.php | 21 ++++++++----------- .../NorthRhineWestphaliaTest.php | 3 ++- .../RhinelandPalatinate/CorpusChristiTest.php | 21 ++++++++----------- .../RhinelandPalatinateTest.php | 3 ++- tests/Germany/Saarland/CorpusChristiTest.php | 21 ++++++++----------- tests/Germany/Saarland/SaarlandTest.php | 2 +- 19 files changed, 79 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d2eccb83..5316ee0b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ to [Semantic Versioning](https://semver.org). ### Fixed +- Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was incorrect + and has been changed to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252) - The test for the USA in that juneteenthDay was considered for all years: it is only celebrated since 2021. - Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)) diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 0d75f0788..d0f7f7153 100755 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -22,8 +22,8 @@ /** * Provider for all holidays in Baden-Württemberg (Germany). * - * Baden-Württemberg is a state in Germany located in the southwest, east of the Upper Rhine. It is Germany’s third - * largest state in terms of size and population, with an area of 36,410 square kilometres (14,060 sq mi) and 10.7 + * Baden-Württemberg is a state in Germany located in the southwest, east of the Upper Rhine. It is Germany’s + * third-largest state in terms of size and population, with an area of 36,410 square kilometres (14,060 sq mi) and 10.7 * million inhabitants. The state capital and largest city is Stuttgart. * * @see https://en.wikipedia.org/wiki/Baden-W%C3%BCrttemberg @@ -50,7 +50,7 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); - $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->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index 9f072e640..42d63b679 100755 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -24,8 +24,8 @@ * * Bavaria is a federal state of Germany. In the southeast of the country with an area of 70,548 square kilometres * (27,200 sq mi), it is the largest state, making up almost a fifth of the total land area of Germany, and, with 12.6 - * million inhabitants, Germany's second most populous state. Munich, Bavaria's capital and largest city, is the third - * largest city in Germany. + * million inhabitants, Germany's second most populous state. Munich, Bavaria's capital and largest city, is the + * third-largest city in Germany. * * @see https://en.wikipedia.org/wiki/Bavaria */ @@ -38,8 +38,6 @@ class Bavaria extends Germany public const ID = 'DE-BY'; /** - * Initialize holidays for Bavaria (Germany). - * * @throws InvalidDateException * @throws \InvalidArgumentException * @throws UnknownLocaleException @@ -51,7 +49,7 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); - $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->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Germany/Hesse.php b/src/Yasumi/Provider/Germany/Hesse.php index 12016d4f0..d0ac3f27f 100755 --- a/src/Yasumi/Provider/Germany/Hesse.php +++ b/src/Yasumi/Provider/Germany/Hesse.php @@ -16,6 +16,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; use Yasumi\Provider\Germany; /** @@ -50,6 +51,6 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); } } diff --git a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php index 0a13ec6f7..8e8e8d7ea 100755 --- a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php +++ b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php @@ -23,7 +23,7 @@ * Provider for all holidays in North Rhine-Westphalia (Germany). * * North Rhine-Westphalia (German: Nordrhein-Westfalen), commonly shortened NRW) is the most populous state of Germany, - * with a population of approximately 18 million, and the fourth largest by area. Its capital is Düsseldorf; the biggest + * with a population of approximately 18 million, and the fourth-largest by area. Its capital is Düsseldorf; the biggest * city is Cologne. Four of Germany's ten biggest cities—Cologne, Düsseldorf, Dortmund, and Essen—are located within the * state, as well as the biggest metropolitan area of the European continent, Rhine-Ruhr. * @@ -50,7 +50,7 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $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->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php index aae8dec16..86bd8002e 100755 --- a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php +++ b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php @@ -49,7 +49,7 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $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->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Germany/Saarland.php b/src/Yasumi/Provider/Germany/Saarland.php index 6ebd485de..b09ffbf66 100755 --- a/src/Yasumi/Provider/Germany/Saarland.php +++ b/src/Yasumi/Provider/Germany/Saarland.php @@ -50,7 +50,7 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $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->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 84e3ee0ee..16319a9b4 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -50,6 +50,7 @@ public function testOfficialHolidays(): void 'internationalWorkersDay', 'ascensionDay', 'pentecostMonday', + 'corpusChristi', 'germanUnityDay', 'christmasDay', 'secondChristmasDay', @@ -94,7 +95,7 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - ['epiphany', 'corpusChristi', 'allSaintsDay'], + ['epiphany', 'allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index 393df3970..e8ad00fb6 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -14,44 +14,41 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; -use DateInterval; use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Corpus Christi in Baden-Württemberg (Germany). + * Class for testing Corpus Christi ('Fronleichnam') in Baden-Württemberg (Germany). */ class CorpusChristiTest extends BadenWurttembergBaseTestCase implements HolidayTestCase { - use ChristianHolidays; - /** - * The name of the holiday. + * The name of the holiday to be tested. */ public const HOLIDAY = 'corpusChristi'; /** - * Tests Corpus Christi. + * Tests the holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi(): void + public function testHoliday(): void { - $year = 2016; + $year = $this->generateRandomYear(); + $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** - * Tests translated name of the holiday defined in this test. + * Tests the translated name of the holiday defined in this test. * * @throws ReflectionException */ @@ -72,6 +69,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/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index eaff104be..d003a8094 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -49,6 +49,7 @@ public function testOfficialHolidays(): void 'easterMonday', 'internationalWorkersDay', 'ascensionDay', + 'corpusChristi', 'pentecostMonday', 'germanUnityDay', 'christmasDay', @@ -94,7 +95,7 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - ['epiphany', 'corpusChristi', 'allSaintsDay'], + ['epiphany', 'allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index 6609bedb5..c84ca39a4 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -14,44 +14,41 @@ namespace Yasumi\tests\Germany\Bavaria; -use DateInterval; use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Corpus Christi in Bavaria (Germany). + * Class for testing Corpus Christi ('Fronleichnam') in Bavaria (Germany). */ class CorpusChristiTest extends BavariaBaseTestCase implements HolidayTestCase { - use ChristianHolidays; - /** - * The name of the holiday. + * The name of the holiday to be tested. */ public const HOLIDAY = 'corpusChristi'; /** - * Tests Corpus Christi. + * Tests the holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi(): void + public function testHoliday(): void { - $year = 2016; + $year = $this->generateRandomYear(); + $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** - * Tests translated name of the holiday defined in this test. + * Tests the translated name of the holiday defined in this test. * * @throws ReflectionException */ @@ -72,6 +69,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/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index 2c01f08fa..e2cdd6b8d 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -14,44 +14,41 @@ namespace Yasumi\tests\Germany\Hesse; -use DateInterval; use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Corpus Christi in Hesse (Germany). + * Class for testing Corpus Christi ('Fronleichnam') in Hesse (Germany). */ class CorpusChristiTest extends HesseBaseTestCase implements HolidayTestCase { - use ChristianHolidays; - /** - * The name of the holiday. + * The name of the holiday to be tested. */ public const HOLIDAY = 'corpusChristi'; /** - * Tests Corpus Christi. + * Tests the holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi(): void + public function testHoliday(): void { - $year = 2016; + $year = $this->generateRandomYear(); + $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** - * Tests translated name of the holiday defined in this test. + * Tests the translated name of the holiday defined in this test. * * @throws ReflectionException */ @@ -72,6 +69,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/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index c36cab33f..8375fd20c 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -49,6 +49,7 @@ public function testOfficialHolidays(): void 'easterMonday', 'internationalWorkersDay', 'ascensionDay', + 'corpusChristi', 'pentecostMonday', 'germanUnityDay', 'christmasDay', @@ -93,7 +94,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); } /** diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index ca5735bb1..319279967 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -14,44 +14,41 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; -use DateInterval; use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Corpus Christi in North Rhine-Westphalia (Germany). + * Class for testing Corpus Christi ('Fronleichnam') in North Rhine-Westphalia (Germany). */ class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements HolidayTestCase { - use ChristianHolidays; - /** - * The name of the holiday. + * The name of the holiday to be tested. */ public const HOLIDAY = 'corpusChristi'; /** - * Tests Corpus Christi. + * Tests the holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi(): void + public function testHoliday(): void { - $year = 2016; + $year = $this->generateRandomYear(); + $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** - * Tests translated name of the holiday defined in this test. + * Tests the translated name of the holiday defined in this test. * * @throws ReflectionException */ @@ -72,6 +69,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/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index b5467a6fa..3c134a0f4 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -49,6 +49,7 @@ public function testOfficialHolidays(): void 'easterMonday', 'internationalWorkersDay', 'ascensionDay', + 'corpusChristi', 'pentecostMonday', 'germanUnityDay', 'christmasDay', @@ -93,7 +94,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays(['corpusChristi', 'allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays(['allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index 9777900f0..595202bd9 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -14,44 +14,41 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; -use DateInterval; use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Corpus Christi in Rhineland Palatinate (Germany). + * Class for testing Corpus Christi ('Fronleichnam') in Rhineland Palatinate (Germany). */ class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements HolidayTestCase { - use ChristianHolidays; - /** - * The name of the holiday. + * The name of the holiday to be tested. */ public const HOLIDAY = 'corpusChristi'; /** - * Tests Corpus Christi. + * Tests the holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi(): void + public function testHoliday(): void { - $year = 2016; + $year = $this->generateRandomYear(); + $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** - * Tests translated name of the holiday defined in this test. + * Tests the translated name of the holiday defined in this test. * * @throws ReflectionException */ @@ -72,6 +69,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/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index 09f6af8f5..6d3125c61 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -49,6 +49,7 @@ public function testOfficialHolidays(): void 'easterMonday', 'internationalWorkersDay', 'ascensionDay', + 'corpusChristi', 'pentecostMonday', 'germanUnityDay', 'christmasDay', @@ -93,7 +94,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays(['corpusChristi', 'allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays(['allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index b5762951d..8111053c7 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -14,44 +14,41 @@ namespace Yasumi\tests\Germany\Saarland; -use DateInterval; use Exception; use ReflectionException; use Yasumi\Holiday; -use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Corpus Christi in Saarland (Germany). + * Class for testing Corpus Christi ('Fronleichnam') in Saarland (Germany). */ class CorpusChristiTest extends SaarlandBaseTestCase implements HolidayTestCase { - use ChristianHolidays; - /** - * The name of the holiday. + * The name of the holiday to be tested. */ public const HOLIDAY = 'corpusChristi'; /** - * Tests Corpus Christi. + * Tests the holiday defined in this test. * * @throws Exception * @throws ReflectionException */ - public function testCorpusChristi(): void + public function testHoliday(): void { - $year = 2016; + $year = $this->generateRandomYear(); + $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** - * Tests translated name of the holiday defined in this test. + * Tests the translated name of the holiday defined in this test. * * @throws ReflectionException */ @@ -72,6 +69,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/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index ed31dbd90..fbfb75f7c 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -49,6 +49,7 @@ public function testOfficialHolidays(): void 'easterMonday', 'internationalWorkersDay', 'ascensionDay', + 'corpusChristi', 'pentecostMonday', 'germanUnityDay', 'christmasDay', @@ -94,7 +95,6 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays([ - 'corpusChristi', 'assumptionOfMary', 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); From 20248d5334f638cfb87badbd49145d67ae68c643 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 6 Oct 2021 00:32:25 +0900 Subject: [PATCH 297/687] Upgraded PHP CS Fixer to v3. --- CHANGELOG.md | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5316ee0b5..bd5ada1a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ to [Semantic Versioning](https://semver.org). - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. - `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. +- Upgraded PHP CS Fixer to v3. ### Fixed diff --git a/composer.json b/composer.json index 1357135e4..db3d6c873 100755 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", + "friendsofphp/php-cs-fixer": "v3.2", "infection/infection": "^0.17 | ^0.25", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", From d78d4d12b2cb64e19af4c82740cc38cbaf5d5d97 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 6 Oct 2021 00:32:44 +0900 Subject: [PATCH 298/687] CS Updates. --- src/Yasumi/Translations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index ca02885bf..fe0f54654 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -25,7 +25,7 @@ class Translations implements TranslationsInterface { /** - * @var array translations array: ['' => ['' => 'translation', ...], ... ] + * @var array translations array: ['' => ['' => 'translation', ...], ... ] */ public $translations = []; From a90cb3df883dad0c208b994c67ceee28170bf743 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 6 Oct 2021 00:43:09 +0900 Subject: [PATCH 299/687] Use correct directive type. --- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index bb73700b5..9851d54de 100755 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -89,7 +89,7 @@ private function calculateWorldChildrensDay(): void $this->addHoliday(new Holiday( 'worldChildrensDay', ['de' => 'Weltkindertag'], - new \DateTimeImmutable(sprintf('%s-09-20', $this->year), DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTimeImmutable(sprintf('%d-09-20', $this->year), DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); From ce1a5a2c92764496792f5000de74bd4247897a74 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 6 Oct 2021 00:44:26 +0900 Subject: [PATCH 300/687] Spelling fixes. --- src/Yasumi/Provider/Germany/Thuringia.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index 9851d54de..d086f7ce9 100755 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -24,8 +24,8 @@ * Provider for all holidays in Thuringia (Germany). * * The Free State of Thuringia is a federal state of Germany, located in the central part of the country. It has an area - * of 16,171 square kilometres (6,244 sq mi) and 2.29 million inhabitants, making it the sixth smallest by area and the - * fifth smallest by population of Germany's sixteen states. Most of Thuringia is within the watershed of the Saale, a + * of 16,171 square kilometres (6,244 sq mi) and 2.29 million inhabitants, making it the sixth-smallest by area and the + * fifth-smallest by population of Germany's sixteen states. Most of Thuringia is within the watershed of the Saale, a * left tributary of the Elbe. Its capital is Erfurt. * * @see https://en.wikipedia.org/wiki/Thuringia @@ -76,7 +76,7 @@ private function calculateReformationDay(): void } /** - * For the German state of Thuringia, World Childrens's Day is celebrated since 2019. + * For the German state of Thuringia, World Children's Day is celebrated since 2019. * * @throws \Exception */ From ea88b27088de5fb1b0227482fda316c5fc5a8085 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 11 Oct 2021 22:16:33 +0900 Subject: [PATCH 301/687] Allow to use PHP CS Fixer v2.19. Using v3.2 causes dependency conflicts with the infection package on PHP7.3 Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index db3d6c873..fd12163c2 100755 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v3.2", + "friendsofphp/php-cs-fixer": "v2.19 | v3.2", "infection/infection": "^0.17 | ^0.25", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", From 03c3b8bf78fefc799044aeae6f83c73c550387dd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 11 Oct 2021 22:29:07 +0900 Subject: [PATCH 302/687] Corrected syntax of the inheritdoc inline tag. --- 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 18c5fa634..a8e840b57 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -266,7 +266,7 @@ public function getHolidayNames(): array return array_keys($this->holidays); } - /** @inheritdoc */ + /** {@inheritdoc} */ public function getYear(): int { return $this->year; From c6656f59badbf236624b86b4e1de0d7debecfcd9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 1 Nov 2021 23:14:33 +0900 Subject: [PATCH 303/687] All Saints Day (German: 'AllerHeiligen') was classified as `Other` for states celebrating this day. This was incorrect (or officially changed) and has been altered to `Official` --- CHANGELOG.md | 8 ++++++-- src/Yasumi/Provider/Germany/BadenWurttemberg.php | 2 +- src/Yasumi/Provider/Germany/Bavaria.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/Provider/Germany/RhinelandPalatinate.php | 2 +- src/Yasumi/Provider/Germany/Saarland.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 4 ++-- tests/Germany/BadenWurttemberg/BadenWurttembergTest.php | 3 ++- tests/Germany/Bavaria/AllSaintsDayTest.php | 4 ++-- tests/Germany/Bavaria/BavariaTest.php | 3 ++- tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 4 ++-- .../NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 3 ++- tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php | 5 +++-- .../RhinelandPalatinate/RhinelandPalatinateTest.php | 3 ++- tests/Germany/Saarland/AllSaintsDayTest.php | 4 ++-- tests/Germany/Saarland/SaarlandTest.php | 6 ++---- 16 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd5ada1a5..f24244b7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,8 +35,12 @@ to [Semantic Versioning](https://semver.org). ### Fixed -- Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was incorrect - and has been changed to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252) +- All Saints Day (German: 'AllerHeiligen') was classified as `Other` for states celebrating this day. This was + incorrect (or officially changed) and has been altered to `Official` + . [\#263](https://github.com/azuyalabs/yasumi/issues/263) +- Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was + incorrect (or officially changed) + and has been altered to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252) - The test for the USA in that juneteenthDay was considered for all years: it is only celebrated since 2021. - Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)) diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index d0f7f7153..8b70f5067 100755 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -51,6 +51,6 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); - $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index 42d63b679..9fe50cf16 100755 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -50,6 +50,6 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); - $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php index 8e8e8d7ea..a267af82e 100755 --- a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php +++ b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php @@ -51,6 +51,6 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); - $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php index 86bd8002e..41084b737 100755 --- a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php +++ b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php @@ -50,6 +50,6 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); - $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany/Saarland.php b/src/Yasumi/Provider/Germany/Saarland.php index b09ffbf66..9426fdf1d 100755 --- a/src/Yasumi/Provider/Germany/Saarland.php +++ b/src/Yasumi/Provider/Germany/Saarland.php @@ -51,7 +51,7 @@ public function initialize(): void // Add custom Christian holidays $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); - $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index b7b4fad86..bda603236 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -79,6 +79,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/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 16319a9b4..662951efa 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -54,6 +54,7 @@ public function testOfficialHolidays(): void 'germanUnityDay', 'christmasDay', 'secondChristmasDay', + 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -95,7 +96,7 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - ['epiphany', 'allSaintsDay'], + ['epiphany'], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index e83c09311..8fd51eff7 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -79,6 +79,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/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index d003a8094..cf4d0fe94 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -54,6 +54,7 @@ public function testOfficialHolidays(): void 'germanUnityDay', 'christmasDay', 'secondChristmasDay', + 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -95,7 +96,7 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - ['epiphany', 'allSaintsDay'], + ['epiphany'], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index 6d9d6b127..d7ea26f21 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -79,6 +79,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/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index 3c134a0f4..aaaf49631 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -54,6 +54,7 @@ public function testOfficialHolidays(): void 'germanUnityDay', 'christmasDay', 'secondChristmasDay', + 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -94,7 +95,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays(['allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index 5723af26a..63b9a5ab5 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -14,6 +14,7 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; +use Cassandra\Date; use DateTime; use Exception; use ReflectionException; @@ -48,7 +49,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -79,6 +80,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/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index 6d3125c61..512aa0dfe 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -54,6 +54,7 @@ public function testOfficialHolidays(): void 'germanUnityDay', 'christmasDay', 'secondChristmasDay', + 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -94,7 +95,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays(['allSaintsDay'], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index 942e0243d..95f95a7da 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -79,6 +79,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/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index fbfb75f7c..6434ae374 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -54,6 +54,7 @@ public function testOfficialHolidays(): void 'germanUnityDay', 'christmasDay', 'secondChristmasDay', + 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -94,10 +95,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([ - 'assumptionOfMary', - 'allSaintsDay', - ], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays(['assumptionOfMary'], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** From f612e46cea7d465d24f26453860d04692e5c27da Mon Sep 17 00:00:00 2001 From: Nader Safadi Date: Thu, 23 Dec 2021 17:42:48 +0200 Subject: [PATCH 304/687] Create Argentinian holidays provider. (#264) Added Argentinian holidays provider. --- src/Yasumi/Provider/Argentina.php | 367 ++++++++++++++++++ src/Yasumi/data/translations/easter.php | 1 + tests/Argentina/ArgentinaBaseTestCase.php | 41 ++ tests/Argentina/ArgentinaTest.php | 91 +++++ tests/Argentina/CarnavalMondayTest.php | 90 +++++ tests/Argentina/CarnavalTuesdayTest.php | 90 +++++ tests/Argentina/ChristmasDayTest.php | 75 ++++ tests/Argentina/EasterTest.php | 71 ++++ tests/Argentina/FlagDayTest.php | 90 +++++ .../Argentina/GeneralJoseSanMartinDayTest.php | 90 +++++ .../GeneralMartinMigueldeGuemesDayTest.php | 90 +++++ tests/Argentina/GoodFridayTest.php | 77 ++++ .../Argentina/ImmaculateConceptionDayTest.php | 90 +++++ tests/Argentina/IndependenceDayTest.php | 90 +++++ .../Argentina/InternationalWorkersDayTest.php | 75 ++++ tests/Argentina/MalvinasDayTest.php | 90 +++++ tests/Argentina/MayRevolutionTest.php | 90 +++++ .../Argentina/NationalSovereigntyDayTest.php | 90 +++++ tests/Argentina/NewYearsDayTest.php | 75 ++++ tests/Argentina/RaceDayTest.php | 90 +++++ tests/Argentina/RemembranceDayTest.php | 88 +++++ 21 files changed, 1951 insertions(+) create mode 100644 src/Yasumi/Provider/Argentina.php create mode 100644 tests/Argentina/ArgentinaBaseTestCase.php create mode 100644 tests/Argentina/ArgentinaTest.php create mode 100644 tests/Argentina/CarnavalMondayTest.php create mode 100644 tests/Argentina/CarnavalTuesdayTest.php create mode 100644 tests/Argentina/ChristmasDayTest.php create mode 100644 tests/Argentina/EasterTest.php create mode 100644 tests/Argentina/FlagDayTest.php create mode 100644 tests/Argentina/GeneralJoseSanMartinDayTest.php create mode 100644 tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php create mode 100644 tests/Argentina/GoodFridayTest.php create mode 100644 tests/Argentina/ImmaculateConceptionDayTest.php create mode 100644 tests/Argentina/IndependenceDayTest.php create mode 100644 tests/Argentina/InternationalWorkersDayTest.php create mode 100644 tests/Argentina/MalvinasDayTest.php create mode 100644 tests/Argentina/MayRevolutionTest.php create mode 100644 tests/Argentina/NationalSovereigntyDayTest.php create mode 100644 tests/Argentina/NewYearsDayTest.php create mode 100644 tests/Argentina/RaceDayTest.php create mode 100644 tests/Argentina/RemembranceDayTest.php diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php new file mode 100644 index 000000000..6626c90f7 --- /dev/null +++ b/src/Yasumi/Provider/Argentina.php @@ -0,0 +1,367 @@ + + */ + +namespace Yasumi\Provider; + +use DateInterval; +use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Provider for all holidays in Argentina. + */ +class Argentina extends AbstractProvider +{ + use CommonHolidays; + use ChristianHolidays; + + public const PROCLAMATION_OF_INDEPENDENCE_YEAR = 1816; + + /** + * Code to identify this Holiday Provider. Typically, this is the ISO3166 + * code corresponding to the respective country or sub-region. + */ + public const ID = 'AR'; + + /** + * Initialize holidays for Argentina. + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'America/Argentina/Buenos_Aires'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); + + // Add Christian holidays + $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->goodFriday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); + + $this->addCarnvalHolidays(); + $this->addRemembranceDay(); + $this->addMalvinasDay(); + $this->addMayRevolution(); + $this->addGeneralMartinMigueldeGuemesDay(); + $this->addFlagDay(); + $this->addGeneralMartinMigueldeGuemesDay(); + $this->addIndependenceDay(); + $this->addGeneralJoseSanMartinDay(); + $this->addRaceDay(); + $this->addNationalSovereigntyDay(); + $this->addImmaculateConceptionDay(); + } + + /** + * The source of the holidays. + * + * @return string[] + * The source URL + */ + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Argentina', + ]; + } + + /** + * Carnaval. + * + * Carnaval is the biggest popular festival of country. The festival + * happens on Day 48 and 47 before Easter. + * + * @see https://en.wikipedia.org/wiki/Brazilian_Carnival + */ + private function addCarnvalHolidays(): void + { + if ($this->year >= 1700) { + $easter = $this->calculateEaster($this->year, $this->timezone); + + $carnavalMonday = clone $easter; + $carnavalMondayDate = $carnavalMonday->sub(new DateInterval('P48D')); + if (false !== $carnavalMondayDate) { + $this->addHoliday(new Holiday( + 'carnavalMonday', + [ + 'en' => 'Carnival Monday', + 'es' => 'Lunes de Carnaval', + ], + $carnavalMondayDate, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } + + $carnavalTuesday = clone $easter; + $carnavalTuesdayDate = $carnavalTuesday->sub(new DateInterval('P47D')); + if (false !== $carnavalTuesdayDate) { + $this->addHoliday(new Holiday( + 'carnavalTuesday', + [ + 'en' => 'Carnival Tuesday', + 'es' => 'Martes de Carnaval', + ], + $carnavalTuesdayDate, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } + } + } + + /* + * Day of Remembrance for Truth and Justice. + * + * The Day of Remembrance for Truth and Justice (Spanish: Día de la + * Memoria por la Verdad y la Justicia) is a public holiday in + * Argentina, commemorating the victims of the Dirty War. It is held on + * 24 March, the anniversary of the coup d'état of 1976 that brought the + * National Reorganization Process to power. + * + * @link https://en.wikipedia.org/wiki/Day_of_Remembrance_for_Truth_and_Justice + */ + private function addRemembranceDay(): void + { + if ($this->year >= 2006) { + $this->addHoliday(new Holiday( + 'remembranceDay', + [ + 'en' => 'Day of Remembrance for Truth and Justice', + 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', + ], + new DateTime("$this->year-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * Malvinas Day. + * + * Malvinas Day (Spanish: Día de las Malvinas), officially Day of the + * Veterans and Fallen of the Malvinas War (Día del Veterano y de los + * Caídos en la Guerra de las Malvinas), is a public holiday in + * Argentina, observed each year on 2 April.[1] The name refers to the + * Malvinas Islands, known in Spanish as the Islas Malvinas. + * + * @link https://en.wikipedia.org/wiki/Malvinas_Day + */ + private function addMalvinasDay(): void + { + if ($this->year >= 1982) { + $this->addHoliday(new Holiday( + 'malvinasDay', + [ + 'en' => 'Malvinas Day', + 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', + ], + new DateTime("$this->year-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * First National Government. + * + * The Anniversary of the First National Government + * (Spanish: Primer gobierno patrio) is a public holiday of Argentina, + * commemorating the May Revolution and the creation of the Primera + * Junta on May 25, 1810, which is considered the first patriotic + * government of Argentina. Along with the 9 July, which commemorates + * the Declaration of Independence, it is considered a National Day of + * Argentina. + * + * @link https://en.wikipedia.org/wiki/First_National_Government + */ + private function addMayRevolution(): void + { + if ($this->year >= 1810) { + $this->addHoliday(new Holiday( + 'mayRevolution', + [ + 'en' => 'May Revolution', + 'es' => 'Día de la Revolución de Mayo', + ], + new DateTime("$this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * Anniversary of the Passing of General Martín Miguel de Güemes. + * + * Anniversary of the death of Martín Miguel de Güemes, general of the + * Argentine War of Independence. + */ + private function addGeneralMartinMigueldeGuemesDay(): void + { + if ($this->year >= 1821) { + $this->addHoliday(new Holiday( + 'generalMartinMigueldeGuemesDay', + [ + 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', + 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', + ], + new DateTime("$this->year-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * General Manuel Belgrano Memorial Day. + * + * Anniversary of the death of Manuel Belgrano, creator of the Flag of + * Argentina. + * + * @link https://en.wikipedia.org/wiki/Flag_Day_(Argentina) + */ + private function addFlagDay(): void + { + if ($this->year >= 1938) { + $this->addHoliday(new Holiday( + 'flagDay', + [ + 'en' => 'General Manuel Belgrano Memorial Day', + 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', + ], + new DateTime("$this->year-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * Independence Day. + * + * Anniversary of the Declaration of Independence in 1816. + * + * @link https://en.wikipedia.org/wiki/Argentine_Declaration_of_Independence + */ + private function addIndependenceDay(): void + { + if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { + $this->addHoliday(new Holiday( + 'independenceDay', + [ + 'en' => 'Independence Day', + 'es' => 'Día de la Independencia', + ], + new DateTime("$this->year-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * General José de San Martín Memorial Day. + * + * Anniversary of the death of José de San Martín, liberator of + * Argentina, Chile and Peru. + */ + private function addGeneralJoseSanMartinDay(): void + { + if ($this->year >= 1850) { + $this->addHoliday(new Holiday( + 'generalJoseSanMartinDay', + [ + 'en' => 'General José de San Martín Memorial Day', + 'es' => 'Paso a la Inmortalidad del General José de San Martín', + ], + new DateTime("$this->year-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * Day of Respect for Cultural Diversity. + * + * Former "Día de la raza" (English: Race day), anniversary of the + * arrival of Columbus to the Americas. + * + * @link https://en.wikipedia.org/wiki/Columbus_Day + */ + private function addRaceDay(): void + { + if ($this->year >= 1492) { + $this->addHoliday(new Holiday( + 'raceDay', + [ + 'en' => 'Day of Respect for Cultural Diversity', + 'es' => 'Día del Respeto a la Diversidad Cultural', + ], + new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * National Sovereignty Day. + * + * Anniversary of the 1845 Battle of Vuelta de Obligado against the + * Anglo-French blockade of the Río de la Plata. + * + * @link https://en.wikipedia.org/wiki/National_Sovereignty_Day + */ + private function addNationalSovereigntyDay(): void + { + if ($this->year >= 2010) { + $this->addHoliday(new Holiday( + 'nationalSovereigntyDay', + [ + 'en' => 'National Sovereignty Day', + 'es' => 'Día de la Soberanía Nacional', + ], + new DateTime("$this->year-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * Immaculate Conception Day. + * + * Christian holiday, conception of the Virgin Mary free from original + * sin. + * + * @link https://en.wikipedia.org/wiki/Immaculate_Conception + */ + private function addImmaculateConceptionDay(): void + { + if ($this->year >= 1900) { + $this->addHoliday(new Holiday( + 'immaculateConceptionDay', + [ + 'en' => 'Immaculate Conception Day', + 'es' => 'Día de la Inmaculada Concepción de María', + ], + new DateTime("$this->year-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } +} diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index b874d07e1..b449f1c51 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -23,6 +23,7 @@ 'de_CH' => 'Ostern', 'el' => 'Κυριακή του Πάσχα', 'en' => 'Easter Sunday', + 'es' => 'Pascua de Resurrección', 'et' => 'Ülestõusmispühade 1. püha', 'fi' => 'Pääsiäispäivä', 'fr' => 'Pâques', diff --git a/tests/Argentina/ArgentinaBaseTestCase.php b/tests/Argentina/ArgentinaBaseTestCase.php new file mode 100644 index 000000000..5ebcdeb3b --- /dev/null +++ b/tests/Argentina/ArgentinaBaseTestCase.php @@ -0,0 +1,41 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Class ArgentinaBaseTestCase. + */ +abstract class ArgentinaBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Country (name) to be tested. + */ + public const REGION = 'Argentina'; + + /** + * Timezone in which this provider has holidays defined. + */ + public const TIMEZONE = 'America/Argentina/Buenos_Aires'; + + /** + * Locale that is considered common for this provider. + */ + public const LOCALE = 'es'; +} diff --git a/tests/Argentina/ArgentinaTest.php b/tests/Argentina/ArgentinaTest.php new file mode 100644 index 000000000..d629b6657 --- /dev/null +++ b/tests/Argentina/ArgentinaTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\Argentina; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Argentina. + */ +class ArgentinaTest extends ArgentinaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Initial setup of this Test Case. + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1980); + } + + /** + * Tests if all official holidays in Argentina are defined by the provider class. + * + * @throws ReflectionException + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'newYearsDay', + 'internationalWorkersDay', + 'remembranceDay', + 'malvinasDay', + 'mayRevolution', + 'generalMartinMigueldeGuemesDay', + 'flagDay', + 'generalJoseSanMartinDay', + 'raceDay', + 'nationalSovereigntyDay', + 'immaculateConceptionDay', + 'christmasDay', + ]; + + if ($this->year >= Argentina::PROCLAMATION_OF_INDEPENDENCE_YEAR) { + $holidays[] = 'independenceDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Argentina are defined by the provider class. + * + * @throws ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([ + 'carnavalMonday', + 'carnavalTuesday', + 'goodFriday', + 'easter', + ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * @throws ReflectionException + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 1); + } +} diff --git a/tests/Argentina/CarnavalMondayTest.php b/tests/Argentina/CarnavalMondayTest.php new file mode 100644 index 000000000..bd19a4192 --- /dev/null +++ b/tests/Argentina/CarnavalMondayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateInterval; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\ChristianHolidays; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Carnaval Monday in Argentina. + */ +class CarnavalMondayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + use ChristianHolidays; + + /** + * The name of the holiday. + */ + public const HOLIDAY = 'carnavalMonday'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1700; + + /** + * Tests Carnaval Monday on or after 1700. + * + * @throws Exception + * @throws ReflectionException + */ + public function testCarnavalMondayAfter1700(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P48D')) + ); + } + + /** + * Tests Carnaval Monday on or before 1700. + * + * @throws ReflectionException + */ + public function testCarnavalMondayBefore1700(): void + { + $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Lunes de Carnaval']); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Argentina/CarnavalTuesdayTest.php b/tests/Argentina/CarnavalTuesdayTest.php new file mode 100644 index 000000000..cbbf46c77 --- /dev/null +++ b/tests/Argentina/CarnavalTuesdayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateInterval; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\ChristianHolidays; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Carnaval Tuesday in Argentina. + */ +class CarnavalTuesdayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + use ChristianHolidays; + + /** + * The name of the holiday. + */ + public const HOLIDAY = 'carnavalTuesday'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1700; + + /** + * Tests Carnaval Tuesday on or after 1700. + * + * @throws Exception + * @throws ReflectionException + */ + public function testCarnavalTuesdayAfter1700(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P47D')) + ); + } + + /** + * Tests Carnaval Tuesday on or before 1700. + * + * @throws ReflectionException + */ + public function testCarnavalTuesdayBefore1700(): void + { + $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Martes de Carnaval']); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Argentina/ChristmasDayTest.php b/tests/Argentina/ChristmasDayTest.php new file mode 100644 index 000000000..6a22854e7 --- /dev/null +++ b/tests/Argentina/ChristmasDayTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Christmas Day in Argentina. + */ +class ChristmasDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'christmasDay'; + + /** + * Tests Christmas Day. + * + * @throws Exception + * @throws ReflectionException + */ + public function testChristmasDay(): void + { + $year = 1897; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests 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 => 'Navidad'] + ); + } + + /** + * 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/Argentina/EasterTest.php b/tests/Argentina/EasterTest.php new file mode 100644 index 000000000..2cbe3c7a2 --- /dev/null +++ b/tests/Argentina/EasterTest.php @@ -0,0 +1,71 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\ChristianHolidays; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Easter in Argentina. + */ +class EasterTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + use ChristianHolidays; + + /** + * The name of the holiday. + */ + public const HOLIDAY = 'easter'; + + /** + * Tests Easter. + * + * @throws Exception + * @throws ReflectionException + */ + public function testEaster(): void + { + $year = 1948; + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $this->calculateEaster($year, self::TIMEZONE)); + } + + /** + * Tests 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 => 'Pascua de Resurrección'] + ); + } + + /** + * 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/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php new file mode 100644 index 000000000..bc1c4ccb2 --- /dev/null +++ b/tests/Argentina/FlagDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing General Manuel Belgrano Memorial Day (Flag Day) in Argentina. + */ +class FlagDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'flagDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1938; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-06-20", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Paso a la Inmortalidad del General Manuel Belgrano'] + ); + } + + /** + * 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/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php new file mode 100644 index 000000000..fbb1d06c4 --- /dev/null +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing General José de San Martín Memorial Day in Argentina. + */ +class GeneralJoseSanMartinDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'generalJoseSanMartinDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1850; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-08-17", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Paso a la Inmortalidad del General José de San Martín'] + ); + } + + /** + * 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/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php new file mode 100644 index 000000000..d6798d2fb --- /dev/null +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing general Martín Miguel de Güemes Day in Argentina. + */ +class GeneralMartinMigueldeGuemesDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'generalMartinMigueldeGuemesDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1821; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-06-17", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Paso a la Inmortalidad del General Martín Miguel de Güemes'] + ); + } + + /** + * 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/Argentina/GoodFridayTest.php b/tests/Argentina/GoodFridayTest.php new file mode 100644 index 000000000..9a45d5ae8 --- /dev/null +++ b/tests/Argentina/GoodFridayTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateInterval; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\Provider\ChristianHolidays; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Good Friday in Argentina. + */ +class GoodFridayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + use ChristianHolidays; + + /** + * The name of the holiday. + */ + public const HOLIDAY = 'goodFriday'; + + /** + * Tests Good Friday. + * + * @throws Exception + * @throws ReflectionException + */ + public function testGoodFriday(): void + { + $year = 1997; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P2D')) + ); + } + + /** + * Tests 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 => 'Viernes Santo'] + ); + } + + /** + * 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/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php new file mode 100644 index 000000000..e65585810 --- /dev/null +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Proclamation of The Republic Day in Argentina. + */ +class ImmaculateConceptionDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'immaculateConceptionDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1900; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-12-08", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Inmaculada Concepción de María'] + ); + } + + /** + * 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/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php new file mode 100644 index 000000000..a1aec28bd --- /dev/null +++ b/tests/Argentina/IndependenceDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Independence Day in Argentina. + */ +class IndependenceDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'independenceDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1816; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-07-09", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Independencia'] + ); + } + + /** + * 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/Argentina/InternationalWorkersDayTest.php b/tests/Argentina/InternationalWorkersDayTest.php new file mode 100644 index 000000000..59ced3288 --- /dev/null +++ b/tests/Argentina/InternationalWorkersDayTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing International Workers' Day in Argentina. + */ +class InternationalWorkersDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'internationalWorkersDay'; + + /** + * Tests International Workers' Day. + * + * @throws Exception + * @throws ReflectionException + */ + public function testInternationalWorkersDay(): void + { + $year = 1927; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests 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 => 'Día del Trabajador'] + ); + } + + /** + * 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/Argentina/MalvinasDayTest.php b/tests/Argentina/MalvinasDayTest.php new file mode 100644 index 000000000..4a9c830ba --- /dev/null +++ b/tests/Argentina/MalvinasDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Malvinas Day in the Argentina. + */ +class MalvinasDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'malvinasDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1982; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-04-02", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of Malvinas Day. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día del Veterano y de los Caídos en la Guerra de Malvinas'] + ); + } + + /** + * 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/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php new file mode 100644 index 000000000..667eb08a1 --- /dev/null +++ b/tests/Argentina/MayRevolutionTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing First National Government in Argentina. + */ +class MayRevolutionTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'mayRevolution'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1810; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-05-25", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of First National Government. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Revolución de Mayo'] + ); + } + + /** + * 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/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php new file mode 100644 index 000000000..642b96e30 --- /dev/null +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Corpus Christi in Argentina. + */ +class NationalSovereigntyDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'nationalSovereigntyDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 2010; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-11-20", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Soberanía Nacional'] + ); + } + + /** + * 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/Argentina/NewYearsDayTest.php b/tests/Argentina/NewYearsDayTest.php new file mode 100644 index 000000000..0df02f090 --- /dev/null +++ b/tests/Argentina/NewYearsDayTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing New Years Day in Argentina. + */ +class NewYearsDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests New Years Day. + * + * @throws Exception + * @throws ReflectionException + */ + public function testNewYearsDay(): void + { + $year = 1997; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests 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 => 'Año Nuevo'] + ); + } + + /** + * 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/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php new file mode 100644 index 000000000..c83ee73f4 --- /dev/null +++ b/tests/Argentina/RaceDayTest.php @@ -0,0 +1,90 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Day of Respect for Cultural Diversity in Argentina. + */ +class RaceDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'raceDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1492; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + * + * @throws ReflectionException + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día del Respeto a la Diversidad Cultural'] + ); + } + + /** + * 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/Argentina/RemembranceDayTest.php b/tests/Argentina/RemembranceDayTest.php new file mode 100644 index 000000000..b6533736b --- /dev/null +++ b/tests/Argentina/RemembranceDayTest.php @@ -0,0 +1,88 @@ + + */ + +namespace Yasumi\tests\Argentina; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing "Day of Remembrance for Truth and Justice" in Argentina. + */ +class RemembranceDayTest extends ArgentinaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'remembranceDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 2006; + + /** + * Tests Day of Remembrance for Truth and Justice on or after 2006. + * + * @throws Exception + * @throws ReflectionException + */ + public function testRemembranceDayAfter2006(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-03-24", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Day of Remembrance for Truth and Justice on or before 2006. + * + * @throws ReflectionException + */ + public function testRemembranceDayBefore2006(): void + { + $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Día Nacional de la Memoria por la Verdad y la Justicia']); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} From 3689cfd0cbef4345cd68682095592c955f4354c0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 17 Jan 2022 23:34:22 +0900 Subject: [PATCH 305/687] Updated dependencies. Added configuration of allowed plugins. Signed-off-by: Sacha Telgenhof --- composer.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index fd12163c2..f22e37a99 100755 --- a/composer.json +++ b/composer.json @@ -40,16 +40,20 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v2.19 | v3.2", - "infection/infection": "^0.17 | ^0.25", + "friendsofphp/php-cs-fixer": "v2.19 | v3.5", + "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^1.4", "phpunit/phpunit": "^8.5 | ^9.5", "vimeo/psalm": "^4.9" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "composer/package-versions-deprecated": true, + "infection/extension-installer": true + } }, "autoload": { "psr-4": { From ede26b499876847a0e4d75e912762033473a9da5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 17 Jan 2022 23:40:00 +0900 Subject: [PATCH 306/687] Updated copyright year. --- .php-cs-fixer.php | 2 +- LICENSE | 2 +- phpunit.xml.dist | 2 +- psalm.xml.dist | 2 +- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidDateException.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- src/Yasumi/Exception/MissingTranslationException.php | 2 +- src/Yasumi/Exception/ProviderNotFoundException.php | 2 +- src/Yasumi/Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 2 +- 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/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Argentina.php | 2 +- src/Yasumi/Provider/Australia.php | 2 +- src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php | 2 +- src/Yasumi/Provider/Australia/NewSouthWales.php | 2 +- src/Yasumi/Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/KingIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northeast.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northwest.php | 2 +- .../Provider/Australia/Tasmania/Northwest/CircularHead.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 2 +- src/Yasumi/Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Canada.php | 2 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/BritishColumbia.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NewBrunswick.php | 2 +- src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php | 2 +- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Ontario.php | 2 +- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/CommonHolidays.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 2 +- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Provider/Denmark.php | 2 +- src/Yasumi/Provider/Estonia.php | 2 +- src/Yasumi/Provider/Finland.php | 2 +- 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/Georgia.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 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 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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/Turkey.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.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/allSoulsDay.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 +- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- src/Yasumi/data/translations/canadaDay.php | 2 +- src/Yasumi/data/translations/carnationRevolutionDay.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 2 +- src/Yasumi/data/translations/christmasEve.php | 2 +- src/Yasumi/data/translations/civicHoliday.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- src/Yasumi/data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/data/translations/dayOfLiberation.php | 2 +- src/Yasumi/data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/discoveryDay.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/familyDay.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goldCupParadeDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- src/Yasumi/data/translations/heritageDay.php | 2 +- src/Yasumi/data/translations/immaculateConception.php | 2 +- src/Yasumi/data/translations/internationalWomensDay.php | 2 +- src/Yasumi/data/translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/islanderDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/louisRielDay.php | 2 +- src/Yasumi/data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/natalHoliday.php | 2 +- src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php | 2 +- src/Yasumi/data/translations/nationalPatriotsDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/novaScotiaHeritageDay.php | 2 +- src/Yasumi/data/translations/orangemensDay.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/plebisciteDay.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- src/Yasumi/data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/queensBirthday.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- src/Yasumi/data/translations/remembranceDay.php | 2 +- src/Yasumi/data/translations/restorationOfIndepence.php | 2 +- src/Yasumi/data/translations/saintJeanBaptisteDay.php | 2 +- src/Yasumi/data/translations/saskatchewanDay.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stFloriansDay.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/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/terryFoxDay.php | 2 +- src/Yasumi/data/translations/thanksgivingDay.php | 2 +- src/Yasumi/data/translations/truthAndReconciliationDay.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- src/Yasumi/data/translations/victoriaDay.php | 2 +- src/Yasumi/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 +- src/Yasumi/data/translations/yukonHeritageDay.php | 2 +- tests/Argentina/ArgentinaBaseTestCase.php | 2 +- tests/Argentina/ArgentinaTest.php | 2 +- tests/Argentina/CarnavalMondayTest.php | 2 +- tests/Argentina/CarnavalTuesdayTest.php | 2 +- tests/Argentina/ChristmasDayTest.php | 2 +- tests/Argentina/EasterTest.php | 2 +- tests/Argentina/FlagDayTest.php | 2 +- tests/Argentina/GeneralJoseSanMartinDayTest.php | 2 +- tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php | 2 +- tests/Argentina/GoodFridayTest.php | 2 +- tests/Argentina/ImmaculateConceptionDayTest.php | 2 +- tests/Argentina/IndependenceDayTest.php | 2 +- tests/Argentina/InternationalWorkersDayTest.php | 2 +- tests/Argentina/MalvinasDayTest.php | 2 +- tests/Argentina/MayRevolutionTest.php | 2 +- tests/Argentina/NationalSovereigntyDayTest.php | 2 +- tests/Argentina/NewYearsDayTest.php | 2 +- tests/Argentina/RaceDayTest.php | 2 +- tests/Argentina/RemembranceDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php | 2 +- .../AustralianCapitalTerritoryBaseTestCase.php | 2 +- .../AustralianCapitalTerritoryTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php | 2 +- .../Australia/AustralianCapitalTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/LabourDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php | 2 +- .../Australia/AustralianCapitalTerritory/QueensBirthdayTest.php | 2 +- .../AustralianCapitalTerritory/ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/AnzacDayTest.php | 2 +- tests/Australia/NewSouthWales/AustraliaDayTest.php | 2 +- tests/Australia/NewSouthWales/BankHolidayTest.php | 2 +- tests/Australia/NewSouthWales/BoxingDayTest.php | 2 +- tests/Australia/NewSouthWales/ChristmasDayTest.php | 2 +- tests/Australia/NewSouthWales/EasterMondayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSaturdayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSundayTest.php | 2 +- tests/Australia/NewSouthWales/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/LabourDayTest.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 2 +- tests/Australia/NewSouthWales/NewYearsDayTest.php | 2 +- tests/Australia/NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/NorthernTerritory/AnzacDayTest.php | 2 +- tests/Australia/NorthernTerritory/AustraliaDayTest.php | 2 +- tests/Australia/NorthernTerritory/BoxingDayTest.php | 2 +- tests/Australia/NorthernTerritory/ChristmasDayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterMondayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/NorthernTerritory/GoodFridayTest.php | 2 +- tests/Australia/NorthernTerritory/MayDayTest.php | 2 +- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 2 +- .../NorthernTerritory/NorthernTerritoryBaseTestCase.php | 2 +- tests/Australia/NorthernTerritory/NorthernTerritoryTest.php | 2 +- tests/Australia/NorthernTerritory/PicnicDayTest.php | 2 +- tests/Australia/NorthernTerritory/QueensBirthdayTest.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 +- tests/Australia/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 +- tests/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/SouthAustralia/AdelaideCupDayTest.php | 2 +- tests/Australia/SouthAustralia/AnzacDayTest.php | 2 +- tests/Australia/SouthAustralia/AustraliaDayTest.php | 2 +- tests/Australia/SouthAustralia/ChristmasDayTest.php | 2 +- tests/Australia/SouthAustralia/EasterMondayTest.php | 2 +- tests/Australia/SouthAustralia/EasterSaturdayTest.php | 2 +- tests/Australia/SouthAustralia/GoodFridayTest.php | 2 +- tests/Australia/SouthAustralia/LabourDayTest.php | 2 +- tests/Australia/SouthAustralia/NewYearsDayTest.php | 2 +- tests/Australia/SouthAustralia/ProclamationDayTest.php | 2 +- tests/Australia/SouthAustralia/QueensBirthdayTest.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaTest.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 +- tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthBaseTestCase.php | 2 +- tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php | 2 +- tests/Australia/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 +- tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandShowTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php | 2 +- tests/Australia/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 +- tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- tests/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 +- tests/Australia/Tasmania/Northeast/LauncestonShowTest.php | 2 +- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- tests/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 +- tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Australia/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 +- .../Tasmania/Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Tasmania/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 +- tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- tests/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 +- tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/HobartShowTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastBaseTestCase.php | 2 +- tests/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/WesternAustralia/AnzacDayTest.php | 2 +- tests/Australia/WesternAustralia/AustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/BoxingDayTest.php | 2 +- tests/Australia/WesternAustralia/ChristmasDayTest.php | 2 +- tests/Australia/WesternAustralia/EasterMondayTest.php | 2 +- tests/Australia/WesternAustralia/GoodFridayTest.php | 2 +- tests/Australia/WesternAustralia/LabourDayTest.php | 2 +- tests/Australia/WesternAustralia/NewYearsDayTest.php | 2 +- tests/Australia/WesternAustralia/QueensBirthdayTest.php | 2 +- .../Australia/WesternAustralia/WesternAustraliaBaseTestCase.php | 2 +- tests/Australia/WesternAustralia/WesternAustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/WesternAustraliaTest.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/Burgenland/BurgenlandBaseTestCase.php | 2 +- tests/Austria/Burgenland/BurgenlandTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 2 +- tests/Austria/Carinthia/CarinthiaTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.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/LowerAustria/LowerAustriaBaseTestCase.php | 2 +- tests/Austria/LowerAustria/LowerAustriaTest.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 2 +- tests/Austria/Salzburg/SalzburgTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 2 +- tests/Austria/Styria/StyriaTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 2 +- tests/Austria/Tyrol/TyrolTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php | 2 +- tests/Austria/UpperAustria/UpperAustriaTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 2 +- tests/Austria/Vienna/ViennaTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 2 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 2 +- tests/Base/TypographyTest.php | 2 +- tests/Base/WeekendTest.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/Canada/Alberta/AlbertaBaseTestCase.php | 2 +- tests/Canada/Alberta/AlbertaTest.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaTest.php | 2 +- tests/Canada/CanadaBaseTestCase.php | 2 +- tests/Canada/CanadaDayTest.php | 2 +- tests/Canada/CanadaTest.php | 2 +- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 2 +- tests/Canada/Manitoba/ManitobaBaseTestCase.php | 2 +- tests/Canada/Manitoba/ManitobaTest.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickTest.php | 2 +- tests/Canada/NewYearsDayTest.php | 2 +- .../NewfoundlandAndLabradorBaseTestCase.php | 2 +- .../NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php | 2 +- .../NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php | 2 +- tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php | 2 +- tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php | 2 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 2 +- tests/Canada/Nunavut/NunavutBaseTestCase.php | 2 +- tests/Canada/Nunavut/NunavutTest.php | 2 +- tests/Canada/Ontario/OntarioBaseTestCase.php | 2 +- tests/Canada/Ontario/OntarioTest.php | 2 +- .../PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php | 2 +- tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php | 2 +- tests/Canada/Quebec/QuebecBaseTestCase.php | 2 +- tests/Canada/Quebec/QuebecTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanTest.php | 2 +- tests/Canada/ThanksgivingDayTest.php | 2 +- tests/Canada/TruthAndReconciliationDayTest.php | 2 +- tests/Canada/Yukon/YukonBaseTestCase.php | 2 +- tests/Canada/Yukon/YukonTest.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/CroatiaTest.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/RemembranceDayTest.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 +- tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php | 2 +- tests/CzechRepublic/InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php | 2 +- tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/CzechRepublic/SecondChristmasDayTest.php | 2 +- tests/CzechRepublic/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/Georgia/GeorgiaBaseTestCase.php | 2 +- tests/Georgia/GeorgiaTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 2 +- tests/Georgia/MtskhetobaDayTest.php | 2 +- tests/Georgia/NewYearsDayTest.php | 2 +- tests/Georgia/OrthodoxChristmasDayTest.php | 2 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 2 +- tests/Georgia/SecondNewYearDayTest.php | 2 +- tests/Georgia/StAndrewsDayTest.php | 2 +- tests/Georgia/StGeorgesDayTest.php | 2 +- tests/Georgia/StMarysDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Georgia/VictoryDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- tests/Germany/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 +- tests/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/DayOfLiberation2020Test.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 +- .../Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php | 2 +- .../MecklenburgWesternPomeraniaBaseTestCase.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../Germany/MecklenburgWesternPomerania/ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php | 2 +- tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php | 2 +- .../NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php | 2 +- tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 2 +- tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/PentecostTest.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 +- tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php | 2 +- .../RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php | 2 +- tests/Germany/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 +- tests/Germany/SchleswigHolstein/ReformationDay2017Test.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- .../Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php | 2 +- tests/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/Germany/Thuringia/WorldChildrensDayTest.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/HolidayTestCase.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 +- tests/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/AllSoulsDayTest.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 +- tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php | 2 +- tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/SecondChristmasDayTest.php | 2 +- tests/Lithuania/StJohnsDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- tests/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/LuxembourgBaseTestCase.php | 2 +- tests/Luxembourg/LuxembourgTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.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/ProviderTestCase.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/StAndrewsDayTest.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 +- tests/Spain/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 +- tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- tests/Spain/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 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php | 2 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- tests/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 +- tests/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 +- .../Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php | 2 +- tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php | 2 +- tests/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 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php | 2 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.php | 2 +- .../Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- tests/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 +- tests/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/AllSaintsDayTest.php | 2 +- tests/Switzerland/Fribourg/AscensionDayTest.php | 2 +- tests/Switzerland/Fribourg/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Fribourg/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/CorpusChristiTest.php | 2 +- tests/Switzerland/Fribourg/December26thTest.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/ImmaculateConceptionTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/CorpusChristiTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/EasterTest.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/PentecostTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/December26thTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php | 2 +- tests/Switzerland/Neuchatel/January2ndTest.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 +- tests/Switzerland/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/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/Turkey/CommemorationOfAtaturkTest.php | 2 +- tests/Turkey/DemocracyDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NationalSovereigntyDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Turkey/RepublicDayTest.php | 2 +- tests/Turkey/TurkeyBaseTestCase.php | 2 +- tests/Turkey/TurkeyTest.php | 2 +- tests/Turkey/VictoryDayTest.php | 2 +- tests/USA/ChristmasDayTest.php | 2 +- tests/USA/ColumbusDayTest.php | 2 +- tests/USA/IndependenceDayTest.php | 2 +- tests/USA/JuneteenthTest.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/CatholicChristmasDayTest.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/SubstitutedHolidayTest.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/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 | 2 +- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- tests/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 +- tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php | 2 +- tests/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 | 2 +- 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/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.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 | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- tests/YasumiBase.php | 2 +- 1651 files changed, 1651 insertions(+), 1651 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index a78f5801e..cf8950eba 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,7 +3,7 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2021 AzuyaLabs + * Copyright (c) 2015 - 2022 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index 330b3191f..cd30fd146 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2021 AzuyaLabs +Copyright (c) 2015 - 2022 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/phpunit.xml.dist b/phpunit.xml.dist index cb80b6443..e23ac74c5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ + ~ @author Sacha Telgenhof --> + * @author Sacha Telgenhof */ namespace Yasumi\Exception; diff --git a/src/Yasumi/Exception/InvalidDateException.php b/src/Yasumi/Exception/InvalidDateException.php index d7f9a287c..ef0697d39 100644 --- a/src/Yasumi/Exception/InvalidDateException.php +++ b/src/Yasumi/Exception/InvalidDateException.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Exception; diff --git a/src/Yasumi/Exception/InvalidYearException.php b/src/Yasumi/Exception/InvalidYearException.php index 4f6ae6907..a66ac1203 100644 --- a/src/Yasumi/Exception/InvalidYearException.php +++ b/src/Yasumi/Exception/InvalidYearException.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Exception; diff --git a/src/Yasumi/Exception/MissingTranslationException.php b/src/Yasumi/Exception/MissingTranslationException.php index c28bf6364..7aa69c82c 100644 --- a/src/Yasumi/Exception/MissingTranslationException.php +++ b/src/Yasumi/Exception/MissingTranslationException.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Exception; diff --git a/src/Yasumi/Exception/ProviderNotFoundException.php b/src/Yasumi/Exception/ProviderNotFoundException.php index bf75beb36..9eccf62f1 100644 --- a/src/Yasumi/Exception/ProviderNotFoundException.php +++ b/src/Yasumi/Exception/ProviderNotFoundException.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Exception; diff --git a/src/Yasumi/Exception/UnknownLocaleException.php b/src/Yasumi/Exception/UnknownLocaleException.php index 9e8a97b15..8cfa97f71 100644 --- a/src/Yasumi/Exception/UnknownLocaleException.php +++ b/src/Yasumi/Exception/UnknownLocaleException.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Exception; diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 93a0b97a3..170749008 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/BankHolidaysFilter.php b/src/Yasumi/Filters/BankHolidaysFilter.php index 382435954..5d1b5b672 100644 --- a/src/Yasumi/Filters/BankHolidaysFilter.php +++ b/src/Yasumi/Filters/BankHolidaysFilter.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 1c33a8f08..a283cc972 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/ObservedHolidaysFilter.php b/src/Yasumi/Filters/ObservedHolidaysFilter.php index 77dce43e0..4b2bc65ba 100644 --- a/src/Yasumi/Filters/ObservedHolidaysFilter.php +++ b/src/Yasumi/Filters/ObservedHolidaysFilter.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/OfficialHolidaysFilter.php b/src/Yasumi/Filters/OfficialHolidaysFilter.php index b4b9ecea7..2e7f361fe 100644 --- a/src/Yasumi/Filters/OfficialHolidaysFilter.php +++ b/src/Yasumi/Filters/OfficialHolidaysFilter.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 8f604f4ab..7fca645ab 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/OtherHolidaysFilter.php b/src/Yasumi/Filters/OtherHolidaysFilter.php index 5ab1e3dab..9e7ab994d 100644 --- a/src/Yasumi/Filters/OtherHolidaysFilter.php +++ b/src/Yasumi/Filters/OtherHolidaysFilter.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Filters/SeasonalHolidaysFilter.php b/src/Yasumi/Filters/SeasonalHolidaysFilter.php index 06d2aae23..f87588fed 100644 --- a/src/Yasumi/Filters/SeasonalHolidaysFilter.php +++ b/src/Yasumi/Filters/SeasonalHolidaysFilter.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Filters; diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 4bf5bccef..71b70fe6f 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi; diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 6202a1256..1d1d8e9d5 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 24bcbb6f4..42870d937 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index cdabcd643..260437f60 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 6a48e4820..27b861892 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 7b8112c21..b27f3b251 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index cdd4bf500..b582bf7f5 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index d7a861a0e..f126a3635 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index 2c2073bce..a6e0d5cbc 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Queensland; diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 7afe4dff9..736381d36 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index d66753089..d7fccc726 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 4b90ae357..ef276de98 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania; diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index 48eafec2e..42c899567 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania; diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index 4cd548c71..70edbbe94 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania; diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 3218a1437..2df8693f2 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania; diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index cbef86d5a..138b1934f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania; diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 201fb8446..d947cdba1 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania\Northwest; diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index 4cc4a1f27..891878777 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania; diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index 2111b70db..dc66bcb58 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia\Tasmania\South; diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 25b2bfc7b..19cd9487a 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index b3da7a5ab..fb2772358 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Australia; diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index e982cc1b7..6a96a7f7f 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Austria/Burgenland.php b/src/Yasumi/Provider/Austria/Burgenland.php index 4aa763124..7e2ceb178 100755 --- a/src/Yasumi/Provider/Austria/Burgenland.php +++ b/src/Yasumi/Provider/Austria/Burgenland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php index de6f6d188..7fb449ed0 100755 --- a/src/Yasumi/Provider/Austria/Carinthia.php +++ b/src/Yasumi/Provider/Austria/Carinthia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/LowerAustria.php b/src/Yasumi/Provider/Austria/LowerAustria.php index 017e9984f..5c7704778 100755 --- a/src/Yasumi/Provider/Austria/LowerAustria.php +++ b/src/Yasumi/Provider/Austria/LowerAustria.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php index 69132458d..b342bb338 100755 --- a/src/Yasumi/Provider/Austria/Salzburg.php +++ b/src/Yasumi/Provider/Austria/Salzburg.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/Styria.php b/src/Yasumi/Provider/Austria/Styria.php index bb4a5fa82..eda059e8f 100755 --- a/src/Yasumi/Provider/Austria/Styria.php +++ b/src/Yasumi/Provider/Austria/Styria.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/Tyrol.php b/src/Yasumi/Provider/Austria/Tyrol.php index b0440c3cf..ccbaa65d3 100755 --- a/src/Yasumi/Provider/Austria/Tyrol.php +++ b/src/Yasumi/Provider/Austria/Tyrol.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php index 6d89cc43a..63c30ed2f 100755 --- a/src/Yasumi/Provider/Austria/UpperAustria.php +++ b/src/Yasumi/Provider/Austria/UpperAustria.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/Vienna.php b/src/Yasumi/Provider/Austria/Vienna.php index 5c2a9b24c..61219f274 100755 --- a/src/Yasumi/Provider/Austria/Vienna.php +++ b/src/Yasumi/Provider/Austria/Vienna.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Austria/Vorarlberg.php b/src/Yasumi/Provider/Austria/Vorarlberg.php index 36baac2a2..9bd3f733b 100755 --- a/src/Yasumi/Provider/Austria/Vorarlberg.php +++ b/src/Yasumi/Provider/Austria/Vorarlberg.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Austria; diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 12a5f7148..84f879f50 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index 9fd62299b..326a9c9c3 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 71605616b..7a09d20c1 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index 92d61b5a3..6fc52365e 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index b75c6dfa3..21f387e7d 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/BritishColumbia.php b/src/Yasumi/Provider/Canada/BritishColumbia.php index eda543cce..ebb3a3be4 100644 --- a/src/Yasumi/Provider/Canada/BritishColumbia.php +++ b/src/Yasumi/Provider/Canada/BritishColumbia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index 460ee7d2b..4aa9af92f 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/NewBrunswick.php b/src/Yasumi/Provider/Canada/NewBrunswick.php index 06c149e4a..4178d45bd 100644 --- a/src/Yasumi/Provider/Canada/NewBrunswick.php +++ b/src/Yasumi/Provider/Canada/NewBrunswick.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index 44f377223..ebd4556a1 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php index 5bd61c6bf..6abf69fd3 100644 --- a/src/Yasumi/Provider/Canada/NorthwestTerritories.php +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index 72342fd7e..c4141842e 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/Nunavut.php b/src/Yasumi/Provider/Canada/Nunavut.php index 85bc8e516..3ec863c1a 100644 --- a/src/Yasumi/Provider/Canada/Nunavut.php +++ b/src/Yasumi/Provider/Canada/Nunavut.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/Ontario.php b/src/Yasumi/Provider/Canada/Ontario.php index a92d1a537..74cfb2f07 100644 --- a/src/Yasumi/Provider/Canada/Ontario.php +++ b/src/Yasumi/Provider/Canada/Ontario.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index db08448bf..68373252a 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index 0d1ebe13a..2275fc17b 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index 862f8372b..666ad56b8 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index 704d3bff8..fdb4d981f 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Canada; diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 8ed630a94..40e229a11 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 94e456449..8afb5131d 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index c2423f281..e64bf30b6 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 4700526e5..fe7db41e3 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php index 5518c7efe..8bb7a62b3 100644 --- a/src/Yasumi/Provider/DateTimeZoneFactory.php +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index dc5992916..deeef714c 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 17c6918f1..f87b7b12c 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 5786da374..8370df710 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 416cb9202..7be3329eb 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/France/BasRhin.php b/src/Yasumi/Provider/France/BasRhin.php index 4cb3decbd..b924a3b05 100755 --- a/src/Yasumi/Provider/France/BasRhin.php +++ b/src/Yasumi/Provider/France/BasRhin.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\France; diff --git a/src/Yasumi/Provider/France/HautRhin.php b/src/Yasumi/Provider/France/HautRhin.php index abc11496d..6eff5dd82 100755 --- a/src/Yasumi/Provider/France/HautRhin.php +++ b/src/Yasumi/Provider/France/HautRhin.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\France; diff --git a/src/Yasumi/Provider/France/Moselle.php b/src/Yasumi/Provider/France/Moselle.php index 818c78a68..2c6abb304 100755 --- a/src/Yasumi/Provider/France/Moselle.php +++ b/src/Yasumi/Provider/France/Moselle.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\France; diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 7d95c3c1d..8822ee289 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index b43bcf34f..0d49459ef 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 15cbc1d16..4f84b2897 100755 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index b403b2286..d043b918a 100755 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 372cc0b36..5d77e3420 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Brandenburg.php b/src/Yasumi/Provider/Germany/Brandenburg.php index 83823fda9..201ac9ff4 100755 --- a/src/Yasumi/Provider/Germany/Brandenburg.php +++ b/src/Yasumi/Provider/Germany/Brandenburg.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Bremen.php b/src/Yasumi/Provider/Germany/Bremen.php index cad02a13a..27090fa30 100755 --- a/src/Yasumi/Provider/Germany/Bremen.php +++ b/src/Yasumi/Provider/Germany/Bremen.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index 8d5431c1d..98eb9408f 100755 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Hesse.php b/src/Yasumi/Provider/Germany/Hesse.php index ad135d4de..d73cbff3d 100755 --- a/src/Yasumi/Provider/Germany/Hesse.php +++ b/src/Yasumi/Provider/Germany/Hesse.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/LowerSaxony.php b/src/Yasumi/Provider/Germany/LowerSaxony.php index f793874b8..f73e412c5 100755 --- a/src/Yasumi/Provider/Germany/LowerSaxony.php +++ b/src/Yasumi/Provider/Germany/LowerSaxony.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php index 8eed4d763..71baed470 100755 --- a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php +++ b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php index a71fa7eec..8cb3cdfad 100755 --- a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php +++ b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php index 9de6d7d99..bff0b0e40 100755 --- a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php +++ b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Saarland.php b/src/Yasumi/Provider/Germany/Saarland.php index 7199629f3..32b035e01 100755 --- a/src/Yasumi/Provider/Germany/Saarland.php +++ b/src/Yasumi/Provider/Germany/Saarland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index 3c9bb66c4..83b4579cd 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php index ec63bc544..b79334166 100755 --- a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php +++ b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/SchleswigHolstein.php b/src/Yasumi/Provider/Germany/SchleswigHolstein.php index fd2eb4863..966040822 100755 --- a/src/Yasumi/Provider/Germany/SchleswigHolstein.php +++ b/src/Yasumi/Provider/Germany/SchleswigHolstein.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index f4be9b443..1806f1ee9 100755 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Germany; diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 8a0e6fc4c..f6c0635f3 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index da0c10cfb..a5f7c7bf5 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 16254258f..6a6f0e756 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index d84a111eb..1308f959e 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 6fa05c57b..26cbc702d 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 3587ed015..1a64df69b 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 95735e30f..447cc8f2b 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 07826455f..0783eb388 100755 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -7,7 +7,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ declare(strict_types=1); diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index feddf43cf..0c81a78a7 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 510f5df41..c8be986c8 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index b00191aa9..f9c9a1bca 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index fec220958..b0fbdfa9e 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index d4b9adf70..41e508e29 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 2fa135a3a..6efb5fa0c 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 43300cfd0..662e92fed 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index e1a3837d7..2c5bc2f0e 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 2735e50ce..d22b8ed48 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 122b84644..805d2e98e 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 3c107e840..e48845242 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 2b42e7924..0fc1361ca 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Aragon.php b/src/Yasumi/Provider/Spain/Aragon.php index d3679873e..b3bbc7053 100755 --- a/src/Yasumi/Provider/Spain/Aragon.php +++ b/src/Yasumi/Provider/Spain/Aragon.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 21308faf0..85beca4fd 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index d6d2e0172..1f3cc75d6 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index cbd7f0a4d..519b74a3f 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index 8652aa630..ef1c0bd3c 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index b0a696187..492d9f4c2 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 0e344fa1d..2ee3254ca 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index 1e607ecc9..647ad8fd2 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index 9b1a7b089..8961f651c 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index b6eba54b2..94270a405 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index c744bcc0a..2417a8a2f 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index 8a392788b..fed1a1326 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index ad6e690f8..b2127147e 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 18e634c0c..d4e9f88ea 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Melilla.php b/src/Yasumi/Provider/Spain/Melilla.php index bc736ed3c..430c1bf4f 100755 --- a/src/Yasumi/Provider/Spain/Melilla.php +++ b/src/Yasumi/Provider/Spain/Melilla.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/Navarre.php b/src/Yasumi/Provider/Spain/Navarre.php index 1d2e1740c..f183c8f57 100755 --- a/src/Yasumi/Provider/Spain/Navarre.php +++ b/src/Yasumi/Provider/Spain/Navarre.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index d65d3e6d1..a9dd42559 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index c641bcbff..9981f605e 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Spain; diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index a3ba789b6..6474af36f 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index 4a8deca78..0231035bb 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Switzerland/Aargau.php b/src/Yasumi/Provider/Switzerland/Aargau.php index a06017f6f..1ab767a0d 100644 --- a/src/Yasumi/Provider/Switzerland/Aargau.php +++ b/src/Yasumi/Provider/Switzerland/Aargau.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php b/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php index e823486bc..621a26066 100644 --- a/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php +++ b/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php b/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php index f75f7f6cc..9bf356e29 100644 --- a/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php +++ b/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/BaselLandschaft.php b/src/Yasumi/Provider/Switzerland/BaselLandschaft.php index 980ea92c3..948261d99 100644 --- a/src/Yasumi/Provider/Switzerland/BaselLandschaft.php +++ b/src/Yasumi/Provider/Switzerland/BaselLandschaft.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/BaselStadt.php b/src/Yasumi/Provider/Switzerland/BaselStadt.php index 94995e0a3..f1f9a29dd 100644 --- a/src/Yasumi/Provider/Switzerland/BaselStadt.php +++ b/src/Yasumi/Provider/Switzerland/BaselStadt.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Bern.php b/src/Yasumi/Provider/Switzerland/Bern.php index 8150a6571..5ab6d14d3 100644 --- a/src/Yasumi/Provider/Switzerland/Bern.php +++ b/src/Yasumi/Provider/Switzerland/Bern.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index 6a924379d..59d04311a 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index b45d64424..970f70167 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 8d9ba6f69..16870ca30 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Grisons.php b/src/Yasumi/Provider/Switzerland/Grisons.php index 51df65f2e..ff7c18e98 100644 --- a/src/Yasumi/Provider/Switzerland/Grisons.php +++ b/src/Yasumi/Provider/Switzerland/Grisons.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index f99557014..50842acdb 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Lucerne.php b/src/Yasumi/Provider/Switzerland/Lucerne.php index b3c57b5c3..63d4a3cb8 100644 --- a/src/Yasumi/Provider/Switzerland/Lucerne.php +++ b/src/Yasumi/Provider/Switzerland/Lucerne.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index c9856511a..f01e0786d 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Nidwalden.php b/src/Yasumi/Provider/Switzerland/Nidwalden.php index 7b156e967..12c7f3f2d 100644 --- a/src/Yasumi/Provider/Switzerland/Nidwalden.php +++ b/src/Yasumi/Provider/Switzerland/Nidwalden.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index 01f8da5b4..a04ec8e97 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Schaffhausen.php b/src/Yasumi/Provider/Switzerland/Schaffhausen.php index 5a398439e..db2a0b2dc 100644 --- a/src/Yasumi/Provider/Switzerland/Schaffhausen.php +++ b/src/Yasumi/Provider/Switzerland/Schaffhausen.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Schwyz.php b/src/Yasumi/Provider/Switzerland/Schwyz.php index e67817b22..fa2bb381a 100644 --- a/src/Yasumi/Provider/Switzerland/Schwyz.php +++ b/src/Yasumi/Provider/Switzerland/Schwyz.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Solothurn.php b/src/Yasumi/Provider/Switzerland/Solothurn.php index d036fc721..51d43182d 100644 --- a/src/Yasumi/Provider/Switzerland/Solothurn.php +++ b/src/Yasumi/Provider/Switzerland/Solothurn.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/StGallen.php b/src/Yasumi/Provider/Switzerland/StGallen.php index 0927f5681..ca89514cd 100644 --- a/src/Yasumi/Provider/Switzerland/StGallen.php +++ b/src/Yasumi/Provider/Switzerland/StGallen.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Thurgau.php b/src/Yasumi/Provider/Switzerland/Thurgau.php index ecac4da19..5f44e2f8f 100644 --- a/src/Yasumi/Provider/Switzerland/Thurgau.php +++ b/src/Yasumi/Provider/Switzerland/Thurgau.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 8695b7ab7..7a3ae0265 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Uri.php b/src/Yasumi/Provider/Switzerland/Uri.php index d27211424..d306705fc 100644 --- a/src/Yasumi/Provider/Switzerland/Uri.php +++ b/src/Yasumi/Provider/Switzerland/Uri.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Valais.php b/src/Yasumi/Provider/Switzerland/Valais.php index 25d828026..6f0a864dd 100644 --- a/src/Yasumi/Provider/Switzerland/Valais.php +++ b/src/Yasumi/Provider/Switzerland/Valais.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Vaud.php b/src/Yasumi/Provider/Switzerland/Vaud.php index 5962f170c..6c29b5cb7 100644 --- a/src/Yasumi/Provider/Switzerland/Vaud.php +++ b/src/Yasumi/Provider/Switzerland/Vaud.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Zug.php b/src/Yasumi/Provider/Switzerland/Zug.php index 23b4b7b2b..79c46feb1 100644 --- a/src/Yasumi/Provider/Switzerland/Zug.php +++ b/src/Yasumi/Provider/Switzerland/Zug.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Switzerland/Zurich.php b/src/Yasumi/Provider/Switzerland/Zurich.php index 1e06af362..e1904e176 100644 --- a/src/Yasumi/Provider/Switzerland/Zurich.php +++ b/src/Yasumi/Provider/Switzerland/Zurich.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\Switzerland; diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php index 3b991a206..19494bc19 100755 --- a/src/Yasumi/Provider/Turkey.php +++ b/src/Yasumi/Provider/Turkey.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 020fa41bb..3153f62be 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index e27522a41..1ab5a440a 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 13285a9e4..197b747f5 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/UnitedKingdom/England.php b/src/Yasumi/Provider/UnitedKingdom/England.php index 468f9f26c..d6e44f88d 100644 --- a/src/Yasumi/Provider/UnitedKingdom/England.php +++ b/src/Yasumi/Provider/UnitedKingdom/England.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\UnitedKingdom; diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index 0dcdeee58..93ad7bf95 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\UnitedKingdom; diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 1838c9990..af5ee863d 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\UnitedKingdom; diff --git a/src/Yasumi/Provider/UnitedKingdom/Wales.php b/src/Yasumi/Provider/UnitedKingdom/Wales.php index e11cb3b02..793fad825 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Wales.php +++ b/src/Yasumi/Provider/UnitedKingdom/Wales.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\Provider\UnitedKingdom; diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 736c361e9..73754848e 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi; diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index a2043f768..d471db3eb 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi; diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 17d0515a3..7cb38bac4 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi; diff --git a/src/Yasumi/TranslationsInterface.php b/src/Yasumi/TranslationsInterface.php index e20601597..b20abe1c8 100644 --- a/src/Yasumi/TranslationsInterface.php +++ b/src/Yasumi/TranslationsInterface.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi; diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index a02453850..8a2246264 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi; diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index 82d7afe8c..73f503cab 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // List of possible locales. This list is used in case the 'intl' extension is not loaded/available. diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 30c93d8a1..924da6dfb 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for All Saints' Day diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index 8c7afd5fc..0d91a9139 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for All Saints' Eve diff --git a/src/Yasumi/data/translations/allSoulsDay.php b/src/Yasumi/data/translations/allSoulsDay.php index 7a04647f9..05425ce22 100644 --- a/src/Yasumi/data/translations/allSoulsDay.php +++ b/src/Yasumi/data/translations/allSoulsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for All Souls' Day diff --git a/src/Yasumi/data/translations/annunciation.php b/src/Yasumi/data/translations/annunciation.php index 334881e27..f0958bc3b 100644 --- a/src/Yasumi/data/translations/annunciation.php +++ b/src/Yasumi/data/translations/annunciation.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Annunciation diff --git a/src/Yasumi/data/translations/anzacDay.php b/src/Yasumi/data/translations/anzacDay.php index 18d6bb362..d25bb015d 100644 --- a/src/Yasumi/data/translations/anzacDay.php +++ b/src/Yasumi/data/translations/anzacDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for ANZAC Day diff --git a/src/Yasumi/data/translations/armisticeDay.php b/src/Yasumi/data/translations/armisticeDay.php index 8f3078aee..b47601e5d 100644 --- a/src/Yasumi/data/translations/armisticeDay.php +++ b/src/Yasumi/data/translations/armisticeDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Armistice Day diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index 672051326..9d6413228 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Ascension Day diff --git a/src/Yasumi/data/translations/ashWednesday.php b/src/Yasumi/data/translations/ashWednesday.php index 3d24c9c0e..d145ae215 100644 --- a/src/Yasumi/data/translations/ashWednesday.php +++ b/src/Yasumi/data/translations/ashWednesday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Ash Wednesday diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 22b6f8458..3795ca906 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Assumption of Mary diff --git a/src/Yasumi/data/translations/australiaDay.php b/src/Yasumi/data/translations/australiaDay.php index 1883a68b6..fe72f966f 100644 --- a/src/Yasumi/data/translations/australiaDay.php +++ b/src/Yasumi/data/translations/australiaDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Australia Day diff --git a/src/Yasumi/data/translations/canadaDay.php b/src/Yasumi/data/translations/canadaDay.php index a66725ad5..f116a3679 100644 --- a/src/Yasumi/data/translations/canadaDay.php +++ b/src/Yasumi/data/translations/canadaDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Canada Day diff --git a/src/Yasumi/data/translations/carnationRevolutionDay.php b/src/Yasumi/data/translations/carnationRevolutionDay.php index 362dfdac2..6d1c6fb8e 100644 --- a/src/Yasumi/data/translations/carnationRevolutionDay.php +++ b/src/Yasumi/data/translations/carnationRevolutionDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Freedom Day diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index cfa09868b..22016e818 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Christmas diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index 5e084baca..3589b410c 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Christmas Eve diff --git a/src/Yasumi/data/translations/civicHoliday.php b/src/Yasumi/data/translations/civicHoliday.php index 989980224..5a945f994 100644 --- a/src/Yasumi/data/translations/civicHoliday.php +++ b/src/Yasumi/data/translations/civicHoliday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Civic Holiday diff --git a/src/Yasumi/data/translations/corpusChristi.php b/src/Yasumi/data/translations/corpusChristi.php index 63aab8989..f46c60cb0 100644 --- a/src/Yasumi/data/translations/corpusChristi.php +++ b/src/Yasumi/data/translations/corpusChristi.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Corpus Christi diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index 3d51a31e0..ee2b40e78 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Day after New Year's Day diff --git a/src/Yasumi/data/translations/dayOfLiberation.php b/src/Yasumi/data/translations/dayOfLiberation.php index 9483d563c..0fdb14c9e 100644 --- a/src/Yasumi/data/translations/dayOfLiberation.php +++ b/src/Yasumi/data/translations/dayOfLiberation.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Day of Liberation diff --git a/src/Yasumi/data/translations/dayOfReformation.php b/src/Yasumi/data/translations/dayOfReformation.php index f99e15770..12da77782 100755 --- a/src/Yasumi/data/translations/dayOfReformation.php +++ b/src/Yasumi/data/translations/dayOfReformation.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Day of Reformation diff --git a/src/Yasumi/data/translations/discoveryDay.php b/src/Yasumi/data/translations/discoveryDay.php index c6dd6c24b..23d583c13 100644 --- a/src/Yasumi/data/translations/discoveryDay.php +++ b/src/Yasumi/data/translations/discoveryDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Discovery Day diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index f223b0db0..65b4961b0 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Easter Sunday diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 7a65f775e..868b05ef1 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Easter Monday diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index 7f7a9e646..c615e01ba 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Epiphany diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php index 4c0a9ae14..1ddf54ebf 100644 --- a/src/Yasumi/data/translations/epiphanyEve.php +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Epiphany Eve diff --git a/src/Yasumi/data/translations/familyDay.php b/src/Yasumi/data/translations/familyDay.php index 1a77cdfa0..f611eaac5 100644 --- a/src/Yasumi/data/translations/familyDay.php +++ b/src/Yasumi/data/translations/familyDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Family Day diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php index e41510494..a1ff62059 100755 --- a/src/Yasumi/data/translations/fathersDay.php +++ b/src/Yasumi/data/translations/fathersDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Father's Day diff --git a/src/Yasumi/data/translations/goldCupParadeDay.php b/src/Yasumi/data/translations/goldCupParadeDay.php index 19be1a338..ac9075026 100644 --- a/src/Yasumi/data/translations/goldCupParadeDay.php +++ b/src/Yasumi/data/translations/goldCupParadeDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Gold Cup Parade Day diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 5d859371d..0758f7528 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Good Friday diff --git a/src/Yasumi/data/translations/heritageDay.php b/src/Yasumi/data/translations/heritageDay.php index e6950d74f..42f35bbb5 100644 --- a/src/Yasumi/data/translations/heritageDay.php +++ b/src/Yasumi/data/translations/heritageDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Heritage Day diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index 5b78504e4..0d75bdf66 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Immaculate Conception diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 8ef5f5c3c..6e3877d2b 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for International Women's Day diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index cfd483eca..f4d4570cf 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for International Workers' Day diff --git a/src/Yasumi/data/translations/islanderDay.php b/src/Yasumi/data/translations/islanderDay.php index 7b43d3e2f..b1272dded 100644 --- a/src/Yasumi/data/translations/islanderDay.php +++ b/src/Yasumi/data/translations/islanderDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Islander Day diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 1b877509b..463d1d724 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Labour Day diff --git a/src/Yasumi/data/translations/louisRielDay.php b/src/Yasumi/data/translations/louisRielDay.php index 8f8f312fa..5f83e5efe 100644 --- a/src/Yasumi/data/translations/louisRielDay.php +++ b/src/Yasumi/data/translations/louisRielDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Louis Riel Day diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index 3130617e7..0aaba02e0 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Maundy Thursday diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php index c84beb8b8..c31900f8a 100755 --- a/src/Yasumi/data/translations/mothersDay.php +++ b/src/Yasumi/data/translations/mothersDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Mother's Day diff --git a/src/Yasumi/data/translations/natalHoliday.php b/src/Yasumi/data/translations/natalHoliday.php index ff9e0bf06..26d4d6e44 100644 --- a/src/Yasumi/data/translations/natalHoliday.php +++ b/src/Yasumi/data/translations/natalHoliday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Natal Holiday diff --git a/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php b/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php index f8f622ed0..e2239f441 100644 --- a/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php +++ b/src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for National Indigenous Peoples Day diff --git a/src/Yasumi/data/translations/nationalPatriotsDay.php b/src/Yasumi/data/translations/nationalPatriotsDay.php index 515f84226..08b5125e7 100644 --- a/src/Yasumi/data/translations/nationalPatriotsDay.php +++ b/src/Yasumi/data/translations/nationalPatriotsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for National Patriot's Day diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 4bbd5f463..06b8b01d1 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for New Year's Day diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index dc28f7e36..a97f651f1 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for New Year's Eve diff --git a/src/Yasumi/data/translations/novaScotiaHeritageDay.php b/src/Yasumi/data/translations/novaScotiaHeritageDay.php index ebaa1f022..8337aae9d 100644 --- a/src/Yasumi/data/translations/novaScotiaHeritageDay.php +++ b/src/Yasumi/data/translations/novaScotiaHeritageDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Nova Scotia Heritage Day diff --git a/src/Yasumi/data/translations/orangemensDay.php b/src/Yasumi/data/translations/orangemensDay.php index 4293fb2b0..0aaa9ba4f 100644 --- a/src/Yasumi/data/translations/orangemensDay.php +++ b/src/Yasumi/data/translations/orangemensDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Orangemen's Day diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index 77160d515..68f82a76b 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Whitsunday diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 931e61a14..de9076520 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Whitmonday diff --git a/src/Yasumi/data/translations/plebisciteDay.php b/src/Yasumi/data/translations/plebisciteDay.php index f5816d7bc..d68854288 100644 --- a/src/Yasumi/data/translations/plebisciteDay.php +++ b/src/Yasumi/data/translations/plebisciteDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Plebiscite Day. diff --git a/src/Yasumi/data/translations/portugalDay.php b/src/Yasumi/data/translations/portugalDay.php index a06451f2e..7b051a772 100644 --- a/src/Yasumi/data/translations/portugalDay.php +++ b/src/Yasumi/data/translations/portugalDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Portugal Day diff --git a/src/Yasumi/data/translations/portugueseRepublicDay.php b/src/Yasumi/data/translations/portugueseRepublicDay.php index a0c74fc80..da020ed5f 100644 --- a/src/Yasumi/data/translations/portugueseRepublicDay.php +++ b/src/Yasumi/data/translations/portugueseRepublicDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Implantation of the Portuguese Republic diff --git a/src/Yasumi/data/translations/queensBirthday.php b/src/Yasumi/data/translations/queensBirthday.php index c0fe0eac2..6ebfea29e 100644 --- a/src/Yasumi/data/translations/queensBirthday.php +++ b/src/Yasumi/data/translations/queensBirthday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Queen's Birthday diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php index 0c1d14a1f..c519914d6 100755 --- a/src/Yasumi/data/translations/reformationDay.php +++ b/src/Yasumi/data/translations/reformationDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Reformation Day diff --git a/src/Yasumi/data/translations/remembranceDay.php b/src/Yasumi/data/translations/remembranceDay.php index 47449814d..3930a26e2 100644 --- a/src/Yasumi/data/translations/remembranceDay.php +++ b/src/Yasumi/data/translations/remembranceDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Remembrance Day diff --git a/src/Yasumi/data/translations/restorationOfIndepence.php b/src/Yasumi/data/translations/restorationOfIndepence.php index 6e1f28586..201f52a41 100644 --- a/src/Yasumi/data/translations/restorationOfIndepence.php +++ b/src/Yasumi/data/translations/restorationOfIndepence.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Restoration of Independence diff --git a/src/Yasumi/data/translations/saintJeanBaptisteDay.php b/src/Yasumi/data/translations/saintJeanBaptisteDay.php index ccac5f086..feace1968 100644 --- a/src/Yasumi/data/translations/saintJeanBaptisteDay.php +++ b/src/Yasumi/data/translations/saintJeanBaptisteDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Saint-Jean Baptiste Day diff --git a/src/Yasumi/data/translations/saskatchewanDay.php b/src/Yasumi/data/translations/saskatchewanDay.php index 22efe99ec..2c87d8d07 100644 --- a/src/Yasumi/data/translations/saskatchewanDay.php +++ b/src/Yasumi/data/translations/saskatchewanDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Saskatchewan Day diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index fc4efebc1..c50e45a52 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Second Christmas Day diff --git a/src/Yasumi/data/translations/secondNewYearsDay.php b/src/Yasumi/data/translations/secondNewYearsDay.php index 76ba3b4fc..f00823db4 100755 --- a/src/Yasumi/data/translations/secondNewYearsDay.php +++ b/src/Yasumi/data/translations/secondNewYearsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for New Year's Day diff --git a/src/Yasumi/data/translations/stAndrewsDay.php b/src/Yasumi/data/translations/stAndrewsDay.php index 428e237e1..7560cb172 100644 --- a/src/Yasumi/data/translations/stAndrewsDay.php +++ b/src/Yasumi/data/translations/stAndrewsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. Andrew's Day diff --git a/src/Yasumi/data/translations/stDavidsDay.php b/src/Yasumi/data/translations/stDavidsDay.php index 0cb472af6..5dda220ab 100644 --- a/src/Yasumi/data/translations/stDavidsDay.php +++ b/src/Yasumi/data/translations/stDavidsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. David's Day diff --git a/src/Yasumi/data/translations/stFloriansDay.php b/src/Yasumi/data/translations/stFloriansDay.php index 2eafa15cd..f9894e014 100644 --- a/src/Yasumi/data/translations/stFloriansDay.php +++ b/src/Yasumi/data/translations/stFloriansDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Saint Florian's Day. diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index bd40b5bd4..7f350fe63 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. George's Day diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index b08a13438..bd2529110 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. John's Day diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index f5d8f2d55..17a81e175 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. John's Eve diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index e803ba464..cb9cfb86b 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. Joseph's Day diff --git a/src/Yasumi/data/translations/stLeopoldsDay.php b/src/Yasumi/data/translations/stLeopoldsDay.php index b3bc6c80a..aa7cfc990 100644 --- a/src/Yasumi/data/translations/stLeopoldsDay.php +++ b/src/Yasumi/data/translations/stLeopoldsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Saint Leopold's Day. diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index 93e2f7c48..3113bf9ec 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. Martin's Day diff --git a/src/Yasumi/data/translations/stRupertsDay.php b/src/Yasumi/data/translations/stRupertsDay.php index c66f145ef..35ad9d318 100644 --- a/src/Yasumi/data/translations/stRupertsDay.php +++ b/src/Yasumi/data/translations/stRupertsDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Saint Rupert's Day. diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index 89c7a2575..be482d8bd 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for St. Stephen's Day diff --git a/src/Yasumi/data/translations/substituteHoliday.php b/src/Yasumi/data/translations/substituteHoliday.php index 886f65301..38a59906e 100755 --- a/src/Yasumi/data/translations/substituteHoliday.php +++ b/src/Yasumi/data/translations/substituteHoliday.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translation pattern for substitute holidays. diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 78ee83b5b..424b41433 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Summertime diff --git a/src/Yasumi/data/translations/terryFoxDay.php b/src/Yasumi/data/translations/terryFoxDay.php index c7f98d057..94c0ea931 100644 --- a/src/Yasumi/data/translations/terryFoxDay.php +++ b/src/Yasumi/data/translations/terryFoxDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Terry Fox Day diff --git a/src/Yasumi/data/translations/thanksgivingDay.php b/src/Yasumi/data/translations/thanksgivingDay.php index 8fecdb4c4..f39c044c9 100644 --- a/src/Yasumi/data/translations/thanksgivingDay.php +++ b/src/Yasumi/data/translations/thanksgivingDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Thanksgiving diff --git a/src/Yasumi/data/translations/truthAndReconciliationDay.php b/src/Yasumi/data/translations/truthAndReconciliationDay.php index 039ed40fb..82d8c5ee3 100644 --- a/src/Yasumi/data/translations/truthAndReconciliationDay.php +++ b/src/Yasumi/data/translations/truthAndReconciliationDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Truth And Reconciliation Day diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 2ccb535df..ec4923620 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Valentine's Day diff --git a/src/Yasumi/data/translations/victoriaDay.php b/src/Yasumi/data/translations/victoriaDay.php index 39f9e1e89..2907f0216 100644 --- a/src/Yasumi/data/translations/victoriaDay.php +++ b/src/Yasumi/data/translations/victoriaDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Victoria Day diff --git a/src/Yasumi/data/translations/victoryInEuropeDay.php b/src/Yasumi/data/translations/victoryInEuropeDay.php index 3ceb9af02..3c25cd75b 100644 --- a/src/Yasumi/data/translations/victoryInEuropeDay.php +++ b/src/Yasumi/data/translations/victoryInEuropeDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Victory in Europe Day diff --git a/src/Yasumi/data/translations/waitangiDay.php b/src/Yasumi/data/translations/waitangiDay.php index 191ffd5c2..7065860e2 100644 --- a/src/Yasumi/data/translations/waitangiDay.php +++ b/src/Yasumi/data/translations/waitangiDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Waitangi Day diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php index 664976087..cb2dab29c 100755 --- a/src/Yasumi/data/translations/walpurgisEve.php +++ b/src/Yasumi/data/translations/walpurgisEve.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Walpurgis Night diff --git a/src/Yasumi/data/translations/winterTime.php b/src/Yasumi/data/translations/winterTime.php index 8fac6c70e..08d0a6f9e 100644 --- a/src/Yasumi/data/translations/winterTime.php +++ b/src/Yasumi/data/translations/winterTime.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Wintertime diff --git a/src/Yasumi/data/translations/worldAnimalDay.php b/src/Yasumi/data/translations/worldAnimalDay.php index 0f52ba418..f4cb470a3 100644 --- a/src/Yasumi/data/translations/worldAnimalDay.php +++ b/src/Yasumi/data/translations/worldAnimalDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for World Animal Day diff --git a/src/Yasumi/data/translations/yukonHeritageDay.php b/src/Yasumi/data/translations/yukonHeritageDay.php index 2f94fc6b5..8047be763 100644 --- a/src/Yasumi/data/translations/yukonHeritageDay.php +++ b/src/Yasumi/data/translations/yukonHeritageDay.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ // Translations for Yukon Heritage Day diff --git a/tests/Argentina/ArgentinaBaseTestCase.php b/tests/Argentina/ArgentinaBaseTestCase.php index 925f3d6ae..370035c56 100644 --- a/tests/Argentina/ArgentinaBaseTestCase.php +++ b/tests/Argentina/ArgentinaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/ArgentinaTest.php b/tests/Argentina/ArgentinaTest.php index 0ced26fe0..2e4d207ee 100644 --- a/tests/Argentina/ArgentinaTest.php +++ b/tests/Argentina/ArgentinaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/CarnavalMondayTest.php b/tests/Argentina/CarnavalMondayTest.php index e36b0af38..d8b1aad25 100644 --- a/tests/Argentina/CarnavalMondayTest.php +++ b/tests/Argentina/CarnavalMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/CarnavalTuesdayTest.php b/tests/Argentina/CarnavalTuesdayTest.php index 11a5c4a9e..d510bf5ec 100644 --- a/tests/Argentina/CarnavalTuesdayTest.php +++ b/tests/Argentina/CarnavalTuesdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/ChristmasDayTest.php b/tests/Argentina/ChristmasDayTest.php index 1c92d5df2..2d120a733 100644 --- a/tests/Argentina/ChristmasDayTest.php +++ b/tests/Argentina/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/EasterTest.php b/tests/Argentina/EasterTest.php index 477f2726f..67c0cea68 100644 --- a/tests/Argentina/EasterTest.php +++ b/tests/Argentina/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php index eeafa8d73..65f4a0afd 100644 --- a/tests/Argentina/FlagDayTest.php +++ b/tests/Argentina/FlagDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php index 1f1ad528c..458afa5d1 100644 --- a/tests/Argentina/GeneralJoseSanMartinDayTest.php +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php index 20062cd5d..648eaa108 100644 --- a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/GoodFridayTest.php b/tests/Argentina/GoodFridayTest.php index 8a8f0ac7f..8c4f95eea 100644 --- a/tests/Argentina/GoodFridayTest.php +++ b/tests/Argentina/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php index 84a0ab7e3..ce495970d 100644 --- a/tests/Argentina/ImmaculateConceptionDayTest.php +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php index 09d3ea31d..7a4a375f6 100644 --- a/tests/Argentina/IndependenceDayTest.php +++ b/tests/Argentina/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/InternationalWorkersDayTest.php b/tests/Argentina/InternationalWorkersDayTest.php index 92cb4f556..346ab0438 100644 --- a/tests/Argentina/InternationalWorkersDayTest.php +++ b/tests/Argentina/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/MalvinasDayTest.php b/tests/Argentina/MalvinasDayTest.php index 88cbb308e..af91840c6 100644 --- a/tests/Argentina/MalvinasDayTest.php +++ b/tests/Argentina/MalvinasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php index 570fabf97..e5e7bd335 100644 --- a/tests/Argentina/MayRevolutionTest.php +++ b/tests/Argentina/MayRevolutionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php index 8d9553ffa..e55e04acb 100644 --- a/tests/Argentina/NationalSovereigntyDayTest.php +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/NewYearsDayTest.php b/tests/Argentina/NewYearsDayTest.php index 8eba94984..5a7e1f11f 100644 --- a/tests/Argentina/NewYearsDayTest.php +++ b/tests/Argentina/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php index 87f4a9482..389278ec1 100644 --- a/tests/Argentina/RaceDayTest.php +++ b/tests/Argentina/RaceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Argentina/RemembranceDayTest.php b/tests/Argentina/RemembranceDayTest.php index a9167147d..83a88f75b 100644 --- a/tests/Argentina/RemembranceDayTest.php +++ b/tests/Argentina/RemembranceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Argentina; diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 240709ddb..48bcd652e 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/AustraliaBaseTestCase.php b/tests/Australia/AustraliaBaseTestCase.php index c979672e8..52085cdc1 100644 --- a/tests/Australia/AustraliaBaseTestCase.php +++ b/tests/Australia/AustraliaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index cd45c8646..09ab06f8a 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 06f4e10ef..22a614269 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php index 515a80bc1..03fec759a 100644 --- a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php index ce327128a..e98702942 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php index 366846f11..dc8360e16 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index 7fe5a4b42..2d48c95b0 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php index dafb1f31c..40467e37d 100644 --- a/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index c10c9dced..1d997a368 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php index 4b3603af2..368ac3cef 100644 --- a/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php index 8c93cdade..40e742962 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index 87c87f6ac..26ca10416 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index 55444ffd9..fb73a78d9 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php index d1b05e729..9b65da7b6 100644 --- a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index 7f1f0d2e6..9bdd92a33 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php index f3fabca8e..7ded580ec 100644 --- a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index 4322fcfaf..f946e0c25 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index 10023a93e..0b78f2ba2 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index d415fcbbc..b04ed1771 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index f0f3d1f6d..b5543624d 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index ff55f704e..cb915f5f3 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index 047dc6708..fa61c14f9 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/NewSouthWales/AnzacDayTest.php b/tests/Australia/NewSouthWales/AnzacDayTest.php index 106f42875..a83c8b4c8 100644 --- a/tests/Australia/NewSouthWales/AnzacDayTest.php +++ b/tests/Australia/NewSouthWales/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/AustraliaDayTest.php b/tests/Australia/NewSouthWales/AustraliaDayTest.php index 1b82ed7e7..26c4911da 100644 --- a/tests/Australia/NewSouthWales/AustraliaDayTest.php +++ b/tests/Australia/NewSouthWales/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index ebaaddd63..c88ce413f 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/BoxingDayTest.php b/tests/Australia/NewSouthWales/BoxingDayTest.php index 08cfd99fd..e050951f3 100644 --- a/tests/Australia/NewSouthWales/BoxingDayTest.php +++ b/tests/Australia/NewSouthWales/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/ChristmasDayTest.php b/tests/Australia/NewSouthWales/ChristmasDayTest.php index ed38df236..4a75bdffc 100644 --- a/tests/Australia/NewSouthWales/ChristmasDayTest.php +++ b/tests/Australia/NewSouthWales/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/EasterMondayTest.php b/tests/Australia/NewSouthWales/EasterMondayTest.php index 9d8ad19c9..4a1c44a62 100644 --- a/tests/Australia/NewSouthWales/EasterMondayTest.php +++ b/tests/Australia/NewSouthWales/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index 206332a53..8886a4472 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index df556abf4..bd73133ec 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/GoodFridayTest.php b/tests/Australia/NewSouthWales/GoodFridayTest.php index 5fac8e48a..0eaa5e076 100644 --- a/tests/Australia/NewSouthWales/GoodFridayTest.php +++ b/tests/Australia/NewSouthWales/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index 5f1484424..05951e516 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php index 69956e283..91a391485 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index c36b4fb8f..cca33c8d9 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/NewYearsDayTest.php b/tests/Australia/NewSouthWales/NewYearsDayTest.php index c8ce5f5cb..90d948180 100644 --- a/tests/Australia/NewSouthWales/NewYearsDayTest.php +++ b/tests/Australia/NewSouthWales/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index fd50ad95f..bbcf37040 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NewSouthWales; diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index ed930eba6..4e1178d95 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia; diff --git a/tests/Australia/NorthernTerritory/AnzacDayTest.php b/tests/Australia/NorthernTerritory/AnzacDayTest.php index ec1328337..c4d6623ae 100644 --- a/tests/Australia/NorthernTerritory/AnzacDayTest.php +++ b/tests/Australia/NorthernTerritory/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/AustraliaDayTest.php b/tests/Australia/NorthernTerritory/AustraliaDayTest.php index 3a47d5e2c..ce7d44f17 100644 --- a/tests/Australia/NorthernTerritory/AustraliaDayTest.php +++ b/tests/Australia/NorthernTerritory/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/BoxingDayTest.php b/tests/Australia/NorthernTerritory/BoxingDayTest.php index 7fa71596d..a6e349ad8 100644 --- a/tests/Australia/NorthernTerritory/BoxingDayTest.php +++ b/tests/Australia/NorthernTerritory/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/ChristmasDayTest.php b/tests/Australia/NorthernTerritory/ChristmasDayTest.php index 23d1043ad..159f50e85 100644 --- a/tests/Australia/NorthernTerritory/ChristmasDayTest.php +++ b/tests/Australia/NorthernTerritory/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/EasterMondayTest.php b/tests/Australia/NorthernTerritory/EasterMondayTest.php index b2e628f57..f525e67db 100644 --- a/tests/Australia/NorthernTerritory/EasterMondayTest.php +++ b/tests/Australia/NorthernTerritory/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 9ec09a5cc..9e9714a3e 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/GoodFridayTest.php b/tests/Australia/NorthernTerritory/GoodFridayTest.php index 2d8f553a7..7724cd26a 100644 --- a/tests/Australia/NorthernTerritory/GoodFridayTest.php +++ b/tests/Australia/NorthernTerritory/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index 39ddd0a78..ebabeaf41 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/NewYearsDayTest.php b/tests/Australia/NorthernTerritory/NewYearsDayTest.php index e33656f88..796f0a26e 100644 --- a/tests/Australia/NorthernTerritory/NewYearsDayTest.php +++ b/tests/Australia/NorthernTerritory/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php index e4b47602b..d0a41673a 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index 784016d5e..6b7a51150 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index 94e09af82..6ba24c77c 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index 3dc55f688..e83294147 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\NorthernTerritory; diff --git a/tests/Australia/Queensland/AnzacDayTest.php b/tests/Australia/Queensland/AnzacDayTest.php index 0a39349f5..ef267915a 100644 --- a/tests/Australia/Queensland/AnzacDayTest.php +++ b/tests/Australia/Queensland/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/AustraliaDayTest.php b/tests/Australia/Queensland/AustraliaDayTest.php index c63103d34..42fea23fb 100644 --- a/tests/Australia/Queensland/AustraliaDayTest.php +++ b/tests/Australia/Queensland/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/BoxingDayTest.php b/tests/Australia/Queensland/BoxingDayTest.php index 3d061c780..be3eb0b47 100644 --- a/tests/Australia/Queensland/BoxingDayTest.php +++ b/tests/Australia/Queensland/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/Brisbane/AnzacDayTest.php b/tests/Australia/Queensland/Brisbane/AnzacDayTest.php index f95132002..5c2cfc3c8 100644 --- a/tests/Australia/Queensland/Brisbane/AnzacDayTest.php +++ b/tests/Australia/Queensland/Brisbane/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php b/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php index b6ac2f26a..b8785798e 100644 --- a/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php +++ b/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/BoxingDayTest.php b/tests/Australia/Queensland/Brisbane/BoxingDayTest.php index 6dfdaf64c..1bfe2183b 100644 --- a/tests/Australia/Queensland/Brisbane/BoxingDayTest.php +++ b/tests/Australia/Queensland/Brisbane/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php b/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php index 9cd4cb73a..e5a18abd4 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index d654da462..6982e325d 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php b/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php index 5d4d969b3..281c4b809 100644 --- a/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php +++ b/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/EasterMondayTest.php b/tests/Australia/Queensland/Brisbane/EasterMondayTest.php index 4dd395940..583df40dc 100644 --- a/tests/Australia/Queensland/Brisbane/EasterMondayTest.php +++ b/tests/Australia/Queensland/Brisbane/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/GoodFridayTest.php b/tests/Australia/Queensland/Brisbane/GoodFridayTest.php index 94e1a5fbd..78794364f 100644 --- a/tests/Australia/Queensland/Brisbane/GoodFridayTest.php +++ b/tests/Australia/Queensland/Brisbane/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/LabourDayTest.php b/tests/Australia/Queensland/Brisbane/LabourDayTest.php index 435be2833..6a25e7377 100644 --- a/tests/Australia/Queensland/Brisbane/LabourDayTest.php +++ b/tests/Australia/Queensland/Brisbane/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php b/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php index 68d571804..dbeee22c0 100644 --- a/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php +++ b/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 042603a7f..fa82eb1bf 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php b/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php index 7f63426bd..6fdd889f3 100644 --- a/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland\Brisbane; diff --git a/tests/Australia/Queensland/ChristmasDayTest.php b/tests/Australia/Queensland/ChristmasDayTest.php index 49c09bbda..798ddbac5 100644 --- a/tests/Australia/Queensland/ChristmasDayTest.php +++ b/tests/Australia/Queensland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/EasterMondayTest.php b/tests/Australia/Queensland/EasterMondayTest.php index e4bd400e7..c6c6fac97 100644 --- a/tests/Australia/Queensland/EasterMondayTest.php +++ b/tests/Australia/Queensland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/GoodFridayTest.php b/tests/Australia/Queensland/GoodFridayTest.php index b87d4d34b..fce0193bd 100644 --- a/tests/Australia/Queensland/GoodFridayTest.php +++ b/tests/Australia/Queensland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index b05929a05..7fd6e0679 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/NewYearsDayTest.php b/tests/Australia/Queensland/NewYearsDayTest.php index 23c684b30..6e65a1c6e 100644 --- a/tests/Australia/Queensland/NewYearsDayTest.php +++ b/tests/Australia/Queensland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index 096ef7262..d1ee1f7b0 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/QueenslandBaseTestCase.php b/tests/Australia/Queensland/QueenslandBaseTestCase.php index 7e452684c..fb3825c68 100644 --- a/tests/Australia/Queensland/QueenslandBaseTestCase.php +++ b/tests/Australia/Queensland/QueenslandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 46a0eea32..8cc68abe3 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Queensland; diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index 1273e8c84..8e84883dd 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/AnzacDayTest.php b/tests/Australia/SouthAustralia/AnzacDayTest.php index 3f68c04a0..a71c8ca6f 100644 --- a/tests/Australia/SouthAustralia/AnzacDayTest.php +++ b/tests/Australia/SouthAustralia/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/AustraliaDayTest.php b/tests/Australia/SouthAustralia/AustraliaDayTest.php index 2594b2a2d..34f98df24 100644 --- a/tests/Australia/SouthAustralia/AustraliaDayTest.php +++ b/tests/Australia/SouthAustralia/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 3bf3b1e0d..261d6992f 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/EasterMondayTest.php b/tests/Australia/SouthAustralia/EasterMondayTest.php index 38efc7f46..8741b3d0d 100644 --- a/tests/Australia/SouthAustralia/EasterMondayTest.php +++ b/tests/Australia/SouthAustralia/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index f3f47d10c..1d5af8746 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/GoodFridayTest.php b/tests/Australia/SouthAustralia/GoodFridayTest.php index 78006d064..817146149 100644 --- a/tests/Australia/SouthAustralia/GoodFridayTest.php +++ b/tests/Australia/SouthAustralia/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index 182c2b9cc..73f7f8db0 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/NewYearsDayTest.php b/tests/Australia/SouthAustralia/NewYearsDayTest.php index 20ed5828e..2dc2ca8e4 100644 --- a/tests/Australia/SouthAustralia/NewYearsDayTest.php +++ b/tests/Australia/SouthAustralia/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index eda3e596e..77a849a05 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index 3118e5b27..8a83852f4 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php index 3d707395a..350ccc0af 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index a3e32945a..9f348c698 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\SouthAustralia; diff --git a/tests/Australia/Tasmania/AnzacDayTest.php b/tests/Australia/Tasmania/AnzacDayTest.php index abb55bc08..b1c6a8b18 100644 --- a/tests/Australia/Tasmania/AnzacDayTest.php +++ b/tests/Australia/Tasmania/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/AustraliaDayTest.php b/tests/Australia/Tasmania/AustraliaDayTest.php index 25c540312..caa329b63 100644 --- a/tests/Australia/Tasmania/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/BoxingDayTest.php b/tests/Australia/Tasmania/BoxingDayTest.php index a79443864..e3c7f9725 100644 --- a/tests/Australia/Tasmania/BoxingDayTest.php +++ b/tests/Australia/Tasmania/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php b/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php index 418d17cb2..4ee87297f 100644 --- a/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php b/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php index 59b20510d..5f36120db 100644 --- a/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php b/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php index 2aad9eb63..18b49f309 100644 --- a/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php index 15ca4a058..792853813 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index df1df351f..74d34d362 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php b/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php index 344b0d099..14e6d9c8e 100644 --- a/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index 264537fb9..bd8ac6842 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php b/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php index ba268f25a..70b181491 100644 --- a/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php b/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php index b8e410f4c..e0307ba35 100644 --- a/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php b/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php index 4c159a131..f0bf13640 100644 --- a/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php b/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php index 2770d888e..b32d31dd1 100644 --- a/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php b/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php index e06da6996..912c0c806 100644 --- a/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php b/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php index 540bb94a7..2a9ddf2c9 100644 --- a/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; diff --git a/tests/Australia/Tasmania/ChristmasDayTest.php b/tests/Australia/Tasmania/ChristmasDayTest.php index 66738d37b..5ee4540b8 100644 --- a/tests/Australia/Tasmania/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/EasterMondayTest.php b/tests/Australia/Tasmania/EasterMondayTest.php index 2f007ee6b..13dc1de1a 100644 --- a/tests/Australia/Tasmania/EasterMondayTest.php +++ b/tests/Australia/Tasmania/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 5846b929a..5f93bc5a5 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php b/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php index b89c70e59..219980b35 100644 --- a/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php b/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php index 5ef3f0baf..2dfafaded 100644 --- a/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php b/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php index 6f3c6f57b..379ae3251 100644 --- a/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php b/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php index ea213b6fc..7c2f617e2 100644 --- a/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php b/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php index d5a4d3705..5df37a4e9 100644 --- a/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php b/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php index 888583c52..67d8d2d13 100644 --- a/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php index 6fba34526..b5929a98f 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index 0043e106f..5ded66c62 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 0bb6e7057..261ab35ec 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php b/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php index f02c4ccdc..60ac761c4 100644 --- a/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php b/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php index 1ab3b06c3..9ee76172b 100644 --- a/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php b/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php index 22e9b73db..d925dd833 100644 --- a/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php b/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php index 8315d5dff..9d047861e 100644 --- a/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; diff --git a/tests/Australia/Tasmania/GoodFridayTest.php b/tests/Australia/Tasmania/GoodFridayTest.php index 72c4ad3cd..d35f556a7 100644 --- a/tests/Australia/Tasmania/GoodFridayTest.php +++ b/tests/Australia/Tasmania/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php b/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php index 9af28568b..c83ab4b39 100644 --- a/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php b/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php index 588e913e6..fc6c681c2 100644 --- a/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php b/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php index 06698dc29..247651f23 100644 --- a/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php b/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php index 98711608f..586ab5314 100644 --- a/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php b/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php index c959e1c8b..530318422 100644 --- a/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php +++ b/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php b/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php index 2eb46bd0c..ca2c5db64 100644 --- a/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php b/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php index 0b2f4b8ad..07979a121 100644 --- a/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php +++ b/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php b/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php index d015e84af..fe538928f 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 7e85127b3..73a007b2e 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index 38278a8cb..ef4ae7482 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php b/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php index 8347219c0..dc563091a 100644 --- a/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php b/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php index 1830eb77a..fefce38a4 100644 --- a/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php b/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php index 743eb28aa..b6109dbc3 100644 --- a/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\KingIsland; diff --git a/tests/Australia/Tasmania/NewYearsDayTest.php b/tests/Australia/Tasmania/NewYearsDayTest.php index c830114e9..a8d4c482f 100644 --- a/tests/Australia/Tasmania/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/Northeast/AnzacDayTest.php b/tests/Australia/Tasmania/Northeast/AnzacDayTest.php index b1289a99d..693508b7e 100644 --- a/tests/Australia/Tasmania/Northeast/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northeast/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php b/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php index 45c6e3a6c..147ff4e67 100644 --- a/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/BoxingDayTest.php b/tests/Australia/Tasmania/Northeast/BoxingDayTest.php index 2d6305c39..f1cf2983b 100644 --- a/tests/Australia/Tasmania/Northeast/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northeast/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php b/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php index 2a8b11812..0a7afa4e7 100644 --- a/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/EasterMondayTest.php b/tests/Australia/Tasmania/Northeast/EasterMondayTest.php index c9e7562e1..41a1edbf9 100644 --- a/tests/Australia/Tasmania/Northeast/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northeast/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/EightHourDayTest.php b/tests/Australia/Tasmania/Northeast/EightHourDayTest.php index b697055e5..23abe1852 100644 --- a/tests/Australia/Tasmania/Northeast/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northeast/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/GoodFridayTest.php b/tests/Australia/Tasmania/Northeast/GoodFridayTest.php index 84f2fe1f6..8b1d8185d 100644 --- a/tests/Australia/Tasmania/Northeast/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northeast/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 58ad3435e..936f9f5ec 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php b/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php index 1252ebb53..5e1f63723 100644 --- a/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php b/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php index a8c393502..7828138aa 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php +++ b/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index ad0668d32..2cd8c198e 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php index cb0d0089a..5aae36b1f 100644 --- a/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northeast/RecreationDayTest.php b/tests/Australia/Tasmania/Northeast/RecreationDayTest.php index 76d4473d7..cb10db520 100644 --- a/tests/Australia/Tasmania/Northeast/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northeast/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northeast; diff --git a/tests/Australia/Tasmania/Northwest/AnzacDayTest.php b/tests/Australia/Tasmania/Northwest/AnzacDayTest.php index 59667d284..cb1a621df 100644 --- a/tests/Australia/Tasmania/Northwest/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northwest/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php b/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php index 5e2c290fc..8776309d7 100644 --- a/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/BoxingDayTest.php b/tests/Australia/Tasmania/Northwest/BoxingDayTest.php index 4c6b7e652..ee2b3ecf5 100644 --- a/tests/Australia/Tasmania/Northwest/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northwest/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index 7ced08e4c..132827b39 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php b/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php index ddd4121c1..007a6ac0a 100644 --- a/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 854c18d75..8aab4c5cd 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php index 6f3c28714..f73af536f 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php index 495657eea..a0eec524a 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php index 94eaba8b5..c796a5f1f 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php index 5527c6f98..2082c4dcd 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php index 7d3b1d412..b638739dc 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php index 6fee7cdb6..fbe834056 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index a59c7f771..9c7924f03 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php index 60601fefb..a9004a510 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php index 23a71d0b4..86e9297e2 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php index 0dba4e3fe..2487f237c 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php index 3eec4302e..ffb1ecf55 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php index 95e8878d3..dddd6cd40 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php index c100a9a77..7be961b75 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; diff --git a/tests/Australia/Tasmania/Northwest/EasterMondayTest.php b/tests/Australia/Tasmania/Northwest/EasterMondayTest.php index d704b21f8..3541fe2c1 100644 --- a/tests/Australia/Tasmania/Northwest/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northwest/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/EightHourDayTest.php b/tests/Australia/Tasmania/Northwest/EightHourDayTest.php index 2a210e4f3..1f2e9d31b 100644 --- a/tests/Australia/Tasmania/Northwest/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northwest/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/GoodFridayTest.php b/tests/Australia/Tasmania/Northwest/GoodFridayTest.php index 315161f3f..7415a80b2 100644 --- a/tests/Australia/Tasmania/Northwest/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northwest/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php b/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php index 132f58a72..aa41dadaa 100644 --- a/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php b/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php index fcf831d9a..0ac65c780 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index 6f7d790d7..5684f5d55 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php index 70e70da41..7216d5ac1 100644 --- a/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/Northwest/RecreationDayTest.php b/tests/Australia/Tasmania/Northwest/RecreationDayTest.php index 221e39fc8..5216e7932 100644 --- a/tests/Australia/Tasmania/Northwest/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northwest/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\Northwest; diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 612520c82..e6672897d 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 332337ca4..f6fbe4441 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/South/AnzacDayTest.php b/tests/Australia/Tasmania/South/AnzacDayTest.php index 2b7904546..c30d9c53e 100644 --- a/tests/Australia/Tasmania/South/AnzacDayTest.php +++ b/tests/Australia/Tasmania/South/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/AustraliaDayTest.php b/tests/Australia/Tasmania/South/AustraliaDayTest.php index 9da90a43e..8fbff55c4 100644 --- a/tests/Australia/Tasmania/South/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/South/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/BoxingDayTest.php b/tests/Australia/Tasmania/South/BoxingDayTest.php index 54c5ef5fc..8de7c7bdd 100644 --- a/tests/Australia/Tasmania/South/BoxingDayTest.php +++ b/tests/Australia/Tasmania/South/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/ChristmasDayTest.php b/tests/Australia/Tasmania/South/ChristmasDayTest.php index cd42d9a19..f3aab9a5b 100644 --- a/tests/Australia/Tasmania/South/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/South/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/EasterMondayTest.php b/tests/Australia/Tasmania/South/EasterMondayTest.php index 7daec67d3..dcbadf76d 100644 --- a/tests/Australia/Tasmania/South/EasterMondayTest.php +++ b/tests/Australia/Tasmania/South/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/EightHourDayTest.php b/tests/Australia/Tasmania/South/EightHourDayTest.php index f43c1ab77..4bb25c640 100644 --- a/tests/Australia/Tasmania/South/EightHourDayTest.php +++ b/tests/Australia/Tasmania/South/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/GoodFridayTest.php b/tests/Australia/Tasmania/South/GoodFridayTest.php index e7b59d20b..5af07b9ce 100644 --- a/tests/Australia/Tasmania/South/GoodFridayTest.php +++ b/tests/Australia/Tasmania/South/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index a69190ace..233d65a15 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/NewYearsDayTest.php b/tests/Australia/Tasmania/South/NewYearsDayTest.php index 12a5d6f3f..b8ce0f402 100644 --- a/tests/Australia/Tasmania/South/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/South/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/QueensBirthdayTest.php b/tests/Australia/Tasmania/South/QueensBirthdayTest.php index 813ca0c49..55b5f61c0 100644 --- a/tests/Australia/Tasmania/South/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/South/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/RecreationDayTest.php b/tests/Australia/Tasmania/South/RecreationDayTest.php index dcec5b0ec..d7a046251 100644 --- a/tests/Australia/Tasmania/South/RecreationDayTest.php +++ b/tests/Australia/Tasmania/South/RecreationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/SouthBaseTestCase.php b/tests/Australia/Tasmania/South/SouthBaseTestCase.php index 6d2c333e1..dd6928de6 100644 --- a/tests/Australia/Tasmania/South/SouthBaseTestCase.php +++ b/tests/Australia/Tasmania/South/SouthBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index d332441f9..33457ed73 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South; diff --git a/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php b/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php index 51e45cb20..09dcb0f0f 100644 --- a/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php b/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php index 2543a3787..c4df5432d 100644 --- a/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php b/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php index 5773f9688..69c14b49d 100644 --- a/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php b/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php index d072075f7..9d850cac5 100644 --- a/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php b/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php index f4172e5f1..466aede58 100644 --- a/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php b/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php index a858c28e5..be559a445 100644 --- a/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php b/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php index 39137732c..6ee000dbb 100644 --- a/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 323a1c4e7..5da6997a7 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php b/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php index 9c1d2386b..27c1e3349 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php b/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php index 164720e7f..4b1086cbd 100644 --- a/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php b/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php index 5bd08cf37..6a9507ac4 100644 --- a/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php b/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php index 16682c945..60bebcdc2 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index 2b227edb4..32602554d 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; diff --git a/tests/Australia/Tasmania/TasmaniaBaseTestCase.php b/tests/Australia/Tasmania/TasmaniaBaseTestCase.php index 52a1da190..6962d554a 100644 --- a/tests/Australia/Tasmania/TasmaniaBaseTestCase.php +++ b/tests/Australia/Tasmania/TasmaniaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 7b5e4e264..eeeb0f409 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Tasmania; diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index bf5d39e96..4ca20039e 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/AnzacDayTest.php b/tests/Australia/Victoria/AnzacDayTest.php index d5f39b270..46857273f 100644 --- a/tests/Australia/Victoria/AnzacDayTest.php +++ b/tests/Australia/Victoria/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/AustraliaDayTest.php b/tests/Australia/Victoria/AustraliaDayTest.php index 9f555b87d..cea38c753 100644 --- a/tests/Australia/Victoria/AustraliaDayTest.php +++ b/tests/Australia/Victoria/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/BoxingDayTest.php b/tests/Australia/Victoria/BoxingDayTest.php index 2df87e96d..0a6a0f062 100644 --- a/tests/Australia/Victoria/BoxingDayTest.php +++ b/tests/Australia/Victoria/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/ChristmasDayTest.php b/tests/Australia/Victoria/ChristmasDayTest.php index 953c62bf9..b971d0d3f 100644 --- a/tests/Australia/Victoria/ChristmasDayTest.php +++ b/tests/Australia/Victoria/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/EasterMondayTest.php b/tests/Australia/Victoria/EasterMondayTest.php index c2bc758e7..52b7bc02f 100644 --- a/tests/Australia/Victoria/EasterMondayTest.php +++ b/tests/Australia/Victoria/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index d56ae0e54..84c3ecc2b 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index a9ca2ed9f..1ebe813a6 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/GoodFridayTest.php b/tests/Australia/Victoria/GoodFridayTest.php index a0b825aaa..d246bccb4 100644 --- a/tests/Australia/Victoria/GoodFridayTest.php +++ b/tests/Australia/Victoria/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 973cdf133..390eb8bf2 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 3ef366aed..a7b166f35 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/NewYearsDayTest.php b/tests/Australia/Victoria/NewYearsDayTest.php index fac5632df..206c4e244 100644 --- a/tests/Australia/Victoria/NewYearsDayTest.php +++ b/tests/Australia/Victoria/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 8b2df4b36..11b6cd7aa 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/VictoriaBaseTestCase.php b/tests/Australia/Victoria/VictoriaBaseTestCase.php index b76fd966e..400f2064a 100644 --- a/tests/Australia/Victoria/VictoriaBaseTestCase.php +++ b/tests/Australia/Victoria/VictoriaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 50d4fadd2..73b0c7c26 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\Victoria; diff --git a/tests/Australia/WesternAustralia/AnzacDayTest.php b/tests/Australia/WesternAustralia/AnzacDayTest.php index 0eae58bed..44dc2a1c9 100644 --- a/tests/Australia/WesternAustralia/AnzacDayTest.php +++ b/tests/Australia/WesternAustralia/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/AustraliaDayTest.php b/tests/Australia/WesternAustralia/AustraliaDayTest.php index 136472bd5..e8e395ac7 100644 --- a/tests/Australia/WesternAustralia/AustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/AustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/BoxingDayTest.php b/tests/Australia/WesternAustralia/BoxingDayTest.php index fadded51f..548197de0 100644 --- a/tests/Australia/WesternAustralia/BoxingDayTest.php +++ b/tests/Australia/WesternAustralia/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/ChristmasDayTest.php b/tests/Australia/WesternAustralia/ChristmasDayTest.php index 277855711..445a89ea6 100644 --- a/tests/Australia/WesternAustralia/ChristmasDayTest.php +++ b/tests/Australia/WesternAustralia/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/EasterMondayTest.php b/tests/Australia/WesternAustralia/EasterMondayTest.php index 281d08395..844fad561 100644 --- a/tests/Australia/WesternAustralia/EasterMondayTest.php +++ b/tests/Australia/WesternAustralia/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/GoodFridayTest.php b/tests/Australia/WesternAustralia/GoodFridayTest.php index 5978d9bd3..ced934315 100644 --- a/tests/Australia/WesternAustralia/GoodFridayTest.php +++ b/tests/Australia/WesternAustralia/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index 413b7cc8f..153179d63 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/NewYearsDayTest.php b/tests/Australia/WesternAustralia/NewYearsDayTest.php index 243e21981..123b09e8a 100644 --- a/tests/Australia/WesternAustralia/NewYearsDayTest.php +++ b/tests/Australia/WesternAustralia/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index 5a783d1dd..a3f2c79aa 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php index f18dca0a1..0814b90b5 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index 876e69f44..2c7fded4c 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index 925a6196e..6447710ef 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Australia\WesternAustralia; diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index a1ff66400..13579e2ee 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index 077e89d09..b952b6bb0 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 8002c84f0..6e30aac47 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/AustriaBaseTestCase.php b/tests/Austria/AustriaBaseTestCase.php index b966c32ce..0c7492a9e 100644 --- a/tests/Austria/AustriaBaseTestCase.php +++ b/tests/Austria/AustriaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 642f546d6..305989849 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/Burgenland/BurgenlandBaseTestCase.php b/tests/Austria/Burgenland/BurgenlandBaseTestCase.php index 3544ced88..3805b45be 100644 --- a/tests/Austria/Burgenland/BurgenlandBaseTestCase.php +++ b/tests/Austria/Burgenland/BurgenlandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Burgenland; diff --git a/tests/Austria/Burgenland/BurgenlandTest.php b/tests/Austria/Burgenland/BurgenlandTest.php index fb4165457..59b6f7ac4 100644 --- a/tests/Austria/Burgenland/BurgenlandTest.php +++ b/tests/Austria/Burgenland/BurgenlandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Burgenland; diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index 93d2a0a55..72bd26a27 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Burgenland; diff --git a/tests/Austria/Carinthia/CarinthiaBaseTestCase.php b/tests/Austria/Carinthia/CarinthiaBaseTestCase.php index c0107d384..65077385c 100644 --- a/tests/Austria/Carinthia/CarinthiaBaseTestCase.php +++ b/tests/Austria/Carinthia/CarinthiaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Carinthia; diff --git a/tests/Austria/Carinthia/CarinthiaTest.php b/tests/Austria/Carinthia/CarinthiaTest.php index 8b469c2c9..b603ad416 100644 --- a/tests/Austria/Carinthia/CarinthiaTest.php +++ b/tests/Austria/Carinthia/CarinthiaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Carinthia; diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 524360933..4241d288a 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Carinthia; diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index 5a8b88061..1ac72f817 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Carinthia; diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 2308a3d7a..7c243fd5f 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index e0cca45a1..1b5dfe0fa 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index 4b8653264..e3b3fafcd 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index 26db25772..362f49c16 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 076f22d53..28bc7b759 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index 118e7a46a..15c4e12cd 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index e3c198862..b3da186d9 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php b/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php index 8773c1527..0e48f7665 100644 --- a/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php +++ b/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\LowerAustria; diff --git a/tests/Austria/LowerAustria/LowerAustriaTest.php b/tests/Austria/LowerAustria/LowerAustriaTest.php index f107ae319..41fc2ae1d 100644 --- a/tests/Austria/LowerAustria/LowerAustriaTest.php +++ b/tests/Austria/LowerAustria/LowerAustriaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\LowerAustria; diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 773eb31ff..39bea4a69 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\LowerAustria; diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 7815bc42b..4dae40559 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index e6d11a10a..65c2111f1 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index 86bf9f078..8a9ef2cd4 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index 5114927ab..caed66870 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/Salzburg/SalzburgBaseTestCase.php b/tests/Austria/Salzburg/SalzburgBaseTestCase.php index 9cbb8654c..729185280 100644 --- a/tests/Austria/Salzburg/SalzburgBaseTestCase.php +++ b/tests/Austria/Salzburg/SalzburgBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Salzburg; diff --git a/tests/Austria/Salzburg/SalzburgTest.php b/tests/Austria/Salzburg/SalzburgTest.php index 2b69c4f4b..e921edc6f 100644 --- a/tests/Austria/Salzburg/SalzburgTest.php +++ b/tests/Austria/Salzburg/SalzburgTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Salzburg; diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index f7573627a..ce32e822c 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Salzburg; diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index aec714f2f..438b37c48 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria; diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index 3602b8e78..090095778 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Styria; diff --git a/tests/Austria/Styria/StyriaBaseTestCase.php b/tests/Austria/Styria/StyriaBaseTestCase.php index bd0f4288b..d396e0035 100644 --- a/tests/Austria/Styria/StyriaBaseTestCase.php +++ b/tests/Austria/Styria/StyriaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Styria; diff --git a/tests/Austria/Styria/StyriaTest.php b/tests/Austria/Styria/StyriaTest.php index 309c16bd7..808e85a3e 100644 --- a/tests/Austria/Styria/StyriaTest.php +++ b/tests/Austria/Styria/StyriaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Styria; diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index 5009dadf9..567aa662b 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Tyrol; diff --git a/tests/Austria/Tyrol/TyrolBaseTestCase.php b/tests/Austria/Tyrol/TyrolBaseTestCase.php index 943950374..40ce2e666 100644 --- a/tests/Austria/Tyrol/TyrolBaseTestCase.php +++ b/tests/Austria/Tyrol/TyrolBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Tyrol; diff --git a/tests/Austria/Tyrol/TyrolTest.php b/tests/Austria/Tyrol/TyrolTest.php index e29608497..8c1e70573 100644 --- a/tests/Austria/Tyrol/TyrolTest.php +++ b/tests/Austria/Tyrol/TyrolTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Tyrol; diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index 606bb0df9..ea884ad4c 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\UpperAustria; diff --git a/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php b/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php index 24e43c528..d7a6f530e 100644 --- a/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php +++ b/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\UpperAustria; diff --git a/tests/Austria/UpperAustria/UpperAustriaTest.php b/tests/Austria/UpperAustria/UpperAustriaTest.php index d8f7b9d6c..ac480b53a 100644 --- a/tests/Austria/UpperAustria/UpperAustriaTest.php +++ b/tests/Austria/UpperAustria/UpperAustriaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\UpperAustria; diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index 53a1e1b47..261eea595 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Vienna; diff --git a/tests/Austria/Vienna/ViennaBaseTestCase.php b/tests/Austria/Vienna/ViennaBaseTestCase.php index 1274ec8dd..5c907d1eb 100644 --- a/tests/Austria/Vienna/ViennaBaseTestCase.php +++ b/tests/Austria/Vienna/ViennaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Vienna; diff --git a/tests/Austria/Vienna/ViennaTest.php b/tests/Austria/Vienna/ViennaTest.php index 636bc485f..f4362bb10 100644 --- a/tests/Austria/Vienna/ViennaTest.php +++ b/tests/Austria/Vienna/ViennaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Vienna; diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index b6a56bb3e..d1b08d0a0 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Vorarlberg; diff --git a/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php b/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php index 4face6380..a1bd13b4e 100644 --- a/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php +++ b/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Vorarlberg; diff --git a/tests/Austria/Vorarlberg/VorarlbergTest.php b/tests/Austria/Vorarlberg/VorarlbergTest.php index 1a3e7abde..03f8f13eb 100644 --- a/tests/Austria/Vorarlberg/VorarlbergTest.php +++ b/tests/Austria/Vorarlberg/VorarlbergTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Austria\Vorarlberg; diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index e027e069b..b8f91f1be 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index 473119169..b2b41797e 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 32667549f..e95a069fe 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 1de0fdf91..8bd9eba42 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 00cc81354..9ceca52ad 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 5a87a5c77..d62d3b05d 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index a91650f11..ccdd52dd5 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index e65423090..182e965df 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/YasumiExternalProvider.php b/tests/Base/YasumiExternalProvider.php index d58ae8df7..224f0f6a1 100644 --- a/tests/Base/YasumiExternalProvider.php +++ b/tests/Base/YasumiExternalProvider.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index bebb31cd1..2a94f3153 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index b8d9f31f6..f626f1101 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Base; diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 178c2c738..618b06697 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index ff1a0c7c3..f20462363 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index b8fcb4f6d..d094730df 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index 43fc0fac2..549afb17f 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/BelgiumBaseTestCase.php b/tests/Belgium/BelgiumBaseTestCase.php index 6d23c5bbc..25c1b6e4a 100644 --- a/tests/Belgium/BelgiumBaseTestCase.php +++ b/tests/Belgium/BelgiumBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index 560a1dfe3..bfb7c5ab0 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 29f72eaab..655962ded 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index c53c3d425..9ecfb2cfa 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index d5c2b06b6..c09320ff3 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index 42d222faa..fb1b2dbb5 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index 84ad1ed1b..fa70f1a51 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index aa5bcc549..4d8de94d1 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 562c47e6a..0a1dfbaf4 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 883806cd3..61c4607f8 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Belgium; diff --git a/tests/Bosnia/BosniaBaseTestCase.php b/tests/Bosnia/BosniaBaseTestCase.php index eb4358ba9..7740f4a9e 100644 --- a/tests/Bosnia/BosniaBaseTestCase.php +++ b/tests/Bosnia/BosniaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index 711ad8efe..7c0230ce8 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index a15b23abf..e4c1195fd 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index 785660a7d..4f214f8cc 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index 6b78384eb..655fd6305 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index 7b481bfb9..d57fdf9dd 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 6fdd4a84c..aed695158 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index d677b7d9a..f0a7ac3ec 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index 98b42e075..2ed5e63ac 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index b3d89ce46..0c3389364 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index 3d56bb882..4d5f0c93f 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Bosnia; diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index e7b45f9fc..ed75ab3ba 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 16492ea84..69163062f 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/BrazilBaseTestCase.php b/tests/Brazil/BrazilBaseTestCase.php index 2792b2e72..7e3b53421 100644 --- a/tests/Brazil/BrazilBaseTestCase.php +++ b/tests/Brazil/BrazilBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 925dd03d2..304681a74 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index 872ae1ccc..26a2afd25 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index b79bc47de..ca3b1759b 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index ab3178ed8..603102be9 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index c348e4a75..6752f3c4c 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index 1ce5671d1..b1191ac3b 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index a2d7f9b84..81bfb6758 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index 89463c77c..52cd0c361 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index 6469de4f9..65b25690d 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index a4816fd29..2d07d76c5 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index 518808b14..d485bb340 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index 54471b614..7d07e71dc 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index 420f3682e..7ae9b3738 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Brazil; diff --git a/tests/Canada/Alberta/AlbertaBaseTestCase.php b/tests/Canada/Alberta/AlbertaBaseTestCase.php index b47aebc9f..ef8bc4f4f 100644 --- a/tests/Canada/Alberta/AlbertaBaseTestCase.php +++ b/tests/Canada/Alberta/AlbertaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Alberta; diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index 040883513..9775f8715 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Alberta; diff --git a/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php b/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php index 1c75b8a35..1eb2f2865 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\BritishColumbia; diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index fee63f932..6beee3f5b 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\BritishColumbia; diff --git a/tests/Canada/CanadaBaseTestCase.php b/tests/Canada/CanadaBaseTestCase.php index 12757aeaf..12e4570a6 100644 --- a/tests/Canada/CanadaBaseTestCase.php +++ b/tests/Canada/CanadaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 85f7978f0..9271a1e04 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php index 4d28c9fce..aa31b1d76 100644 --- a/tests/Canada/CanadaTest.php +++ b/tests/Canada/CanadaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index 6abbdc791..a0804ee73 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index 50d3c64f0..de1ea1044 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/Manitoba/ManitobaBaseTestCase.php b/tests/Canada/Manitoba/ManitobaBaseTestCase.php index bcac76a5d..6592bb4f2 100644 --- a/tests/Canada/Manitoba/ManitobaBaseTestCase.php +++ b/tests/Canada/Manitoba/ManitobaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Manitoba; diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index c7ae581e2..2c2204c0c 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Manitoba; diff --git a/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php b/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php index b6414479e..474afd546 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php +++ b/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NewBrunswick; diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index 14ef64b42..3b4f92f3d 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NewBrunswick; diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 1589edd43..544dd784b 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php index f1b3e8d5d..8ed219d7d 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NewfoundlandAndLabrador; diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php index a76887401..55adf8ba4 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NewfoundlandAndLabrador; diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php index a0ef4e5a2..70a814041 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NorthwestTerritories; diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index 3161f627b..ec8a1d196 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NorthwestTerritories; diff --git a/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php b/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php index ab423c6fe..c31d3c829 100644 --- a/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php +++ b/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NovaScotia; diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index 6abc3a977..1f591445d 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\NovaScotia; diff --git a/tests/Canada/Nunavut/NunavutBaseTestCase.php b/tests/Canada/Nunavut/NunavutBaseTestCase.php index 6f30e5994..f5519e485 100644 --- a/tests/Canada/Nunavut/NunavutBaseTestCase.php +++ b/tests/Canada/Nunavut/NunavutBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Nunavut; diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php index e043e0af0..0bcb72155 100644 --- a/tests/Canada/Nunavut/NunavutTest.php +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Nunavut; diff --git a/tests/Canada/Ontario/OntarioBaseTestCase.php b/tests/Canada/Ontario/OntarioBaseTestCase.php index b98f6997e..08236ec80 100644 --- a/tests/Canada/Ontario/OntarioBaseTestCase.php +++ b/tests/Canada/Ontario/OntarioBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Ontario; diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index 99eadb1b8..117a2a321 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Ontario; diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php index 315a675b6..697bd3e0f 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\PrinceEdwardIsland; diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index 1724cc708..3e6ebdff0 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\PrinceEdwardIsland; diff --git a/tests/Canada/Quebec/QuebecBaseTestCase.php b/tests/Canada/Quebec/QuebecBaseTestCase.php index 3872ee265..d349c6aee 100644 --- a/tests/Canada/Quebec/QuebecBaseTestCase.php +++ b/tests/Canada/Quebec/QuebecBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Quebec; diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index 44088a960..64e3179bb 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Quebec; diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index 3fe0d46be..f9bfbac1a 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php b/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php index 6307db3a2..a8996a213 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php +++ b/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Saskatchewan; diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index 666e68f79..0fdb8f0f1 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Saskatchewan; diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index 5f348a2ad..18155736d 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/TruthAndReconciliationDayTest.php b/tests/Canada/TruthAndReconciliationDayTest.php index 9b6506c7f..3ee107938 100644 --- a/tests/Canada/TruthAndReconciliationDayTest.php +++ b/tests/Canada/TruthAndReconciliationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada; diff --git a/tests/Canada/Yukon/YukonBaseTestCase.php b/tests/Canada/Yukon/YukonBaseTestCase.php index cc6da64a8..d72c6b45e 100644 --- a/tests/Canada/Yukon/YukonBaseTestCase.php +++ b/tests/Canada/Yukon/YukonBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Yukon; diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index d7f7a9d2d..d62a53c83 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Canada\Yukon; diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 149e3b41c..580bd8467 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index 91c85bb31..ad5a50171 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index 808ec9d31..13e9a14b0 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 755c6cb16..f880d080e 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index 571c26c89..20b8bcf01 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/CroatiaBaseTestCase.php b/tests/Croatia/CroatiaBaseTestCase.php index 03d19a250..21dcddaeb 100644 --- a/tests/Croatia/CroatiaBaseTestCase.php +++ b/tests/Croatia/CroatiaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/CroatiaTest.php b/tests/Croatia/CroatiaTest.php index 6cc473485..55b00ca72 100644 --- a/tests/Croatia/CroatiaTest.php +++ b/tests/Croatia/CroatiaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 7bf8a3489..16fca9417 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index 04a2e09b0..1a20b505d 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 47a195ed2..26c6e29bc 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index f8a6df479..1671a54e7 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 2190b1365..2ea157559 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index 5d1d685a8..3b46ad045 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index e3ac45182..26027b6a5 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index 5befe232d..48ad1558c 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index bb95d18b2..d9bc68e24 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 7bfcdcd1c..3de09184b 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Croatia; diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 61972caba..2e01f5617 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index c2df6f960..496949858 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/CzechRepublicBaseTestCase.php b/tests/CzechRepublic/CzechRepublicBaseTestCase.php index 66d6a6034..ef0bd1173 100644 --- a/tests/CzechRepublic/CzechRepublicBaseTestCase.php +++ b/tests/CzechRepublic/CzechRepublicBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index 49c9ddb9a..e69602492 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 595621c9b..fbd0d6ab9 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index f9675f4a8..94ffccbb1 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 1c5e33712..08533553f 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 621bd58f5..0866727e2 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index 0966a17ea..df82b5588 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index 5b1cd0256..ddb5295b3 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 1e0683b27..fd93181dc 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index f9eae71c3..3171b7df2 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index bf4770248..c14da0ff5 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index de1fd9a40..90fc97b12 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index b715510c1..c35fe2c67 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index fd5b0ab36..d6d02aa36 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\CzechRepublic; diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index 2343675fa..b17b9f86b 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index de1190222..0e1869ea9 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 10b199bec..6a6961b58 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index dfb9685a6..7023256bd 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/DenmarkBaseTestCase.php b/tests/Denmark/DenmarkBaseTestCase.php index b38fc542a..bcb82f36d 100644 --- a/tests/Denmark/DenmarkBaseTestCase.php +++ b/tests/Denmark/DenmarkBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index b2f6453fb..2c81ab71a 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index 7335cb5c2..87daa37a8 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index de8c46183..f328718b5 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index eb62e1a3e..77e94cb82 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index 5d2881930..66f494a1e 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 29d600807..a285a0425 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index 4da460575..e3f6c5336 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index b7c65f315..1d4290197 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index 3f6913227..955bfb3e1 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 5e864485d..b62d2db43 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index 9fcfc381e..79f58903c 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index 2860921c2..678928845 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index c873aa7cb..d7af59a0c 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 6b6de81ec..792499428 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Denmark; diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 51377898f..091cb53a9 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index 5d030da45..4198750b6 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index 1d5d67726..166d01949 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/EstoniaBaseTestCase.php b/tests/Estonia/EstoniaBaseTestCase.php index 0c3ae1fca..faebab42f 100644 --- a/tests/Estonia/EstoniaBaseTestCase.php +++ b/tests/Estonia/EstoniaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index 1a091d6d6..ec85bda72 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index 88837fecc..87ac7574a 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index 108e43671..4423b2ff3 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index ef1b0a6d9..dd20c54a2 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index 2a24daad3..e9cb9cbee 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 3e9da2140..118c5da78 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index c674338e0..a375a50ae 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index db87d7e9b..71810c769 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index d01ba830c..290307606 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index b13ecfe55..7ff5fda2a 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Estonia; diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index ad7065cbc..577913abe 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index 508b40243..a0dde23d2 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 8d326235f..b8ec6de84 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index 88d3294c9..51b1da3f0 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 73862b26e..6f2170361 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index b2a53241e..f0e44d674 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/FinlandBaseTestCase.php b/tests/Finland/FinlandBaseTestCase.php index 20f8d0402..6cafbbc3e 100644 --- a/tests/Finland/FinlandBaseTestCase.php +++ b/tests/Finland/FinlandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index b7bd8d769..979a377d7 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index f0c9f753a..466d97c0b 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 8a109ff06..07581f40b 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 6e8b165ae..c35742127 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index 6d589bb90..068aa1717 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index 1307a5532..dd67ed761 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 5d92517e5..246c26068 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 4290d8b30..207ea0e67 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Finland; diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index 2b09305b3..c78ee5151 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index 71d10d134..d467049df 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index a675d96e3..484e1e18c 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index fb941fafb..6de074804 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/BasRhin/BasRhinBaseTestCase.php b/tests/France/BasRhin/BasRhinBaseTestCase.php index 48fa74674..f129cef52 100644 --- a/tests/France/BasRhin/BasRhinBaseTestCase.php +++ b/tests/France/BasRhin/BasRhinBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\BasRhin; diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index 9d148d6b6..9dab4cdec 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\BasRhin; diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index e0aa4c1af..f4900022b 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\BasRhin; diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index 35351650e..c51777bcb 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\BasRhin; diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index 5d8d699e2..7e5904013 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index 89cd19783..a32d39000 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 166cae3dd..55a90cdf5 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/FranceBaseTestCase.php b/tests/France/FranceBaseTestCase.php index 596fbdc90..3d37fb0b3 100644 --- a/tests/France/FranceBaseTestCase.php +++ b/tests/France/FranceBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index d90601398..a4a8d3a68 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index f4403ad09..421e5c5dd 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\HautRhin; diff --git a/tests/France/HautRhin/HautRhinBaseTestCase.php b/tests/France/HautRhin/HautRhinBaseTestCase.php index 6bc65f96e..824d877c6 100644 --- a/tests/France/HautRhin/HautRhinBaseTestCase.php +++ b/tests/France/HautRhin/HautRhinBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\HautRhin; diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 8e1e285b6..620bc0a39 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\HautRhin; diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 643d431f9..7d57039ac 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\HautRhin; diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 3230a3c40..1d962eb9d 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index cb9d180b1..a39f5025b 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\Moselle; diff --git a/tests/France/Moselle/MoselleBaseTestCase.php b/tests/France/Moselle/MoselleBaseTestCase.php index 4132e0cc2..c12e1bde6 100644 --- a/tests/France/Moselle/MoselleBaseTestCase.php +++ b/tests/France/Moselle/MoselleBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\Moselle; diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index 977e747d9..bd257c5de 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\Moselle; diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 1fccb9935..439be3ced 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France\Moselle; diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index 2d039082e..7dce92684 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index fd3852c0b..c422a82e0 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 00b8043fd..7d5359a43 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\France; diff --git a/tests/Georgia/GeorgiaBaseTestCase.php b/tests/Georgia/GeorgiaBaseTestCase.php index 811c97cf3..0e9ada00e 100644 --- a/tests/Georgia/GeorgiaBaseTestCase.php +++ b/tests/Georgia/GeorgiaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php index 0d91dd2da..713e91d87 100644 --- a/tests/Georgia/GeorgiaTest.php +++ b/tests/Georgia/GeorgiaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index c6046af5b..79b53ed0b 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index a6b6fb427..d79a5704c 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index e94097b06..1af9ff2e0 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 7f4037bc2..269db3c52 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index cab1d69a7..2aa786d90 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index 66908bb70..5d788be6e 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 81b17a554..332122cea 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index 882c82153..366fd2e57 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index 1f4620d9c..b52ddb52e 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index ba3effc74..4e9685f02 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index d1e8cd478..0b3492da3 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index 15d70b21b..ef56d84c2 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Georgia; diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index 65f575eb5..a3950edc5 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 245b8ea53..7a6db7fe5 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php b/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php index e19474e3d..f5b01e24d 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index e83e03e95..af8ac2ed0 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index 8a1d83700..8b17388f3 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 461732a32..254dc7b15 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php b/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php index 238c7e6d2..9bdefaf71 100644 --- a/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php +++ b/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php b/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php index 88e8c5169..dfb7b6641 100644 --- a/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php +++ b/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\BadenWurttemberg; diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index 6560b7519..80f7be042 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Bavaria/BavariaBaseTestCase.php b/tests/Germany/Bavaria/BavariaBaseTestCase.php index 3ecf69fac..a08bd9fcb 100644 --- a/tests/Germany/Bavaria/BavariaBaseTestCase.php +++ b/tests/Germany/Bavaria/BavariaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index 644b8c906..d6f5c31f0 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index 7dd3a5879..b806ff93c 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index ebc49196b..50ba9182b 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Bavaria/GermanUnityDayTest.php b/tests/Germany/Bavaria/GermanUnityDayTest.php index 342f7dbd4..e452d1bf3 100644 --- a/tests/Germany/Bavaria/GermanUnityDayTest.php +++ b/tests/Germany/Bavaria/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Bavaria/ReformationDay2017Test.php b/tests/Germany/Bavaria/ReformationDay2017Test.php index 1b33ac481..5a08ea0a2 100644 --- a/tests/Germany/Bavaria/ReformationDay2017Test.php +++ b/tests/Germany/Bavaria/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bavaria; diff --git a/tests/Germany/Berlin/BerlinBaseTestCase.php b/tests/Germany/Berlin/BerlinBaseTestCase.php index 61fdc13d2..42fcf4511 100644 --- a/tests/Germany/Berlin/BerlinBaseTestCase.php +++ b/tests/Germany/Berlin/BerlinBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Berlin; diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index 1caec7f61..d4a8c8f48 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Berlin; diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberation2020Test.php index 54b3a63af..75c724390 100644 --- a/tests/Germany/Berlin/DayOfLiberation2020Test.php +++ b/tests/Germany/Berlin/DayOfLiberation2020Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Berlin; diff --git a/tests/Germany/Berlin/GermanUnityDayTest.php b/tests/Germany/Berlin/GermanUnityDayTest.php index 68eaa8bea..2b9e1183a 100644 --- a/tests/Germany/Berlin/GermanUnityDayTest.php +++ b/tests/Germany/Berlin/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Berlin; diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index 1193b8a75..d339363e0 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Berlin; diff --git a/tests/Germany/Berlin/ReformationDay2017Test.php b/tests/Germany/Berlin/ReformationDay2017Test.php index 926b95e53..af10a497c 100644 --- a/tests/Germany/Berlin/ReformationDay2017Test.php +++ b/tests/Germany/Berlin/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Berlin; diff --git a/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php b/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php index 313e4947b..83d790c4a 100644 --- a/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php +++ b/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Brandenburg; diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index 3262f058b..aef48a97d 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Brandenburg; diff --git a/tests/Germany/Brandenburg/GermanUnityDayTest.php b/tests/Germany/Brandenburg/GermanUnityDayTest.php index d738f2411..ad6bf1fd1 100644 --- a/tests/Germany/Brandenburg/GermanUnityDayTest.php +++ b/tests/Germany/Brandenburg/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Brandenburg; diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 59bcd8bbf..29c0658c0 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Brandenburg; diff --git a/tests/Germany/Bremen/BremenBaseTestCase.php b/tests/Germany/Bremen/BremenBaseTestCase.php index ff9138130..5598bfc59 100644 --- a/tests/Germany/Bremen/BremenBaseTestCase.php +++ b/tests/Germany/Bremen/BremenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bremen; diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index b27402f02..cedfda86d 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bremen; diff --git a/tests/Germany/Bremen/GermanUnityDayTest.php b/tests/Germany/Bremen/GermanUnityDayTest.php index 413f87490..3f3c93422 100644 --- a/tests/Germany/Bremen/GermanUnityDayTest.php +++ b/tests/Germany/Bremen/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bremen; diff --git a/tests/Germany/Bremen/ReformationDay2017Test.php b/tests/Germany/Bremen/ReformationDay2017Test.php index 4aae8f5f5..a3d3cc519 100644 --- a/tests/Germany/Bremen/ReformationDay2017Test.php +++ b/tests/Germany/Bremen/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bremen; diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 4ce34facc..e06af97c9 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Bremen; diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index 0fc676611..07f2877a6 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 2519f8d61..745eed5ee 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index 366aa792f..26633b7eb 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/GermanyBaseTestCase.php b/tests/Germany/GermanyBaseTestCase.php index 4d43c50de..a5e25ee66 100644 --- a/tests/Germany/GermanyBaseTestCase.php +++ b/tests/Germany/GermanyBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 36c0fa6e4..8c45e63a3 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index e92148870..d37bbd56e 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 29eefb6e5..838e8cb3e 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hamburg; diff --git a/tests/Germany/Hamburg/GermanUnityDay.php b/tests/Germany/Hamburg/GermanUnityDay.php index 062461fef..f99bd5a6e 100644 --- a/tests/Germany/Hamburg/GermanUnityDay.php +++ b/tests/Germany/Hamburg/GermanUnityDay.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hamburg; diff --git a/tests/Germany/Hamburg/HamburgBaseTestCase.php b/tests/Germany/Hamburg/HamburgBaseTestCase.php index 0a13a9264..361e786ec 100644 --- a/tests/Germany/Hamburg/HamburgBaseTestCase.php +++ b/tests/Germany/Hamburg/HamburgBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hamburg; diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index 6a3a48476..bdbab94de 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hamburg; diff --git a/tests/Germany/Hamburg/ReformationDay2017Test.php b/tests/Germany/Hamburg/ReformationDay2017Test.php index ad0ca781a..b5f059ca7 100644 --- a/tests/Germany/Hamburg/ReformationDay2017Test.php +++ b/tests/Germany/Hamburg/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hamburg; diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index 666f68452..dd6871470 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hesse; diff --git a/tests/Germany/Hesse/GermanUnityDayTest.php b/tests/Germany/Hesse/GermanUnityDayTest.php index 410d3cb01..68c6b5f57 100644 --- a/tests/Germany/Hesse/GermanUnityDayTest.php +++ b/tests/Germany/Hesse/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hesse; diff --git a/tests/Germany/Hesse/HesseBaseTestCase.php b/tests/Germany/Hesse/HesseBaseTestCase.php index 2ae7f4ee6..53242d21c 100644 --- a/tests/Germany/Hesse/HesseBaseTestCase.php +++ b/tests/Germany/Hesse/HesseBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hesse; diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index 53e7aee37..99ad17d11 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hesse; diff --git a/tests/Germany/Hesse/ReformationDay2017Test.php b/tests/Germany/Hesse/ReformationDay2017Test.php index 38cbfc64f..61367bb80 100644 --- a/tests/Germany/Hesse/ReformationDay2017Test.php +++ b/tests/Germany/Hesse/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Hesse; diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index c8f2f2dc0..c6f610643 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/LowerSaxony/GermanUnityDayTest.php b/tests/Germany/LowerSaxony/GermanUnityDayTest.php index ee0fbe3ae..1125f0862 100644 --- a/tests/Germany/LowerSaxony/GermanUnityDayTest.php +++ b/tests/Germany/LowerSaxony/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\LowerSaxony; diff --git a/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php b/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php index 104e302cc..133109a3e 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\LowerSaxony; diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index 24778e1db..5211a4f04 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\LowerSaxony; diff --git a/tests/Germany/LowerSaxony/ReformationDay2017Test.php b/tests/Germany/LowerSaxony/ReformationDay2017Test.php index 8192bdef0..c55e63c28 100644 --- a/tests/Germany/LowerSaxony/ReformationDay2017Test.php +++ b/tests/Germany/LowerSaxony/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\LowerSaxony; diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index dcb054ff5..3374eab95 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\LowerSaxony; diff --git a/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php b/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php index af5c262b6..f2d3104af 100644 --- a/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php index 7d5942bce..2980d7dba 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index b6bf696f0..d621aeac4 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index 54bbdd4d2..68a81e2fc 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index 9b6823b2e..00b370e3f 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index 11d64563f..a42d000f4 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index baa562050..4c346b57e 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\NorthRhineWestphalia; diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index f3178b4dd..3066cdd03 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\NorthRhineWestphalia; diff --git a/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php b/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php index 68a43dfc6..54f6caa86 100644 --- a/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\NorthRhineWestphalia; diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php index 077e92494..afb29f45d 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\NorthRhineWestphalia; diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index ff380f8e2..38ed24a59 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\NorthRhineWestphalia; diff --git a/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php b/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php index ef39f8986..c77a7efa0 100644 --- a/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php +++ b/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\NorthRhineWestphalia; diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 2383312fd..7a84d6265 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 3c3e80870..221ce94cb 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index 586f22b7e..c12b505a1 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index e49976ad3..3e4807131 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\RhinelandPalatinate; diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index a98b469bb..445ebc955 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\RhinelandPalatinate; diff --git a/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php b/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php index aca245b7b..eb2838e66 100644 --- a/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php +++ b/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\RhinelandPalatinate; diff --git a/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php b/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php index a0d8993c9..3a0c68321 100644 --- a/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php +++ b/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\RhinelandPalatinate; diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php index bbe556c4e..dcc8b7111 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\RhinelandPalatinate; diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index 0217904ef..c00733267 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\RhinelandPalatinate; diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index b6e3888a0..ac5819e0d 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 77276f828..a86130098 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index 3203955b7..a266d6bd7 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saarland/GermanUnityDayTest.php b/tests/Germany/Saarland/GermanUnityDayTest.php index d9cca3f7d..d4d2ef2c3 100644 --- a/tests/Germany/Saarland/GermanUnityDayTest.php +++ b/tests/Germany/Saarland/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saarland/ReformationDay2017Test.php b/tests/Germany/Saarland/ReformationDay2017Test.php index 10b933fce..b4e3cd323 100644 --- a/tests/Germany/Saarland/ReformationDay2017Test.php +++ b/tests/Germany/Saarland/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saarland/SaarlandBaseTestCase.php b/tests/Germany/Saarland/SaarlandBaseTestCase.php index da4fe1122..db0afaf3e 100644 --- a/tests/Germany/Saarland/SaarlandBaseTestCase.php +++ b/tests/Germany/Saarland/SaarlandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 066ccb9ae..593b6ab91 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saarland; diff --git a/tests/Germany/Saxony/GermanUnityDayTest.php b/tests/Germany/Saxony/GermanUnityDayTest.php index c4bdb4cb4..dcce24f21 100644 --- a/tests/Germany/Saxony/GermanUnityDayTest.php +++ b/tests/Germany/Saxony/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saxony; diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 87542c655..393243a2e 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saxony; diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index 578eeab8a..ef9429e7d 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saxony; diff --git a/tests/Germany/Saxony/SaxonyBaseTestCase.php b/tests/Germany/Saxony/SaxonyBaseTestCase.php index 7768f3e2a..45ce5d71b 100644 --- a/tests/Germany/Saxony/SaxonyBaseTestCase.php +++ b/tests/Germany/Saxony/SaxonyBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saxony; diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index 7b9e7aa9a..ac007def4 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Saxony; diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index 407ba6d9c..e1968ac96 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SaxonyAnhalt; diff --git a/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php b/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php index ee5f90274..a3ba82f65 100644 --- a/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php +++ b/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SaxonyAnhalt; diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index 94c35e0e3..dbec24d74 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SaxonyAnhalt; diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php index de20bf90a..a5e099965 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SaxonyAnhalt; diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index c8dab606b..39866be4f 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SaxonyAnhalt; diff --git a/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php b/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php index 7cbfc61b3..729a8acc9 100644 --- a/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php +++ b/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SchleswigHolstein; diff --git a/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php b/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php index e6ad84544..8e2c34032 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php +++ b/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SchleswigHolstein; diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index e78d3ff6f..03767debb 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SchleswigHolstein; diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php index 22c9982cb..cb66d5f21 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SchleswigHolstein; diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index 5c530aab8..f70e3326e 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\SchleswigHolstein; diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index 8c92e0184..b4b819b10 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany; diff --git a/tests/Germany/Thuringia/GermanUnityDayTest.php b/tests/Germany/Thuringia/GermanUnityDayTest.php index 2bbb41605..48b9853df 100644 --- a/tests/Germany/Thuringia/GermanUnityDayTest.php +++ b/tests/Germany/Thuringia/GermanUnityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Thuringia; diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index caf6c8313..1bc00a392 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Thuringia; diff --git a/tests/Germany/Thuringia/ThuringiaBaseTestCase.php b/tests/Germany/Thuringia/ThuringiaBaseTestCase.php index eefff46f0..755bc149a 100644 --- a/tests/Germany/Thuringia/ThuringiaBaseTestCase.php +++ b/tests/Germany/Thuringia/ThuringiaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Thuringia; diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index ee3729446..ba397c717 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Thuringia; diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index 7fca50c42..6141fb6ab 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Germany\Thuringia; diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 54f3a5704..e3a664e79 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index e3a25cac3..442ac7ab8 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index cd371a84e..38a321417 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 7b171954d..f7e6e60ec 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index 9c942d75c..025fc6c1e 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 738fc079d..000efc060 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 957c5c833..d8c44a9ec 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index cc45a5b01..b73ba79e8 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/GreeceBaseTestCase.php b/tests/Greece/GreeceBaseTestCase.php index 5a3dc235c..fc5a1b147 100644 --- a/tests/Greece/GreeceBaseTestCase.php +++ b/tests/Greece/GreeceBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index a034e64e6..573586ccb 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index 70df8fc13..4f96f8c92 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index ff866942e..3b30e9528 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index e2bf49a63..c2e8ec7dc 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index f40d2f168..6ba7b42ca 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index df1b3da97..593b8c9d7 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index f5a67eaf6..fb255be6a 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index a6bbab5a5..a68c70b56 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 6762eb6b0..eae7698b8 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index cb7d0f62c..c328a7578 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Greece; diff --git a/tests/HolidayTestCase.php b/tests/HolidayTestCase.php index 6b2d9accf..6124be808 100644 --- a/tests/HolidayTestCase.php +++ b/tests/HolidayTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests; diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 157a1c7aa..35f85c4c1 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index ee88cb3e5..c459b593d 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index adf1f4820..1de531198 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index 56939bd9c..97eb06ec2 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/HungaryBaseTestCase.php b/tests/Hungary/HungaryBaseTestCase.php index 726ac163d..c72b15fa0 100644 --- a/tests/Hungary/HungaryBaseTestCase.php +++ b/tests/Hungary/HungaryBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index ec2b96be3..dc93ccb1f 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index fffa8efdd..116161df1 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 472d03ad0..97b4d32a0 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index 356863ab6..ce181e8c3 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 8f353241e..8b8cd3e57 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index 151f817e4..c5c7d1cc3 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index 2e34591c2..6518f5c55 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index 11eb5be2b..01ab9eb04 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 639c8c2ea..50aff2bdd 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Hungary; diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index 738704bcc..18b78e383 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index 5958b6404..74196e2e7 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index cbdcacb1f..fb681c971 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index f47a0b34f..31482138b 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index 140ce0a56..40a1203d9 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/IrelandBaseTestCase.php b/tests/Ireland/IrelandBaseTestCase.php index 9b4cc4807..28ed2092e 100644 --- a/tests/Ireland/IrelandBaseTestCase.php +++ b/tests/Ireland/IrelandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index acd7d2ca0..96fef9191 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index a23d38512..2bf25296e 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 664fa5eef..b6e5f655a 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 092b60b2d..1d72380ab 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index bb5927525..62a48a31d 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index a9d69b9fe..5d560850a 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index f021ae7b3..25c6a16fe 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index 240078053..d4f5939d4 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index 4c3de9a71..bf47459cf 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ireland; diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 04d055c3c..897d1931a 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index 377cd6604..c0784d0cf 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 04470f754..b587483dd 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index f2ecab4e1..96ee4fdf1 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 5ce6f97a3..9b3780730 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 41fc0cba3..65b9dab0b 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index 35237bb7a..0e63b489e 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 052e41a72..5e0c78834 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/ItalyBaseTestCase.php b/tests/Italy/ItalyBaseTestCase.php index 1040a75a9..be21d724d 100644 --- a/tests/Italy/ItalyBaseTestCase.php +++ b/tests/Italy/ItalyBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index d06ec9d5f..0a8eb73b4 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 75122d96d..7d4845fdf 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index 0a2335935..ded8bb194 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 868998e3f..859bd5d75 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index d835eee19..918138e98 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Italy; diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 293778a21..f480ab92c 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index c9185dae9..e5f4aef89 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index 6dced5c28..5fe9295e0 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index 79b683ad0..37bb00c3a 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 281c794f9..d3f1a05c6 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index 53e31eb0d..c068223cb 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index e55e047b4..3791aa770 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index f9fc198b9..7ab798f3c 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index c83756639..55158feff 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/JapanBaseTestCase.php b/tests/Japan/JapanBaseTestCase.php index b1ef59f6b..baa3bc242 100644 --- a/tests/Japan/JapanBaseTestCase.php +++ b/tests/Japan/JapanBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index a6c85aa49..b0b826d3c 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 7980faf5b..2f3183bdc 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 277535606..c1c11ed1e 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 8e1cfd00b..302298864 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 4261d0dd3..052d2f81f 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index ad01f4ea0..5a7e19e8c 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index e084617e5..ae02cc53d 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index a44ad1344..bd3739435 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index ad9d8458a..251f03674 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 59aff6bb8..80bb0cf79 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index d8d7c3ab4..332df9e8e 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Japan; diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 998309e63..4a1be1a82 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index e37dfcccf..e26f7ec65 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index 650a6a9c4..f997a4c38 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index d1842afc6..6f8b4dd24 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index f818922ff..a62d51e9e 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index bdb08ffe8..01c59ac4f 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/LatviaBaseTestCase.php b/tests/Latvia/LatviaBaseTestCase.php index 56a52d087..b1e93a89c 100644 --- a/tests/Latvia/LatviaBaseTestCase.php +++ b/tests/Latvia/LatviaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index 355c84ac5..c2ba79116 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index c7eefa8e5..2efc2262e 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index 91196c148..db7462582 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index 1c7901fc8..003e7bd7b 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 9b0311a34..16a8fb447 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index 477c218a0..f201a4479 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index 0dbe5e1e1..3f03e31b5 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index 265231b3a..daf71dd61 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Latvia; diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index a9d1a6a18..a43f7f778 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index a023c6a34..7373e3376 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index fba02c6ca..dcc56b2eb 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 733e726a8..77120c4f4 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 508e90497..c803e3e28 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index c1d2a1a9d..e6eb0edf2 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index 03925176b..55654a943 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index 8c2d0de22..838833339 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/LithuaniaBaseTestCase.php b/tests/Lithuania/LithuaniaBaseTestCase.php index f61f9876b..6632e67c8 100644 --- a/tests/Lithuania/LithuaniaBaseTestCase.php +++ b/tests/Lithuania/LithuaniaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index 9be9a8c3f..bfce4afb0 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 478d45346..2a159e726 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 78d23c6ca..4881296de 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 1bc579971..7ecf6c601 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 86fff37f2..4980750b2 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index 558266a98..8affc1f7f 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index 3fadac29d..f3cf30983 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Lithuania; diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index e17d817a5..1c7f25897 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index 75657cf60..83cf3a9e4 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index 56e9f4082..b7f39db4b 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index e678680d2..cdc59359c 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index 1d02a19ee..df5664acf 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index a38482798..3d89b3274 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index 302fd1d2e..23c99e0ba 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/LuxembourgBaseTestCase.php b/tests/Luxembourg/LuxembourgBaseTestCase.php index 095e2ce61..84ebdae51 100644 --- a/tests/Luxembourg/LuxembourgBaseTestCase.php +++ b/tests/Luxembourg/LuxembourgBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/LuxembourgTest.php b/tests/Luxembourg/LuxembourgTest.php index d3f1b3b80..c262c2054 100644 --- a/tests/Luxembourg/LuxembourgTest.php +++ b/tests/Luxembourg/LuxembourgTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index 2028544f1..611908d44 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index d27c692bc..2a23fffb2 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index 4f530d6d8..5546f1382 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index 71075d555..d545babc7 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Luxembourg; diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 53962a387..9f8ad4ad0 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index a6cdef0db..efddc1113 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 99a7549fe..1f5e77695 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 5e8be73e5..28fdbf911 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index bc64c5088..178912930 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 0ec92040e..50eef008d 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index e050c0081..e212782d2 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index c55751de5..d90653786 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index 166a13809..d674af476 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index 0eb0f7279..8d2e8d3a3 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index bc8f938a3..2a43d55ab 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index 21ba808a3..7ab2d81b1 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 82e3e6338..24106ecfd 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index 080791472..e9ea418b6 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/NetherlandsBaseTestCase.php b/tests/Netherlands/NetherlandsBaseTestCase.php index 8a4bda6bb..87106aee4 100644 --- a/tests/Netherlands/NetherlandsBaseTestCase.php +++ b/tests/Netherlands/NetherlandsBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index faf41bc45..99387f1d0 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 9adcb5478..5cb5c308f 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index f22e8bfb0..2ee6e3a07 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 7aaa51986..ea9c5ff26 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index e1e4bd350..1cf348cd8 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 5b3fbefe1..0110d0702 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index 11b8acd22..050024092 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index 7bc9a0a07..cb4431624 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index 18218f4ac..b860ef3be 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index c5f29c674..07def2ae6 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index 55ac67a0b..c561adc5f 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index 06ff7fe40..d88173d66 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index d2c2c62a1..a596dc7c9 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 07f918d17..c6ffe1466 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index 684c98106..d05f3d308 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index 4e3f449b3..33cd25a3a 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Netherlands; diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index 0a5c312e0..c14c66111 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index d1820a14f..4a70b6b4f 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index f28368194..d5430dfa0 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index 3cd2ab5e7..e845eabcb 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index fe3173db0..d84fb09c2 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index ea5df2b4f..de93445a0 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index ebaf2719b..91c9ec0ad 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 532ef0a5b..979d67a0f 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/NewZealandBaseTestCase.php b/tests/NewZealand/NewZealandBaseTestCase.php index bfb5ec2ed..1fc8a44f6 100644 --- a/tests/NewZealand/NewZealandBaseTestCase.php +++ b/tests/NewZealand/NewZealandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index 6f331318a..a46c47b7d 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index b7d657ec8..46e7e999d 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 22d0f4149..695974971 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\NewZealand; diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index f22c6f407..92a7e9f75 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index de6eb7866..069fbe93c 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index 03f2b0c2e..b59f06842 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 675b762d5..0d82ecaaa 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index 0c3e8e36a..6a41148d5 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index 398054780..032c80066 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 146a2461e..a7de3128f 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index 7247fb766..9338ab5eb 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index d13532b6e..f71bfcd15 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/NorwayBaseTestCase.php b/tests/Norway/NorwayBaseTestCase.php index 3575f9a1c..c24f59f72 100644 --- a/tests/Norway/NorwayBaseTestCase.php +++ b/tests/Norway/NorwayBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index abff61a12..ef4df7acd 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 35d047adf..3678bd599 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index a6d98c965..36bd46d12 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index d78477847..ba0cc4e0b 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Norway; diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index 9b218d11b..0c361b020 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index a57ddb481..6d1432994 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 23a73df31..6e6d19324 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index bda654a40..f2817f7a7 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index 0e36a7de3..7cee1e486 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index a8dbe29fc..4a48c85e7 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 305a72f6d..144b2cbb0 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index 32d1aed8a..2c57f56ea 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index a16e21ca0..2a3a85c76 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index 01d725c8c..3b3dfbf12 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index bff6163f1..73d104cc4 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index ed5a52264..a1160c394 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/PolandBaseTestCase.php b/tests/Poland/PolandBaseTestCase.php index 3a7342ce5..070b6c70d 100644 --- a/tests/Poland/PolandBaseTestCase.php +++ b/tests/Poland/PolandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index 05f9a29ff..c826894e7 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index a673db603..358f31e89 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Poland; diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 12a88a602..ad72287bf 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index ae37c2db7..925fbd98b 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index 234232bf2..d7445b877 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index 7bfbd0209..e3a219b60 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 63576b1b3..8fa96fe05 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index 2edeb7272..d3665dde3 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index 74af62a9a..ba58e83df 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index af70536f3..da636f883 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index c229de112..dab456d8a 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index fdc176231..764bbcf8b 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/PortugalBaseTestCase.php b/tests/Portugal/PortugalBaseTestCase.php index 7e65d2651..a1af4595d 100644 --- a/tests/Portugal/PortugalBaseTestCase.php +++ b/tests/Portugal/PortugalBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 1b75d335e..4e82be7f6 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index d73da042b..1f295decb 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 114268020..1b50cd446 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index edf1251cb..87f2b362b 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Portugal; diff --git a/tests/ProviderTestCase.php b/tests/ProviderTestCase.php index 976ef2ece..34d72d539 100644 --- a/tests/ProviderTestCase.php +++ b/tests/ProviderTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests; diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index be9426d7f..913f3034c 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index 9e4c4ad80..eca6ecfb0 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 5fe3a4835..12b96ec3b 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index f2a9f4ecc..92fa37f8b 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index ee4c43caf..4e0cdc9de 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index fddbb73ab..a890d352f 100755 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index 9301fe4ca..e0d369553 100755 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 0239e4cf9..f7e544303 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index 16ae83e7d..b6a4caf8a 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 722dd6388..19e0ae449 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index 2e22e5d83..2d8bfeb49 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index 4ad2641b2..a913ab387 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/RomaniaBaseTestCase.php b/tests/Romania/RomaniaBaseTestCase.php index a3501ade0..d6ae9fb33 100755 --- a/tests/Romania/RomaniaBaseTestCase.php +++ b/tests/Romania/RomaniaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index ddbea24ef..4681fe8bb 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index b2d15582c..5f4d0514b 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index e8d6642cb..744d47c1f 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index 0cab6b545..53e8a5a0d 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Romania; diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index 6c428e38e..88b552b60 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index ecc101a4a..6fdfe19a4 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index 22bf24922..612e8b17d 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 7a938a29d..392383a6a 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index c6439f243..c51b88289 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index b4ee71979..242bd2f36 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 93fc64708..5f94abc92 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index 58f876109..fdb45bf79 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 8001bf83b..94cad9a1b 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 27a8b86a4..016526628 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/RussiaBaseTestCase.php b/tests/Russia/RussiaBaseTestCase.php index b96cd4ef8..9949241a0 100644 --- a/tests/Russia/RussiaBaseTestCase.php +++ b/tests/Russia/RussiaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index 7747e4762..65b39e495 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index a2353e2a7..0bcb60236 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 3985f7d8d..174b27369 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index 1f62d2850..64287fea7 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index 03cf13aa4..98080be53 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Russia; diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index d84397c4b..902ef8b86 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index 135fb5f69..7f9bb4fc5 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index 955177682..41f718fa5 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index a52170672..84bbcc628 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index c8c720acf..07ad9c2b2 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 52c85491f..9ccf63e00 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index 17a41642c..ec68de79d 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 1cea9b9f1..061c25036 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index a3bf74e86..e519ffbe3 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index 8d289df13..d20e4c666 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 07649a9ba..004410b8c 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index cd7ed9e01..07d12c3cb 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index b7f1afd83..023dc4b38 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SlovakiaBaseTestCase.php b/tests/Slovakia/SlovakiaBaseTestCase.php index 8438e4576..73fde8e3a 100644 --- a/tests/Slovakia/SlovakiaBaseTestCase.php +++ b/tests/Slovakia/SlovakiaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index b4630d782..62b3971ec 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 2aa14b0af..1d142ee7e 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 25eb3b76f..15c4f8116 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Slovakia; diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index b137ac5ab..0bb3a7183 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 18a2e18ac..ea65d5bf7 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 61d9c6e39..1f0e20ba4 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index cb0297fab..199ab3944 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 55a83f7da..809de1d73 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index 6cd048e74..2004dcca7 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index a40114ab1..644b7d90c 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 2ff24265a..42b2cb092 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index db7007a89..712814ff1 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index ad47993be..962239c52 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 9670cf50c..ff450186c 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/SouthAfricaBaseTestCase.php b/tests/SouthAfrica/SouthAfricaBaseTestCase.php index a5e7bbb74..d5846e9bb 100644 --- a/tests/SouthAfrica/SouthAfricaBaseTestCase.php +++ b/tests/SouthAfrica/SouthAfricaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; @@ -21,7 +21,7 @@ /** * Base class for test cases of the South Africa holiday provider. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ abstract class SouthAfricaBaseTestCase extends TestCase { diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index a4c4d85fc..c3dc937eb 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; @@ -22,7 +22,7 @@ /** * Class for testing holidays in South Africa. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ class SouthAfricaTest extends SouthAfricaBaseTestCase implements ProviderTestCase { diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index 2777b116a..0b660ee1a 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index dec39692b..73a1a8f6c 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index 22df1beaa..b6ec95c01 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthAfrica; diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 9ed0ccf7b..396f8e92a 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index 9eb753beb..93169afc9 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index ccc857624..aade35964 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 5059eb041..5fd2a8b01 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index e98e12ddc..700358ce5 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 897dd90a2..3061323aa 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 3f50820cd..58e5de3ea 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index f7eac9865..96e1e3f95 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index de480d521..b1680a802 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 26215fdd5..2985afb3b 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index c703b7f9d..bfb501cde 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 99aa55b5b..d4e41a8c7 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index c55e2e6b3..a16c08613 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index b39aa9ae9..933366b77 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/SouthKoreaBaseTestCase.php b/tests/SouthKorea/SouthKoreaBaseTestCase.php index 9b5e7bd48..ea934194d 100644 --- a/tests/SouthKorea/SouthKoreaBaseTestCase.php +++ b/tests/SouthKorea/SouthKoreaBaseTestCase.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 985c10537..85acd3b1d 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\SouthKorea; diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 77a34b365..3cd01d2e0 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/Andalusia/AndalusiaBaseTestCase.php b/tests/Spain/Andalusia/AndalusiaBaseTestCase.php index 8294c66da..753c7b390 100644 --- a/tests/Spain/Andalusia/AndalusiaBaseTestCase.php +++ b/tests/Spain/Andalusia/AndalusiaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Andalusia; diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index b942b81ee..12e17e2fc 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Andalusia; diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index f78a71865..4b48a3cc7 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Andalusia; diff --git a/tests/Spain/Aragon/AragonBaseTestCase.php b/tests/Spain/Aragon/AragonBaseTestCase.php index db8ff9554..c318e2076 100644 --- a/tests/Spain/Aragon/AragonBaseTestCase.php +++ b/tests/Spain/Aragon/AragonBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Aragon; diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 31ad03892..459044410 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Aragon; diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index c898f1242..5487aa677 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Aragon; diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index 08e0a92b9..4766ddd43 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/Asturias/AsturiasBaseTestCase.php b/tests/Spain/Asturias/AsturiasBaseTestCase.php index f722b7d49..02f5c2db8 100644 --- a/tests/Spain/Asturias/AsturiasBaseTestCase.php +++ b/tests/Spain/Asturias/AsturiasBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Asturias; diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index f33f68b55..60740befd 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Asturias; diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index 30b404941..bfc719069 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Asturias; diff --git a/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php b/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php index 0faf234c8..2370fbb02 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\BalearicIslands; diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index 7be0d8017..089a8c38c 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\BalearicIslands; diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 7f990d754..06520fd20 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\BalearicIslands; diff --git a/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php b/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php index 9c7029d3c..e24869fa4 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php +++ b/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\BasqueCountry; diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index 926810448..d01fac12b 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\BasqueCountry; diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index 6b8d122cb..113ac76b2 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\BasqueCountry; diff --git a/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php b/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php index 0e172f406..5ef462513 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CanaryIslands; diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index ea43da2fa..25b690ed5 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CanaryIslands; diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 41a86e3c7..5a758618d 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CanaryIslands; diff --git a/tests/Spain/Cantabria/CantabriaBaseTestCase.php b/tests/Spain/Cantabria/CantabriaBaseTestCase.php index 8de376d1a..2098b404f 100644 --- a/tests/Spain/Cantabria/CantabriaBaseTestCase.php +++ b/tests/Spain/Cantabria/CantabriaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Cantabria; diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index bc0479982..7d42068a7 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Cantabria; diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index 9d6191fd0..bb90095c8 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Cantabria; diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php b/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php index 40c6a2290..aa5bd5bd8 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CastileAndLeon; diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index 67d12eceb..1896c1fbb 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CastileAndLeon; diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index a4ddc4110..82c0fc799 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CastileAndLeon; diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php index d8f6f8b46..ffcbeca20 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CastillaLaMancha; diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index 180b1dcf0..c6a562083 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CastillaLaMancha; diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index d6e82be17..005eb88e3 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CastillaLaMancha; diff --git a/tests/Spain/Catalonia/CataloniaBaseTestCase.php b/tests/Spain/Catalonia/CataloniaBaseTestCase.php index 2570049ef..22d4ff8bf 100644 --- a/tests/Spain/Catalonia/CataloniaBaseTestCase.php +++ b/tests/Spain/Catalonia/CataloniaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Catalonia; diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index d4bc66f50..1d97031f3 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Catalonia; diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index 56c264a45..8f11b7807 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Catalonia; diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 3cde60ab8..cb5aebbc3 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Catalonia; diff --git a/tests/Spain/Ceuta/CeutaBaseTestCase.php b/tests/Spain/Ceuta/CeutaBaseTestCase.php index 396c70d38..88a55bceb 100644 --- a/tests/Spain/Ceuta/CeutaBaseTestCase.php +++ b/tests/Spain/Ceuta/CeutaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Ceuta; diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index cb28aa103..14d4853f7 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Ceuta; diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index e8315afdb..aca7596e9 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Ceuta; diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 8d6b73ad6..a9a4fa352 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php index 8b4538527..6c848a843 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CommunityOfMadrid; diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 32abb7b57..47c2eab61 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CommunityOfMadrid; diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index f2c2b6b80..278ecea4d 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\CommunityOfMadrid; diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index b113bdcb7..2ce558f0a 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index ba8a12fd6..4a7f65bcc 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index 57ec7fef8..6cfa13d7a 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php b/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php index 691b27547..ee223437b 100644 --- a/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php +++ b/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Extremadura; diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index 1c715a147..3a44bee42 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Extremadura; diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 3131321d4..44e24396f 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Extremadura; diff --git a/tests/Spain/Galicia/GaliciaBaseTestCase.php b/tests/Spain/Galicia/GaliciaBaseTestCase.php index a771831ff..52ade76b2 100644 --- a/tests/Spain/Galicia/GaliciaBaseTestCase.php +++ b/tests/Spain/Galicia/GaliciaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Galicia; diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index b5c5d82b3..4ece58a76 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Galicia; diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index e8b7541e6..1ccac9795 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Galicia; diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index b30de3680..548096095 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Galicia; diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index bbfa33383..574af79f2 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 21719fb49..b6b4adba5 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 98734b2a6..55e59c6b3 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/LaRioja/LaRiojaBaseTestCase.php b/tests/Spain/LaRioja/LaRiojaBaseTestCase.php index 0b9af1213..b2b160a6d 100644 --- a/tests/Spain/LaRioja/LaRiojaBaseTestCase.php +++ b/tests/Spain/LaRioja/LaRiojaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\LaRioja; diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index 002f1a10e..12fb2e81e 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\LaRioja; diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 8aee967b3..dac47846d 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\LaRioja; diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index 5afc9467e..ae1697191 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/Melilla/MelillaBaseTestCase.php b/tests/Spain/Melilla/MelillaBaseTestCase.php index ae9e79e58..12590552f 100644 --- a/tests/Spain/Melilla/MelillaBaseTestCase.php +++ b/tests/Spain/Melilla/MelillaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Melilla; diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index 12ca69b8c..ca6e59d9f 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Melilla; diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index c1feea818..2863ea09f 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/Navarre/NavarreBaseTestCase.php b/tests/Spain/Navarre/NavarreBaseTestCase.php index e9cf1693d..37a001d4a 100644 --- a/tests/Spain/Navarre/NavarreBaseTestCase.php +++ b/tests/Spain/Navarre/NavarreBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Navarre; diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index fb213f963..a06197775 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\Navarre; diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index ca229a40b..8ca78398c 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php index 256977ab2..7913b58da 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\RegionOfMurcia; diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index 02d518fc2..351626ad7 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\RegionOfMurcia; diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index eb95a3020..a9b4241ac 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\RegionOfMurcia; diff --git a/tests/Spain/SpainBaseTestCase.php b/tests/Spain/SpainBaseTestCase.php index 8e971c850..7112a6b2f 100644 --- a/tests/Spain/SpainBaseTestCase.php +++ b/tests/Spain/SpainBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index f8a453e12..f37a59daf 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php b/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php index b1018a934..ddf109755 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\ValencianCommunity; diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index c70ab5b09..5f19ccbda 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\ValencianCommunity; diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 71e596d77..676b4f26a 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain\ValencianCommunity; diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 6c9a9f7e7..0be0aadf7 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index 1fdb78464..7163ead9a 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Spain; diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 2585addc7..bd0b51367 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index d9f41f572..3d6898487 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 9bc591b70..646d56268 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index f8bf01168..5e7afd40d 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index cba3e4e9d..1f7ebadec 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index f7d6ef7a2..cd7965f4b 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index d0b804fdd..4da370867 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index 03fe80e57..9bbd5b621 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index 193a2d854..e954a5ed4 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 7e1e6699c..3c1fb2e77 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index d7f7c8973..7bc19dbef 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index 7798a1226..80ad69072 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index 3e4080b7e..56543b568 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index 73bdfb4a9..694051a31 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index 432f33fda..586badd4e 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 61dcc6411..9ca638d9f 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index 874bf3330..4890117ba 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index ce4c521b4..05dcac7bf 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/SwedenBaseTestCase.php b/tests/Sweden/SwedenBaseTestCase.php index e00e8b81b..8ccac8d81 100644 --- a/tests/Sweden/SwedenBaseTestCase.php +++ b/tests/Sweden/SwedenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index 67d1aac83..0193814a1 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index 159fce5a3..0d933f6a3 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Sweden; diff --git a/tests/Switzerland/Aargau/AargauBaseTestCase.php b/tests/Switzerland/Aargau/AargauBaseTestCase.php index e33de4333..2096f03d5 100644 --- a/tests/Switzerland/Aargau/AargauBaseTestCase.php +++ b/tests/Switzerland/Aargau/AargauBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Aargau; diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index a573f6292..1897542c2 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Aargau; diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index 597174429..6955ce258 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Aargau; diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 098d10ae9..9086eb552 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Aargau; diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index 27ee3f0b2..d5b8881f4 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Aargau; diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index b9bffd860..07e665c31 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Aargau; diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php index 1bd949c8f..e274bfc95 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 79791d80e..aebf1ead1 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index 91978ed44..5e072aa6d 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index fe1d821c3..a80ea3def 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index 3f75c5cd4..eff613788 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 0eb7b729b..1c5d4ba2e 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 49b1ef77d..f345a9857 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index 1b2b36264..46805ccdc 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index 786b1b345..a28a571c2 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index a4998f1ec..f1f1ada74 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php index eee8fc068..90c74194b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index 0b2b084dd..d45a9379e 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index 433bfdc69..3ea14f4e2 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index e8a374035..be67a54a7 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index e24a9bb1a..a72fbd8c2 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index dbbbddc9c..3fe9d4a77 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index 7c32986b8..6718592f6 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index 651334dda..387a3f389 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index 08f73bfd8..798b701b4 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index d8cd7c178..53b4ef57d 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index cc051ea41..e086d9df4 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 6892de676..2f146ef9b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 2d0779dec..6c663465a 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php index 98d8cd206..3a20a2385 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index 84021438d..ed0c82d01 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 6af749d6c..1ca1c772c 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index 68efd30e5..3e239c195 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index e93a89eea..29c777812 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 1000ae6e2..0640d6789 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index 3d7acd896..b23b41756 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index 0e07d567b..c74e6f0b1 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index eb9da5520..4f2d48978 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselLandschaft; diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index ed43f8aab..9bb6d03e3 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php b/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php index 65becbdd0..96e950d44 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php +++ b/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index bd0843802..ccaa745e6 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index b1b5fca35..9307b4a03 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index 1c3699be5..08196decb 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index e69c3f4f4..effafe53c 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index d7ddd649f..936395895 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index 591b812a7..b15614b64 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 9057bfacf..28d0e94ee 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index 2af832147..8c784a7e2 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\BaselStadt; diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index 41e4747f2..a0c120914 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index f23def736..13663debd 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/BernBaseTestCase.php b/tests/Switzerland/Bern/BernBaseTestCase.php index bb4280fba..a4f00daa7 100644 --- a/tests/Switzerland/Bern/BernBaseTestCase.php +++ b/tests/Switzerland/Bern/BernBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index cf2b3cdee..4ac9b2a0d 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index f6eb69697..70bc40e1b 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 571c034a9..191ac1d5f 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index d36e08986..666c512df 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 7815dede1..2df10607d 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index 0f56d05e2..0c537c754 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index c0367a45d..3a4b37c53 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Bern; diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index a0f6d3445..795ab7c05 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index 5721b4077..3c409fa35 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 919a73f43..64e64cc3a 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php index 449c8a1f3..1509d6e66 100644 --- a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index bf578b85c..6682a1d04 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/CorpusChristiTest.php b/tests/Switzerland/Fribourg/CorpusChristiTest.php index 997badae3..0272d7a99 100644 --- a/tests/Switzerland/Fribourg/CorpusChristiTest.php +++ b/tests/Switzerland/Fribourg/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index dec363f1b..dd923e46a 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index 3e4edcb65..938044500 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/FribourgBaseTestCase.php b/tests/Switzerland/Fribourg/FribourgBaseTestCase.php index 0a0f1ff72..ec599d169 100644 --- a/tests/Switzerland/Fribourg/FribourgBaseTestCase.php +++ b/tests/Switzerland/Fribourg/FribourgBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index d3e2a0549..f1825b9d6 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index f519da264..bd68f874b 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index 43a32b94f..26f465dc3 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index 573997a9c..086c31b9f 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index a298d87b5..ab5abf75e 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Fribourg; diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index e269e7e93..172b4178e 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 45d450003..3f30a19d0 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index 86c28c4e8..f4f24f69e 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/GenevaBaseTestCase.php b/tests/Switzerland/Geneva/GenevaBaseTestCase.php index 58108df47..b45443b33 100644 --- a/tests/Switzerland/Geneva/GenevaBaseTestCase.php +++ b/tests/Switzerland/Geneva/GenevaBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index bcabc397b..dc5e60b39 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index e6c119c23..ee1a30a91 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 9fc10a9b7..235db191d 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 3fcf07335..3447184d3 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index c5276eeae..30220280b 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index e13552af5..8a8dd64d5 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Geneva; diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 20797e81c..9309a1de9 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index 962594869..e9de23fd1 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index ab170c262..a744f5e9b 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index ded8c9654..11a65655e 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index 1d112ba0d..fbf2d73aa 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/GlarusBaseTestCase.php b/tests/Switzerland/Glarus/GlarusBaseTestCase.php index 863446e8f..92af10fa0 100644 --- a/tests/Switzerland/Glarus/GlarusBaseTestCase.php +++ b/tests/Switzerland/Glarus/GlarusBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index 7d9dd28c6..39fa4994a 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index bc6c8a4b8..ce0b420cf 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index 42cf7e1a9..26aa978a2 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 8a9a28943..dfd6b5c61 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index b045db256..35f54fcd1 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 4df0a8640..378351f34 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Glarus; diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index 2e8562a8a..54ef008f1 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 42c58257c..6a04a9c60 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index 060ffbbab..2e4d2eb96 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index 26c5ada1c..eaebbf307 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/GrisonsBaseTestCase.php b/tests/Switzerland/Grisons/GrisonsBaseTestCase.php index 716142c97..3bfcb4060 100644 --- a/tests/Switzerland/Grisons/GrisonsBaseTestCase.php +++ b/tests/Switzerland/Grisons/GrisonsBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index 92ccfe2d5..1cdbe9360 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index 7428db0f3..75ef609fc 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index c3955ae85..9f3b97518 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index 1957bcc16..2431f25fb 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Grisons; diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index cff8448e0..f0f1693d9 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index 4a72c4ceb..498acc1d6 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index 3e44dec3b..99d0baf07 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/BerchtoldsTagTest.php b/tests/Switzerland/Jura/BerchtoldsTagTest.php index c91bf00f7..82e8d1d2d 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index 593c75af5..65422e706 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index 8b6f32022..6a1f07d9a 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index 5650c9185..c873bd806 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index 36db87a9f..5337477e2 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php index 7ee9ccde1..d0461b975 100644 --- a/tests/Switzerland/Jura/EasterTest.php +++ b/tests/Switzerland/Jura/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index 8b384332c..cc18f8703 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/JuraBaseTestCase.php b/tests/Switzerland/Jura/JuraBaseTestCase.php index cad9afe61..094bf0b04 100644 --- a/tests/Switzerland/Jura/JuraBaseTestCase.php +++ b/tests/Switzerland/Jura/JuraBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index 363a52d0d..4ef2af3c2 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 6bb534354..a961530ac 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index 6f3fd2d6c..34ec5edea 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php index cf8647e08..d15f3364e 100644 --- a/tests/Switzerland/Jura/PentecostTest.php +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index bfbc0457b..3a2855690 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index d9521d083..5e95d525a 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Jura; diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index 5d1adea8e..f7ee3e4c6 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index d2ba5e4d4..eb69158bc 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index dbeeee93d..9a6cf4694 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php index e96232af8..b68e0168e 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 1e538cbe4..460ab8c84 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index 9e6819891..ee68d13d6 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index b2a98fca6..6c0db1b8f 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index bf294b5b4..66dd75231 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 0d2cd2cba..152da33cb 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/LucerneBaseTestCase.php b/tests/Switzerland/Lucerne/LucerneBaseTestCase.php index 52f2a381e..52b43cdb3 100644 --- a/tests/Switzerland/Lucerne/LucerneBaseTestCase.php +++ b/tests/Switzerland/Lucerne/LucerneBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index 78a454b7f..c75ea0e5d 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index b26605cd7..beb0f60d9 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index bb87f41c7..73aa38138 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index aae76664d..e87f3c51e 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Lucerne; diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index 7c045a2d9..3c7a98a0f 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index e4182c3a7..ee5e504af 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 6100f256e..5ac9e6384 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/December26thTest.php b/tests/Switzerland/Neuchatel/December26thTest.php index 6aff40dac..a05031dc0 100644 --- a/tests/Switzerland/Neuchatel/December26thTest.php +++ b/tests/Switzerland/Neuchatel/December26thTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index f2bf6b6cf..35325a2c9 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 20f06ac8a..39c5c56d9 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 1db24e011..5f21ede43 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/January2ndTest.php b/tests/Switzerland/Neuchatel/January2ndTest.php index 94dfae29d..34ebbc503 100644 --- a/tests/Switzerland/Neuchatel/January2ndTest.php +++ b/tests/Switzerland/Neuchatel/January2ndTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php index 2a6872511..b96217b89 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php +++ b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index cd1de7215..23ec6e30a 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index c8bbed0d3..78fccac81 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index dea711178..97204f46a 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index 1d09c225f..a9b319e03 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Neuchatel; diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index feffc9732..618265c0b 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index 39ca2ddea..a1572c6b1 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index 999915395..84da7fb8c 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 70bdf570d..781b969b7 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index fac2d13e2..d50c8b9a0 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index 90916a347..3480461f8 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index f26a84e73..ae61d1cc7 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index bbb6fc15f..ebcba00b5 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index e26a537d1..a5f6fa17e 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php b/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php index ad67c696a..b592d269e 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php +++ b/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index b164c53be..e98427d7e 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index dab93534e..4f321e905 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index bd12468da..67f09bc3d 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 0916448b4..fca401103 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Nidwalden; diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index 46d3a57ff..7ff738679 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index 4beeefc7f..e093ad669 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index f0bafaec1..83d9f7e55 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php index bdd8bb151..94ef8c76b 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index 25e7b57ff..7f3cee3df 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 5e6ecbceb..cbfdf7dfc 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index 48c734fe0..990cca57a 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index bce52a32b..2885fd534 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index aee7b9c33..822ab27aa 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 2b35c2f77..0632cb40d 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index af46ae5a1..dbfd43780 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php b/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php index 85731947b..3680fa0f1 100644 --- a/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php +++ b/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index 9e87ce1a7..956a5cee5 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index a25af21f0..94e1882b9 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 94dd82a56..bd5f21cc5 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Obwalden; diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index 0fe61a7c9..164171d2b 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index 210473fd0..2f0915943 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index fe0559e07..863c12c8e 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 075c9f009..45cd9f651 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index 62ebc4ad4..3f674c86e 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index e9efd61a7..44963f866 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index 088ffb314..ae7436e1b 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php b/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php index 1304fb701..264c092ea 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index f2e73fa45..da7885121 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 30be506dd..8264f20a1 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index 7d253e8b1..7bafe1742 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schaffhausen; diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index 955e76372..a326cfc26 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index 97bccb260..f6122f01b 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index 238172d79..b23410274 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index 5fe44cf4f..741cd464f 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index a6c9c5ba3..5b20cbc4e 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index 3e59212fe..0c3119ff8 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 67aae1db5..2d4f998d2 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index f4d8a2000..5e61365ae 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index 3b90471f8..3f26bf35c 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index a5f88b9e8..deefbaeca 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index f16e61ceb..dcf085522 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php b/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php index 5a4ebec31..bd022d605 100644 --- a/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php +++ b/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index a81d033d9..fc23c1365 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index e66c4cd12..a68c33a96 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 9a07e9886..456e62bb6 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Schwyz; diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index 4bb780b95..e59d39c75 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index 5a5e71895..124cd8071 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 6e27bee07..d5bbc5883 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 348d89c57..96e48ecad 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 8f2a9e4c4..1209a3f1b 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php b/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php index 38789a64a..dba74b3b9 100644 --- a/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php +++ b/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index 542f2b7ed..aa5f93eb2 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Solothurn; diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index 2e0424612..38315b04a 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index d9592decb..9606ed4bd 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 1076abba1..5b033a8a0 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index bc8182e98..a44b54e15 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index b1698ba44..ac917bb4e 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index c079ad51f..268fba7e3 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index 0658c6958..9ae921586 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/StGallenBaseTestCase.php b/tests/Switzerland/StGallen/StGallenBaseTestCase.php index cf18a612d..b7363ae6d 100644 --- a/tests/Switzerland/StGallen/StGallenBaseTestCase.php +++ b/tests/Switzerland/StGallen/StGallenBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index af2092019..d87f698c4 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index ceda185ae..0abcae41a 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\StGallen; diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index 9a1fed207..a0fa465b1 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland; diff --git a/tests/Switzerland/SwitzerlandBaseTestCase.php b/tests/Switzerland/SwitzerlandBaseTestCase.php index 6427605ab..bf03aebb2 100644 --- a/tests/Switzerland/SwitzerlandBaseTestCase.php +++ b/tests/Switzerland/SwitzerlandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland; diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index 4b60b638e..1aab01217 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland; diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index af4539b9d..808c6c865 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index 65a869bf0..f8a25f391 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index 5d60c8d19..1827fd155 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index 960dbe56c..1ae22747f 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index 66fd015e6..ff1f43abe 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index 4269a58be..613306be1 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index d2b6189bf..e7ba6ac25 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index e69d2d410..a22751424 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php b/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php index 753946f4d..1dccf78a9 100644 --- a/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php +++ b/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 31e1cada4..30f1f6704 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index 14fbda0be..f802ff2f4 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Thurgau; diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 1c26e3775..ba67385a9 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index 5c40ab6e9..e4e23dd8d 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 53021ae86..8fea858c8 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index 8113f6fd6..51fbd26a3 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index 33bd00941..458d8ffdb 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index d07c7434a..dbd42a209 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 9be658de2..348b6e544 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index 793868b95..95214fae2 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index fa6313776..1dabc57c7 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index fe32670d5..0b9d28174 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index a78feecc4..8b3e0e13d 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index d16133ae5..e1e7667a9 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index 4d03b6166..71b9f62c4 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/TicinoBaseTestCase.php b/tests/Switzerland/Ticino/TicinoBaseTestCase.php index 3a5b8c15b..c7275cc76 100644 --- a/tests/Switzerland/Ticino/TicinoBaseTestCase.php +++ b/tests/Switzerland/Ticino/TicinoBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index cc6ec18ab..549853f56 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index 4dfa03e4c..77ee0c689 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Ticino; diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index f7052f0dc..30b09f5fc 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 40c6c5cf7..2b6a2adc2 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index eafe2101c..d4e5a8c04 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index a03aab92b..794ef9de5 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index 81fda25ed..0293d9e1e 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index d724b0be9..c2da0431a 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index e40315416..78bedef36 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index 08b8b18e1..66dbdf721 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 6c60d37a6..1398afc53 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index b37a563ad..d293e754c 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index 1f0f49674..56dc947a3 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index fbe05bb3e..5ee262165 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 061e0b03e..44d4b1d81 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/UriBaseTestCase.php b/tests/Switzerland/Uri/UriBaseTestCase.php index 5d67119eb..fb0b82d99 100644 --- a/tests/Switzerland/Uri/UriBaseTestCase.php +++ b/tests/Switzerland/Uri/UriBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index edcff0e61..491aebf1c 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Uri; diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 9c47c83f9..0e65de541 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index ac86ddc9b..c9c0accd0 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 58a5227d4..15e6a4ccf 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index ffec5b90c..d21a97b4c 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index 7231f7656..3d73b2672 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index 554f3b6c9..cbee831b4 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 64a358562..6e198deb5 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index 73a1e5bfe..6d2d589d0 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/ValaisBaseTestCase.php b/tests/Switzerland/Valais/ValaisBaseTestCase.php index 3fd105cdc..6e510802e 100644 --- a/tests/Switzerland/Valais/ValaisBaseTestCase.php +++ b/tests/Switzerland/Valais/ValaisBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index 7ec2ce343..3d7199e3e 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Valais; diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index c68abaad3..6a033fcfb 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index bef3f56c0..3b2b066df 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 520f23c0f..91683f0f6 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 763771797..aa41921fa 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index 3ccc9d6c3..482b041c2 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index f26158627..16ea9b198 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 78bf74000..d46863bd3 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index a9e90b479..b114c71fa 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/VaudBaseTestCase.php b/tests/Switzerland/Vaud/VaudBaseTestCase.php index f200b91f6..61d49a995 100644 --- a/tests/Switzerland/Vaud/VaudBaseTestCase.php +++ b/tests/Switzerland/Vaud/VaudBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index 2c5838389..76cbe97bd 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Vaud; diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index ae0246119..9af38a68d 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index a1c934f9c..01a2e35a7 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 1458a3142..e16cfbb07 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/BerchtoldsTagTest.php b/tests/Switzerland/Zug/BerchtoldsTagTest.php index 986fb86fa..0e21d1409 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 5c5317db1..ea82e7b80 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index f8272160f..07687af9e 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 83c6c3fe5..155dcac3b 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index bb4f33294..285cb82a8 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index ed0fa480c..33e671c0b 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index a5b86c7bb..5d0083bdc 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index 05e17e22d..51b48e677 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index ac4af1711..425036125 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/ZugBaseTestCase.php b/tests/Switzerland/Zug/ZugBaseTestCase.php index e41aa0899..f90c3f202 100644 --- a/tests/Switzerland/Zug/ZugBaseTestCase.php +++ b/tests/Switzerland/Zug/ZugBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 70ec637b1..007de3982 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zug; diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index b94f16aee..d4eb92dae 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index d97fba6e7..33081c3c6 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index 438c9fe46..56d99ee15 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index b068b855a..6fd945738 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 7b5d178cf..9378e4840 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index 6ab490b7e..4b43eb833 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index 07c21c18c..cd8da2b5e 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index ac7b2c0f5..a3ff927f2 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/ZurichBaseTestCase.php b/tests/Switzerland/Zurich/ZurichBaseTestCase.php index 89ed379ff..0649797ed 100644 --- a/tests/Switzerland/Zurich/ZurichBaseTestCase.php +++ b/tests/Switzerland/Zurich/ZurichBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index bdc498b75..69aa7d830 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Switzerland\Zurich; diff --git a/tests/Turkey/CommemorationOfAtaturkTest.php b/tests/Turkey/CommemorationOfAtaturkTest.php index 93b275574..0867b75e9 100644 --- a/tests/Turkey/CommemorationOfAtaturkTest.php +++ b/tests/Turkey/CommemorationOfAtaturkTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/DemocracyDayTest.php b/tests/Turkey/DemocracyDayTest.php index f1af34eba..c1417c808 100644 --- a/tests/Turkey/DemocracyDayTest.php +++ b/tests/Turkey/DemocracyDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php index 656bd7cf8..3657db65f 100644 --- a/tests/Turkey/LabourDayTest.php +++ b/tests/Turkey/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/NationalSovereigntyDayTest.php b/tests/Turkey/NationalSovereigntyDayTest.php index 094f671c7..b8d7352bb 100644 --- a/tests/Turkey/NationalSovereigntyDayTest.php +++ b/tests/Turkey/NationalSovereigntyDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php index 40549658f..3558ffbc7 100644 --- a/tests/Turkey/NewYearsDayTest.php +++ b/tests/Turkey/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/RepublicDayTest.php b/tests/Turkey/RepublicDayTest.php index 1a263529e..770a788f3 100644 --- a/tests/Turkey/RepublicDayTest.php +++ b/tests/Turkey/RepublicDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/TurkeyBaseTestCase.php b/tests/Turkey/TurkeyBaseTestCase.php index f3dbe5a06..20c8b26ef 100755 --- a/tests/Turkey/TurkeyBaseTestCase.php +++ b/tests/Turkey/TurkeyBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php index 8293f6e2c..310dd2bad 100755 --- a/tests/Turkey/TurkeyTest.php +++ b/tests/Turkey/TurkeyTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/Turkey/VictoryDayTest.php b/tests/Turkey/VictoryDayTest.php index f0bcad06e..9d796b035 100644 --- a/tests/Turkey/VictoryDayTest.php +++ b/tests/Turkey/VictoryDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Turkey; diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index fe66caaa9..41405bed3 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index 2ef11d648..100cf175f 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index 29fed7333..da1e3dac2 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index 4d8aa2e09..56427c7f6 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 7273c2b84..00f46ee78 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index c0ada57a1..6151b1f97 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index bd4734ea5..880174a2c 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 1168f1440..24496b593 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index 45e8bf6f1..bd581c37a 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/USABaseTestCase.php b/tests/USA/USABaseTestCase.php index 915aab8f1..aa693cd18 100644 --- a/tests/USA/USABaseTestCase.php +++ b/tests/USA/USABaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 39af6a7bc..245cd6ad6 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index 98c2e76cd..7c976db51 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index d7ba986b4..e6aa98c93 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\USA; diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index f3b6e69af..c6bf670e5 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index e82b16dc2..205134053 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index b26b77fb2..3daedd9a6 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index 9eaa07425..7615d2963 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index d81d8f623..ca153ea56 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index 14ef6171f..3b1933b18 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index 28eef6dc0..b13ff28e5 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 02436e0f2..0c4b3df98 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index f95a38e28..007c5c859 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 6b11876fe..95efecd72 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 7e408ec49..9b4c4242a 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 6e23a592d..000fef5bf 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/UkraineBaseTestCase.php b/tests/Ukraine/UkraineBaseTestCase.php index db42a7814..8389a8fc1 100644 --- a/tests/Ukraine/UkraineBaseTestCase.php +++ b/tests/Ukraine/UkraineBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 443085cfe..395851830 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -10,7 +10,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index ca84bb40e..39f599e3b 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\Ukraine; diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 4c17ae6f2..5b72563fe 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 3afec5d50..c952e1bfa 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 0d8bca170..55ea738db 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index 37726b796..8b072c9f2 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index b7143e8fd..44db5a5d8 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 61e9d34cc..d19452a3a 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/EnglandBaseTestCase.php b/tests/UnitedKingdom/England/EnglandBaseTestCase.php index ddc248f43..d2fadc2a1 100644 --- a/tests/UnitedKingdom/England/EnglandBaseTestCase.php +++ b/tests/UnitedKingdom/England/EnglandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index 3edc7c52c..a03903792 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index 4bb95d0aa..601b64b55 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index cab142306..8c4dc869e 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index c01b28641..2cdba56d8 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index 24d2e481a..738ed55b6 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index bd9b25618..54070539a 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\England; diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index ca3caaf54..3e8170d8f 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 6b2d7a978..d4f91680e 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 9cf154144..204c316e3 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index a478a17d1..0aa8159a1 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 67aabc3ca..45890c1bc 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index 74e6a78f7..12ce2faae 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index 005d25856..30805ff8d 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index 4b5b2d8e9..74bbcbdcd 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index cd625f9a7..a60cb5f4d 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index c4352fe55..f3bb05962 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php index f5f84926e..7bc128abf 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index aee96ce01..203b91f2f 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index b0a3347ce..dedf403a3 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 4933a9cad..df0ca5a3d 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index 097a56b0b..6678181c9 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index 85df44d72..466be0f67 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 27a606e47..1aa746349 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index 16b8aca6b..b33bf19c0 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index 55e68e9fa..d2616bfa0 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index 8b6ef3714..f7e5da741 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php index b27da8d4c..1e5388da7 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php +++ b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 587f95b85..53162b0ef 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index 9b4dd7e7c..a6a01db64 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 91b884439..5e6a83e3f 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 53c7c6231..9c2e92e3d 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index c8e5553d4..59dad9593 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Scotland; diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 5370d4e09..14f12a33a 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index 33c54bcdc..104a6a95e 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php b/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php index fa332c05b..baf60656e 100644 --- a/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php +++ b/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 75ab4c990..e50979293 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom; diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index e5b1444f4..37c9cb595 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 92161d58b..a3c48d62c 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index 3bddb2cd2..90619720a 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index b029f4c7b..d31ee8e8a 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index ddf6774ab..f43fe3d68 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index 69f55f2b7..b35bfe2a1 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 4b0213c81..1bed1806d 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index 2f6fc1a28..9cc37231e 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/WalesBaseTestCase.php b/tests/UnitedKingdom/Wales/WalesBaseTestCase.php index b1e7879f5..e275d5809 100644 --- a/tests/UnitedKingdom/Wales/WalesBaseTestCase.php +++ b/tests/UnitedKingdom/Wales/WalesBaseTestCase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index ac0804f77..7eda1f42e 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests\UnitedKingdom\Wales; diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index a706d77fe..c1f756842 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Sacha Telgenhof + * @author Sacha Telgenhof */ namespace Yasumi\tests; From c915e2757627fba756c915db2a23b538ceb6d011 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 17 Jan 2022 23:50:40 +0900 Subject: [PATCH 308/687] Reverted email address. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 23e752505..f22e37a99 100755 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "authors": [ { "name": "Sacha Telgenhof", - "email": "me at sachatelgenhof dot com", + "email": "me@sachatelgenhof.com", "role": "Maintainer" } ], From d0a59ae5b2c34eace8170a867623eef73840c196 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 18 Jan 2022 00:05:53 +0900 Subject: [PATCH 309/687] Downgrading phpstan as latest version causes unexpected false negatives. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f22e37a99..8adb8befe 100755 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^8.5 | ^9.5", "vimeo/psalm": "^4.9" }, From 4caba66598b842b171adcf1acb64a27e01efad18 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 18 Jan 2022 00:06:07 +0900 Subject: [PATCH 310/687] Reformatted config Signed-off-by: Sacha Telgenhof --- phpstan.neon.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 8f462e579..2faf82185 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,8 +2,8 @@ parameters: level: 6 paths: - src - checkGenericClassInNonGenericObjectType: false ignoreErrors: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' - path: src/Yasumi/Provider/Turkey.php \ No newline at end of file + path: src/Yasumi/Provider/Turkey.php + checkGenericClassInNonGenericObjectType: false From 1670d7bc653053d35a6ce6a80d14d7deb7b1f74a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 18 Jan 2022 00:06:23 +0900 Subject: [PATCH 311/687] Corrected data type Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 6 +++--- src/Yasumi/Translations.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 1d1d8e9d5..9a8eba7f4 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -40,9 +40,9 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato public const ID = 'US'; /** - * @var array list of the days of the week (the index of the weekdays) that are considered weekend days. - * This list only concerns those countries that deviate from the global common definition, - * where the weekend starts on Saturday and ends on Sunday (0 = Sunday, 1 = Monday, etc.). + * @var array list of the days of the week (the index of the weekdays) that are considered weekend days. + * This list only concerns those countries that deviate from the global common definition, + * where the weekend starts on Saturday and ends on Sunday (0 = Sunday, 1 = Monday, etc.). */ public const WEEKEND_DATA = [ // Thursday and Friday diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 7cb38bac4..5346e831b 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -25,7 +25,7 @@ class Translations implements TranslationsInterface { /** - * @var array translations array: ['' => ['' => 'translation', ...], ... ] + * @var array translations array: ['' => ['' => 'translation', ...], ... ] */ public $translations = []; From fe2d4c3378f9818056871682a8e6254d4374ea16 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 18 Jan 2022 00:10:15 +0900 Subject: [PATCH 312/687] Fixed incorrect config Signed-off-by: Sacha Telgenhof --- infection.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/infection.json b/infection.json index ae04957d1..254270a99 100644 --- a/infection.json +++ b/infection.json @@ -9,10 +9,7 @@ "text": "var/infection.log", "summary": "var/summary.log", "debug": "var/debug.log", - "perMutator": "var/per-mutator.md", - "badge": { - "branch": "master" - } + "perMutator": "var/per-mutator.md" }, "mutators": { "@default": true From abe0b17aa6e01b93173529efe5a243597c6c1f64 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 19 Jan 2022 23:48:44 +0900 Subject: [PATCH 313/687] Dropped support for PHP7.3 as it is EOL. Updated codebase to use 7.4 syntax features. --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/mutation-tests.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- .phan/config.php | 2 +- CHANGELOG.md | 3 +++ SECURITY.md | 18 ++++++++++------- composer.json | 2 +- src/Yasumi/Filters/BetweenFilter.php | 18 ++++++----------- src/Yasumi/Filters/OnFilter.php | 6 ++---- src/Yasumi/Holiday.php | 20 +++++++------------ src/Yasumi/Provider/AbstractProvider.php | 20 +++++++------------ src/Yasumi/Provider/Australia.php | 2 +- .../Australia/AustralianCapitalTerritory.php | 2 +- .../Provider/Australia/NewSouthWales.php | 2 +- .../Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- .../Australia/Queensland/Brisbane.php | 2 +- .../Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- .../Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 2 +- .../Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/SubstituteHoliday.php | 6 ++---- src/Yasumi/Translations.php | 4 ++-- src/Yasumi/Yasumi.php | 8 ++------ tests/Argentina/ArgentinaBaseTestCase.php | 8 ++------ tests/Argentina/ArgentinaTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 18 +++++++---------- ...AustralianCapitalTerritoryBaseTestCase.php | 12 ++++------- .../NewSouthWalesBaseTestCase.php | 12 ++++------- .../NorthernTerritoryBaseTestCase.php | 12 ++++------- .../Brisbane/BrisbaneBaseTestCase.php | 12 ++++------- .../Queensland/QueenslandBaseTestCase.php | 12 ++++------- .../SouthAustraliaBaseTestCase.php | 12 ++++------- .../CentralNorth/CentralNorthBaseTestCase.php | 6 ++---- .../CentralNorth/CentralNorthTest.php | 2 +- .../FlindersIslandBaseTestCase.php | 6 ++---- .../FlindersIsland/FlindersIslandTest.php | 2 +- .../KingIsland/KingIslandBaseTestCase.php | 6 ++---- .../Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Northeast/NortheastBaseTestCase.php | 6 ++---- .../Tasmania/Northeast/NortheastTest.php | 2 +- .../CircularHead/CircularHeadBaseTestCase.php | 6 ++---- .../CircularHead/CircularHeadTest.php | 2 +- .../Northwest/NorthwestBaseTestCase.php | 6 ++---- .../Tasmania/Northwest/NorthwestTest.php | 2 +- .../Tasmania/South/SouthBaseTestCase.php | 6 ++---- tests/Australia/Tasmania/South/SouthTest.php | 2 +- .../South/Southeast/SoutheastBaseTestCase.php | 12 ++++------- .../South/Southeast/SoutheastTest.php | 2 +- .../Tasmania/TasmaniaBaseTestCase.php | 12 ++++------- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- .../Victoria/VictoriaBaseTestCase.php | 12 ++++------- .../WesternAustraliaBaseTestCase.php | 12 ++++------- tests/Austria/AustriaBaseTestCase.php | 12 +++-------- tests/Austria/AustriaTest.php | 2 +- .../Burgenland/BurgenlandBaseTestCase.php | 4 +--- tests/Austria/Burgenland/BurgenlandTest.php | 2 +- .../Carinthia/CarinthiaBaseTestCase.php | 4 +--- tests/Austria/Carinthia/CarinthiaTest.php | 2 +- .../LowerAustria/LowerAustriaBaseTestCase.php | 4 +--- .../Austria/LowerAustria/LowerAustriaTest.php | 2 +- .../Austria/Salzburg/SalzburgBaseTestCase.php | 4 +--- tests/Austria/Salzburg/SalzburgTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 4 +--- tests/Austria/Styria/StyriaTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 4 +--- tests/Austria/Tyrol/TyrolTest.php | 2 +- .../UpperAustria/UpperAustriaBaseTestCase.php | 4 +--- .../Austria/UpperAustria/UpperAustriaTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 4 +--- tests/Austria/Vienna/ViennaTest.php | 2 +- .../Vorarlberg/VorarlbergBaseTestCase.php | 4 +--- tests/Austria/Vorarlberg/VorarlbergTest.php | 2 +- tests/Belgium/BelgiumBaseTestCase.php | 8 ++------ tests/Belgium/BelgiumTest.php | 2 +- tests/Bosnia/BosniaBaseTestCase.php | 8 ++------ tests/Bosnia/BosniaTest.php | 2 +- tests/Brazil/BrazilBaseTestCase.php | 8 ++------ tests/Brazil/BrazilTest.php | 2 +- tests/Canada/Alberta/AlbertaBaseTestCase.php | 12 +++-------- tests/Canada/Alberta/AlbertaTest.php | 2 +- .../BritishColumbiaBaseTestCase.php | 12 +++-------- .../BritishColumbia/BritishColumbiaTest.php | 2 +- tests/Canada/CanadaBaseTestCase.php | 8 ++------ tests/Canada/CanadaTest.php | 2 +- .../Canada/Manitoba/ManitobaBaseTestCase.php | 12 +++-------- tests/Canada/Manitoba/ManitobaTest.php | 2 +- .../NewBrunswick/NewBrunswickBaseTestCase.php | 12 +++-------- .../Canada/NewBrunswick/NewBrunswickTest.php | 2 +- .../NewfoundlandAndLabradorBaseTestCase.php | 12 +++-------- .../NewfoundlandAndLabradorTest.php | 2 +- .../NorthwestTerritoriesBaseTestCase.php | 12 +++-------- .../NorthwestTerritoriesTest.php | 2 +- .../NovaScotia/NovaScotiaBaseTestCase.php | 12 +++-------- tests/Canada/NovaScotia/NovaScotiaTest.php | 2 +- tests/Canada/Nunavut/NunavutBaseTestCase.php | 12 +++-------- tests/Canada/Nunavut/NunavutTest.php | 2 +- tests/Canada/Ontario/OntarioBaseTestCase.php | 12 +++-------- tests/Canada/Ontario/OntarioTest.php | 2 +- .../PrinceEdwardIslandBaseTestCase.php | 12 +++-------- .../PrinceEdwardIslandTest.php | 2 +- tests/Canada/Quebec/QuebecBaseTestCase.php | 12 +++-------- tests/Canada/Quebec/QuebecTest.php | 2 +- .../Saskatchewan/SaskatchewanBaseTestCase.php | 12 +++-------- .../Canada/Saskatchewan/SaskatchewanTest.php | 2 +- tests/Canada/Yukon/YukonBaseTestCase.php | 12 +++-------- tests/Canada/Yukon/YukonTest.php | 2 +- tests/Croatia/CroatiaBaseTestCase.php | 8 ++------ tests/Croatia/CroatiaTest.php | 2 +- .../CzechRepublicBaseTestCase.php | 12 +++-------- tests/Denmark/DenmarkBaseTestCase.php | 12 +++-------- tests/Denmark/DenmarkTest.php | 2 +- tests/Estonia/EstoniaBaseTestCase.php | 8 ++------ tests/Finland/FinlandBaseTestCase.php | 12 +++-------- tests/Finland/FinlandTest.php | 2 +- tests/France/BasRhin/BasRhinBaseTestCase.php | 12 +++-------- tests/France/BasRhin/BasRhinTest.php | 2 +- tests/France/FranceBaseTestCase.php | 8 ++------ tests/France/FranceTest.php | 2 +- .../France/HautRhin/HautRhinBaseTestCase.php | 12 +++-------- tests/France/HautRhin/HautRhinTest.php | 2 +- tests/France/Moselle/MoselleBaseTestCase.php | 12 +++-------- tests/France/Moselle/MoselleTest.php | 2 +- tests/Georgia/GeorgiaBaseTestCase.php | 8 ++------ tests/Georgia/GeorgiaTest.php | 2 +- .../BadenWurttembergBaseTestCase.php | 8 ++------ .../BadenWurttemberg/BadenWurttembergTest.php | 2 +- tests/Germany/Bavaria/BavariaBaseTestCase.php | 8 ++------ tests/Germany/Bavaria/BavariaTest.php | 2 +- tests/Germany/Berlin/BerlinBaseTestCase.php | 8 ++------ tests/Germany/Berlin/BerlinTest.php | 2 +- .../Brandenburg/BrandenburgBaseTestCase.php | 8 ++------ tests/Germany/Brandenburg/BrandenburgTest.php | 2 +- tests/Germany/Bremen/BremenBaseTestCase.php | 8 ++------ tests/Germany/Bremen/BremenTest.php | 2 +- tests/Germany/GermanyBaseTestCase.php | 12 +++-------- tests/Germany/GermanyTest.php | 2 +- tests/Germany/Hamburg/HamburgBaseTestCase.php | 8 ++------ tests/Germany/Hamburg/HamburgTest.php | 2 +- tests/Germany/Hesse/HesseBaseTestCase.php | 8 ++------ tests/Germany/Hesse/HesseTest.php | 2 +- .../LowerSaxony/LowerSaxonyBaseTestCase.php | 8 ++------ tests/Germany/LowerSaxony/LowerSaxonyTest.php | 2 +- ...ecklenburgWesternPomeraniaBaseTestCase.php | 8 ++------ .../MecklenburgWesternPomeraniaTest.php | 2 +- .../NorthRhineWestphaliaBaseTestCase.php | 8 ++------ .../NorthRhineWestphaliaTest.php | 2 +- .../RhinelandPalatinate/AllSaintsDayTest.php | 1 - .../RhinelandPalatinateBaseTestCase.php | 8 ++------ .../RhinelandPalatinateTest.php | 2 +- .../Germany/Saarland/SaarlandBaseTestCase.php | 8 ++------ tests/Germany/Saarland/SaarlandTest.php | 2 +- tests/Germany/Saxony/SaxonyBaseTestCase.php | 8 ++------ tests/Germany/Saxony/SaxonyTest.php | 2 +- .../SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 8 ++------ .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- .../SchleswigHolsteinBaseTestCase.php | 8 ++------ .../SchleswigHolsteinTest.php | 2 +- .../Thuringia/ThuringiaBaseTestCase.php | 8 ++------ tests/Germany/Thuringia/ThuringiaTest.php | 2 +- tests/Greece/GreeceBaseTestCase.php | 8 ++------ tests/Greece/GreeceTest.php | 2 +- tests/Hungary/HungaryBaseTestCase.php | 12 +++-------- tests/Hungary/HungaryTest.php | 2 +- tests/Ireland/IrelandBaseTestCase.php | 12 +++-------- tests/Ireland/IrelandTest.php | 2 +- tests/Italy/ItalyBaseTestCase.php | 12 +++-------- tests/Italy/ItalyTest.php | 2 +- tests/Japan/JapanBaseTestCase.php | 8 ++------ tests/Japan/JapanTest.php | 2 +- tests/Latvia/LatviaBaseTestCase.php | 8 ++------ tests/Lithuania/LithuaniaBaseTestCase.php | 8 ++------ tests/Luxembourg/LuxembourgBaseTestCase.php | 8 ++------ tests/Netherlands/NetherlandsBaseTestCase.php | 12 +++-------- tests/NewZealand/NewZealandBaseTestCase.php | 12 +++-------- tests/Norway/NorwayBaseTestCase.php | 12 +++-------- tests/Norway/NorwayTest.php | 2 +- tests/Poland/PolandBaseTestCase.php | 12 +++-------- tests/Poland/PolandTest.php | 2 +- tests/Portugal/PortugalBaseTestCase.php | 12 +++-------- tests/Portugal/PortugalTest.php | 2 +- tests/Romania/RomaniaBaseTestCase.php | 12 +++-------- tests/Romania/RomaniaTest.php | 2 +- tests/Russia/RussiaBaseTestCase.php | 8 ++------ tests/Slovakia/SlovakiaBaseTestCase.php | 12 +++-------- tests/Slovakia/SlovakiaTest.php | 2 +- tests/SouthAfrica/SouthAfricaBaseTestCase.php | 12 +++-------- tests/SouthKorea/SouthKoreaBaseTestCase.php | 12 +++-------- .../Spain/Andalusia/AndalusiaBaseTestCase.php | 8 ++------ tests/Spain/Andalusia/AndalusiaTest.php | 2 +- tests/Spain/Aragon/AragonBaseTestCase.php | 8 ++------ tests/Spain/Aragon/AragonTest.php | 2 +- tests/Spain/Asturias/AsturiasBaseTestCase.php | 8 ++------ tests/Spain/Asturias/AsturiasTest.php | 2 +- .../BalearicIslandsBaseTestCase.php | 8 ++------ .../BalearicIslands/BalearicIslandsTest.php | 2 +- .../BasqueCountryBaseTestCase.php | 8 ++------ .../Spain/BasqueCountry/BasqueCountryTest.php | 2 +- .../CanaryIslandsBaseTestCase.php | 8 ++------ .../Spain/CanaryIslands/CanaryIslandsTest.php | 2 +- .../Spain/Cantabria/CantabriaBaseTestCase.php | 8 ++------ tests/Spain/Cantabria/CantabriaTest.php | 2 +- .../CastileAndLeonBaseTestCase.php | 8 ++------ .../CastileAndLeon/CastileAndLeonTest.php | 2 +- .../CastillaLaManchaBaseTestCase.php | 8 ++------ .../CastillaLaMancha/CastillaLaManchaTest.php | 2 +- .../Spain/Catalonia/CataloniaBaseTestCase.php | 8 ++------ tests/Spain/Catalonia/CataloniaTest.php | 2 +- tests/Spain/Ceuta/CeutaBaseTestCase.php | 8 ++------ tests/Spain/Ceuta/CeutaTest.php | 2 +- .../CommunityOfMadridBaseTestCase.php | 8 ++------ .../CommunityOfMadridTest.php | 2 +- .../Extremadura/ExtremaduraBaseTestCase.php | 8 ++------ tests/Spain/Extremadura/ExtremaduraTest.php | 2 +- tests/Spain/Galicia/GaliciaBaseTestCase.php | 8 ++------ tests/Spain/Galicia/GaliciaTest.php | 2 +- tests/Spain/LaRioja/LaRiojaBaseTestCase.php | 8 ++------ tests/Spain/LaRioja/LaRiojaTest.php | 2 +- tests/Spain/Melilla/MelillaBaseTestCase.php | 4 +--- tests/Spain/Melilla/MelillaTest.php | 2 +- tests/Spain/Navarre/NavarreBaseTestCase.php | 4 +--- tests/Spain/Navarre/NavarreTest.php | 2 +- .../RegionOfMurciaBaseTestCase.php | 8 ++------ .../RegionOfMurcia/RegionOfMurciaTest.php | 2 +- tests/Spain/SpainBaseTestCase.php | 12 +++-------- tests/Spain/SpainTest.php | 2 +- .../ValencianCommunityBaseTestCase.php | 8 ++------ .../ValencianCommunityTest.php | 2 +- tests/Sweden/SwedenBaseTestCase.php | 12 +++-------- tests/Sweden/SwedenTest.php | 2 +- .../Switzerland/Aargau/AargauBaseTestCase.php | 12 +++-------- .../AppenzellAusserrhodenBaseTestCase.php | 12 +++-------- .../AppenzellInnerrhodenBaseTestCase.php | 12 +++-------- .../BaselLandschaftBaseTestCase.php | 12 +++-------- .../BaselStadt/BaselStadtBaseTestCase.php | 12 +++-------- tests/Switzerland/Bern/BernBaseTestCase.php | 12 +++-------- .../Fribourg/FribourgBaseTestCase.php | 12 +++-------- .../Switzerland/Geneva/GenevaBaseTestCase.php | 12 +++-------- .../Switzerland/Glarus/GlarusBaseTestCase.php | 12 +++-------- .../Grisons/GrisonsBaseTestCase.php | 12 +++-------- tests/Switzerland/Jura/JuraBaseTestCase.php | 12 +++-------- .../Lucerne/LucerneBaseTestCase.php | 12 +++-------- .../Neuchatel/NeuchatelBaseTestCase.php | 12 +++-------- .../Nidwalden/NidwaldenBaseTestCase.php | 12 +++-------- .../Obwalden/ObwaldenBaseTestCase.php | 12 +++-------- .../Schaffhausen/SchaffhausenBaseTestCase.php | 12 +++-------- .../Switzerland/Schwyz/SchwyzBaseTestCase.php | 12 +++-------- .../Solothurn/SolothurnBaseTestCase.php | 12 +++-------- .../StGallen/StGallenBaseTestCase.php | 12 +++-------- tests/Switzerland/SwitzerlandBaseTestCase.php | 8 ++------ .../Thurgau/ThurgauBaseTestCase.php | 12 +++-------- .../Switzerland/Ticino/TicinoBaseTestCase.php | 12 +++-------- tests/Switzerland/Uri/UriBaseTestCase.php | 12 +++-------- .../Switzerland/Valais/ValaisBaseTestCase.php | 12 +++-------- tests/Switzerland/Vaud/VaudBaseTestCase.php | 12 +++-------- tests/Switzerland/Zug/ZugBaseTestCase.php | 12 +++-------- .../Switzerland/Zurich/ZurichBaseTestCase.php | 12 +++-------- tests/Turkey/TurkeyTest.php | 2 +- tests/USA/USABaseTestCase.php | 8 ++------ tests/USA/USATest.php | 2 +- tests/Ukraine/UkraineBaseTestCase.php | 12 +++-------- tests/Ukraine/UkraineTest.php | 2 +- .../England/EnglandBaseTestCase.php | 12 +++-------- .../NorthernIrelandBaseTestCase.php | 12 +++-------- .../Scotland/ScotlandBaseTestCase.php | 12 +++-------- .../UnitedKingdomBaseTestCase.php | 12 +++-------- .../UnitedKingdom/Wales/WalesBaseTestCase.php | 12 +++-------- 270 files changed, 529 insertions(+), 1231 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 54fc0af20..a05470b63 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.3', '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index 6f1b67be8..bfb344f77 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '7.3', '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index ecf85684b..7f611f124 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.3', '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 38cb568fc..a5b18897d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.3', '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF diff --git a/.phan/config.php b/.phan/config.php index 84808a426..8d583c969 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -51,7 +51,7 @@ // Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist. // (See `backward_compatibility_checks` for additional options) // Automatically inferred from composer.json requirement for "php" of "^7.4 || ^8.0" - 'target_php_version' => '7.3', + 'target_php_version' => '7.4', // If enabled, missing properties will be created when // they are first seen. If false, we'll report an diff --git a/CHANGELOG.md b/CHANGELOG.md index f24244b7c..d9801c39d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ to [Semantic Versioning](https://semver.org). ### Changed +- Updated codebase using PHP7.4 syntax features. - Revised rules to calculate substitution holidays of South Korea to apply the newly enacted law on June 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Separate `calculateSubstituteHolidays` method of South Korea Provider to `calculateSubstituteHolidays` @@ -49,6 +50,8 @@ to [Semantic Versioning](https://semver.org). ### Removed +- PHP7.3 Support + ## [2.4.0] - 2021-05-09 ### Added diff --git a/SECURITY.md b/SECURITY.md index 06417ba6e..1bc16bfa9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,16 +6,19 @@ Please refer to the below table for the supported versions of Yasumi. | Version | Supported | | ------- | ------------------ | -| 2.4 | :white_check_mark: | -| < 2.3 | :x: | +| 2.5 (dev) | :white_check_mark: | +| < 2.4 | :x: | | < 1.8 | :x: | -As for supported PHP versions, Yasumi supports only the actively supported versions of PHP. Currently that is PHP 7.3, 7.4 and 8.0. Please refer to the [supported versions](https://www.php.net/supported-versions.php) page, -to find more details. When a version of PHP becomes EOL, generally a new release of Yasumi will be issued that sunsets the support of that retired PHP version. +As for supported PHP versions, Yasumi supports only the actively supported versions of PHP. Currently, that is PHP 7.4, +and 8.0. Please refer to the [supported versions](https://www.php.net/supported-versions.php) page, to find more +details. When a version of PHP becomes EOL, generally a new release of Yasumi will be issued that sunsets the support of +that retired PHP version. ## Reporting a Vulnerability -If you would like to report a vulnerability or have any security concerns with Yasumi, please [open an issue](https://github.com/azuyalabs/yasumi/issues/new?labels=security). +If you would like to report a vulnerability or have any security concerns with Yasumi, +please [open an issue](https://github.com/azuyalabs/yasumi/issues/new?labels=security). To investigate your request as good as possible, please include any of the following when reporting: @@ -23,5 +26,6 @@ To investigate your request as good as possible, please include any of the follo - Any tools, including versions used - Any relevant output -I will take all disclosures very seriously and will do my best to rapidly respond and verify the vulnerability before taking the necessary steps to fix it. -After my initial reply to your disclosure, which should be directly after receiving it, I will periodically update you with the status of the fix. +I will take all disclosures very seriously and will do my best to rapidly respond and verify the vulnerability before +taking the necessary steps to fix it. After my initial reply to your disclosure, which should be directly after +receiving it, I will periodically update you with the status of the fix. diff --git a/composer.json b/composer.json index 8adb8befe..342460ac4 100755 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ ], "prefer-stable": true, "require": { - "php": ">=7.3", + "php": ">=7.4", "ext-json": "*" }, "require-dev": { diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index a283cc972..8bb8865ba 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -28,20 +28,14 @@ */ class BetweenFilter extends AbstractFilter { - /** - * @var string start date of the time frame to check against - */ - private $startDate; + /** start date of the time frame to check against. */ + private string $startDate; - /** - * @var string end date of the time frame to check against - */ - private $endDate; + /** end date of the time frame to check against */ + private string $endDate; - /** - * @var bool indicates whether the start and end dates should be included in the comparison - */ - private $equal; + /**indicates whether the start and end dates should be included in the comparison */ + private bool $equal; /** * Construct the Between FilterIterator Object. diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 7fca645ab..b45fcc7d1 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -27,10 +27,8 @@ */ class OnFilter extends AbstractFilter { - /** - * @var string date to check for holidays - */ - private $date; + /** date to check for holidays */ + private string $date; /** * Construct the On FilterIterator Object. diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 71b70fe6f..8b0c52c13 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -63,32 +63,26 @@ class Holiday extends DateTime implements JsonSerializable public const LOCALE_KEY = '_key'; /** - * @var string holiday key - * * @deprecated Public access to this property is deprecated in favor of getKey() * @see getKey() */ - public $shortName; + public string $shortName; /** * @var array list of translations of this holiday */ - public $translations; + public array $translations; - /** - * @var string identifies the type of holiday - */ - protected $type; + /** identifies the type of holiday */ + protected string $type; - /** - * @var string Locale (i.e. language) in which the holiday information needs to be displayed in. (Default 'en_US') - */ - protected $displayLocale; + /** locale (i.e. language) in which the holiday information needs to be displayed in. (Default 'en_US') */ + protected string $displayLocale; /** * @var array list of all defined locales */ - private static $locales = []; + private static array $locales = []; /** * Creates a new Holiday. diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 9a8eba7f4..9b0d3d666 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -79,25 +79,19 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato */ protected $year; - /** - * @var string the object's current timezone - */ - protected $timezone; + /** the object's current timezone */ + protected string $timezone; - /** - * @var string the object's current locale - */ - protected $locale; + /** the object's current locale */ + protected string $locale; /** * @var Holiday[] list of dates of the available holidays */ - private $holidays = []; + private array $holidays = []; - /** - * @var TranslationsInterface|null global translations - */ - private $globalTranslations; + /** global translations */ + private ?TranslationsInterface $globalTranslations; /** * Creates a new holiday provider (i.e. country/state). diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 260437f60..d8cf32855 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -34,7 +34,7 @@ class Australia extends AbstractProvider */ public const ID = 'AU'; - public $timezone = 'Australia/Melbourne'; + public string $timezone = 'Australia/Melbourne'; /** * Initialize holidays for Australia. diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 27b861892..5936ccc50 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -32,7 +32,7 @@ class AustralianCapitalTerritory extends Australia */ public const ID = 'AU-ACT'; - public $timezone = 'Australia/ACT'; + public string $timezone = 'Australia/ACT'; /** * Initialize holidays for Australian Capital Territory (Australia). diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index b27f3b251..87031bfea 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -32,7 +32,7 @@ class NewSouthWales extends Australia */ public const ID = 'AU-NSW'; - public $timezone = 'Australia/NSW'; + public string $timezone = 'Australia/NSW'; /** * Initialize holidays for New South Wales (Australia). diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index b582bf7f5..324b52711 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -32,7 +32,7 @@ class NorthernTerritory extends Australia */ public const ID = 'AU-NT'; - public $timezone = 'Australia/North'; + public string $timezone = 'Australia/North'; /** * Initialize holidays for Northern Territory (Australia). diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index f126a3635..cf451af89 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -31,7 +31,7 @@ class Queensland extends Australia */ public const ID = 'AU-QLD'; - public $timezone = 'Australia/Queensland'; + public string $timezone = 'Australia/Queensland'; /** * Initialize holidays for Queensland (Australia). diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index a6e0d5cbc..3255f2fe7 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -33,7 +33,7 @@ class Brisbane extends Queensland */ public const ID = 'AU-QLD-BRI'; - public $timezone = 'Australia/Brisbane'; + public string $timezone = 'Australia/Brisbane'; /** * Initialize holidays for Brisbane (Australia). diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 736381d36..0b5540407 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -32,7 +32,7 @@ class SouthAustralia extends Australia */ public const ID = 'AU-SA'; - public $timezone = 'Australia/South'; + public string $timezone = 'Australia/South'; /** * Initialize holidays for South Australia (Australia). diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index d7fccc726..72ebf4c46 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -31,7 +31,7 @@ class Tasmania extends Australia */ public const ID = 'AU-TAS'; - public $timezone = 'Australia/Tasmania'; + public string $timezone = 'Australia/Tasmania'; /** * Initialize holidays for Tasmania (Australia). diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index dc66bcb58..39454d5c7 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -32,7 +32,7 @@ class Southeast extends South */ public const ID = 'AU-TAS-SOU-SE'; - public $timezone = 'Australia/Hobart'; + public string $timezone = 'Australia/Hobart'; /** * Initialize holidays for southeastern Tasmania (Australia). diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 19cd9487a..09ec7684a 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -32,7 +32,7 @@ class Victoria extends Australia */ public const ID = 'AU-VIC'; - public $timezone = 'Australia/Victoria'; + public string $timezone = 'Australia/Victoria'; /** * Initialize holidays for Victoria (Australia). diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index fb2772358..426531535 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -31,7 +31,7 @@ class WesternAustralia extends Australia */ public const ID = 'AU-WA'; - public $timezone = 'Australia/West'; + public string $timezone = 'Australia/West'; /** * Initialize holidays for Western Australia (Australia). diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 197b747f5..94c0d7687 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -36,7 +36,7 @@ class UnitedKingdom extends AbstractProvider */ public const ID = 'GB'; - public $timezone = 'Europe/London'; + public string $timezone = 'Europe/London'; /** * Initialize holidays for the United Kingdom. diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index d471db3eb..4eeee819f 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -30,17 +30,15 @@ class SubstituteHoliday extends Holiday { /** - * @var Holiday - * * @deprecated public access to this property is deprecated in favor of getSubstitutedHoliday() * @see getSubstitutedHoliday() */ - public $substitutedHoliday; + public Holiday $substitutedHoliday; /** * @var array list of translations of the "{0} observed" pattern */ - public $substituteHolidayTranslations; + public array $substituteHolidayTranslations; /** * Creates a new SubstituteHoliday. diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 5346e831b..9717e592c 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -27,12 +27,12 @@ class Translations implements TranslationsInterface /** * @var array translations array: ['' => ['' => 'translation', ...], ... ] */ - public $translations = []; + public array $translations = []; /** * @var array list of all defined locales */ - private $availableLocales; + private array $availableLocales; /** * Constructor. diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 8a2246264..542ab020c 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -42,12 +42,8 @@ class Yasumi */ private static $locales = []; - /** - * Global translations. - * - * @var Translations - */ - private static $globalTranslations; + /** Global translations */ + private static ?Translations $globalTranslations = null; /** * Provider class to be ignored (Abstract, trait, other). diff --git a/tests/Argentina/ArgentinaBaseTestCase.php b/tests/Argentina/ArgentinaBaseTestCase.php index 370035c56..b16a4f955 100644 --- a/tests/Argentina/ArgentinaBaseTestCase.php +++ b/tests/Argentina/ArgentinaBaseTestCase.php @@ -29,13 +29,9 @@ abstract class ArgentinaBaseTestCase extends TestCase */ public const REGION = 'Argentina'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Argentina/Buenos_Aires'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'es'; } diff --git a/tests/Argentina/ArgentinaTest.php b/tests/Argentina/ArgentinaTest.php index 2e4d207ee..0f66d092a 100644 --- a/tests/Argentina/ArgentinaTest.php +++ b/tests/Argentina/ArgentinaTest.php @@ -27,7 +27,7 @@ class ArgentinaTest extends ArgentinaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/AustraliaBaseTestCase.php b/tests/Australia/AustraliaBaseTestCase.php index 52085cdc1..6014afaff 100644 --- a/tests/Australia/AustraliaBaseTestCase.php +++ b/tests/Australia/AustraliaBaseTestCase.php @@ -24,16 +24,12 @@ abstract class AustraliaBaseTestCase extends TestCase { use YasumiBase; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_AU'; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/Melbourne'; + + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia'; + + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/Melbourne'; } diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php index dc8360e16..426469d11 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php @@ -24,13 +24,9 @@ abstract class AustralianCapitalTerritoryBaseTestCase extends AustraliaBaseTestC { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\AustralianCapitalTerritory'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\AustralianCapitalTerritory'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/ACT'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/ACT'; } diff --git a/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php index 91a391485..25c474f14 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php @@ -24,13 +24,9 @@ abstract class NewSouthWalesBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\NewSouthWales'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\NewSouthWales'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/NSW'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/NSW'; } diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php index d0a41673a..e51836e36 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php @@ -24,13 +24,9 @@ abstract class NorthernTerritoryBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\NorthernTerritory'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\NorthernTerritory'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/North'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/North'; } diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php b/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php index e5a18abd4..b8b898491 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BrisbaneBaseTestCase extends QueenslandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Queensland\Brisbane'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Queensland\Brisbane'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/Brisbane'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/Brisbane'; } diff --git a/tests/Australia/Queensland/QueenslandBaseTestCase.php b/tests/Australia/Queensland/QueenslandBaseTestCase.php index fb3825c68..c4c509d8a 100644 --- a/tests/Australia/Queensland/QueenslandBaseTestCase.php +++ b/tests/Australia/Queensland/QueenslandBaseTestCase.php @@ -24,13 +24,9 @@ abstract class QueenslandBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Queensland'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Queensland'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/Queensland'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/Queensland'; } diff --git a/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php index 350ccc0af..c1177cad8 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class SouthAustraliaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\SouthAustralia'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\SouthAustralia'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/South'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/South'; } diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php index 792853813..364783f7b 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthBaseTestCase.php @@ -24,8 +24,6 @@ abstract class CentralNorthBaseTestCase extends TasmaniaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\CentralNorth'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\CentralNorth'; } diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 74d34d362..2f96ca123 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -26,7 +26,7 @@ class CentralNorthTest extends CentralNorthBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php index b5929a98f..2726300e6 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php @@ -24,8 +24,6 @@ abstract class FlindersIslandBaseTestCase extends TasmaniaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\FlindersIsland'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\FlindersIsland'; } diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 261ab35ec..fe612a37b 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -26,7 +26,7 @@ class FlindersIslandTest extends FlindersIslandBaseTestCase implements ProviderT /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php b/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php index fe538928f..46f9c9811 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php @@ -24,8 +24,6 @@ abstract class KingIslandBaseTestCase extends TasmaniaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\KingIsland'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\KingIsland'; } diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index ef4ae7482..2f1d23083 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -26,7 +26,7 @@ class KingIslandTest extends KingIslandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php b/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php index 7828138aa..318755030 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php +++ b/tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php @@ -24,8 +24,6 @@ abstract class NortheastBaseTestCase extends TasmaniaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\Northeast'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\Northeast'; } diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index 2cd8c198e..e01db49eb 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -26,7 +26,7 @@ class NortheastTest extends NortheastBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php index fbe834056..70e13c30c 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadBaseTestCase.php @@ -24,8 +24,6 @@ abstract class CircularHeadBaseTestCase extends NorthwestBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\Northwest\CircularHead'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\Northwest\CircularHead'; } diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 9c7924f03..79b1ec73a 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -25,7 +25,7 @@ class CircularHeadTest extends CircularHeadBaseTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php b/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php index 0ac65c780..2f40825cf 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php @@ -24,8 +24,6 @@ abstract class NorthwestBaseTestCase extends TasmaniaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\Northwest'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\Northwest'; } diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index 5684f5d55..36466435e 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -26,7 +26,7 @@ class NorthwestTest extends NorthwestBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/South/SouthBaseTestCase.php b/tests/Australia/Tasmania/South/SouthBaseTestCase.php index dd6928de6..2da9fbf86 100644 --- a/tests/Australia/Tasmania/South/SouthBaseTestCase.php +++ b/tests/Australia/Tasmania/South/SouthBaseTestCase.php @@ -24,8 +24,6 @@ abstract class SouthBaseTestCase extends TasmaniaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\South'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\South'; } diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 33457ed73..7af73ab3e 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -26,7 +26,7 @@ class SouthTest extends SouthBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php b/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php index 60bebcdc2..4e1d6f7e2 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php @@ -24,13 +24,9 @@ abstract class SoutheastBaseTestCase extends SouthBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania\South\Southeast'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania\South\Southeast'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/Hobart'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/Hobart'; } diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index 32602554d..f0d42b0ad 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -25,7 +25,7 @@ class SoutheastTest extends SoutheastBaseTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Tasmania/TasmaniaBaseTestCase.php b/tests/Australia/Tasmania/TasmaniaBaseTestCase.php index 6962d554a..39fac83a0 100644 --- a/tests/Australia/Tasmania/TasmaniaBaseTestCase.php +++ b/tests/Australia/Tasmania/TasmaniaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class TasmaniaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Tasmania'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Tasmania'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/Tasmania'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/Tasmania'; } diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index eeeb0f409..e1e40fcfa 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -26,7 +26,7 @@ class TasmaniaTest extends TasmaniaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Australia/Victoria/VictoriaBaseTestCase.php b/tests/Australia/Victoria/VictoriaBaseTestCase.php index 400f2064a..c803ade63 100644 --- a/tests/Australia/Victoria/VictoriaBaseTestCase.php +++ b/tests/Australia/Victoria/VictoriaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class VictoriaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\Victoria'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\Victoria'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/Victoria'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/Victoria'; } diff --git a/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php index 0814b90b5..e75330e93 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class WesternAustraliaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ - public $region = 'Australia\WesternAustralia'; + /** Name of the region (e.g. country / state) to be tested. */ + public string $region = 'Australia\WesternAustralia'; - /** - * Timezone in which this provider has holidays defined. - */ - public $timezone = 'Australia/West'; + /** Timezone in which this provider has holidays defined. */ + public string $timezone = 'Australia/West'; } diff --git a/tests/Austria/AustriaBaseTestCase.php b/tests/Austria/AustriaBaseTestCase.php index 0c7492a9e..82ecbdbb2 100644 --- a/tests/Austria/AustriaBaseTestCase.php +++ b/tests/Austria/AustriaBaseTestCase.php @@ -24,19 +24,13 @@ abstract class AustriaBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Vienna'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_AT'; /** diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 305989849..491a70ba6 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -26,7 +26,7 @@ class AustriaTest extends AustriaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Burgenland/BurgenlandBaseTestCase.php b/tests/Austria/Burgenland/BurgenlandBaseTestCase.php index 3805b45be..03bfe986c 100644 --- a/tests/Austria/Burgenland/BurgenlandBaseTestCase.php +++ b/tests/Austria/Burgenland/BurgenlandBaseTestCase.php @@ -24,8 +24,6 @@ abstract class BurgenlandBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Burgenland'; } diff --git a/tests/Austria/Burgenland/BurgenlandTest.php b/tests/Austria/Burgenland/BurgenlandTest.php index 59b6f7ac4..cdaf6f31e 100644 --- a/tests/Austria/Burgenland/BurgenlandTest.php +++ b/tests/Austria/Burgenland/BurgenlandTest.php @@ -26,7 +26,7 @@ class BurgenlandTest extends BurgenlandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Carinthia/CarinthiaBaseTestCase.php b/tests/Austria/Carinthia/CarinthiaBaseTestCase.php index 65077385c..5f3a7a4b9 100644 --- a/tests/Austria/Carinthia/CarinthiaBaseTestCase.php +++ b/tests/Austria/Carinthia/CarinthiaBaseTestCase.php @@ -24,8 +24,6 @@ abstract class CarinthiaBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Carinthia'; } diff --git a/tests/Austria/Carinthia/CarinthiaTest.php b/tests/Austria/Carinthia/CarinthiaTest.php index b603ad416..79e9acb3b 100644 --- a/tests/Austria/Carinthia/CarinthiaTest.php +++ b/tests/Austria/Carinthia/CarinthiaTest.php @@ -26,7 +26,7 @@ class CarinthiaTest extends CarinthiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php b/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php index 0e48f7665..d9517d7c3 100644 --- a/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php +++ b/tests/Austria/LowerAustria/LowerAustriaBaseTestCase.php @@ -24,8 +24,6 @@ abstract class LowerAustriaBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/LowerAustria'; } diff --git a/tests/Austria/LowerAustria/LowerAustriaTest.php b/tests/Austria/LowerAustria/LowerAustriaTest.php index 41fc2ae1d..6295481fb 100644 --- a/tests/Austria/LowerAustria/LowerAustriaTest.php +++ b/tests/Austria/LowerAustria/LowerAustriaTest.php @@ -26,7 +26,7 @@ class LowerAustriaTest extends LowerAustriaBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Salzburg/SalzburgBaseTestCase.php b/tests/Austria/Salzburg/SalzburgBaseTestCase.php index 729185280..89083dcfb 100644 --- a/tests/Austria/Salzburg/SalzburgBaseTestCase.php +++ b/tests/Austria/Salzburg/SalzburgBaseTestCase.php @@ -24,8 +24,6 @@ abstract class SalzburgBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Salzburg'; } diff --git a/tests/Austria/Salzburg/SalzburgTest.php b/tests/Austria/Salzburg/SalzburgTest.php index e921edc6f..b0587b605 100644 --- a/tests/Austria/Salzburg/SalzburgTest.php +++ b/tests/Austria/Salzburg/SalzburgTest.php @@ -26,7 +26,7 @@ class SalzburgTest extends SalzburgBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Styria/StyriaBaseTestCase.php b/tests/Austria/Styria/StyriaBaseTestCase.php index d396e0035..afb05d6f4 100644 --- a/tests/Austria/Styria/StyriaBaseTestCase.php +++ b/tests/Austria/Styria/StyriaBaseTestCase.php @@ -24,8 +24,6 @@ abstract class StyriaBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Styria'; } diff --git a/tests/Austria/Styria/StyriaTest.php b/tests/Austria/Styria/StyriaTest.php index 808e85a3e..5b1f24e6b 100644 --- a/tests/Austria/Styria/StyriaTest.php +++ b/tests/Austria/Styria/StyriaTest.php @@ -26,7 +26,7 @@ class StyriaTest extends StyriaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Tyrol/TyrolBaseTestCase.php b/tests/Austria/Tyrol/TyrolBaseTestCase.php index 40ce2e666..02d58ad8c 100644 --- a/tests/Austria/Tyrol/TyrolBaseTestCase.php +++ b/tests/Austria/Tyrol/TyrolBaseTestCase.php @@ -24,8 +24,6 @@ abstract class TyrolBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Tyrol'; } diff --git a/tests/Austria/Tyrol/TyrolTest.php b/tests/Austria/Tyrol/TyrolTest.php index 8c1e70573..ac08b857c 100644 --- a/tests/Austria/Tyrol/TyrolTest.php +++ b/tests/Austria/Tyrol/TyrolTest.php @@ -26,7 +26,7 @@ class TyrolTest extends TyrolBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php b/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php index d7a6f530e..0cb75ac95 100644 --- a/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php +++ b/tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php @@ -24,8 +24,6 @@ abstract class UpperAustriaBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/UpperAustria'; } diff --git a/tests/Austria/UpperAustria/UpperAustriaTest.php b/tests/Austria/UpperAustria/UpperAustriaTest.php index ac480b53a..a6c91b0cf 100644 --- a/tests/Austria/UpperAustria/UpperAustriaTest.php +++ b/tests/Austria/UpperAustria/UpperAustriaTest.php @@ -26,7 +26,7 @@ class UpperAustriaTest extends UpperAustriaBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Vienna/ViennaBaseTestCase.php b/tests/Austria/Vienna/ViennaBaseTestCase.php index 5c907d1eb..ba54eb780 100644 --- a/tests/Austria/Vienna/ViennaBaseTestCase.php +++ b/tests/Austria/Vienna/ViennaBaseTestCase.php @@ -24,8 +24,6 @@ abstract class ViennaBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Vienna'; } diff --git a/tests/Austria/Vienna/ViennaTest.php b/tests/Austria/Vienna/ViennaTest.php index f4362bb10..8eebe56ce 100644 --- a/tests/Austria/Vienna/ViennaTest.php +++ b/tests/Austria/Vienna/ViennaTest.php @@ -26,7 +26,7 @@ class ViennaTest extends ViennaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php b/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php index a1bd13b4e..e270d2622 100644 --- a/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php +++ b/tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php @@ -24,8 +24,6 @@ abstract class VorarlbergBaseTestCase extends AustriaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Austria/Vorarlberg'; } diff --git a/tests/Austria/Vorarlberg/VorarlbergTest.php b/tests/Austria/Vorarlberg/VorarlbergTest.php index 03f8f13eb..24c7713ac 100644 --- a/tests/Austria/Vorarlberg/VorarlbergTest.php +++ b/tests/Austria/Vorarlberg/VorarlbergTest.php @@ -26,7 +26,7 @@ class VorarlbergTest extends VorarlbergBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Belgium/BelgiumBaseTestCase.php b/tests/Belgium/BelgiumBaseTestCase.php index 25c1b6e4a..91c389538 100644 --- a/tests/Belgium/BelgiumBaseTestCase.php +++ b/tests/Belgium/BelgiumBaseTestCase.php @@ -29,13 +29,9 @@ abstract class BelgiumBaseTestCase extends TestCase */ public const REGION = 'Belgium'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Brussels'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'nl_BE'; } diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index bfb7c5ab0..28779e5ed 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -25,7 +25,7 @@ class BelgiumTest extends BelgiumBaseTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Bosnia/BosniaBaseTestCase.php b/tests/Bosnia/BosniaBaseTestCase.php index 7740f4a9e..141d295cd 100644 --- a/tests/Bosnia/BosniaBaseTestCase.php +++ b/tests/Bosnia/BosniaBaseTestCase.php @@ -31,13 +31,9 @@ abstract class BosniaBaseTestCase extends TestCase */ public const REGION = 'Bosnia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Sarajevo'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'bs_Latn_BA'; } diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index 7c0230ce8..381461ef9 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -26,7 +26,7 @@ class BosniaTest extends BosniaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Brazil/BrazilBaseTestCase.php b/tests/Brazil/BrazilBaseTestCase.php index 7e3b53421..7d0f89ac0 100644 --- a/tests/Brazil/BrazilBaseTestCase.php +++ b/tests/Brazil/BrazilBaseTestCase.php @@ -29,13 +29,9 @@ abstract class BrazilBaseTestCase extends TestCase */ public const REGION = 'Brazil'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Fortaleza'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'pt_BR'; } diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 304681a74..dfb60b96f 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -26,7 +26,7 @@ class BrazilTest extends BrazilBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Alberta/AlbertaBaseTestCase.php b/tests/Canada/Alberta/AlbertaBaseTestCase.php index ef8bc4f4f..835c6216c 100644 --- a/tests/Canada/Alberta/AlbertaBaseTestCase.php +++ b/tests/Canada/Alberta/AlbertaBaseTestCase.php @@ -24,19 +24,13 @@ abstract class AlbertaBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Alberta'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Edmonton'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index 9775f8715..b5282478a 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -26,7 +26,7 @@ class AlbertaTest extends AlbertaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php b/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php index 1eb2f2865..6340f2bdf 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php @@ -24,19 +24,13 @@ abstract class BritishColumbiaBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\BritishColumbia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Vancouver'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index 6beee3f5b..0f81006bc 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -26,7 +26,7 @@ class BritishColumbiaTest extends BritishColumbiaBaseTestCase implements Provide /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/CanadaBaseTestCase.php b/tests/Canada/CanadaBaseTestCase.php index 12e4570a6..7ba78675c 100644 --- a/tests/Canada/CanadaBaseTestCase.php +++ b/tests/Canada/CanadaBaseTestCase.php @@ -29,13 +29,9 @@ abstract class CanadaBaseTestCase extends TestCase */ public const REGION = 'Canada'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Toronto'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; } diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php index aa31b1d76..7658cc233 100644 --- a/tests/Canada/CanadaTest.php +++ b/tests/Canada/CanadaTest.php @@ -26,7 +26,7 @@ class CanadaTest extends CanadaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Manitoba/ManitobaBaseTestCase.php b/tests/Canada/Manitoba/ManitobaBaseTestCase.php index 6592bb4f2..5d1a6135f 100644 --- a/tests/Canada/Manitoba/ManitobaBaseTestCase.php +++ b/tests/Canada/Manitoba/ManitobaBaseTestCase.php @@ -24,19 +24,13 @@ abstract class ManitobaBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Manitoba'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Winnipeg'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index 2c2204c0c..49db8947d 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -26,7 +26,7 @@ class ManitobaTest extends ManitobaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php b/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php index 474afd546..8f40572db 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php +++ b/tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php @@ -24,19 +24,13 @@ abstract class NewBrunswickBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\NewBrunswick'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Halifax'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index 3b4f92f3d..1982907f9 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -26,7 +26,7 @@ class NewBrunswickTest extends NewBrunswickBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php index 8ed219d7d..5004cc16c 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorBaseTestCase.php @@ -24,19 +24,13 @@ abstract class NewfoundlandAndLabradorBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\NewfoundlandAndLabrador'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/St_Johns'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php index 55adf8ba4..54c39795b 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -26,7 +26,7 @@ class NewfoundlandAndLabradorTest extends NewfoundlandAndLabradorBaseTestCase im /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php index 70a814041..9374bcdb4 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php @@ -24,19 +24,13 @@ abstract class NorthwestTerritoriesBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\NorthwestTerritories'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Yellowknife'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index ec8a1d196..ac47a50d1 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -26,7 +26,7 @@ class NorthwestTerritoriesTest extends NorthwestTerritoriesBaseTestCase implemen /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php b/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php index c31d3c829..042119d9b 100644 --- a/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php +++ b/tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php @@ -24,19 +24,13 @@ abstract class NovaScotiaBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\NovaScotia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Halifax'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index 1f591445d..5806edfe5 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -26,7 +26,7 @@ class NovaScotiaTest extends NovaScotiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Nunavut/NunavutBaseTestCase.php b/tests/Canada/Nunavut/NunavutBaseTestCase.php index f5519e485..0b9bf95fd 100644 --- a/tests/Canada/Nunavut/NunavutBaseTestCase.php +++ b/tests/Canada/Nunavut/NunavutBaseTestCase.php @@ -24,19 +24,13 @@ abstract class NunavutBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Nunavut'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Iqaluit'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php index 0bcb72155..880323569 100644 --- a/tests/Canada/Nunavut/NunavutTest.php +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -26,7 +26,7 @@ class NunavutTest extends NunavutBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Ontario/OntarioBaseTestCase.php b/tests/Canada/Ontario/OntarioBaseTestCase.php index 08236ec80..72106e8ac 100644 --- a/tests/Canada/Ontario/OntarioBaseTestCase.php +++ b/tests/Canada/Ontario/OntarioBaseTestCase.php @@ -24,19 +24,13 @@ abstract class OntarioBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Ontario'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Toronto'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index 117a2a321..871a0f207 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -26,7 +26,7 @@ class OntarioTest extends OntarioBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php index 697bd3e0f..0e45ff9f8 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php @@ -24,19 +24,13 @@ abstract class PrinceEdwardIslandBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\PrinceEdwardIsland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Halifax'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index 3e6ebdff0..c39180328 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -26,7 +26,7 @@ class PrinceEdwardIslandTest extends PrinceEdwardIslandBaseTestCase implements P /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Quebec/QuebecBaseTestCase.php b/tests/Canada/Quebec/QuebecBaseTestCase.php index d349c6aee..590d9a3d0 100644 --- a/tests/Canada/Quebec/QuebecBaseTestCase.php +++ b/tests/Canada/Quebec/QuebecBaseTestCase.php @@ -24,19 +24,13 @@ abstract class QuebecBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Quebec'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Toronto'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index 64e3179bb..ab7339fdf 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -26,7 +26,7 @@ class QuebecTest extends QuebecBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php b/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php index a8996a213..602442471 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php +++ b/tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php @@ -24,19 +24,13 @@ abstract class SaskatchewanBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Saskatchewan'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Regina'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index 0fdb8f0f1..37390de0f 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -26,7 +26,7 @@ class SaskatchewanTest extends SaskatchewanBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Canada/Yukon/YukonBaseTestCase.php b/tests/Canada/Yukon/YukonBaseTestCase.php index d72c6b45e..7ad12c9c6 100644 --- a/tests/Canada/Yukon/YukonBaseTestCase.php +++ b/tests/Canada/Yukon/YukonBaseTestCase.php @@ -24,19 +24,13 @@ abstract class YukonBaseTestCase extends CanadaBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Canada\Yukon'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/Whitehorse'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_CA'; /** diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index d62a53c83..ac7549090 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -26,7 +26,7 @@ class YukonTest extends YukonBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Croatia/CroatiaBaseTestCase.php b/tests/Croatia/CroatiaBaseTestCase.php index 21dcddaeb..7861cd392 100644 --- a/tests/Croatia/CroatiaBaseTestCase.php +++ b/tests/Croatia/CroatiaBaseTestCase.php @@ -31,13 +31,9 @@ abstract class CroatiaBaseTestCase extends TestCase */ public const REGION = 'Croatia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zagreb'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'hr_HR'; } diff --git a/tests/Croatia/CroatiaTest.php b/tests/Croatia/CroatiaTest.php index 55b00ca72..98652c6a7 100644 --- a/tests/Croatia/CroatiaTest.php +++ b/tests/Croatia/CroatiaTest.php @@ -26,7 +26,7 @@ class CroatiaTest extends CroatiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/CzechRepublic/CzechRepublicBaseTestCase.php b/tests/CzechRepublic/CzechRepublicBaseTestCase.php index ef0bd1173..76811d4eb 100644 --- a/tests/CzechRepublic/CzechRepublicBaseTestCase.php +++ b/tests/CzechRepublic/CzechRepublicBaseTestCase.php @@ -28,18 +28,12 @@ abstract class CzechRepublicBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'CzechRepublic'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Prague'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'cs_CZ'; } diff --git a/tests/Denmark/DenmarkBaseTestCase.php b/tests/Denmark/DenmarkBaseTestCase.php index bcb82f36d..c08767904 100644 --- a/tests/Denmark/DenmarkBaseTestCase.php +++ b/tests/Denmark/DenmarkBaseTestCase.php @@ -24,18 +24,12 @@ abstract class DenmarkBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Denmark'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Copenhagen'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'da_DK'; } diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index 2c81ab71a..79cb6fca8 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -26,7 +26,7 @@ class DenmarkTest extends DenmarkBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Estonia/EstoniaBaseTestCase.php b/tests/Estonia/EstoniaBaseTestCase.php index faebab42f..bea64f428 100644 --- a/tests/Estonia/EstoniaBaseTestCase.php +++ b/tests/Estonia/EstoniaBaseTestCase.php @@ -32,13 +32,9 @@ abstract class EstoniaBaseTestCase extends TestCase */ public const REGION = 'Estonia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Tallinn'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'et_EE'; } diff --git a/tests/Finland/FinlandBaseTestCase.php b/tests/Finland/FinlandBaseTestCase.php index 6cafbbc3e..b58b07892 100644 --- a/tests/Finland/FinlandBaseTestCase.php +++ b/tests/Finland/FinlandBaseTestCase.php @@ -24,18 +24,12 @@ abstract class FinlandBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Finland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Helsinki'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fi_FI'; } diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 979a377d7..7f98f2580 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -26,7 +26,7 @@ class FinlandTest extends FinlandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/France/BasRhin/BasRhinBaseTestCase.php b/tests/France/BasRhin/BasRhinBaseTestCase.php index f129cef52..f9a46f307 100644 --- a/tests/France/BasRhin/BasRhinBaseTestCase.php +++ b/tests/France/BasRhin/BasRhinBaseTestCase.php @@ -24,18 +24,12 @@ abstract class BasRhinBaseTestCase extends FranceBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'France/BasRhin'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Paris'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_FR'; } diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index 9dab4cdec..fe0242897 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -26,7 +26,7 @@ class BasRhinTest extends BasRhinBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/France/FranceBaseTestCase.php b/tests/France/FranceBaseTestCase.php index 3d37fb0b3..ce4c78c46 100644 --- a/tests/France/FranceBaseTestCase.php +++ b/tests/France/FranceBaseTestCase.php @@ -29,13 +29,9 @@ abstract class FranceBaseTestCase extends TestCase */ public const REGION = 'France'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Paris'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_FR'; } diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index a4a8d3a68..518a2bd3b 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -26,7 +26,7 @@ class FranceTest extends FranceBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/France/HautRhin/HautRhinBaseTestCase.php b/tests/France/HautRhin/HautRhinBaseTestCase.php index 824d877c6..51bae272e 100644 --- a/tests/France/HautRhin/HautRhinBaseTestCase.php +++ b/tests/France/HautRhin/HautRhinBaseTestCase.php @@ -24,18 +24,12 @@ abstract class HautRhinBaseTestCase extends FranceBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'France/HautRhin'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Paris'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_FR'; } diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 620bc0a39..d7e3964bf 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -26,7 +26,7 @@ class HautRhinTest extends HautRhinBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/France/Moselle/MoselleBaseTestCase.php b/tests/France/Moselle/MoselleBaseTestCase.php index c12e1bde6..0747fdf52 100644 --- a/tests/France/Moselle/MoselleBaseTestCase.php +++ b/tests/France/Moselle/MoselleBaseTestCase.php @@ -24,18 +24,12 @@ abstract class MoselleBaseTestCase extends FranceBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'France/Moselle'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Paris'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_FR'; } diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index bd257c5de..71842d52c 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -26,7 +26,7 @@ class MoselleTest extends MoselleBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Georgia/GeorgiaBaseTestCase.php b/tests/Georgia/GeorgiaBaseTestCase.php index 0e9ada00e..a56cebef3 100644 --- a/tests/Georgia/GeorgiaBaseTestCase.php +++ b/tests/Georgia/GeorgiaBaseTestCase.php @@ -30,13 +30,9 @@ abstract class GeorgiaBaseTestCase extends TestCase */ public const REGION = 'Georgia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Asia/Tbilisi'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'ka_GE'; } diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php index 713e91d87..d86642c37 100644 --- a/tests/Georgia/GeorgiaTest.php +++ b/tests/Georgia/GeorgiaTest.php @@ -30,7 +30,7 @@ class GeorgiaTest extends GeorgiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php b/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php index f5b01e24d..850a69695 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BadenWurttembergBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/BadenWurttemberg'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index af8ac2ed0..c409c9c17 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -26,7 +26,7 @@ class BadenWurttembergTest extends BadenWurttembergBaseTestCase implements Provi /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Bavaria/BavariaBaseTestCase.php b/tests/Germany/Bavaria/BavariaBaseTestCase.php index a08bd9fcb..e666c8a7e 100644 --- a/tests/Germany/Bavaria/BavariaBaseTestCase.php +++ b/tests/Germany/Bavaria/BavariaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BavariaBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Bavaria'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index d6f5c31f0..d9dbe3947 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -26,7 +26,7 @@ class BavariaTest extends BavariaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Berlin/BerlinBaseTestCase.php b/tests/Germany/Berlin/BerlinBaseTestCase.php index 42fcf4511..b1f824478 100644 --- a/tests/Germany/Berlin/BerlinBaseTestCase.php +++ b/tests/Germany/Berlin/BerlinBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BerlinBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Berlin'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index d4a8c8f48..fa551e4ec 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -26,7 +26,7 @@ class BerlinTest extends BerlinBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php b/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php index 83d790c4a..5f193724f 100644 --- a/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php +++ b/tests/Germany/Brandenburg/BrandenburgBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BrandenburgBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Brandenburg'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index aef48a97d..3fda8a19d 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -26,7 +26,7 @@ class BrandenburgTest extends BrandenburgBaseTestCase implements ProviderTestCas /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Bremen/BremenBaseTestCase.php b/tests/Germany/Bremen/BremenBaseTestCase.php index 5598bfc59..defced46b 100644 --- a/tests/Germany/Bremen/BremenBaseTestCase.php +++ b/tests/Germany/Bremen/BremenBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BremenBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Bremen'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index cedfda86d..49ae20575 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -26,7 +26,7 @@ class BremenTest extends BremenBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/GermanyBaseTestCase.php b/tests/Germany/GermanyBaseTestCase.php index a5e25ee66..b60fa04a1 100644 --- a/tests/Germany/GermanyBaseTestCase.php +++ b/tests/Germany/GermanyBaseTestCase.php @@ -24,19 +24,13 @@ abstract class GermanyBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_DE'; /** diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 8c45e63a3..6c0fde0ba 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -26,7 +26,7 @@ class GermanyTest extends GermanyBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Hamburg/HamburgBaseTestCase.php b/tests/Germany/Hamburg/HamburgBaseTestCase.php index 361e786ec..d34f7112c 100644 --- a/tests/Germany/Hamburg/HamburgBaseTestCase.php +++ b/tests/Germany/Hamburg/HamburgBaseTestCase.php @@ -24,13 +24,9 @@ abstract class HamburgBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Hamburg'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index bdbab94de..5b84a54ae 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -26,7 +26,7 @@ class HamburgTest extends HamburgBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Hesse/HesseBaseTestCase.php b/tests/Germany/Hesse/HesseBaseTestCase.php index 53242d21c..407749f0c 100644 --- a/tests/Germany/Hesse/HesseBaseTestCase.php +++ b/tests/Germany/Hesse/HesseBaseTestCase.php @@ -24,13 +24,9 @@ abstract class HesseBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Hesse'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index 99ad17d11..21d6b8610 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -26,7 +26,7 @@ class HesseTest extends HesseBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php b/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php index 133109a3e..64fadf5ac 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php @@ -24,13 +24,9 @@ abstract class LowerSaxonyBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/LowerSaxony'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index 5211a4f04..b27d90e32 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -26,7 +26,7 @@ class LowerSaxonyTest extends LowerSaxonyBaseTestCase implements ProviderTestCas /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php index 2980d7dba..f67e3d374 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class MecklenburgWesternPomeraniaBaseTestCase extends GermanyBaseTestCa { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/MecklenburgWesternPomerania'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index d621aeac4..78bd9b14c 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -26,7 +26,7 @@ class MecklenburgWesternPomeraniaTest extends MecklenburgWesternPomeraniaBaseTes /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php index afb29f45d..ff0bd6829 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class NorthRhineWestphaliaBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/NorthRhineWestphalia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index 38ed24a59..35751c641 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -26,7 +26,7 @@ class NorthRhineWestphaliaTest extends NorthRhineWestphaliaBaseTestCase implemen /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index 3e4807131..2ab9e52aa 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; -use Cassandra\Date; use DateTime; use Exception; use ReflectionException; diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php index dcc8b7111..552da7458 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php @@ -24,13 +24,9 @@ abstract class RhinelandPalatinateBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/RhinelandPalatinate'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index c00733267..de2f76461 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -26,7 +26,7 @@ class RhinelandPalatinateTest extends RhinelandPalatinateBaseTestCase implements /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Saarland/SaarlandBaseTestCase.php b/tests/Germany/Saarland/SaarlandBaseTestCase.php index db0afaf3e..9f197aabe 100644 --- a/tests/Germany/Saarland/SaarlandBaseTestCase.php +++ b/tests/Germany/Saarland/SaarlandBaseTestCase.php @@ -24,13 +24,9 @@ abstract class SaarlandBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Saarland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 593b6ab91..2524fbdec 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -26,7 +26,7 @@ class SaarlandTest extends SaarlandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Saxony/SaxonyBaseTestCase.php b/tests/Germany/Saxony/SaxonyBaseTestCase.php index 45ce5d71b..5b6e4a831 100644 --- a/tests/Germany/Saxony/SaxonyBaseTestCase.php +++ b/tests/Germany/Saxony/SaxonyBaseTestCase.php @@ -24,13 +24,9 @@ abstract class SaxonyBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Saxony'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index ac007def4..b3713cc58 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -26,7 +26,7 @@ class SaxonyTest extends SaxonyBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php index a5e099965..f7972c328 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php @@ -24,13 +24,9 @@ abstract class SaxonyAnhaltBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/SaxonyAnhalt'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index 39866be4f..f15d9d599 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -26,7 +26,7 @@ class SaxonyAnhaltTest extends SaxonyAnhaltBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php index cb66d5f21..8067dc9d5 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php @@ -24,13 +24,9 @@ abstract class SchleswigHolsteinBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/SchleswigHolstein'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index f70e3326e..28eb39bc6 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -26,7 +26,7 @@ class SchleswigHolsteinTest extends SchleswigHolsteinBaseTestCase implements Pro /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Germany/Thuringia/ThuringiaBaseTestCase.php b/tests/Germany/Thuringia/ThuringiaBaseTestCase.php index 755bc149a..5233b8b17 100644 --- a/tests/Germany/Thuringia/ThuringiaBaseTestCase.php +++ b/tests/Germany/Thuringia/ThuringiaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class ThuringiaBaseTestCase extends GermanyBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Germany/Thuringia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Berlin'; } diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index ba397c717..de62a7adf 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -26,7 +26,7 @@ class ThuringiaTest extends ThuringiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Greece/GreeceBaseTestCase.php b/tests/Greece/GreeceBaseTestCase.php index fc5a1b147..b734bf4fc 100644 --- a/tests/Greece/GreeceBaseTestCase.php +++ b/tests/Greece/GreeceBaseTestCase.php @@ -29,13 +29,9 @@ abstract class GreeceBaseTestCase extends TestCase */ public const REGION = 'Greece'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Athens'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'el_GR'; } diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index 573586ccb..78024df39 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -26,7 +26,7 @@ class GreeceTest extends GreeceBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Hungary/HungaryBaseTestCase.php b/tests/Hungary/HungaryBaseTestCase.php index c72b15fa0..55221b86e 100644 --- a/tests/Hungary/HungaryBaseTestCase.php +++ b/tests/Hungary/HungaryBaseTestCase.php @@ -24,18 +24,12 @@ abstract class HungaryBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Hungary'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Budapest'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'hu_HU'; } diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index dc93ccb1f..2189669f4 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -26,7 +26,7 @@ class HungaryTest extends HungaryBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Ireland/IrelandBaseTestCase.php b/tests/Ireland/IrelandBaseTestCase.php index 28ed2092e..fb9fed554 100644 --- a/tests/Ireland/IrelandBaseTestCase.php +++ b/tests/Ireland/IrelandBaseTestCase.php @@ -24,19 +24,13 @@ abstract class IrelandBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Ireland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Dublin'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_IE'; /** diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index 96fef9191..dd9787043 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -26,7 +26,7 @@ class IrelandTest extends IrelandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Italy/ItalyBaseTestCase.php b/tests/Italy/ItalyBaseTestCase.php index be21d724d..d610973c8 100644 --- a/tests/Italy/ItalyBaseTestCase.php +++ b/tests/Italy/ItalyBaseTestCase.php @@ -24,18 +24,12 @@ abstract class ItalyBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Italy'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Rome'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'it_IT'; } diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index 0a8eb73b4..5f17253e9 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -26,7 +26,7 @@ class ItalyTest extends ItalyBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Japan/JapanBaseTestCase.php b/tests/Japan/JapanBaseTestCase.php index baa3bc242..8c688e76f 100644 --- a/tests/Japan/JapanBaseTestCase.php +++ b/tests/Japan/JapanBaseTestCase.php @@ -29,9 +29,7 @@ abstract class JapanBaseTestCase extends TestCase */ public const REGION = 'Japan'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Asia/Tokyo'; /** @@ -39,8 +37,6 @@ abstract class JapanBaseTestCase extends TestCase */ public const SUBSTITUTE_PREFIX = 'substituteHoliday:'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'ja_JP'; } diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index b0b826d3c..ec22e3eeb 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -26,7 +26,7 @@ class JapanTest extends JapanBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Latvia/LatviaBaseTestCase.php b/tests/Latvia/LatviaBaseTestCase.php index b1e93a89c..5c25188e4 100644 --- a/tests/Latvia/LatviaBaseTestCase.php +++ b/tests/Latvia/LatviaBaseTestCase.php @@ -32,13 +32,9 @@ abstract class LatviaBaseTestCase extends TestCase */ public const REGION = 'Latvia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Riga'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'lv_LV'; } diff --git a/tests/Lithuania/LithuaniaBaseTestCase.php b/tests/Lithuania/LithuaniaBaseTestCase.php index 6632e67c8..67ae05369 100644 --- a/tests/Lithuania/LithuaniaBaseTestCase.php +++ b/tests/Lithuania/LithuaniaBaseTestCase.php @@ -32,13 +32,9 @@ abstract class LithuaniaBaseTestCase extends TestCase */ public const REGION = 'Lithuania'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Vilnius'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'lt_LT'; } diff --git a/tests/Luxembourg/LuxembourgBaseTestCase.php b/tests/Luxembourg/LuxembourgBaseTestCase.php index 84ebdae51..59f9df8a2 100644 --- a/tests/Luxembourg/LuxembourgBaseTestCase.php +++ b/tests/Luxembourg/LuxembourgBaseTestCase.php @@ -29,13 +29,9 @@ abstract class LuxembourgBaseTestCase extends TestCase */ public const REGION = 'Luxembourg'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Luxembourg'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_LU'; } diff --git a/tests/Netherlands/NetherlandsBaseTestCase.php b/tests/Netherlands/NetherlandsBaseTestCase.php index 87106aee4..b579498e7 100644 --- a/tests/Netherlands/NetherlandsBaseTestCase.php +++ b/tests/Netherlands/NetherlandsBaseTestCase.php @@ -24,18 +24,12 @@ abstract class NetherlandsBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Netherlands'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Amsterdam'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'nl_NL'; } diff --git a/tests/NewZealand/NewZealandBaseTestCase.php b/tests/NewZealand/NewZealandBaseTestCase.php index 1fc8a44f6..948f8eed4 100644 --- a/tests/NewZealand/NewZealandBaseTestCase.php +++ b/tests/NewZealand/NewZealandBaseTestCase.php @@ -24,18 +24,12 @@ abstract class NewZealandBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'NewZealand'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Pacific/Auckland'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_NZ'; } diff --git a/tests/Norway/NorwayBaseTestCase.php b/tests/Norway/NorwayBaseTestCase.php index c24f59f72..1524b407d 100644 --- a/tests/Norway/NorwayBaseTestCase.php +++ b/tests/Norway/NorwayBaseTestCase.php @@ -24,18 +24,12 @@ abstract class NorwayBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Norway'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Oslo'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'nb_NO'; } diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index ef4df7acd..426178240 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -26,7 +26,7 @@ class NorwayTest extends NorwayBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Poland/PolandBaseTestCase.php b/tests/Poland/PolandBaseTestCase.php index 070b6c70d..8ffb69d12 100644 --- a/tests/Poland/PolandBaseTestCase.php +++ b/tests/Poland/PolandBaseTestCase.php @@ -24,18 +24,12 @@ abstract class PolandBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Poland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Warsaw'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'pl_PL'; } diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index c826894e7..5c1cd0023 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -26,7 +26,7 @@ class PolandTest extends PolandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Portugal/PortugalBaseTestCase.php b/tests/Portugal/PortugalBaseTestCase.php index a1af4595d..073928915 100644 --- a/tests/Portugal/PortugalBaseTestCase.php +++ b/tests/Portugal/PortugalBaseTestCase.php @@ -24,18 +24,12 @@ abstract class PortugalBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Portugal'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Lisbon'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'pt_PT'; } diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index 1f295decb..c61842d08 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -26,7 +26,7 @@ class PortugalTest extends PortugalBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Romania/RomaniaBaseTestCase.php b/tests/Romania/RomaniaBaseTestCase.php index d6ae9fb33..d77f93168 100755 --- a/tests/Romania/RomaniaBaseTestCase.php +++ b/tests/Romania/RomaniaBaseTestCase.php @@ -24,18 +24,12 @@ class RomaniaBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Romania'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Bucharest'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'ro_RO'; } diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index 4681fe8bb..da4d4ea9c 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -27,7 +27,7 @@ class RomaniaTest extends RomaniaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Russia/RussiaBaseTestCase.php b/tests/Russia/RussiaBaseTestCase.php index 9949241a0..423c79b11 100644 --- a/tests/Russia/RussiaBaseTestCase.php +++ b/tests/Russia/RussiaBaseTestCase.php @@ -32,13 +32,9 @@ abstract class RussiaBaseTestCase extends TestCase */ public const REGION = 'Russia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Moscow'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'ru_RU'; } diff --git a/tests/Slovakia/SlovakiaBaseTestCase.php b/tests/Slovakia/SlovakiaBaseTestCase.php index 73fde8e3a..76bd8cca6 100644 --- a/tests/Slovakia/SlovakiaBaseTestCase.php +++ b/tests/Slovakia/SlovakiaBaseTestCase.php @@ -27,18 +27,12 @@ abstract class SlovakiaBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Slovakia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Bratislava'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'sk_SK'; } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 62b3971ec..305821833 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -29,7 +29,7 @@ class SlovakiaTest extends SlovakiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/SouthAfrica/SouthAfricaBaseTestCase.php b/tests/SouthAfrica/SouthAfricaBaseTestCase.php index d5846e9bb..99734c0bb 100644 --- a/tests/SouthAfrica/SouthAfricaBaseTestCase.php +++ b/tests/SouthAfrica/SouthAfricaBaseTestCase.php @@ -27,18 +27,12 @@ abstract class SouthAfricaBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'SouthAfrica'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Africa/Johannesburg'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_ZA'; } diff --git a/tests/SouthKorea/SouthKoreaBaseTestCase.php b/tests/SouthKorea/SouthKoreaBaseTestCase.php index ea934194d..3d4fa96e4 100644 --- a/tests/SouthKorea/SouthKoreaBaseTestCase.php +++ b/tests/SouthKorea/SouthKoreaBaseTestCase.php @@ -25,18 +25,12 @@ abstract class SouthKoreaBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'SouthKorea'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Asia/Seoul'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'ko_KR'; } diff --git a/tests/Spain/Andalusia/AndalusiaBaseTestCase.php b/tests/Spain/Andalusia/AndalusiaBaseTestCase.php index 753c7b390..7a717c403 100644 --- a/tests/Spain/Andalusia/AndalusiaBaseTestCase.php +++ b/tests/Spain/Andalusia/AndalusiaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class AndalusiaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Andalusia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 4b48a3cc7..6a2c8313f 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -26,7 +26,7 @@ class AndalusiaTest extends AndalusiaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Aragon/AragonBaseTestCase.php b/tests/Spain/Aragon/AragonBaseTestCase.php index c318e2076..4f2b70c22 100644 --- a/tests/Spain/Aragon/AragonBaseTestCase.php +++ b/tests/Spain/Aragon/AragonBaseTestCase.php @@ -24,13 +24,9 @@ abstract class AragonBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Aragon'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 459044410..8948f83fd 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -26,7 +26,7 @@ class AragonTest extends AragonBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Asturias/AsturiasBaseTestCase.php b/tests/Spain/Asturias/AsturiasBaseTestCase.php index 02f5c2db8..0d7da515a 100644 --- a/tests/Spain/Asturias/AsturiasBaseTestCase.php +++ b/tests/Spain/Asturias/AsturiasBaseTestCase.php @@ -24,13 +24,9 @@ abstract class AsturiasBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Asturias'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index bfc719069..4606589e3 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -26,7 +26,7 @@ class AsturiasTest extends AsturiasBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php b/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php index 2370fbb02..18ec00407 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BalearicIslandsBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/BalearicIslands'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 06520fd20..287740337 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -26,7 +26,7 @@ class BalearicIslandsTest extends BalearicIslandsBaseTestCase implements Provide /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php b/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php index e24869fa4..84a079785 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php +++ b/tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php @@ -24,13 +24,9 @@ abstract class BasqueCountryBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/BasqueCountry'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index 113ac76b2..190999d8f 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -26,7 +26,7 @@ class BasqueCountryTest extends BasqueCountryBaseTestCase implements ProviderTes /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php b/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php index 5ef462513..71698ffc1 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CanaryIslandsBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/CanaryIslands'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Atlantic/Canary'; } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 5a758618d..330a2abd9 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -26,7 +26,7 @@ class CanaryIslandsTest extends CanaryIslandsBaseTestCase implements ProviderTes /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Cantabria/CantabriaBaseTestCase.php b/tests/Spain/Cantabria/CantabriaBaseTestCase.php index 2098b404f..d20533c21 100644 --- a/tests/Spain/Cantabria/CantabriaBaseTestCase.php +++ b/tests/Spain/Cantabria/CantabriaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CantabriaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Cantabria'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index bb90095c8..3a4068286 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -26,7 +26,7 @@ class CantabriaTest extends CantabriaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php b/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php index aa5bd5bd8..907409945 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CastileAndLeonBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/CastileAndLeon'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index 82c0fc799..674b1ac96 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -26,7 +26,7 @@ class CastileAndLeonTest extends CastileAndLeonBaseTestCase implements ProviderT /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php index ffcbeca20..9127cc791 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CastillaLaManchaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/CastillaLaMancha'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 005eb88e3..252494046 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -26,7 +26,7 @@ class CastillaLaManchaTest extends CastillaLaManchaBaseTestCase implements Provi /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Catalonia/CataloniaBaseTestCase.php b/tests/Spain/Catalonia/CataloniaBaseTestCase.php index 22d4ff8bf..231ea5465 100644 --- a/tests/Spain/Catalonia/CataloniaBaseTestCase.php +++ b/tests/Spain/Catalonia/CataloniaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CataloniaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Catalonia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 1d97031f3..0f3f0c49f 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -26,7 +26,7 @@ class CataloniaTest extends CataloniaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Ceuta/CeutaBaseTestCase.php b/tests/Spain/Ceuta/CeutaBaseTestCase.php index 88a55bceb..08c76e107 100644 --- a/tests/Spain/Ceuta/CeutaBaseTestCase.php +++ b/tests/Spain/Ceuta/CeutaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CeutaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Ceuta'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index 14d4853f7..babeb778b 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -26,7 +26,7 @@ class CeutaTest extends CeutaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php index 6c848a843..081a4d861 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php @@ -24,13 +24,9 @@ abstract class CommunityOfMadridBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/CommunityOfMadrid'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 47c2eab61..49f5f17f9 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -26,7 +26,7 @@ class CommunityOfMadridTest extends CommunityOfMadridBaseTestCase implements Pro /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php b/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php index ee223437b..865a11900 100644 --- a/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php +++ b/tests/Spain/Extremadura/ExtremaduraBaseTestCase.php @@ -24,13 +24,9 @@ abstract class ExtremaduraBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Extremadura'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 44e24396f..888b9f27f 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -26,7 +26,7 @@ class ExtremaduraTest extends ExtremaduraBaseTestCase implements ProviderTestCas /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Galicia/GaliciaBaseTestCase.php b/tests/Spain/Galicia/GaliciaBaseTestCase.php index 52ade76b2..7791afa8e 100644 --- a/tests/Spain/Galicia/GaliciaBaseTestCase.php +++ b/tests/Spain/Galicia/GaliciaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class GaliciaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Galicia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index 4ece58a76..4bdc29dca 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -26,7 +26,7 @@ class GaliciaTest extends GaliciaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/LaRioja/LaRiojaBaseTestCase.php b/tests/Spain/LaRioja/LaRiojaBaseTestCase.php index b2b160a6d..ecc586f2a 100644 --- a/tests/Spain/LaRioja/LaRiojaBaseTestCase.php +++ b/tests/Spain/LaRioja/LaRiojaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class LaRiojaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/LaRioja'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index dac47846d..34b39bf60 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -26,7 +26,7 @@ class LaRiojaTest extends LaRiojaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Melilla/MelillaBaseTestCase.php b/tests/Spain/Melilla/MelillaBaseTestCase.php index 12590552f..94348091c 100644 --- a/tests/Spain/Melilla/MelillaBaseTestCase.php +++ b/tests/Spain/Melilla/MelillaBaseTestCase.php @@ -24,8 +24,6 @@ abstract class MelillaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Melilla'; } diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index ca6e59d9f..150e3e05c 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -26,7 +26,7 @@ class MelillaTest extends MelillaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/Navarre/NavarreBaseTestCase.php b/tests/Spain/Navarre/NavarreBaseTestCase.php index 37a001d4a..078659a1b 100644 --- a/tests/Spain/Navarre/NavarreBaseTestCase.php +++ b/tests/Spain/Navarre/NavarreBaseTestCase.php @@ -24,8 +24,6 @@ abstract class NavarreBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/Navarre'; } diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index a06197775..81225c9f3 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -26,7 +26,7 @@ class NavarreTest extends NavarreBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php index 7913b58da..4723766b7 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php @@ -24,13 +24,9 @@ abstract class RegionOfMurciaBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/RegionOfMurcia'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index a9b4241ac..a7989d3f3 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -26,7 +26,7 @@ class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase implements ProviderT /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/SpainBaseTestCase.php b/tests/Spain/SpainBaseTestCase.php index 7112a6b2f..68a6717b9 100644 --- a/tests/Spain/SpainBaseTestCase.php +++ b/tests/Spain/SpainBaseTestCase.php @@ -24,18 +24,12 @@ abstract class SpainBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'es_ES'; } diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index f37a59daf..829b84c54 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -26,7 +26,7 @@ class SpainTest extends SpainBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php b/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php index ddf109755..da8823da2 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php @@ -24,13 +24,9 @@ abstract class ValencianCommunityBaseTestCase extends SpainBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Spain/ValencianCommunity'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 676b4f26a..732deea27 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -26,7 +26,7 @@ class ValencianCommunityTest extends ValencianCommunityBaseTestCase implements P /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Sweden/SwedenBaseTestCase.php b/tests/Sweden/SwedenBaseTestCase.php index 8ccac8d81..c5d2adafb 100644 --- a/tests/Sweden/SwedenBaseTestCase.php +++ b/tests/Sweden/SwedenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class SwedenBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Sweden'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Stockholm'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'sv_SE'; } diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index 0193814a1..111cd0755 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -26,7 +26,7 @@ class SwedenTest extends SwedenBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Switzerland/Aargau/AargauBaseTestCase.php b/tests/Switzerland/Aargau/AargauBaseTestCase.php index 2096f03d5..3edcb3a7b 100644 --- a/tests/Switzerland/Aargau/AargauBaseTestCase.php +++ b/tests/Switzerland/Aargau/AargauBaseTestCase.php @@ -24,18 +24,12 @@ abstract class AargauBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Aargau'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php index e274bfc95..280a5ea75 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class AppenzellAusserrhodenBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/AppenzellAusserrhoden'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php index 90c74194b..ec46743fd 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class AppenzellInnerrhodenBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/AppenzellInnerrhoden'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php index 3a20a2385..221c37a54 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php @@ -24,18 +24,12 @@ abstract class BaselLandschaftBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/BaselLandschaft'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php b/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php index 96e950d44..99fb8e3ee 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php +++ b/tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php @@ -24,18 +24,12 @@ abstract class BaselStadtBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/BaselStadt'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Bern/BernBaseTestCase.php b/tests/Switzerland/Bern/BernBaseTestCase.php index a4f00daa7..4352a8be9 100644 --- a/tests/Switzerland/Bern/BernBaseTestCase.php +++ b/tests/Switzerland/Bern/BernBaseTestCase.php @@ -24,18 +24,12 @@ abstract class BernBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Bern'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Fribourg/FribourgBaseTestCase.php b/tests/Switzerland/Fribourg/FribourgBaseTestCase.php index ec599d169..4c0caa7ed 100644 --- a/tests/Switzerland/Fribourg/FribourgBaseTestCase.php +++ b/tests/Switzerland/Fribourg/FribourgBaseTestCase.php @@ -24,18 +24,12 @@ abstract class FribourgBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Fribourg'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_CH'; } diff --git a/tests/Switzerland/Geneva/GenevaBaseTestCase.php b/tests/Switzerland/Geneva/GenevaBaseTestCase.php index b45443b33..c6743b54f 100644 --- a/tests/Switzerland/Geneva/GenevaBaseTestCase.php +++ b/tests/Switzerland/Geneva/GenevaBaseTestCase.php @@ -24,18 +24,12 @@ abstract class GenevaBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Geneva'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_CH'; } diff --git a/tests/Switzerland/Glarus/GlarusBaseTestCase.php b/tests/Switzerland/Glarus/GlarusBaseTestCase.php index 92af10fa0..087377137 100644 --- a/tests/Switzerland/Glarus/GlarusBaseTestCase.php +++ b/tests/Switzerland/Glarus/GlarusBaseTestCase.php @@ -24,18 +24,12 @@ abstract class GlarusBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Glarus'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Grisons/GrisonsBaseTestCase.php b/tests/Switzerland/Grisons/GrisonsBaseTestCase.php index 3bfcb4060..81d97dfb2 100644 --- a/tests/Switzerland/Grisons/GrisonsBaseTestCase.php +++ b/tests/Switzerland/Grisons/GrisonsBaseTestCase.php @@ -24,18 +24,12 @@ abstract class GrisonsBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Grisons'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Jura/JuraBaseTestCase.php b/tests/Switzerland/Jura/JuraBaseTestCase.php index 094bf0b04..d0136447c 100644 --- a/tests/Switzerland/Jura/JuraBaseTestCase.php +++ b/tests/Switzerland/Jura/JuraBaseTestCase.php @@ -24,18 +24,12 @@ abstract class JuraBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Jura'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_CH'; } diff --git a/tests/Switzerland/Lucerne/LucerneBaseTestCase.php b/tests/Switzerland/Lucerne/LucerneBaseTestCase.php index 52b43cdb3..617bb7a9f 100644 --- a/tests/Switzerland/Lucerne/LucerneBaseTestCase.php +++ b/tests/Switzerland/Lucerne/LucerneBaseTestCase.php @@ -24,18 +24,12 @@ abstract class LucerneBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Lucerne'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php index b96217b89..b3ddf83f1 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php +++ b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php @@ -24,18 +24,12 @@ abstract class NeuchatelBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Neuchatel'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_CH'; } diff --git a/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php b/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php index b592d269e..def946544 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php +++ b/tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class NidwaldenBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Nidwalden'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php b/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php index 3680fa0f1..fe09d2f07 100644 --- a/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php +++ b/tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class ObwaldenBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Obwalden'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php b/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php index 264c092ea..fb4222392 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class SchaffhausenBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Schaffhausen'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php b/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php index bd022d605..add82560e 100644 --- a/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php +++ b/tests/Switzerland/Schwyz/SchwyzBaseTestCase.php @@ -24,18 +24,12 @@ abstract class SchwyzBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Schwyz'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php b/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php index dba74b3b9..c9508efd4 100644 --- a/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php +++ b/tests/Switzerland/Solothurn/SolothurnBaseTestCase.php @@ -24,18 +24,12 @@ abstract class SolothurnBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Solothurn'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/StGallen/StGallenBaseTestCase.php b/tests/Switzerland/StGallen/StGallenBaseTestCase.php index b7363ae6d..c2d2655fa 100644 --- a/tests/Switzerland/StGallen/StGallenBaseTestCase.php +++ b/tests/Switzerland/StGallen/StGallenBaseTestCase.php @@ -24,18 +24,12 @@ abstract class StGallenBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/StGallen'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/SwitzerlandBaseTestCase.php b/tests/Switzerland/SwitzerlandBaseTestCase.php index bf03aebb2..129770f0b 100644 --- a/tests/Switzerland/SwitzerlandBaseTestCase.php +++ b/tests/Switzerland/SwitzerlandBaseTestCase.php @@ -29,13 +29,9 @@ abstract class SwitzerlandBaseTestCase extends TestCase */ public const REGION = 'Switzerland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php b/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php index 1dccf78a9..e4c5ce931 100644 --- a/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php +++ b/tests/Switzerland/Thurgau/ThurgauBaseTestCase.php @@ -24,18 +24,12 @@ abstract class ThurgauBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Thurgau'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Ticino/TicinoBaseTestCase.php b/tests/Switzerland/Ticino/TicinoBaseTestCase.php index c7275cc76..3baab4d36 100644 --- a/tests/Switzerland/Ticino/TicinoBaseTestCase.php +++ b/tests/Switzerland/Ticino/TicinoBaseTestCase.php @@ -24,18 +24,12 @@ abstract class TicinoBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Ticino'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'it_CH'; } diff --git a/tests/Switzerland/Uri/UriBaseTestCase.php b/tests/Switzerland/Uri/UriBaseTestCase.php index fb0b82d99..7d01f0c43 100644 --- a/tests/Switzerland/Uri/UriBaseTestCase.php +++ b/tests/Switzerland/Uri/UriBaseTestCase.php @@ -24,18 +24,12 @@ abstract class UriBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Uri'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Valais/ValaisBaseTestCase.php b/tests/Switzerland/Valais/ValaisBaseTestCase.php index 6e510802e..fff31da8d 100644 --- a/tests/Switzerland/Valais/ValaisBaseTestCase.php +++ b/tests/Switzerland/Valais/ValaisBaseTestCase.php @@ -24,18 +24,12 @@ abstract class ValaisBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Valais'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_CH'; } diff --git a/tests/Switzerland/Vaud/VaudBaseTestCase.php b/tests/Switzerland/Vaud/VaudBaseTestCase.php index 61d49a995..2fdacb092 100644 --- a/tests/Switzerland/Vaud/VaudBaseTestCase.php +++ b/tests/Switzerland/Vaud/VaudBaseTestCase.php @@ -24,18 +24,12 @@ abstract class VaudBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Vaud'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'fr_CH'; } diff --git a/tests/Switzerland/Zug/ZugBaseTestCase.php b/tests/Switzerland/Zug/ZugBaseTestCase.php index f90c3f202..be4a12150 100644 --- a/tests/Switzerland/Zug/ZugBaseTestCase.php +++ b/tests/Switzerland/Zug/ZugBaseTestCase.php @@ -24,18 +24,12 @@ abstract class ZugBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Zug'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Switzerland/Zurich/ZurichBaseTestCase.php b/tests/Switzerland/Zurich/ZurichBaseTestCase.php index 0649797ed..240fd2404 100644 --- a/tests/Switzerland/Zurich/ZurichBaseTestCase.php +++ b/tests/Switzerland/Zurich/ZurichBaseTestCase.php @@ -24,18 +24,12 @@ abstract class ZurichBaseTestCase extends SwitzerlandBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Switzerland/Zurich'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Zurich'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'de_CH'; } diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php index 310dd2bad..1edffc74c 100755 --- a/tests/Turkey/TurkeyTest.php +++ b/tests/Turkey/TurkeyTest.php @@ -24,7 +24,7 @@ class TurkeyTest extends TurkeyBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; protected function setUp(): void { diff --git a/tests/USA/USABaseTestCase.php b/tests/USA/USABaseTestCase.php index aa693cd18..830b09968 100644 --- a/tests/USA/USABaseTestCase.php +++ b/tests/USA/USABaseTestCase.php @@ -29,13 +29,9 @@ abstract class USABaseTestCase extends TestCase */ public const REGION = 'USA'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'America/New_York'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_US'; } diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 245cd6ad6..235f702af 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -26,7 +26,7 @@ class USATest extends USABaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/Ukraine/UkraineBaseTestCase.php b/tests/Ukraine/UkraineBaseTestCase.php index 8389a8fc1..5779033e4 100644 --- a/tests/Ukraine/UkraineBaseTestCase.php +++ b/tests/Ukraine/UkraineBaseTestCase.php @@ -24,18 +24,12 @@ class UkraineBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'Ukraine'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Kiev'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'uk_UA'; } diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 395851830..f142186a5 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -27,7 +27,7 @@ class UkraineTest extends UkraineBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. diff --git a/tests/UnitedKingdom/England/EnglandBaseTestCase.php b/tests/UnitedKingdom/England/EnglandBaseTestCase.php index d2fadc2a1..f41d89d24 100644 --- a/tests/UnitedKingdom/England/EnglandBaseTestCase.php +++ b/tests/UnitedKingdom/England/EnglandBaseTestCase.php @@ -24,19 +24,13 @@ abstract class EnglandBaseTestCase extends UnitedKingdomBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'UnitedKingdom\England'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/London'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_GB'; /** diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php index 7bc128abf..dbcec8d3d 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php @@ -24,19 +24,13 @@ abstract class NorthernIrelandBaseTestCase extends UnitedKingdomBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'UnitedKingdom\NorthernIreland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/Belfast'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_GB'; /** diff --git a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php index 1e5388da7..52d1ce81a 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php +++ b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php @@ -24,19 +24,13 @@ abstract class ScotlandBaseTestCase extends UnitedKingdomBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'UnitedKingdom\Scotland'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/London'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_GB'; /** diff --git a/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php b/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php index baf60656e..c707533b0 100644 --- a/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php +++ b/tests/UnitedKingdom/UnitedKingdomBaseTestCase.php @@ -24,19 +24,13 @@ abstract class UnitedKingdomBaseTestCase extends TestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'UnitedKingdom'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/London'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_GB'; /** diff --git a/tests/UnitedKingdom/Wales/WalesBaseTestCase.php b/tests/UnitedKingdom/Wales/WalesBaseTestCase.php index e275d5809..84ea75288 100644 --- a/tests/UnitedKingdom/Wales/WalesBaseTestCase.php +++ b/tests/UnitedKingdom/Wales/WalesBaseTestCase.php @@ -24,19 +24,13 @@ abstract class WalesBaseTestCase extends UnitedKingdomBaseTestCase { use YasumiBase; - /** - * Name of the region (e.g. country / state) to be tested. - */ + /** Name of the region (e.g. country / state) to be tested. */ public const REGION = 'UnitedKingdom\Wales'; - /** - * Timezone in which this provider has holidays defined. - */ + /** Timezone in which this provider has holidays defined. */ public const TIMEZONE = 'Europe/London'; - /** - * Locale that is considered common for this provider. - */ + /** Locale that is considered common for this provider. */ public const LOCALE = 'en_GB'; /** From afedc010e5779f3c63be9e8c89964f19353b6db9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 20 Jan 2022 00:15:27 +0900 Subject: [PATCH 314/687] Removed version 8.1 for the time being as there is an issue with the timezones in 8.1. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/mutation-tests.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index a05470b63..bb06be3b9 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0', '8.1' ] + php-versions: [ '7.4', '8.0' ] steps: - name: Set git to use LF diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index bfb344f77..65b72feaa 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '7.4', '8.0', '8.1' ] + php-versions: [ '7.4', '8.0' ] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 7f611f124..4f157e7ac 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0', '8.1' ] + php-versions: [ '7.4', '8.0' ] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a5b18897d..945e33fff 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0', '8.1' ] + php-versions: [ '7.4', '8.0' ] steps: - name: Set git to use LF From 6e53aad09b1b1ed65cb3a2cb520f7cae6579bdd4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 23 Jan 2022 14:35:04 +0900 Subject: [PATCH 315/687] Changed visibility back to public as this is public method. 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 9b0d3d666..c993de3bc 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -375,7 +375,7 @@ public function on(\DateTimeInterface $date): OnFilter * * @return array list of all holiday dates defined for the given year */ - protected function getHolidayDates(): array + public function getHolidayDates(): array { return array_map(static function ($holiday): string { return (string) $holiday; From b961af6f4eb834f24fcd65f6a46926b074aba080 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 23 Jan 2022 14:36:17 +0900 Subject: [PATCH 316/687] Corrected text to refer to CHANGELOG (README should not be updated normally) Signed-off-by: Sacha Telgenhof --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00537c625..3317cab59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ When contributing there are a few guidelines we'd like you to keep in mind: Some holidays are only established from a certain year and having the test year number smaller than the minimum establishment year (amongst all holidays) can result in false errors. -- **Document any change** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. +- **Document any change** - Make sure the `CHANGELOG.md` and any other relevant documentation are kept up-to-date. - **One pull request per feature** - If you want to contribute more than one thing, send multiple pull requests. From 03c6deaac3bee738221181719a0642d4a9fe9969 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 23 Jan 2022 15:43:39 +0900 Subject: [PATCH 317/687] Preparing 2.5.0 release notes. Reformatting. --- CHANGELOG.md | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9801c39d..8cdc47173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,29 +9,45 @@ to [Semantic Versioning](https://semver.org). ### Added -- World Children's Day for Thuringia (Germany) [\#260](https://github.com/azuyalabs/yasumi/issues/260) +### Changed + +### Fixed + +### Deprecated + +### Removed + +## [2.5.0] - 2022-01-?? + +### Added + +- Argentina Provider [\#264](https://github.com/azuyalabs/yasumi/pull/264) ([Nader Safadi](https://github.com/nedSaf)). +- Turkey Provider [\#250](https://github.com/azuyalabs/yasumi/pull/250). +- World Children's Day for Thuringia (Germany) [\#260](https://github.com/azuyalabs/yasumi/issues/260). - New National Day for Truth and Reconciliation to - Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)) + Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)). - New Juneteenth National Independence Day to - USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)) + USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)). - The Korea Tourism Organization's holiday guide link was added to the source of South Korea - Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) -- All providers now include a method that returns a list of external sources (i.e. references to websites, books, - scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. + Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). + +- All holiday providers now include a method that returns a list of external sources (i.e. references to websites, + books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. ### Changed -- Updated codebase using PHP7.4 syntax features. - Revised rules to calculate substitution holidays of South Korea to apply the newly enacted law on June - 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) + 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). - Separate `calculateSubstituteHolidays` method of South Korea Provider to `calculateSubstituteHolidays` and `calculateOldSubstituteHolidays` . [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Refactored the tests of South Korea provider to testing substitution - holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) + holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). + - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. - `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` interface. +- Updated codebase using PHP7.4 syntax features. - Upgraded PHP CS Fixer to v3. ### Fixed @@ -41,16 +57,16 @@ to [Semantic Versioning](https://semver.org). . [\#263](https://github.com/azuyalabs/yasumi/issues/263) - Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was incorrect (or officially changed) - and has been altered to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252) + and has been altered to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252). - The test for the USA in that juneteenthDay was considered for all years: it is only celebrated since 2021. - Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 - if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)) + if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)). -### Deprecated +- Reverted the visibility of the `AbstractProvider->getHolidaDates()` method as it incorrectly was set to `protectecd`. ### Removed -- PHP7.3 Support +- PHP7.3 Support as it is End of Life. ## [2.4.0] - 2021-05-09 @@ -668,7 +684,9 @@ to [Semantic Versioning](https://semver.org). - Initial Release -[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.4.0...HEAD +[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.5.0...HEAD + +[2.5.0]: https://github.com/azuyalabs/yasumi/compare/2.4.0...2.5.0 [2.4.0]: https://github.com/azuyalabs/yasumi/compare/2.3.0...2.4.0 From 4c77ea3bf445e9699f190b74b5a975bc6838c09e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 23 Jan 2022 16:35:06 +0900 Subject: [PATCH 318/687] Added Mothering Sunday for the United Kingdom. --- src/Yasumi/Provider/UnitedKingdom.php | 26 ++++++ tests/UnitedKingdom/MotheringSundayTest.php | 96 +++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 tests/UnitedKingdom/MotheringSundayTest.php diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 94c0d7687..a3de7c0dc 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -58,6 +58,9 @@ public function initialize(): void $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); $this->calculateChristmasHolidays(); + + // Add any other holidays + $this->calculateMotheringSunday(); } public function getSources(): array @@ -309,4 +312,27 @@ private function calculateSummerBankHoliday(): void Holiday::TYPE_BANK )); } + + /** + * Mothering Sunday is a day honouring mothers and mother churches, celebrated in the United Kingdom, Ireland on the + * fourth Sunday in Lent since the Middle Ages. On Mothering Sunday, Christians have historically visited their + * mother church—the church in which they received the sacrament of baptism. + * + * @see https://en.wikipedia.org/wiki/Mothering_Sunday + * + * @throws \Exception + */ + private function calculateMotheringSunday(): void + { + $date = $this->calculateEaster($this->year, $this->timezone); + $date->sub(new DateInterval('P3W')); + + $this->addHoliday(new Holiday( + 'motheringSunday', + ['en' => 'Mothering Sunday'], + $date, + $this->locale, + Holiday::TYPE_OTHER + )); + } } diff --git a/tests/UnitedKingdom/MotheringSundayTest.php b/tests/UnitedKingdom/MotheringSundayTest.php new file mode 100644 index 000000000..4717b09d8 --- /dev/null +++ b/tests/UnitedKingdom/MotheringSundayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\tests\UnitedKingdom\England\EnglandBaseTestCase; + +class MotheringSundayTest extends EnglandBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'motheringSunday'; + + /** + * @dataProvider HolidayDataProvider + * + * @throws ReflectionException + * @throws Exception + */ + public function testHoliday(int $year, string $expected): void + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @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->sub(new DateInterval('P3W')); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + // some extra random dates + $data[] = [2016, '2016-03-06']; + $data[] = [2022, '2022-03-27']; + + return $data; + } + + /** + * @throws ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Mothering Sunday'] + ); + } + + /** + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + Holiday::TYPE_OTHER + ); + } +} From 317911eac45625fa328f4f71075b6d52091701f5 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 24 Jan 2022 11:27:54 +0000 Subject: [PATCH 319/687] Added Platinum Jubilee Bank Holiday, moved Spring Bank holiday (2022 only) (#273) Co-authored-by: Dan --- CHANGELOG.md | 2 + src/Yasumi/Provider/UnitedKingdom.php | 43 +++++++ .../PlatinumJubileeBankHolidayTest.php | 117 ++++++++++++++++++ tests/UnitedKingdom/SpringBankHolidayTest.php | 9 +- 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cdc47173..ed8fdedc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ to [Semantic Versioning](https://semver.org). ### Changed +- Moved Spring Bank Holiday to 2nd June and added Platinum Jubilee bank holiday on 3rd June for 2022 (UK) [\#270](https://github.com/azuyalabs/yasumi/issues/270) + ### Fixed ### Deprecated diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 94c0d7687..8d927062f 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -58,6 +58,9 @@ public function initialize(): void $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); $this->calculateChristmasHolidays(); + + // Add additional holidays + $this->calculatePlatinumJubileeBankHoliday(); } public function getSources(): array @@ -150,6 +153,19 @@ protected function calculateSpringBankHoliday(): void return; } + // Moved to 2 June in 2022 for the celebration of the Platinum Jubilee of Elizabeth II. + if (2022 === $this->year) { + $this->addHoliday(new Holiday( + 'springBankHoliday', + ['en' => 'Spring Bank Holiday'], + new DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + + return; + } + $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], @@ -159,6 +175,33 @@ protected function calculateSpringBankHoliday(): void )); } + /** + * The Platinum Jubilee bank holiday is an extra bank holiday added on 3 June 2022 + * for the celebration of the Platinum Jubilee of Elizabeth II. + * + * @see https://www.timeanddate.com/holidays/uk/queen-platinum-jubilee + * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom#Special_holidays + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculatePlatinumJubileeBankHoliday(): void + { + if (2022 !== $this->year) { + return; + } + + $this->addHoliday(new Holiday( + 'platinumJubileeBankHoliday', + ['en' => 'Platinum Jubilee Bank Holiday'], + new DateTime("$this->year-6-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + } + /** * Christmas Day is celebrated in the United Kingdom on December 25. It traditionally celebrates Jesus Christ's * birth but many aspects of this holiday have pagan origins. Christmas is a time for many people to give and diff --git a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php new file mode 100644 index 000000000..1a5200b2d --- /dev/null +++ b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php @@ -0,0 +1,117 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom; + +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing the Platinum Jubilee Bank Holiday in the United Kingdom. + */ +class PlatinumJubileeBankHolidayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'platinumJubileeBankHoliday'; + + /** + * The year in which the holiday occurred. + */ + public const ACTIVE_YEAR = 2022; + + /** + * The date on which the holiday occurred. + */ + public const ACTIVE_DATE = '2022-6-3'; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + * @throws ReflectionException + */ + public function testHoliday(): void + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + self::ACTIVE_YEAR, + new DateTime(self::ACTIVE_DATE, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before the year in which it occurred. + * + * @throws ReflectionException + */ + public function testHolidayBeforeActive(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + ); + } + + /** + * Tests the holiday defined in this test after the year in which it occurred. + * + * @throws ReflectionException + */ + public function testHolidayAfterActive(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ACTIVE_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, + self::ACTIVE_YEAR, + [self::LOCALE => 'Platinum Jubilee Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + self::ACTIVE_YEAR, + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 14f12a33a..9762e0078 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -54,7 +54,7 @@ public function testHoliday(): void } /** - * Tests the holiday exceptions in 2002 and 2012. + * Tests the holiday exceptions in 2002, 2012 and 2022. * * @throws ReflectionException * @throws Exception @@ -74,6 +74,13 @@ public function testHolidayException(): void 2012, new DateTime('2012-6-4', new DateTimeZone(self::TIMEZONE)) ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2022, + new DateTime('2022-6-2', new DateTimeZone(self::TIMEZONE)) + ); } /** From c74dee0d8d7c9f90592d40f9657f3d9574c47eef Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 25 Jan 2022 20:45:13 +0900 Subject: [PATCH 320/687] Replaced with simpler arrow function. --- src/Yasumi/Provider/AbstractProvider.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index c993de3bc..d4609da1b 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -377,9 +377,7 @@ public function on(\DateTimeInterface $date): OnFilter */ public function getHolidayDates(): array { - return array_map(static function ($holiday): string { - return (string) $holiday; - }, $this->holidays); + return array_map(static fn($holiday): string => (string) $holiday, $this->holidays); } /** From abf3c2495a27d135789f1d844876de79f236e969 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 25 Jan 2022 20:50:07 +0900 Subject: [PATCH 321/687] Added missing variable data types. --- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Yasumi.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php index 8bb7a62b3..9aead9d21 100644 --- a/src/Yasumi/Provider/DateTimeZoneFactory.php +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -22,7 +22,7 @@ final class DateTimeZoneFactory { /** @var array */ - private static $dateTimeZones; + private static ?array $dateTimeZones = null; public static function getDateTimeZone(string $timezone): \DateTimeZone { diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 542ab020c..fbefba16e 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -40,7 +40,7 @@ class Yasumi /** * @var array list of all defined locales */ - private static $locales = []; + private static array $locales = []; /** Global translations */ private static ?Translations $globalTranslations = null; @@ -50,7 +50,7 @@ class Yasumi * * @var array */ - private static $ignoredProvider = [ + private static array $ignoredProvider = [ 'AbstractProvider.php', 'CommonHolidays.php', 'ChristianHolidays.php', From 6919c8326f098c4062bb2cdb4d440bf73f559812 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 25 Jan 2022 20:54:52 +0900 Subject: [PATCH 322/687] Replaced with simpler arrow function. Reformatting. --- src/Yasumi/Provider/AbstractProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index d4609da1b..2f7c01870 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -128,7 +128,7 @@ public function addHoliday(Holiday $holiday): void } $this->holidays[$holiday->getKey()] = $holiday; - uasort($this->holidays, [__CLASS__, 'compareDates']); + uasort($this->holidays, fn (\DateTimeInterface $dateA, \DateTimeInterface $dateB): int => $this::compareDates($dateA, $dateB)); } /** @@ -377,7 +377,7 @@ public function on(\DateTimeInterface $date): OnFilter */ public function getHolidayDates(): array { - return array_map(static fn($holiday): string => (string) $holiday, $this->holidays); + return array_map(static fn ($holiday): string => (string) $holiday, $this->holidays); } /** From bebe131fc6140242825e513d200b5d5b1f06f293 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 25 Jan 2022 20:55:33 +0900 Subject: [PATCH 323/687] Included rector configuration for helping to find/apply syntax updates. --- rector.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 rector.php diff --git a/rector.php b/rector.php new file mode 100644 index 000000000..0b826aa72 --- /dev/null +++ b/rector.php @@ -0,0 +1,22 @@ +parameters(); + $parameters->set(Option::PATHS, [ + __DIR__.'/src', + ]); + + $parameters->set(Option::AUTOLOAD_PATHS, [ + ]); + + $containerConfigurator->import(SetList::CODE_QUALITY); + $containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT); + $containerConfigurator->import(SetList::PHP_74); + $containerConfigurator->import(SetList::DEAD_CODE); +}; From 55dbbdcd9b90efe435912c014591ef4f4723b424 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 26 Jan 2022 09:37:12 +0900 Subject: [PATCH 324/687] Added note regarding Mothering Day. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed8fdedc1..cce818efc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ to [Semantic Versioning](https://semver.org). USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)). - The Korea Tourism Organization's holiday guide link was added to the source of South Korea Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). +- Mothering Day for the United Kingdom [\#266](https://github.com/azuyalabs/yasumi/issues/266). - All holiday providers now include a method that returns a list of external sources (i.e. references to websites, books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. From 1d63e3a78e07ed881ef6c444ec96a864fff86200 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 30 Jan 2022 16:26:30 +0900 Subject: [PATCH 325/687] Added missing suites for Argentina and Georgia Signed-off-by: Sacha Telgenhof --- phpunit.xml.dist | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e99c5fc6a..c7356f333 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -29,6 +29,10 @@ ./tests/Base + + + ./tests/Argentina + ./tests/Australia @@ -77,6 +81,10 @@ ./tests/France + + + ./tests/Georgia + ./tests/Germany @@ -169,10 +177,6 @@ ./tests/Turkey - - - ./tests/USA - ./tests/Ukraine @@ -181,5 +185,9 @@ ./tests/UnitedKingdom + + + ./tests/USA + From d6272b818505f0f695c4b6d4357568e8747b91cb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 30 Jan 2022 16:38:39 +0900 Subject: [PATCH 326/687] Updated Changelog/Readme with last changes. --- CHANGELOG.md | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce818efc..e292b5485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,15 +11,13 @@ to [Semantic Versioning](https://semver.org). ### Changed -- Moved Spring Bank Holiday to 2nd June and added Platinum Jubilee bank holiday on 3rd June for 2022 (UK) [\#270](https://github.com/azuyalabs/yasumi/issues/270) - ### Fixed ### Deprecated ### Removed -## [2.5.0] - 2022-01-?? +## [2.5.0] - 2022-01-30 ### Added @@ -46,6 +44,8 @@ to [Semantic Versioning](https://semver.org). . [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) - Refactored the tests of South Korea provider to testing substitution holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). +- Moved the United Kingdom Spring Bank Holiday to June 2nd and added Platinum Jubilee bank holiday on June 3rd + for [\#270](https://github.com/azuyalabs/yasumi/issues/270) ([Dan](https://github.com/dch-dev)). - Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. - `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` diff --git a/README.md b/README.md index 69d56fe9d..d988188c8 100644 --- a/README.md +++ b/README.md @@ -62,5 +62,5 @@ time into Open-Source Software projects like this. # License -Yasumi is open-sourced software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more +Yasumi is open-source software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more information. From 2c34708bc7ab4504bd396b8a4661cca7f6d7cf96 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 30 Jan 2022 16:40:02 +0900 Subject: [PATCH 327/687] Text reformatting. --- CODE_OF_CONDUCT.md | 3 ++- README.md | 3 +-- SECURITY.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f4a5874db..2a00fc8e8 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -47,7 +47,8 @@ via an official social media account, or acting as an appointed representative a Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -[me at sachatelgenhof dot com](mailto:me at sachatelgenhof dot com). All complaints will be reviewed and investigated promptly and fairly. +[me at sachatelgenhof dot com](mailto:me at sachatelgenhof dot com). All complaints will be reviewed and investigated +promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. diff --git a/README.md b/README.md index d988188c8..66ab67363 100644 --- a/README.md +++ b/README.md @@ -62,5 +62,4 @@ time into Open-Source Software projects like this. # License -Yasumi is open-source software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more -information. +Yasumi is open-source software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more information. diff --git a/SECURITY.md b/SECURITY.md index 1bc16bfa9..28269d629 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,7 +6,7 @@ Please refer to the below table for the supported versions of Yasumi. | Version | Supported | | ------- | ------------------ | -| 2.5 (dev) | :white_check_mark: | +| 2.5 | :white_check_mark: | | < 2.4 | :x: | | < 1.8 | :x: | From ffe6342ff2cc8919d8c5034089814cf0328a2387 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 30 Jan 2022 21:41:17 +0900 Subject: [PATCH 328/687] Added back tests --- .gitattributes | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index d66c7f948..a66f62b68 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,4 @@ /.github export-ignore -/tests export-ignore /.gitattributes export-ignore /.gitignore export-ignore /.php_cs export-ignore From ceeb8fd35b94356f731c10deca60a733668595ca Mon Sep 17 00:00:00 2001 From: Jakub Wojtyra <87640400+jwojtyra-aterian@users.noreply.github.com> Date: Wed, 2 Feb 2022 14:31:36 +0100 Subject: [PATCH 329/687] Fix BC break add missing method `ProviderInterface::getHolidays` (#277) --- src/Yasumi/ProviderInterface.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 73754848e..83ae7f7a9 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -70,4 +70,11 @@ public function isWorkingDay(\DateTimeInterface $date): bool; * @throws \InvalidArgumentException when the given name is blank or empty */ public function getHoliday(string $key): ?Holiday; + + /** + * Gets all 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; } From e4df3af07ba01929719d07a83838c36f3018877a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 00:37:18 +0900 Subject: [PATCH 330/687] Included tests in the statistical analysis. Added the type of the array return type. --- phpstan.neon.dist | 1 + tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaDayTest.php | 4 +- .../CanberraDayTest.php | 2 +- .../EasterSaturdayTest.php | 2 +- .../EasterSundayTest.php | 2 +- .../LabourDayTest.php | 2 +- .../QueensBirthdayTest.php | 2 +- .../ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 4 +- tests/Australia/GoodFridayTest.php | 2 +- .../NewSouthWales/BankHolidayTest.php | 2 +- .../NewSouthWales/EasterSaturdayTest.php | 2 +- .../NewSouthWales/EasterSundayTest.php | 2 +- .../Australia/NewSouthWales/LabourDayTest.php | 2 +- .../NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- .../NorthernTerritory/EasterSaturdayTest.php | 2 +- .../NorthernTerritory/MayDayTest.php | 2 +- .../NorthernTerritory/PicnicDayTest.php | 2 +- .../NorthernTerritory/QueensBirthdayTest.php | 2 +- .../Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/Australia/Queensland/LabourDayTest.php | 2 +- .../Queensland/QueensBirthdayTest.php | 2 +- .../SouthAustralia/AdelaideCupDayTest.php | 2 +- .../SouthAustralia/ChristmasDayTest.php | 2 +- .../SouthAustralia/EasterSaturdayTest.php | 2 +- .../SouthAustralia/LabourDayTest.php | 2 +- .../SouthAustralia/ProclamationDayTest.php | 2 +- .../SouthAustralia/QueensBirthdayTest.php | 2 +- .../CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/EightHourDayTest.php | 2 +- .../FlindersIsland/FlindersIslandShowTest.php | 2 +- .../KingIsland/KingIslandShowTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Northwest/CircularHead/AGFESTTest.php | 2 +- .../Australia/Tasmania/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/RecreationDayTest.php | 2 +- .../Tasmania/South/HobartShowTest.php | 2 +- .../South/Southeast/HobartRegattaTest.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 +- .../WesternAustralia/LabourDayTest.php | 2 +- .../WesternAustralia/QueensBirthdayTest.php | 2 +- .../WesternAustraliaDayTest.php | 2 +- tests/Austria/AllSaintsDayTest.php | 2 +- tests/Austria/AssumptionOfMaryTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.php | 2 +- tests/Austria/ChristmasTest.php | 2 +- tests/Austria/EpiphanyTest.php | 2 +- tests/Austria/ImmaculateConceptionTest.php | 2 +- tests/Austria/InternationalWorkersDayTest.php | 2 +- .../LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- .../UpperAustria/StFloriansDayTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Base/TypographyTest.php | 2 + tests/Base/WeekendTest.php | 4 ++ tests/Base/YasumiWorkdayTest.php | 6 +++ tests/Belgium/AllSaintsDayTest.php | 2 +- tests/Belgium/ArmisticeDayTest.php | 2 +- tests/Belgium/AssumptionOfMaryTest.php | 2 +- tests/Belgium/ChristmasTest.php | 2 +- tests/Belgium/InternationalWorkersDayTest.php | 2 +- tests/Belgium/NationalDayTest.php | 2 +- tests/Belgium/NewYearsDayTest.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/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/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/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/InternationalWorkersDayTest.php | 2 +- tests/Finland/NewYearsDayTest.php | 2 +- tests/Finland/SecondChristmasDayTest.php | 2 +- tests/France/AllSaintsDayTest.php | 2 +- tests/France/AssumptionOfMaryTest.php | 2 +- tests/France/BasRhin/stStephensDayTest.php | 2 +- tests/France/ChristmasDayTest.php | 2 +- tests/France/HautRhin/stStephensDayTest.php | 2 +- tests/France/InternationalWorkersDayTest.php | 2 +- tests/France/Moselle/stStephensDayTest.php | 2 +- tests/France/NewYearsDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 2 +- tests/Georgia/MtskhetobaDayTest.php | 2 +- tests/Georgia/NewYearsDayTest.php | 2 +- tests/Georgia/OrthodoxChristmasDayTest.php | 2 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 2 +- tests/Georgia/SecondNewYearDayTest.php | 2 +- tests/Georgia/StAndrewsDayTest.php | 2 +- tests/Georgia/StGeorgesDayTest.php | 2 +- tests/Georgia/StMarysDayTest.php | 2 +- tests/Georgia/VictoryDayTest.php | 2 +- .../BadenWurttemberg/AllSaintsDayTest.php | 2 +- .../Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/EpiphanyTest.php | 2 +- .../Brandenburg/ReformationDayTest.php | 2 +- tests/Germany/Bremen/ReformationDayTest.php | 2 +- tests/Germany/ChristmasTest.php | 2 +- .../Germany/Hamburg/DayOfReformationTest.php | 2 +- tests/Germany/InternationalWorkersDayTest.php | 2 +- .../LowerSaxony/ReformationDayTest.php | 2 +- .../ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../RhinelandPalatinate/AllSaintsDayTest.php | 2 +- tests/Germany/Saarland/AllSaintsDayTest.php | 2 +- .../Germany/Saarland/AssumptionOfMaryTest.php | 2 +- tests/Germany/Saxony/ReformationDayTest.php | 2 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 2 +- .../SaxonyAnhalt/ReformationDayTest.php | 2 +- .../SchleswigHolstein/ReformationDayTest.php | 2 +- tests/Germany/SecondChristmasDayTest.php | 2 +- .../Germany/Thuringia/ReformationDayTest.php | 2 +- .../Thuringia/WorldChildrensDayTest.php | 2 +- tests/Greece/AnnunciationTest.php | 2 +- tests/Greece/AssumptionOfMaryTest.php | 2 +- tests/Greece/ChristmasDayTest.php | 2 +- tests/Greece/EpiphanyTest.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/InternationalWorkersDayTest.php | 2 +- tests/Hungary/NewYearsDayTest.php | 2 +- tests/Hungary/SecondChristmasDayTest.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/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/EpiphanyTest.php | 2 +- tests/Italy/ImmaculateConceptionTest.php | 2 +- tests/Italy/InternationalWorkersDayTest.php | 2 +- tests/Italy/NewYearsDayTest.php | 2 +- tests/Italy/stStephensDayTest.php | 2 +- tests/Japan/AutumnalEquinoxDayTest.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/MidsummerEveDayTest.php | 2 + tests/Latvia/NewYearsDayTest.php | 2 + tests/Latvia/NewYearsEveDayTest.php | 2 + ...oclamationOfTheRepublicOfLatviaDayTest.php | 2 + .../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 + .../Lithuania/InternationalWorkersDayTest.php | 2 + tests/Lithuania/NewYearsDayTest.php | 2 + tests/Lithuania/SecondChristmasDayTest.php | 2 + tests/Lithuania/StJohnsDayTest.php | 2 + tests/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- .../InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/EpiphanyTest.php | 2 +- tests/Netherlands/HalloweenTest.php | 2 +- .../InternationalWorkersDayTest.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 | 2 +- tests/NewZealand/NewYearsDayTest.php | 2 +- tests/NewZealand/QueensBirthdayTest.php | 2 +- tests/NewZealand/WaitangiDayTest.php | 2 +- tests/Norway/ChristmasDayTest.php | 2 +- tests/Norway/InternationalWorkersDayTest.php | 2 +- tests/Norway/NewYearsDayTest.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/SecondChristmasDayTest.php | 2 +- tests/Portugal/AssumptionOfMaryTest.php | 2 +- tests/Portugal/ChristmasTest.php | 2 +- tests/Portugal/ImmaculateConceptionTest.php | 2 +- .../Portugal/InternationalWorkersDayTest.php | 2 +- tests/Portugal/NewYearsDayTest.php | 2 +- tests/Portugal/PortugueseRepublicDayTest.php | 3 ++ tests/Romania/ChristmasDayTest.php | 2 +- tests/Romania/DayAfterNewYearsDayTest.php | 2 +- tests/Romania/InternationalWorkersDayTest.php | 2 +- tests/Romania/NewYearsDayTest.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 +- .../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/NationalWomensDayTest.php | 2 +- tests/SouthAfrica/NewYearsDayTest.php | 2 +- tests/SouthAfrica/ReconciliationDayTest.php | 2 +- tests/SouthAfrica/SecondChristmasDayTest.php | 2 +- tests/SouthAfrica/WorkersDayTest.php | 2 +- tests/SouthAfrica/YouthDayTest.php | 2 +- tests/Spain/AllSaintsDayTest.php | 2 +- tests/Spain/AssumptionOfMaryTest.php | 2 +- tests/Spain/Catalonia/stJohnsDayTest.php | 2 +- tests/Spain/ChristmasTest.php | 2 +- tests/Spain/EpiphanyTest.php | 2 +- tests/Spain/ImmaculateConceptionTest.php | 2 +- tests/Spain/InternationalWorkersDayTest.php | 2 +- tests/Spain/NewYearsDayTest.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/WalpurgisEveTest.php | 2 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 2 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 2 +- .../ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- .../StStephensDayTest.php | 2 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AssumptionOfMaryTest.php | 2 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- .../ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../StStephensDayTest.php | 2 +- .../BaselLandschaft/ChristmasDayTest.php | 2 +- .../BaselLandschaft/NewYearsDayTest.php | 2 +- .../BaselLandschaft/StStephensDayTest.php | 2 +- .../BaselLandschaft/WorkersDayTest.php | 2 +- .../BaselStadt/ChristmasDayTest.php | 2 +- .../BaselStadt/NewYearsDayTest.php | 2 +- .../BaselStadt/StStephensDayTest.php | 2 +- .../Switzerland/BaselStadt/WorkersDayTest.php | 2 +- tests/Switzerland/Bern/ChristmasDayTest.php | 2 +- tests/Switzerland/Bern/NewYearsDayTest.php | 2 +- tests/Switzerland/Bern/StStephensDayTest.php | 2 +- .../Switzerland/Fribourg/AllSaintsDayTest.php | 2 +- .../Fribourg/AssumptionOfMaryTest.php | 2 +- .../Switzerland/Fribourg/ChristmasDayTest.php | 2 +- .../Fribourg/ImmaculateConceptionTest.php | 2 +- .../Switzerland/Fribourg/NewYearsDayTest.php | 2 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 2 +- tests/Switzerland/Geneva/NewYearsDayTest.php | 2 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 2 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 2 +- tests/Switzerland/Glarus/NewYearsDayTest.php | 2 +- .../Switzerland/Glarus/StStephensDayTest.php | 2 +- .../Switzerland/Grisons/ChristmasDayTest.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/NewYearsDayTest.php | 2 +- tests/Switzerland/Jura/WorkersDayTest.php | 2 +- .../Switzerland/Lucerne/AllSaintsDayTest.php | 2 +- .../Lucerne/AssumptionOfMaryTest.php | 2 +- .../Switzerland/Lucerne/ChristmasDayTest.php | 2 +- .../Lucerne/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 2 +- .../Switzerland/Lucerne/StStephensDayTest.php | 2 +- .../Neuchatel/ChristmasDayTest.php | 2 +- .../Switzerland/Neuchatel/NewYearsDayTest.php | 2 +- .../Switzerland/Neuchatel/WorkersDayTest.php | 2 +- .../Nidwalden/AllSaintsDayTest.php | 2 +- .../Nidwalden/AssumptionOfMaryTest.php | 2 +- .../Nidwalden/ChristmasDayTest.php | 2 +- .../Nidwalden/ImmaculateConceptionTest.php | 2 +- .../Switzerland/Nidwalden/NewYearsDayTest.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 +- .../Obwalden/StStephensDayTest.php | 2 +- .../Schaffhausen/ChristmasDayTest.php | 2 +- .../Schaffhausen/NewYearsDayTest.php | 2 +- .../Schaffhausen/StStephensDayTest.php | 2 +- .../Schaffhausen/WorkersDayTest.php | 2 +- 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/StJosephDayTest.php | 2 +- .../Switzerland/Schwyz/StStephensDayTest.php | 2 +- .../Solothurn/ChristmasDayTest.php | 2 +- .../Switzerland/Solothurn/NewYearsDayTest.php | 2 +- .../Switzerland/StGallen/AllSaintsDayTest.php | 2 +- .../Switzerland/StGallen/ChristmasDayTest.php | 2 +- .../Switzerland/StGallen/NewYearsDayTest.php | 2 +- .../StGallen/StStephensDayTest.php | 2 +- .../Switzerland/Thurgau/ChristmasDayTest.php | 2 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 2 +- .../Switzerland/Thurgau/StStephensDayTest.php | 2 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 2 +- 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/WorkersDayTest.php | 2 +- 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/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/Vaud/ChristmasDayTest.php | 2 +- tests/Switzerland/Vaud/NewYearsDayTest.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/Zurich/ChristmasDayTest.php | 2 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 2 +- .../Switzerland/Zurich/StStephensDayTest.php | 2 +- tests/Switzerland/Zurich/WorkersDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Ukraine/CatholicChristmasDayTest.php | 2 +- 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/VictoryDayTest.php | 2 +- tests/UnitedKingdom/BoxingDayTest.php | 2 +- tests/UnitedKingdom/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/EasterMondayTest.php | 2 +- tests/UnitedKingdom/England/BoxingDayTest.php | 2 +- .../England/ChristmasDayTest.php | 2 +- .../England/EasterMondayTest.php | 2 +- .../UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 2 +- .../NorthernIreland/BoxingDayTest.php | 2 +- .../NorthernIreland/ChristmasDayTest.php | 2 +- .../NorthernIreland/EasterMondayTest.php | 2 +- .../NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- .../UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- .../Scotland/ChristmasDayTest.php | 2 +- .../Scotland/NewYearsDayTest.php | 2 +- .../Scotland/SecondNewYearsDayTest.php | 2 +- .../Scotland/StAndrewsDayTest.php | 2 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 2 +- .../UnitedKingdom/Wales/ChristmasDayTest.php | 2 +- .../UnitedKingdom/Wales/EasterMondayTest.php | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/YasumiBase.php | 42 +++++++++---------- 487 files changed, 564 insertions(+), 460 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2faf82185..d5383d22d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,6 +2,7 @@ parameters: level: 6 paths: - src + - tests ignoreErrors: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 48bcd652e..429cb3c0d 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -70,7 +70,7 @@ public function testNotHoliday(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 09ab06f8a..2461499c7 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -103,7 +103,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -115,7 +115,7 @@ public function HolidayDataProvider(): array /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function SubstituteHolidayDataProvider(): array { diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index 1d997a368..2fa82fc2c 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index 26ca10416..103b15d7d 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index fb73a78d9..6ac520c26 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index 9bdd92a33..45393245b 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index f946e0c25..bc88b9d1d 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index 0b78f2ba2..b92043159 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index b04ed1771..85d5fe3d3 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -71,7 +71,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index b5543624d..c03dbab0a 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -71,7 +71,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index cb915f5f3..68fc8b0a1 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -78,7 +78,7 @@ public function testHoliday2(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ @@ -100,7 +100,7 @@ public function HolidayDataProvider(): array /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider2(): array { diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index fa61c14f9..2d586fba0 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index c88ce413f..c9b74de45 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index 8886a4472..3e4c2ce89 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index bd73133ec..94d833652 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index 05951e516..1fab61ada 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index bbcf37040..cf7277beb 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 4e1178d95..c0622cbb4 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -71,7 +71,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 9e9714a3e..da8294475 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index ebabeaf41..1547cb287 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index 6ba24c77c..868c30ed2 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index e83294147..094742b5c 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index fa82eb1bf..3d9089eba 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 7fd6e0679..9eddbda8c 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index d1ee1f7b0..199c7cef3 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index 8e84883dd..ca06dae3e 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 261d6992f..901f77531 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -71,7 +71,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index 1d5af8746..be452f2c6 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index 73f7f8db0..4562a36b6 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index 77a849a05..b31eb4de1 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index 8a83852f4..9db861703 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index bd8ac6842..461adfc2d 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 5f93bc5a5..e56d0fcc8 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index 5ded66c62..b33fcc1e0 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 73a007b2e..943a95dd9 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 936f9f5ec..aba05fe83 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index 132827b39..527785c2a 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 8aab4c5cd..e723744ae 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index e6672897d..ca6f4a709 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index f6fbe4441..ded75ec5a 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 233d65a15..d2b4bde9b 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 5da6997a7..ed8ac69c3 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 4ca20039e..2fdceaca2 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -98,7 +98,7 @@ public function testNotHoliday(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index 84c3ecc2b..7c24a3ca9 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index 1ebe813a6..33ed6cec3 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 390eb8bf2..0bb0b40e6 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index a7b166f35..130864c8a 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 11b6cd7aa..e56c77223 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index 153179d63..9422ab63d 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index a3f2c79aa..aa50f3a85 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -60,7 +60,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index 2c7fded4c..a58c0e515 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test */ public function HolidayDataProvider(): array { diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 13579e2ee..e8032d2a0 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 6e30aac47..c31d8569c 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index 72bd26a27..0bb8ce04c 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -48,7 +48,7 @@ public function teststMartinsDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Saint Martins Day. * - * @return array list of test dates for Saint Martins Day + * @return array list of test dates for Saint Martins Day * * @throws Exception */ diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 4241d288a..ea0bda51c 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -54,7 +54,7 @@ public function testPlebisciteDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Plebiscite Day. * - * @return array list of test dates for Plebiscite Day + * @return array list of test dates for Plebiscite Day * * @throws Exception */ diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index 1ac72f817..6504849f7 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -48,7 +48,7 @@ public function testStJosephsDay(int $year, DateTime $expected): void /** * 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. + * @return array list of test dates for St. Joseph's Day. * * @throws Exception */ diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 7c243fd5f..10c5eae0e 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 28bc7b759..911541038 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index 15c4e12cd..e508ecb96 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index b3da186d9..771d48d4f 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 39bea4a69..5436b7c84 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -54,7 +54,7 @@ public function testStLeopoldsDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Saint Leopold's Day. * - * @return array list of test dates for Saint Leopold's Day + * @return array list of test dates for Saint Leopold's Day * * @throws Exception */ diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 65c2111f1..79e578fe2 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index ce32e822c..b723e0a1b 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -48,7 +48,7 @@ public function testStRupertsDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Saint Rupert's Day. * - * @return array list of test dates for Saint Rupert's Day + * @return array list of test dates for Saint Rupert's Day * * @throws Exception */ diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index 438b37c48..582855b89 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index 090095778..935e2abf9 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -48,7 +48,7 @@ public function testStJosephsDay(int $year, DateTime $expected): void /** * 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. + * @return array list of test dates for St. Joseph's Day. * * @throws Exception */ diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index 567aa662b..a5eae304c 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -48,7 +48,7 @@ public function testStJosephsDay(int $year, DateTime $expected): void /** * 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. + * @return array list of test dates for St. Joseph's Day. * * @throws Exception */ diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index ea884ad4c..d5e9db4f7 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -48,7 +48,7 @@ public function testStFloriansDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Saint Florian's Day. * - * @return array list of test dates for Saint Florian's Day + * @return array list of test dates for Saint Florian's Day * * @throws Exception */ diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index 261eea595..a40e0cf1d 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -54,7 +54,7 @@ public function testStLeopoldsDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Saint Leopold's Day. * - * @return array list of test dates for Saint Leopold's Day + * @return array list of test dates for Saint Leopold's Day * * @throws Exception */ diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index d1b08d0a0..ff2e21227 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -48,7 +48,7 @@ public function testStJosephsDay(int $year, DateTime $expected): void /** * 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. + * @return array list of test dates for St. Joseph's Day. * * @throws Exception */ diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index ccdd52dd5..b6f3b22c0 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -49,6 +49,8 @@ public function testTranslations(string $name, string $class, string $key, strin /** * Provides test data for testProvider(). * + * @return array list of test translations + * * @throws \ReflectionException */ public function translationProvider(): array diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index 182e965df..8a2695b7d 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -48,6 +48,8 @@ public function testWeekendDay(\DateTimeImmutable $date): void } /** + * @return array list of test dates that are considered a weekend date + * * @throws \Exception */ public function dataProviderWeekendDays(): array @@ -90,6 +92,8 @@ public function testNonWeekendDay(\DateTimeImmutable $date): void } /** + * @return array list of test dates that are considered not a weekend date + * * @throws \Exception */ public function dataProviderNonWeekendDays(): array diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index f626f1101..4a46b505d 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -161,6 +161,9 @@ public function testWorkDayIsNextYear(string $start, int $workdays, string $expe self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); } + /** + * @return array list of test dates that are considered working days the next year + */ public function dataProviderWorkDayNextYear(): array { return [ @@ -195,6 +198,9 @@ public function testWorkDayIsPreviousYear(string $start, int $workdays, string $ self::assertEquals($expectedNext, $previousWorkingDay->format(self::FORMAT_DATE)); } + /** + * @return array list of test dates that are considered working days the previous year + */ public function dataProviderWorkDayPreviousYear(): array { return [ diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 618b06697..2d9bd2255 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index f20462363..fbffaad1d 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index 549afb17f..2f11ee542 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 655962ded..abacc016e 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index fb1b2dbb5..d5a8640fb 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index fa70f1a51..b3d6c7086 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index 4d8de94d1..713975296 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index e4c1195fd..5fdd54db6 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index 4f214f8cc..ffef673f6 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index aed695158..2230e07de 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index f0a7ac3ec..36dd23b96 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index 2ed5e63ac..eccde76df 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -31,6 +31,8 @@ class OrthodoxChristmasDay extends BosniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'orthodoxChristmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 0c3389364..6790237a2 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 580bd8467..32eebfb8b 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index 13e9a14b0..19697fe5a 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index f880d080e..48b2f62b0 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 26c6e29bc..35b1b16d5 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index 3b46ad045..fd81ac3e9 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index 26027b6a5..43661610e 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index d9bc68e24..ae5171375 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -48,7 +48,7 @@ public function teststStephensDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Stephen's Day * * @throws Exception */ diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 2e01f5617..4dc6247d0 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -52,7 +52,7 @@ public function testChristmasDay(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 496949858..f9cd7ac53 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -52,7 +52,7 @@ public function testChristmasDay(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index fbd0d6ab9..721f22bec 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 0866727e2..cbce326ce 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index df82b5588..f9bdb32fd 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -77,7 +77,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index ddb5295b3..a276145b4 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index fd93181dc..081d5b135 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index 3171b7df2..e951b1a5a 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index c14da0ff5..937f89015 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 90fc97b12..94f152f2e 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index c35fe2c67..31e15f7e9 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index d6d02aa36..fa1dcd128 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 0e1869ea9..da84ebb2e 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 6a6961b58..8cdeeeb91 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index a285a0425..8a6ed9686 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): 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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index 1d4290197..e844f4c1d 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index 955bfb3e1..b16335eda 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index 678928845..6d93a34f9 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 091cb53a9..5aadd5ff9 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -34,6 +34,8 @@ class ChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'christmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index 4198750b6..bdddf9630 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -34,6 +34,8 @@ class ChristmasEveDayTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'christmasEve'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index 166d01949..b37d453a0 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -35,6 +35,8 @@ class EasterDayTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'easter'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index 87ac7574a..adb757569 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -35,6 +35,8 @@ class GoodFridayDayTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'goodFriday'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index dd20c54a2..0f6f8ff6e 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -34,6 +34,8 @@ class InternationalWorkersDayTest extends EstoniaBaseTestCase implements Holiday public const HOLIDAY = 'internationalWorkersDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index e9cb9cbee..6be904b9d 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -34,6 +34,8 @@ class NewYearsDayTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'newYearsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 118c5da78..5dc27dab7 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -35,6 +35,8 @@ class PentecostTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'pentecost'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 71810c769..39780fe8f 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -34,6 +34,8 @@ class SecondChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestC public const HOLIDAY = 'secondChristmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index 290307606..4b443670a 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -34,6 +34,8 @@ class StJohnsDayTest extends EstoniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'stJohnsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 577913abe..60b944f89 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -50,7 +50,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index b8ec6de84..263bf9dc9 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index f0e44d674..a66273efc 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index c35742127..1734c8238 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index 068aa1717..71c16aca5 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 246c26068..f64bf1e3c 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index c78ee5151..70d28516b 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index 6de074804..6448fd9da 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index c51777bcb..0e1c09764 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index a32d39000..93132590c 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 7d57039ac..76a82e6c8 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 1d962eb9d..bd94a58ea 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 439be3ced..559020362 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index 7dce92684..d87bb62f5 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index d79a5704c..43edbaf15 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index 1af9ff2e0..76e9ea612 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 269db3c52..601ea55d7 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index 2aa786d90..4cfc569b7 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index 5d788be6e..022aa469d 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 332122cea..c5aaf49c5 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index 366fd2e57..44c3c3521 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index b52ddb52e..eb5529115 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index 4e9685f02..77f7c3ee9 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index ef56d84c2..12d8822d0 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -41,7 +41,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 7a6db7fe5..1def6b656 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 254dc7b15..b9d418ddf 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index 80f7be042..d5caef2c0 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index 50ba9182b..997e250d5 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 29c0658c0..50736d85c 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index e06af97c9..9a399fade 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index 07f2877a6..dd4da91cb 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 838e8cb3e..f17ec8d0b 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index c6f610643..ff8312ade 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 3374eab95..4b6b2fc6b 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index 68a81e2fc..368b6e098 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -39,7 +39,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index 00b370e3f..ce226496a 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index a42d000f4..64e5c9b06 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index 4c346b57e..25a33a18a 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index 2ab9e52aa..cbfd274be 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index ac5819e0d..d4d5fc1db 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index a86130098..78f70797d 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 393243a2e..c89b88ca0 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index e1968ac96..8b637ba86 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index dbec24d74..f840dbf16 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 03767debb..09c4909c8 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index b4b819b10..13eb7d195 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 1bc00a392..d750bbad2 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index 6141fb6ab..fb1f90e74 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index e3a664e79..97a960d63 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index 38a321417..5f246e201 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index f7e6e60ec..1fcf452e3 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index b73ba79e8..c9b973e42 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index 3b30e9528..da146b5a3 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index c2e8ec7dc..6be5a507c 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index eae7698b8..8d8a7ab36 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 35f85c4c1..d2dc4fd3e 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index c459b593d..ed3f7d5e7 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index 116161df1..6665d4a5f 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 8b8cd3e57..f04a1c451 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index 01ab9eb04..48e2c5a8a 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index 18b78e383..d3d8e89ae 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index 74196e2e7..fbacaa90e 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index fb681c971..288c3a5a2 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index 31482138b..d67e648cc 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -55,7 +55,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index 40a1203d9..ea83651b8 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 2bf25296e..53dd8cd30 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index b6e5f655a..71e553a1a 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 1d72380ab..c1c22ae78 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index 62a48a31d..f5eaaa55a 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 5d560850a..5ff81dbc4 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 25c6a16fe..24cca4d57 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index d4f5939d4..dc654abce 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index bf47459cf..5a859f746 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 897d1931a..2a67908b3 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): 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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index c0784d0cf..74c5e1558 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): 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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index b587483dd..cf365feac 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 65b9dab0b..b5bec4d86 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testEpiphany(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Epiphany. * - * @return array list of test dates for Epiphany + * @return array list of test dates for Epiphany * * @throws Exception */ diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index 0e63b489e..735d0f3ca 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testImmaculateConception(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for the day of Immaculate Conception * * @throws Exception */ diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 5e0c78834..aedfeb4f3 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): 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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index ded8bb194..5e1875602 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testNewYearsDay(int $year, DateTime $expected): 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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 918138e98..83fe92e53 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -48,7 +48,7 @@ public function teststStephensDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Stephen's Day * * @throws Exception */ diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index f480ab92c..d1931c739 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -79,7 +79,7 @@ public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, /** * Returns a list of all Japanese Autumnal Equinox holidays used for assertions. * - * @return array list of Japanese Autumnal Equinox holidays + * @return array list of test dates for the holiday defined in this test */ public function autumnalEquinoxHolidaysProvider(): array { diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 332df9e8e..cdc015e03 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -79,7 +79,7 @@ public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, in /** * Returns a list of all Japanese Vernal Equinox holidays used for assertions. * - * @return array list of Japanese Vernal Equinox holidays + * @return array list of test dates for the holiday defined in this test */ public function vernalEquinoxHolidaysProvider(): array { diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 4a1be1a82..61257cb51 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -34,6 +34,8 @@ class ChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'christmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index e26f7ec65..cf1665771 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -34,6 +34,8 @@ class ChristmasEveDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'christmasEve'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index f997a4c38..05a464e60 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -35,6 +35,8 @@ class EasterDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'easter'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 6f8b4dd24..76e8595d2 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -35,6 +35,8 @@ class EasterMondayDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'easterMonday'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index a62d51e9e..66c02497b 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -35,6 +35,8 @@ class GoodFridayDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'goodFriday'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index 01c59ac4f..5d6161566 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -34,6 +34,8 @@ class InternationalWorkersDayTest extends LatviaBaseTestCase implements HolidayT public const HOLIDAY = 'internationalWorkersDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 2efc2262e..e2a6ac2a6 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -34,6 +34,8 @@ class MidsummerEveDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'midsummerEveDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index db7462582..04caa1309 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -34,6 +34,8 @@ class NewYearsDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'newYearsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index 003e7bd7b..b37c24e69 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -34,6 +34,8 @@ class NewYearsEveDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'newYearsEve'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 16a8fb447..3f6e6f577 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -50,6 +50,8 @@ public function testNotHoliday(): void } /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index f201a4479..1011987cb 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -50,6 +50,8 @@ public function testNotHoliday(): void } /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index 3f03e31b5..b6f8e5d76 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -34,6 +34,8 @@ class SecondChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCa public const HOLIDAY = 'secondChristmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index daf71dd61..db3d67077 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -34,6 +34,8 @@ class StJohnsDayTest extends LatviaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'stJohnsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index a43f7f778..5438552f2 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -34,6 +34,8 @@ class AllSaintsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'allSaintsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index dcc56b2eb..9073f0cf7 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -34,6 +34,8 @@ class AssumptionOfMaryDayTest extends LithuaniaBaseTestCase implements HolidayTe public const HOLIDAY = 'assumptionOfMary'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 77120c4f4..85343e6f1 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -34,6 +34,8 @@ class ChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'christmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index c803e3e28..4794ac8c2 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -34,6 +34,8 @@ class ChristmasEveDayTest extends LithuaniaBaseTestCase implements HolidayTestCa public const HOLIDAY = 'christmasEve'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index e6eb0edf2..4196a7798 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -35,6 +35,8 @@ class EasterDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'easter'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index 55654a943..f8c31e50c 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -35,6 +35,8 @@ class EasterMondayDayTest extends LithuaniaBaseTestCase implements HolidayTestCa public const HOLIDAY = 'easterMonday'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index 838833339..aae7d5ed6 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -34,6 +34,8 @@ class InternationalWorkersDayTest extends LithuaniaBaseTestCase implements Holid public const HOLIDAY = 'internationalWorkersDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 2a159e726..00fa10092 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -34,6 +34,8 @@ class NewYearsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'newYearsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 4980750b2..b05554e21 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -34,6 +34,8 @@ class SecondChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTes public const HOLIDAY = 'secondChristmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index 8affc1f7f..392bff7b5 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -34,6 +34,8 @@ class StJohnsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'stJohnsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index 1c7f25897..44a388f8a 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index b7f39db4b..f611451cd 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index cdc59359c..cbb6cc9c4 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index 23c99e0ba..9838ef820 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index 611908d44..6b586e173 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index 2a23fffb2..ab90746f7 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index d545babc7..65b03ebf5 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 1f5e77695..95e0e8936 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index e212782d2..b18d77e09 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testEpiphany(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Epiphany. * - * @return array list of test dates for Epiphany + * @return array list of test dates for Epiphany * * @throws Exception */ diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index 8d2e8d3a3..c8d8d9d79 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Halloween. * - * @return array list of test dates for Halloween + * @return array list of test dates for Halloween * * @throws Exception */ diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index 2a43d55ab..1f47024d4 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): 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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 5cb5c308f..66eb9b681 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testNewYearsDay(int $year, DateTime $expected): 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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 0110d0702..4bb8b2a3b 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -48,7 +48,7 @@ public function testValentinesDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Valentines Day. * - * @return array list of test dates for Valentines Day + * @return array list of test dates for Valentines Day * * @throws Exception */ diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index a596dc7c9..218effec2 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index c6ffe1466..5aeecdd96 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -48,7 +48,7 @@ public function teststMartinsDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Sint Martins Day. * - * @return array list of test dates for Sint Martins Day + * @return array list of test dates for Sint Martins Day * * @throws Exception */ diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index d05f3d308..e816f5139 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -48,7 +48,7 @@ public function teststNicholasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Sint Nicholas Day. * - * @return array list of test dates for Sint Nicholas Day + * @return array list of test dates for Sint Nicholas Day * * @throws Exception */ diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index c14c66111..e1d321e35 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -70,7 +70,7 @@ public function testNotHoliday(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 4a70b6b4f..939b8819d 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index d5430dfa0..895701da2 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index e845eabcb..1efaca72a 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -81,7 +81,7 @@ public function testHolidayType(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index d84fb09c2..5d41f6461 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index de93445a0..80ac99751 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index 91c9ec0ad..dbd5d4464 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -70,7 +70,7 @@ public function testNotHoliday(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 979d67a0f..57d251a18 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 46e7e999d..1d0b5e2c2 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -64,7 +64,7 @@ public function testNotHoliday(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 695974971..85a9188b3 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -100,7 +100,7 @@ public function testHolidayType(): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 069fbe93c..a867d0ee5 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index a7de3128f..64fb62ed3 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index f71bfcd15..acbe32565 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index ba0cc4e0b..dcabc13c5 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index 0c361b020..05932e8fe 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 6d1432994..1030ee8da 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 6e6d19324..8285fffde 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index 2c57f56ea..ec64bd019 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testEpiphany(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Epiphany. * - * @return array list of test dates for Epiphany + * @return array list of test dates for Epiphany * * @throws Exception */ diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index 3b3dfbf12..2c4f08536 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index 73d104cc4..eb42740e5 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index 358f31e89..364ff76ba 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index 925fbd98b..e6bc4060e 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index e3a219b60..eabff06f8 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index da636f883..3127130b6 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index dab456d8a..7a1dbac55 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index 764bbcf8b..f8fe56a36 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 1b50cd446..e70ea6ba7 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -124,6 +124,9 @@ public function testHolidayType(): void } } + /** + * @return \Generator + */ private function randomEstablishedYear(): \Generator { yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 12b96ec3b..3ac3d95b9 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index 4e0cdc9de..4f3287b71 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index f7e544303..9688f852b 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 19e0ae449..7364e5666 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index 5f4d0514b..70ccfc7fb 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index 6fdfe19a4..0e176fc74 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -34,6 +34,8 @@ class InternationalWomensDayTest extends RussiaBaseTestCase implements HolidayTe public const HOLIDAY = 'internationalWomensDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index 612e8b17d..e8a5294cc 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -34,6 +34,8 @@ class NewYearHolidaysDay2Test extends RussiaBaseTestCase implements HolidayTestC public const HOLIDAY = 'newYearHolidaysDay2'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 392383a6a..202deec1f 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -34,6 +34,8 @@ class NewYearHolidaysDay3Test extends RussiaBaseTestCase implements HolidayTestC public const HOLIDAY = 'newYearHolidaysDay3'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index c51b88289..cb4a3c4e0 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -33,6 +33,8 @@ class NewYearHolidaysDay4Test extends RussiaBaseTestCase implements HolidayTestC public const HOLIDAY = 'newYearHolidaysDay4'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index 242bd2f36..fcf7b15f2 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -34,6 +34,8 @@ class NewYearHolidaysDay5Test extends RussiaBaseTestCase implements HolidayTestC public const HOLIDAY = 'newYearHolidaysDay5'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 5f94abc92..0ec5eea47 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -34,6 +34,8 @@ class NewYearHolidaysDay6Test extends RussiaBaseTestCase implements HolidayTestC public const HOLIDAY = 'newYearHolidaysDay6'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index fdb45bf79..a044061ba 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -33,6 +33,8 @@ class NewYearHolidaysDay8Test extends RussiaBaseTestCase implements HolidayTestC public const HOLIDAY = 'newYearHolidaysDay8'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 94cad9a1b..ddda23516 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -34,6 +34,8 @@ class NewYearsDayTest extends RussiaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'newYearsDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 016526628..d06f102a6 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -34,6 +34,8 @@ class OrthodoxChristmasDayTest extends RussiaBaseTestCase implements HolidayTest public const HOLIDAY = 'orthodoxChristmasDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 174b27369..bce11c436 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -34,6 +34,8 @@ class SpringAndLabourDayTest extends RussiaBaseTestCase implements HolidayTestCa public const HOLIDAY = 'springAndLabourDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index 98080be53..2b2d29acd 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -34,6 +34,8 @@ class VictoryDayTest extends RussiaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'victoryDay'; /** + * @return array list of test dates for the holiday defined in this test + * * @throws Exception */ public function holidayDataProvider(): array diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index 902ef8b86..af032e4d7 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index 7f9bb4fc5..3e07372b3 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -51,7 +51,7 @@ public function testChristmasDay(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index 41f718fa5..eb94b65a7 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -51,7 +51,7 @@ public function testChristmasEve(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index 84bbcc628..4aecaf8ad 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 07ad9c2b2..273ad8dd7 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 9ccf63e00..8a19a81b8 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index ec68de79d..ff3c4ac88 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 061c25036..86f1ba46d 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index e519ffbe3..12b9cf024 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index d20e4c666..1d2ffc773 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 004410b8c..0393a0129 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index 07d12c3cb..ae1ef9d71 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index 023dc4b38..dbb667c89 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 1d142ee7e..5946e66f6 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 15c4f8116..ee3b13e20 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 0bb3a7183..5145ec17f 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index ea65d5bf7..1f635a0ef 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -65,7 +65,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 1f0e20ba4..fc9d7f641 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 199ab3944..440deff88 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -65,7 +65,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 809de1d73..db48aefd8 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index 2004dcca7..acc33a3e2 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 42b2cb092..a75b61783 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index 712814ff1..ac177ddf5 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 962239c52..e47f08359 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index ff450186c..6ef19f7d8 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index 73a1a8f6c..4c3f1d994 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index b6ec95c01..b736fded7 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -67,7 +67,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 3cd01d2e0..ff7dbe2fd 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index 4766ddd43..9809dca74 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index cb5aebbc3..6c807c7f5 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index a9a4fa352..47df8e030 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index 6cfa13d7a..89c1b1874 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index b6b4adba5..89baa7c87 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 55e59c6b3..76697626a 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index 8ca78398c..4cde99773 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 0be0aadf7..dd830d65d 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index 7163ead9a..3c811e549 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -54,7 +54,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index bd0b51367..c2b0450a5 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -50,7 +50,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index 3d6898487..f1228d348 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -50,7 +50,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 5e7afd40d..d1414856d 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index 1f7ebadec..3f4aa1fb2 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index 9bbd5b621..0e3f53c54 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index e954a5ed4..1e1bf999b 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 7bc19dbef..10b818889 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index 56543b568..7dbf2cb77 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index 694051a31..d00fe33dd 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 9ca638d9f..8b6ca7ad5 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index 0d933f6a3..4422afbd1 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 9086eb552..c15531c02 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index 07e665c31..082609218 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index a80ea3def..7a9656248 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index f345a9857..105f9102a 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index a28a571c2..18ba2953a 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index f1f1ada74..d33b8fc7a 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index be67a54a7..a344238b5 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index a72fbd8c2..e656e644b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index 798b701b4..d708e4664 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index 53b4ef57d..caf6d3e44 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 2f146ef9b..e300a8db6 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 1ca1c772c..cc5026060 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 0640d6789..c4419aa44 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index c74e6f0b1..0807b582a 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index 4f2d48978..fe2656b60 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index 9307b4a03..2e4fb20c2 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index 936395895..f8be83c24 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 28d0e94ee..864939106 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index 8c784a7e2..2a772b678 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index 70bc40e1b..b6585c5ce 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 2df10607d..e2e06f262 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index 3a4b37c53..a98ac2519 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index 795ab7c05..7f109391a 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 64e64cc3a..85f457e24 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 6682a1d04..6673ba0c8 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index 26f465dc3..2d65589c6 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index 086c31b9f..d09cf73a3 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 3f30a19d0..9592b1fb6 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 3447184d3..d3ea0a9d8 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 9309a1de9..1aa755a79 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index 11a65655e..e5a7fd966 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index dfd6b5c61..a1f01d1a1 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 378351f34..80e5283c6 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 6a04a9c60..a42b1d742 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index 75ef609fc..cf596ac82 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index 2431f25fb..ddb5cf96a 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index f0f1693d9..2452b2bef 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index 99d0baf07..97ae5e632 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index 6a1f07d9a..a8918601a 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index a961530ac..01928d6bd 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index 5e95d525a..6a6d7ab8a 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index f7ee3e4c6..17ba5b196 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index 9a6cf4694..2396238b7 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 460ab8c84..50cb199c9 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 152da33cb..9f6299c67 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index beb0f60d9..c0b1b305d 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index e87f3c51e..cc42010da 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 5ac9e6384..556fd9367 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index 78fccac81..67dd2a8ef 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index a9b319e03..102f3fb93 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index 618265c0b..93a0ff464 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index 84da7fb8c..572742fac 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 781b969b7..e905354a4 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index ebcba00b5..b49a246bf 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index a5f6fa17e..3b3573f40 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 67f09bc3d..c755e1687 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -51,7 +51,7 @@ public function testStJosephDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Joseph's Day * * @throws Exception */ diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index fca401103..222b738fe 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index 7ff738679..e45f7a03f 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index 83d9f7e55..b984c240a 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index cbfdf7dfc..859ddeaa1 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 0632cb40d..f9d7a5cc9 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index dbfd43780..23e29fdc4 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index bd5f21cc5..32d427e3d 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index 863c12c8e..274e8ced9 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 44963f866..42eff7880 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 8264f20a1..2af128680 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index 7bafe1742..efe1fe5d6 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index a326cfc26..29f38fbc0 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index b23410274..d3923041f 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index 741cd464f..9a71d4e02 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 2d4f998d2..38ff413c4 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index 3f26bf35c..af29abe19 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index deefbaeca..cd7494ae5 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index a68c33a96..48a1bfd67 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -51,7 +51,7 @@ public function testStJosephDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Joseph's Day * * @throws Exception */ diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 456e62bb6..8843a3dc4 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index d5bbc5883..e3117293d 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 1209a3f1b..658e4dc5f 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index 38315b04a..c8bb3cf9c 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 5b033a8a0..8eef44970 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index 268fba7e3..80c22cb2e 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 0abcae41a..83e8d1470 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index 1827fd155..f8944fa49 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index 613306be1..731276734 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index a22751424..19a1eebff 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index f802ff2f4..f01f8926b 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index ba67385a9..3495fc29e 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 8fea858c8..940f711ad 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index 51fbd26a3..861d96a92 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 348b6e544..f7ee9df0f 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index 95214fae2..613bd96bd 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index 1dabc57c7..e91d08956 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 8b3e0e13d..24562f239 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -51,7 +51,7 @@ public function testStJosephDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Joseph's Day * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index e1e7667a9..80af96580 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -48,7 +48,7 @@ public function testStPeterPaul(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for Feast of Saints Peter and Paul * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index 71b9f62c4..c753c859c 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index 77ee0c689..3562dd3e6 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index 30b09f5fc..41c7f8ac5 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index d4e5a8c04..3328befff 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index 794ef9de5..128d3814e 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 78bedef36..a3ab97aab 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 1398afc53..565cfeaca 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index d293e754c..2c96268e6 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 5ee262165..15527ccfd 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -51,7 +51,7 @@ public function testStJosephDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Joseph's Day * * @throws Exception */ diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 44d4b1d81..c24a86761 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 0e65de541..4d4afebde 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 15e6a4ccf..7caa0c699 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index d21a97b4c..3f6aff06f 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index cbee831b4..db7bde5d0 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 6e198deb5..0a6dc8dbb 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index 6d2d589d0..0df7761f6 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -51,7 +51,7 @@ public function testStJosephDay(int $year, DateTime $expected): void /** * 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 + * @return array list of test dates for St. Joseph's Day * * @throws Exception */ diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index aa41921fa..4d5a2c1de 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index d46863bd3..859a9f2e5 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 9af38a68d..09b360dba 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for All Saints' Day * * @throws Exception */ diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index e16cfbb07..debe5c3e4 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -73,7 +73,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 + * @return array list of test dates for the day of the Assumption of Mary * * @throws Exception */ diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index ea82e7b80..0ecd66210 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 33e671c0b..ac2cd7d1a 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 day of the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index 5d0083bdc..4bbefbfac 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 425036125..2f0e0a4cd 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 33081c3c6..6b5d8c464 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): void /** * Returns a list of random test dates used for assertion of Christmas Day. * - * @return array list of test dates for Christmas Day + * @return array list of test dates for Christmas Day * * @throws Exception */ diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 9378e4840..46568c6ba 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for New Years Day * * @throws Exception */ diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index cd8da2b5e..426b0dd45 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index a3ff927f2..3ca643dc4 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -51,7 +51,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php index 3657db65f..20069558b 100644 --- a/tests/Turkey/LabourDayTest.php +++ b/tests/Turkey/LabourDayTest.php @@ -64,7 +64,7 @@ public function testHolidayType(): void } /** - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php index 3558ffbc7..5480a2757 100644 --- a/tests/Turkey/NewYearsDayTest.php +++ b/tests/Turkey/NewYearsDayTest.php @@ -38,7 +38,7 @@ public function testHoliday(int $year, DateTime $expected): void } /** - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index c6bf670e5..6f55216d6 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -91,7 +91,7 @@ public function testHolidayType(): void /** * Returns a list of random test dates used for assertion of Catholic Christmas Day. * - * @return array list of test dates for Catholic Christmas Day + * @return array list of test dates for Catholic Christmas Day * * @throws Exception */ diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 205134053..4db0562f5 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -48,7 +48,7 @@ public function testChristmasDay(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index b13ff28e5..a46b46f21 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -43,7 +43,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 0c4b3df98..46407353d 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -73,7 +73,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 + * @return array list of test dates for International Workers' Day * * @throws Exception */ diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 007c5c859..6899ec9e1 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -48,7 +48,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 9b4c4242a..55bc24cf3 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -95,7 +95,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 + * @return array list of test dates for International Workers' Day * * @throws \Exception */ diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index 39f599e3b..08c573511 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -43,7 +43,7 @@ public function testHoliday(int $year, DateTime $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 5b72563fe..1bb47bb2c 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index c952e1bfa..3b4c3f4f8 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 55ea738db..29806a8b0 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index 8b072c9f2..f5ac58fbf 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 44db5a5d8..1a244d78f 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index d19452a3a..0bc947d45 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 2cdba56d8..8aadfd6e8 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -94,7 +94,7 @@ public function testHolidayIsObservedTypeBeforeChange(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 204c316e3..7c20b464f 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -94,7 +94,7 @@ public function testHolidayIsObservedTypeBeforeChange(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index 0aa8159a1..e7afbc512 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -75,7 +75,7 @@ public function testHolidayBeforeEstablishment(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 45890c1bc..61b11a906 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index 12ce2faae..a95578df8 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index 30805ff8d..ea65fae74 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index f3bb05962..54d318d15 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -94,7 +94,7 @@ public function testHolidayIsObservedTypeBeforeChange(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index df0ca5a3d..85430e391 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -75,7 +75,7 @@ public function testHolidayBeforeEstablishment(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index 466be0f67..37e14d9f5 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 1aa746349..c00ae6d06 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index f7e5da741..08913d82a 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -96,7 +96,7 @@ public function testHolidayIsObservedTypeBeforeChange(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index a6a01db64..a4492d69c 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -96,7 +96,7 @@ public function testHolidayIsObservedTypeBeforeChange(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 9c2e92e3d..a2b39a341 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -61,7 +61,7 @@ public function testHoliday(int $year, string $expected): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 37c9cb595..dcd153923 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index a3c48d62c..2fb282aef 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -58,7 +58,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index 90619720a..8e07b0d95 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Returns a list of test dates. * - * @return array list of test dates for the holiday defined in this test + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index b35bfe2a1..77d673e3f 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -94,7 +94,7 @@ public function testHolidayIsObservedTypeBeforeChange(): 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 + * @return array list of test dates for the holiday defined in this test * * @throws Exception */ diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index c1f756842..8ade5c6e2 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -41,17 +41,17 @@ */ trait YasumiBase { - protected static $defaultTimezone; + protected static string $defaultTimezone; /** * 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 - * tested - * @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. + * @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, + * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. * * @throws InvalidArgumentException * @throws RuntimeException @@ -202,10 +202,10 @@ public function assertNotHoliday( /** * 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 $key string the key 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 $key string the key 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 @@ -328,7 +328,7 @@ public function assertSources(string $provider, int $expectedSourceCount): void * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $range year range from which dates will be generated (default: 1000) * - * @return array list of random test dates used for assertion of holidays + * @return array list of random test dates used for assertion of holidays * * @throws Exception */ @@ -356,7 +356,7 @@ public function generateRandomDates( * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $range year range from which dates will be generated (default: 1000) * - * @return array list of random easter test dates used for assertion of holidays + * @return array list of random easter test dates used for assertion of holidays * * @throws Exception */ @@ -385,7 +385,7 @@ public function generateRandomEasterDates( * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $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 + * @return array list of random Easter Monday test dates used for assertion of holidays * * @throws Exception */ @@ -409,7 +409,7 @@ public function generateRandomEasterMondayDates( * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $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 + * @return array list of random modified Easter day test dates for assertion of holidays * * @throws Exception */ @@ -440,7 +440,7 @@ public function generateRandomModifiedEasterDates( * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $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 + * @return array list of random Good Friday test dates used for assertion of holidays * * @throws Exception */ @@ -463,7 +463,7 @@ public function generateRandomGoodFridayDates( * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $range year range from which dates will be generated (default: 1000) * - * @return array list of random Pentecost test dates used for assertion of holidays + * @return array list of random Pentecost test dates used for assertion of holidays * * @throws Exception */ @@ -489,7 +489,7 @@ public function generateRandomPentecostDates( * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) * @param int|null $range year range from which dates will be generated (default: 1000) * - * @return array list of random test dates used for assertion of holidays + * @return array list of random test dates used for assertion of holidays * * @throws Exception */ @@ -517,7 +517,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( * @param int $range year range from which dates will be generated (default: 1000) * @param string|null $timezone name of the timezone for which the dates need to be generated * - * @return array list of random test dates used for assertion of holidays with applied callback + * @return array list of random test dates used for assertion of holidays with applied callback * * @throws Exception */ @@ -562,7 +562,7 @@ public function generateRandomYear( * 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 array $weekendDays weekend days. Saturday and Sunday are used by default. * * @return bool true if $dateTime is a weekend, false otherwise */ @@ -724,7 +724,7 @@ private static function setTimezone(DateTime $dt, ?string $timezone): DateTime return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); } - private static function resolveTimezone(?string $timezone): ?string + private static function resolveTimezone(?string $timezone): string { return $timezone ?? (static::$defaultTimezone ?? date_default_timezone_get()); } From 0418a3355392dce885db03223d70b9b3b042c0a5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 00:54:29 +0900 Subject: [PATCH 331/687] Created interface methods that were not defined. --- src/Yasumi/Provider/AbstractProvider.php | 154 ++------------------- src/Yasumi/ProviderInterface.php | 169 +++++++++++++++++++++++ 2 files changed, 184 insertions(+), 139 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 2f7c01870..28f81e853 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -18,7 +18,6 @@ use Countable; use InvalidArgumentException; use IteratorAggregate; -use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Filters\BetweenFilter; use Yasumi\Filters\OnFilter; @@ -115,12 +114,7 @@ public function __construct( $this->initialize(); } - /** - * Adds a holiday to the holidays providers (i.e. country/state) list of holidays. - * - * @param Holiday $holiday holiday instance (representing a holiday) to be added to the internal list - * of holidays of this country - */ + /** {@inheritdoc} */ public function addHoliday(Holiday $holiday): void { if ($this->globalTranslations instanceof TranslationsInterface) { @@ -131,14 +125,7 @@ public function addHoliday(Holiday $holiday): void uasort($this->holidays, fn (\DateTimeInterface $dateA, \DateTimeInterface $dateB): int => $this::compareDates($dateA, $dateB)); } - /** - * Removes a holiday from the holidays providers (i.e. country/state) list of holidays. - * - * This function can be helpful in cases where an existing holiday provider class can be extended but some holidays - * are not part of the original (extended) provider. - * - * @param string $key holiday key - */ + /** {@inheritdoc} */ public function removeHoliday(string $key): void { unset($this->holidays[$key]); @@ -150,32 +137,14 @@ public function isWorkingDay(\DateTimeInterface $date): bool return !$this->isHoliday($date) && !$this->isWeekendDay($date); } - /** - * Determines whether a date represents a holiday or not. - * - * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, - * \DateTime) - * - * @return bool true if date represents a holiday, otherwise false - * - * @throws InvalidDateException - */ + /** {@inheritdoc} */ public function isHoliday(\DateTimeInterface $date): bool { // Check if given date is a holiday or not return \in_array($date->format('Y-m-d'), $this->getHolidayDates(), true); } - /** - * Determines whether a date represents a weekend day or not. - * - * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, - * \DateTime) - * - * @return bool true if date represents a weekend day, otherwise false - * - * @throws InvalidDateException - */ + /** {@inheritdoc} */ public function isWeekendDay(\DateTimeInterface $date): bool { // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. @@ -186,15 +155,7 @@ public function isWeekendDay(\DateTimeInterface $date): bool ); } - /** - * On what date is the given holiday? - * - * @param string $key holiday key - * - * @return string the date of the requested holiday - * - * @throws InvalidArgumentException when the given name is blank or empty - */ + /** {@inheritdoc} */ public function whenIs(string $key): string { $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty @@ -202,18 +163,7 @@ public function whenIs(string $key): string return (string) $this->holidays[$key]; } - /** - * On what day of the week is the given holiday? - * - * This function returns the index number for the day of the week on which the given holiday falls. - * The index number is an integer starting with 0 being Sunday, 1 = Monday, etc. - * - * @param string $key key 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 - */ + /** {@inheritdoc} */ public function whatWeekDayIs(string $key): int { $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty @@ -221,12 +171,7 @@ public function whatWeekDayIs(string $key): int return (int) $this->holidays[$key]->format('w'); } - /** - * Returns the number of defined holidays (for the given country and the given year). - * In case a holiday is substituted (e.g. observed), the holiday is only counted once. - * - * @return int number of holidays - */ + /** {@inheritdoc} */ public function count(): int { $names = array_map(static function ($holiday): string { @@ -240,21 +185,13 @@ public function count(): int return \count(array_unique($names)); } - /** - * Gets all the holidays defined by this holiday provider (for the given year). - * - * @return Holiday[] list of all holidays defined for the given year - */ + /** {@inheritdoc} */ public function getHolidays(): array { return $this->holidays; } - /** - * Gets all the holiday names defined by this holiday provider (for the given year). - * - * @return array list of all holiday names defined for the given year - */ + /** {@inheritdoc} */ public function getHolidayNames(): array { return array_keys($this->holidays); @@ -266,19 +203,7 @@ public function getYear(): int return $this->year; } - /** - * Retrieves the next date (year) the given holiday is going to take place. - * - * @param string $key key of the holiday for which the next occurrence need to be retrieved - * - * @return Holiday|null a Holiday instance for the given holiday - * - * @throws UnknownLocaleException - * @throws \RuntimeException - * @throws InvalidArgumentException - * - * @covers AbstractProvider::anotherTime - */ + /** {@inheritdoc} */ public function next(string $key): ?Holiday { return $this->anotherTime($this->year + 1, $key); @@ -294,44 +219,13 @@ public function getHoliday(string $key): ?Holiday return $holidays[$key] ?? null; } - /** - * Retrieves the previous date (year) the given holiday took place. - * - * @param string $key key of the holiday for which the previous occurrence need to be retrieved - * - * @return Holiday|null a Holiday instance for the given holiday - * - * @throws UnknownLocaleException - * @throws \RuntimeException - * @throws InvalidArgumentException - * - * @covers AbstractProvider::anotherTime - */ + /** {@inheritdoc} */ public function previous(string $key): ?Holiday { return $this->anotherTime($this->year - 1, $key); } - /** - * Retrieves a list of all holidays between the given start and end date. - * - * Yasumi only calculates holidays for a single year, so a start date or end date beyond the given year will only - * return holidays for the given year. For example, holidays calculated for the year 2016, will only return 2016 - * holidays if the provided period is for example 01/01/2012 - 31/12/2017. - * - * Please take care to use the appropriate timezone for the start and end date parameters. In case you use - * different - * timezone for these parameters versus the instantiated Holiday Provider, the outcome might be unexpected (but - * correct). - * - * @param \DateTimeInterface $startDate Start date of the time frame to check against - * @param \DateTimeInterface $endDate 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 - * - * @throws InvalidArgumentException an InvalidArgumentException is thrown if the start date is set after the end - * date - */ + /** {@inheritdoc} */ public function between( \DateTimeInterface $startDate, \DateTimeInterface $endDate, @@ -344,37 +238,19 @@ public function between( return new BetweenFilter($this->getIterator(), $startDate, $endDate, $equals ?? true); } - /** - * Get an iterator for the holidays. - * - * @return ArrayIterator iterator for the holidays of this calendar - */ + /** {@inheritdoc} */ public function getIterator(): ArrayIterator { return new ArrayIterator($this->getHolidays()); } - /** - * Retrieves a list of all holidays that happen on the given date. - * - * Yasumi only calculates holidays for a single year, so a date outside the given year will not appear to - * contain any holidays. - * - * Please take care to use the appropriate timezone for the date parameters. If there is a different timezone used - * for these parameters versus the instantiated Holiday Provider, the outcome might be unexpected (but correct). - * - * @param \DateTimeInterface $date date to check for holidays on - */ + /** {@inheritdoc} */ public function on(\DateTimeInterface $date): OnFilter { return new OnFilter($this->getIterator(), $date); } - /** - * Gets all the holiday dates defined by this holiday provider (for the given year). - * - * @return array list of all holiday dates defined for the given year - */ + /** {@inheritdoc} */ public function getHolidayDates(): array { return array_map(static fn ($holiday): string => (string) $holiday, $this->holidays); diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 83ae7f7a9..1734f08a0 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -14,7 +14,11 @@ namespace Yasumi; +use ArrayIterator; use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Filters\BetweenFilter; +use Yasumi\Filters\OnFilter; /** * Interface ProviderInterface - Holiday provider interface. @@ -77,4 +81,169 @@ public function getHoliday(string $key): ?Holiday; * @return Holiday[] list of all holidays defined for the given year */ public function getHolidays(): array; + + /** + * Determines whether a date represents a holiday or not. + * + * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, + * \DateTime) + * + * @return bool true if date represents a holiday, otherwise false + * + * @throws InvalidDateException + */ + public function isHoliday(\DateTimeInterface $date): bool; + + /** + * Get an iterator for the holidays. + * + * @return ArrayIterator iterator for the holidays of this calendar + */ + public function getIterator(): ArrayIterator; + + /** + * Adds a holiday to the holidays providers (i.e. country/state) list of holidays. + * + * @param Holiday $holiday holiday instance (representing a holiday) to be added to the internal list + * of holidays of this country + */ + public function addHoliday(Holiday $holiday): void; + + /** + * Removes a holiday from the holidays providers (i.e. country/state) list of holidays. + * + * This function can be helpful in cases where an existing holiday provider class can be extended but some holidays + * are not part of the original (extended) provider. + * + * @param string $key holiday key + */ + public function removeHoliday(string $key): void; + + /** + * Determines whether a date represents a weekend day or not. + * + * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, + * \DateTime) + * + * @return bool true if date represents a weekend day, otherwise false + * + * @throws InvalidDateException + */ + public function isWeekendDay(\DateTimeInterface $date): bool; + + /** + * On what date is the given holiday? + * + * @param string $key holiday key + * + * @return string the date of the requested holiday + * + * @throws \InvalidArgumentException when the given name is blank or empty + */ + public function whenIs(string $key): string; + + /** + * On what day of the week is the given holiday? + * + * This function returns the index number for the day of the week on which the given holiday falls. + * The index number is an integer starting with 0 being Sunday, 1 = Monday, etc. + * + * @param string $key key 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 + */ + public function whatWeekDayIs(string $key): int; + + /** + * Returns the number of defined holidays (for the given country and the given year). + * In case a holiday is substituted (e.g. observed), the holiday is only counted once. + * + * @return int number of holidays + */ + public function count(): int; + + /** + * Gets all the holiday names defined by this holiday provider (for the given year). + * + * @return array list of all holiday names defined for the given year + */ + public function getHolidayNames(): array; + + /** + * Retrieves the next date (year) the given holiday is going to take place. + * + * @param string $key key of the holiday for which the next occurrence need to be retrieved + * + * @return Holiday|null a Holiday instance for the given holiday + * + * @throws UnknownLocaleException + * @throws \RuntimeException + * @throws \InvalidArgumentException + * + * @covers AbstractProvider::anotherTime + */ + public function next(string $key): ?Holiday; + + /** + * Retrieves the previous date (year) the given holiday took place. + * + * @param string $key key of the holiday for which the previous occurrence need to be retrieved + * + * @return Holiday|null a Holiday instance for the given holiday + * + * @throws UnknownLocaleException + * @throws \RuntimeException + * @throws \InvalidArgumentException + * + * @covers AbstractProvider::anotherTime + */ + public function previous(string $key): ?Holiday; + + /** + * Retrieves a list of all holidays between the given start and end date. + * + * Yasumi only calculates holidays for a single year, so a start date or end date beyond the given year will only + * return holidays for the given year. For example, holidays calculated for the year 2016, will only return 2016 + * holidays if the provided period is for example 01/01/2012 - 31/12/2017. + * + * Please take care to use the appropriate timezone for the start and end date parameters. In case you use + * different + * timezone for these parameters versus the instantiated Holiday Provider, the outcome might be unexpected (but + * correct). + * + * @param \DateTimeInterface $startDate Start date of the time frame to check against + * @param \DateTimeInterface $endDate 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 + * + * @throws \InvalidArgumentException an InvalidArgumentException is thrown if the start date is set after the end + * date + */ + public function between( + \DateTimeInterface $startDate, + \DateTimeInterface $endDate, + ?bool $equals = null + ): BetweenFilter; + + /** + * Retrieves a list of all holidays that happen on the given date. + * + * Yasumi only calculates holidays for a single year, so a date outside the given year will not appear to + * contain any holidays. + * + * Please take care to use the appropriate timezone for the date parameters. If there is a different timezone used + * for these parameters versus the instantiated Holiday Provider, the outcome might be unexpected (but correct). + * + * @param \DateTimeInterface $date date to check for holidays on + */ + public function on(\DateTimeInterface $date): OnFilter; + + /** + * Gets all the holiday dates defined by this holiday provider (for the given year). + * + * @return array list of all holiday dates defined for the given year + */ + public function getHolidayDates(): array; } From ea7228810b12cab61c72a11b3d78313b88a07436 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 01:20:19 +0900 Subject: [PATCH 332/687] Removed superfluous comments/notes. --- src/Yasumi/ProviderInterface.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 59 ++---------- tests/Base/HolidayFiltersTest.php | 31 ------- tests/Base/HolidayOnFilterTest.php | 23 +---- tests/Base/HolidayTest.php | 73 +++------------ tests/Base/SubstituteHolidayTest.php | 60 ++----------- tests/Base/TranslationsTest.php | 35 -------- tests/Base/YasumiExternalProvider.php | 8 -- tests/Base/YasumiTest.php | 114 ------------------------ tests/Base/YasumiWorkdayTest.php | 11 --- 10 files changed, 31 insertions(+), 385 deletions(-) diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 1734f08a0..483806355 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -27,7 +27,7 @@ * * @see AbstractProvider */ -interface ProviderInterface +interface ProviderInterface extends \Countable { /** * Initialize country holidays. diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index b8f91f1be..e3f0efd8d 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -20,25 +20,14 @@ use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; -use ReflectionException; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; -/** - * Class HolidayBetweenFilterTest. - * - * Contains tests for testing the BetweenFilter class - */ class HolidayBetweenFilterTest extends TestCase { use YasumiBase; - /** - * Tests the basic usage of the BetweenFilter. - * - * @throws Exception - * @throws ReflectionException - */ + /** @throws Exception */ public function testHolidaysBetweenDateRange(): void { $timezone = 'Europe/Amsterdam'; @@ -88,12 +77,7 @@ public function testHolidaysBetweenDateRange(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** - * Tests the basic usage of the BetweenFilter using DateTimeImmutable objects. - * - * @throws Exception - * @throws ReflectionException - */ + /** @throws Exception */ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void { $timezone = 'Europe/Amsterdam'; @@ -143,12 +127,7 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** - * Tests that BetweenFilter considers the date and ignores timezones and time of day. - * - * @throws Exception - * @throws ReflectionException - */ + /** @throws Exception */ public function testHolidaysBetweenDateRangeDifferentTimezone(): void { $holidays = Yasumi::create('Netherlands', 2016); @@ -170,12 +149,7 @@ 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 */ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void { $timezone = 'Europe/Amsterdam'; @@ -226,12 +200,7 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** - * Tests the BetweenFilter where the start date lies before the year of the Holiday Provider instance. - * - * @throws Exception - * @throws ReflectionException - */ + /** @throws Exception */ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void { $year = 2015; @@ -266,12 +235,7 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** - * Tests the BetweenFilter where the end date lies beyond the year of the Holiday Provider instance. - * - * @throws Exception - * @throws ReflectionException - */ + /** @throws Exception */ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void { $year = 2000; @@ -306,12 +270,7 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** - * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. - * - * @throws Exception - * @throws ReflectionException - */ + /** @throws Exception */ public function testWrongDates(): void { $this->expectException(InvalidArgumentException::class); @@ -332,7 +291,6 @@ public function testWrongDates(): void * This test covers the scenario that the requested date range covers all know holidays. * * @throws Exception - * @throws ReflectionException */ public function testCountBetweenWithSubstitutes(): void { @@ -373,7 +331,6 @@ public function testCountBetweenWithSubstitutes(): void * This test covers the scenario that the requested date range excludes a substituted holiday. * * @throws Exception - * @throws ReflectionException */ public function testCountBetweenExcludingSubstituteHoliday(): void { @@ -418,7 +375,6 @@ public function testCountBetweenExcludingSubstituteHoliday(): void * the original substituted holiday. * * @throws Exception - * @throws ReflectionException */ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHoliday(): void { @@ -464,7 +420,6 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid * the original substituted holiday. * * @throws Exception - * @throws ReflectionException */ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): void { diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index b2b41797e..07c1d7042 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Base; use PHPUnit\Framework\TestCase; -use ReflectionException; use Yasumi\Filters\BankHolidaysFilter; use Yasumi\Filters\ObservedHolidaysFilter; use Yasumi\Filters\OfficialHolidaysFilter; @@ -24,20 +23,10 @@ use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; -/** - * Class HolidayFiltersTest. - * - * Contains tests for testing the filter classes - */ class HolidayFiltersTest extends TestCase { use YasumiBase; - /** - * Tests the Official Holidays filter. - * - * @throws ReflectionException - */ public function testOfficialHolidaysFilter(): void { // There are 11 official holidays in Ireland in the year 2018, with 1 substituted holiday. @@ -68,11 +57,6 @@ public function testOfficialHolidaysFilter(): void self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } - /** - * Tests the Observed Holidays filter. - * - * @throws ReflectionException - */ public function testObservedHolidaysFilter(): void { // There are 2 observed holidays in Ireland in the year 2018. @@ -103,11 +87,6 @@ public function testObservedHolidaysFilter(): void self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } - /** - * Tests Bank Holidays. - * - * @throws ReflectionException - */ public function testBankHolidaysFilter(): void { // There are no bank holidays in Ireland in the year 2018. @@ -138,11 +117,6 @@ public function testBankHolidaysFilter(): void self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } - /** - * Tests Seasonal Holidays. - * - * @throws ReflectionException - */ public function testSeasonalHolidaysFilter(): void { $holidays = Yasumi::create('Netherlands', 2017); @@ -187,11 +161,6 @@ public function testSeasonalHolidaysFilter(): void self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } - /** - * Tests other type of Holidays. - * - * @throws ReflectionException - */ public function testOtherHolidaysFilter(): void { $holidays = Yasumi::create('Netherlands', 2017); diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index e95a069fe..5bdeecbd7 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -18,25 +18,14 @@ use DateTimeZone; use Exception; use PHPUnit\Framework\TestCase; -use ReflectionException; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; -/** - * Class HolidayOnFilterTest. - * - * Contains tests for testing the OnFilter class - */ class HolidayOnFilterTest extends TestCase { use YasumiBase; - /** - * Tests the basic usage of the OnFilter. - * - * @throws ReflectionException - * @throws Exception - */ + /** @throws Exception */ public function testHolidaysOnDate(): void { $timezone = 'Europe/Amsterdam'; @@ -57,10 +46,7 @@ public function testHolidaysOnDate(): void } } - /** - * @throws ReflectionException - * @throws Exception - */ + /** @throws Exception */ public function testHolidaysNotOnDate(): void { $timezone = 'Europe/Amsterdam'; @@ -81,10 +67,7 @@ public function testHolidaysNotOnDate(): void } } - /** - * @throws ReflectionException - * @throws Exception - */ + /** @throws Exception */ public function testCorrectNumberOfHolidaysOnDate(): void { $timezone = 'Europe/Amsterdam'; diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 8bd9eba42..eff824902 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -25,20 +25,11 @@ use Yasumi\tests\YasumiBase; use Yasumi\TranslationsInterface; -/** - * Class HolidayTest. - * - * Contains tests for testing the Holiday class - */ class HolidayTest extends TestCase { use YasumiBase; - /** - * Tests that an InvalidArgumentException is thrown in case a blank key is given. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayBlankKeyInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -46,11 +37,7 @@ public function testHolidayBlankKeyInvalidArgumentException(): void new Holiday('', [], new DateTime()); } - /** - * Tests that an Yasumi\Exception\UnknownLocaleException is thrown in case an invalid locale is given. - * - * @throws Exception - */ + /** @throws Exception */ public function testCreateHolidayUnknownLocaleException(): void { $this->expectException(UnknownLocaleException::class); @@ -58,11 +45,7 @@ public function testCreateHolidayUnknownLocaleException(): void new Holiday('testHoliday', [], new DateTime(), 'wx-YZ'); } - /** - * Tests that a Yasumi holiday instance can be serialized to a JSON object. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayIsJsonSerializable(): void { $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); @@ -74,12 +57,7 @@ public function testHolidayIsJsonSerializable(): void self::assertArrayHasKey('shortName', $instance); } - /** - * 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 { // Assert with DateTime instance @@ -93,11 +71,7 @@ public function testHolidayWithDateTimeInterface(): void self::assertInstanceOf(Holiday::class, $holiday); } - /** - * Tests the getLocales function of the Holiday object. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetLocales(): void { $holiday = new Holiday('testHoliday', [], new DateTime(), 'ca_ES_VALENCIA'); @@ -109,11 +83,7 @@ public function testHolidayGetLocales(): void self::assertEquals(['de_DE', 'de', Holiday::LOCALE_KEY], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_KEY])); } - /** - * Tests the getName function of the Holiday object without any arguments provided. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetNameWithoutArgument(): void { // 'en_US' fallback @@ -160,12 +130,7 @@ public function testHolidayGetNameWithoutArgument(): void self::assertEquals('testHoliday', $holiday->getName()); } - /** - * Tests the getName function of the Holiday object with an explicit list of locales. - * - * @throws MissingTranslationException - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetNameWithArgument(): void { $translations = [ @@ -197,11 +162,7 @@ public function testHolidayGetNameWithArgument(): void $holiday->getName(['it']); } - /** - * Tests the getName function of the Holiday object with global translations and no custom translation. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetNameWithGlobalTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -223,11 +184,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void self::assertEquals($translations[$locale], $holiday->getName()); } - /** - * Tests the getName function of the Holiday object with global translations and no custom translation. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -249,11 +206,7 @@ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void self::assertEquals($translations['pl'], $holiday->getName()); } - /** - * Tests the getName function of the Holiday object with global translations and a new custom translation. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -281,11 +234,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void self::assertEquals($customTranslation, $holiday->getName()); } - /** - * Tests the getName function of the Holiday object with global translations and an overriding custom translation. - * - * @throws Exception - */ + /** @throws Exception */ public function testHolidayGetNameWithOverridenGlobalTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 9ceca52ad..a947adb1c 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -23,20 +23,11 @@ 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 - */ + /** @throws \Exception */ public function testCreateSubstituteHolidayUnknownLocaleException(): void { $holiday = new Holiday('testHoliday', [], new DateTime()); @@ -60,11 +51,7 @@ public function testCreateSubstituteHolidaySameDate(): void new SubstituteHoliday($holiday, [], new DateTime('2019-01-01')); } - /** - * Tests the constructor. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testConstructor(): void { $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01'), 'en_US', Holiday::TYPE_BANK); @@ -76,11 +63,7 @@ public function testConstructor(): void self::assertEquals(new DateTime('2019-01-02'), $substitute); } - /** - * Tests that a Yasumi holiday instance can be serialized to a JSON object. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testSubstituteHolidayIsJsonSerializable(): void { $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01'), 'en_US'); @@ -94,12 +77,7 @@ public function testSubstituteHolidayIsJsonSerializable(): void self::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 - */ + /** @throws \Exception */ public function testSubstituteHolidayWithDateTimeInterface(): void { // Assert with DateTime instance @@ -114,11 +92,7 @@ public function testSubstituteHolidayWithDateTimeInterface(): void self::assertInstanceOf(SubstituteHoliday::class, $substitute); } - /** - * Tests the getName function of the SubstituteHoliday object with no translations for the name given. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testSubstituteHolidayGetNameWithNoTranslations(): void { $name = 'testHoliday'; @@ -129,11 +103,7 @@ public function testSubstituteHolidayGetNameWithNoTranslations(): void self::assertEquals('substituteHoliday:'.$name, $substitute->getName()); } - /** - * Tests the getName function of the SubstituteHoliday object when it has a custom translation. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): void { $name = 'testHoliday'; @@ -159,11 +129,7 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v self::assertEquals($translation, $substitute->getName()); } - /** - * Tests the getName function of the SubstituteHoliday object when substitute holiday pattern uses fallback. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testSubstituteHolidayGetNameWithPatternFallback(): void { $name = 'testHoliday'; @@ -189,11 +155,7 @@ public function testSubstituteHolidayGetNameWithPatternFallback(): void self::assertEquals('My Holiday obs', $substitute->getName()); } - /** - * Tests the getName function of the SubstituteHoliday object when it has a global translation. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): void { $name = 'testHoliday'; @@ -219,11 +181,7 @@ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): v self::assertEquals($translation, $substitute->getName()); } - /** - * Tests the getName function of the SubstituteHoliday object when only the substituted holiday has a translation. - * - * @throws \Exception - */ + /** @throws \Exception */ public function testSubstituteHolidayGetNameWithSubstitutedTranslation(): void { $name = 'testHoliday'; diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index d62d3b05d..ad4a785ab 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -20,11 +20,6 @@ use Yasumi\Exception\UnknownLocaleException; use Yasumi\Translations; -/** - * Class TranslationsTest. - * - * Contains tests for testing the Translations class - */ class TranslationsTest extends TestCase { public const LOCALES = [ @@ -33,9 +28,6 @@ class TranslationsTest extends TestCase 'pl_PL', ]; - /** - * Tests adding single translation. - */ public function testAddTranslation(): void { $translations = new Translations(self::LOCALES); @@ -58,9 +50,6 @@ public function testAddTranslation(): void self::assertEquals($translation, $translations->getTranslation($key, $locale)); } - /** - * Tests adding multiple translations. - */ public function testAddMultipleTranslations(): void { $translations = new Translations(self::LOCALES); @@ -111,9 +100,6 @@ public function testAddMultipleTranslations(): void self::assertEquals($thirdTranslation, $translations->getTranslation($thirdIdentifier, $thirdLocale)); } - /** - * Tests that an UnknownLocaleException is thrown when adding translation for unknown locale. - */ public function testAddTranslationUnknownLocaleException(): void { $this->expectException(UnknownLocaleException::class); @@ -127,9 +113,6 @@ public function testAddTranslationUnknownLocaleException(): void $translations->addTranslation($key, $unknownLocale, $translation); } - /** - * Tests that no translation is returned for an unknown holiday. - */ public function testNoTranslationForUnknownHoliday(): void { $translations = new Translations(self::LOCALES); @@ -146,9 +129,6 @@ public function testNoTranslationForUnknownHoliday(): void self::assertEmpty($translations->getTranslations($unknownIdentifier)); } - /** - * Tests that no translation is returned for not translated locale. - */ public function testNoTranslationForNotTranslatedLocale(): void { $translations = new Translations(self::LOCALES); @@ -164,9 +144,6 @@ public function testNoTranslationForNotTranslatedLocale(): void self::assertNull($translations->getTranslation($key, $unknownLocale)); } - /** - * Tests loading one translation file from directory. - */ public function testLoadingTranslationsFromDirectory(): void { $key = 'newYearsDay'; @@ -193,9 +170,6 @@ public function testLoadingTranslationsFromDirectory(): void self::assertEquals($translation, $translations->getTranslation($key, $locale)); } - /** - * Tests that translation is not loaded from file with invalid extension. - */ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void { $key = 'newYearsDay'; @@ -217,9 +191,6 @@ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void self::assertEmpty($translations->getTranslations($key)); } - /** - * Tests that an UnknownLocaleException is thrown when loading translation with unknown locale(s). - */ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException(): void { $this->expectException(UnknownLocaleException::class); @@ -239,9 +210,6 @@ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException() $translations->loadTranslations(vfsStream::url('root/lang')); } - /** - * Tests that an InvalidArgumentException is thrown when loading translation from inexistent directory. - */ public function testLoadingTranslationsFromInexistentDirectory(): void { $this->expectException(InvalidArgumentException::class); @@ -252,9 +220,6 @@ public function testLoadingTranslationsFromInexistentDirectory(): void $translations->loadTranslations(vfsStream::url('root/lang')); } - /** - * Tests loading more than one translation file from directory. - */ public function testLoadingMultipleTranslationsFromDirectory(): void { $firstIdentifier = 'newYearsDay'; diff --git a/tests/Base/YasumiExternalProvider.php b/tests/Base/YasumiExternalProvider.php index 224f0f6a1..0bce81376 100644 --- a/tests/Base/YasumiExternalProvider.php +++ b/tests/Base/YasumiExternalProvider.php @@ -16,16 +16,8 @@ use Yasumi\Provider\AbstractProvider; -/** - * Class YasumiExternalProvider. - * - * Class for testing the use of an external holiday provider class. - */ class YasumiExternalProvider extends AbstractProvider { - /** - * Initialize country holidays. - */ public function initialize(): void { // We don't actually have to do anything here. diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 2a94f3153..27d9dd0fe 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -27,30 +27,14 @@ use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; -/** - * Class YasumiTest. - * - * Contains tests for testing the Holiday class - */ class YasumiTest extends TestCase { use YasumiBase; - /** - * The lower year limit supported by Yasumi. - */ public const YEAR_LOWER_BOUND = 1000; - /** - * The upper year limit supported by Yasumi. - */ public const YEAR_UPPER_BOUND = 9999; - /** - * Tests that an InvalidArgumentException is thrown in case an invalid year is given. - * - * @throws ReflectionException - */ public function testCreateWithInvalidYear(): void { $this->expectException(InvalidYearException::class); @@ -58,11 +42,6 @@ public function testCreateWithInvalidYear(): void Yasumi::create('Japan', 10100); } - /** - * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. - * - * @throws ReflectionException - */ public function testCreateWithInvalidProvider(): void { $this->expectException(ProviderNotFoundException::class); @@ -70,11 +49,6 @@ public function testCreateWithInvalidProvider(): void Yasumi::create('Mars'); } - /** - * Tests that an InvalidArgumentException is thrown in case we try to load a Trait as provider. - * - * @throws ReflectionException - */ public function testCreateWithInvalidProviderBecauseItsATrait(): void { $this->expectException(InvalidArgumentException::class); @@ -82,11 +56,6 @@ public function testCreateWithInvalidProviderBecauseItsATrait(): void Yasumi::create('CommonHolidays'); } - /** - * Tests that an InvalidArgumentException is thrown in case we try to load the AbstractProvider as provider. - * - * @throws ReflectionException - */ public function testCreateWithAbstractClassProvider(): void { $this->expectException(InvalidArgumentException::class); @@ -94,11 +63,6 @@ public function testCreateWithAbstractClassProvider(): void Yasumi::create('AbstractProvider'); } - /** - * Tests that Yasumi allows external classes that extend the ProviderInterface. - * - * @throws ReflectionException - */ public function testCreateWithAbstractExtension(): void { $class = YasumiExternalProvider::class; @@ -109,11 +73,6 @@ public function testCreateWithAbstractExtension(): void self::assertInstanceOf(YasumiExternalProvider::class, $instance); } - /** - * Tests that an Yasumi\Exception\UnknownLocaleException is thrown in case an invalid locale is given. - * - * @throws ReflectionException - */ public function testCreateWithInvalidLocale(): void { $this->expectException(UnknownLocaleException::class); @@ -125,11 +84,6 @@ public function testCreateWithInvalidLocale(): void ); } - /** - * Tests that the count function returns an integer and a correct count for the test holiday provider. - * - * @throws ReflectionException - */ public function testCount(): void { // There are 16 holidays in Japan in the year 2015, with 1 substituted holiday. @@ -140,11 +94,6 @@ public function testCount(): void self::assertNotEquals(17, $holidays->count()); } - /** - * Tests that the getType function returns a string for the test holiday provider. - * - * @throws ReflectionException - */ public function testGetType(): void { $holidays = Yasumi::create('Japan', self::numberBetween(1949, self::YEAR_UPPER_BOUND)); @@ -153,11 +102,6 @@ public function testGetType(): void self::assertIsString($holiday->getType()); } - /** - * Tests that the getYear function returns an integer for the test holiday provider. - * - * @throws ReflectionException - */ public function testGetYear(): void { $year = self::numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND); @@ -183,11 +127,6 @@ public function testNext(): void $this->assertHoliday($country, $name, $year + 1, $holidays->next($name)); } - /** - * Tests the next function that an InvalidArgumentException is thrown in case a blank name is given. - * - * @throws ReflectionException - */ public function testNextWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -221,11 +160,6 @@ public function testPrevious(): void ); } - /** - * Tests the previous function that an InvalidArgumentException is thrown in case a blank name is given. - * - * @throws ReflectionException - */ public function testPreviousWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -237,11 +171,6 @@ public function testPreviousWithBlankKey(): void $holidays->previous(''); } - /** - * Tests that the getHolidayNames function returns an array and a correct count for the test holiday provider. - * - * @throws ReflectionException - */ public function testGetHolidayNames(): void { $holidays = Yasumi::create('Japan', 2015); @@ -252,11 +181,6 @@ public function testGetHolidayNames(): void self::assertContains('newYearsDay', $holidayNames); } - /** - * Tests that the WhenIs function returns a string representation of the date the given holiday occurs. - * - * @throws ReflectionException - */ public function testWhenIs(): void { $holidays = Yasumi::create('Japan', 2010); @@ -267,11 +191,6 @@ public function testWhenIs(): void self::assertEquals('2010-09-23', $when); } - /** - * Tests that the WhenIs function throws an InvalidArgumentException when a blank key is given. - * - * @throws ReflectionException - */ public function testWhenIsWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -280,11 +199,6 @@ public function testWhenIsWithBlankKey(): void $holidays->whenIs(''); } - /** - * Tests that an InvalidArgumentException is thrown in case a blank name is given for the getHoliday function. - * - * @throws ReflectionException - */ public function testGetHolidayWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -293,12 +207,6 @@ public function testGetHolidayWithBlankKey(): void $holidays->getHoliday(''); } - /** - * Tests that the whatWeekDayIs function returns an integer representation of the day of the week the given holiday - * is occurring. - * - * @throws ReflectionException - */ public function testWhatWeekDayIs(): void { $holidays = Yasumi::create('Netherlands', 2110); @@ -308,11 +216,6 @@ public function testWhatWeekDayIs(): void self::assertEquals(2, $weekDay); } - /** - * Tests that the whatWeekDayIs function throws an InvalidArgumentException when a blank name is given. - * - * @throws ReflectionException - */ public function testWhatWeekDayIsWithBlankKey(): void { $this->expectException(InvalidArgumentException::class); @@ -366,9 +269,6 @@ public function testGetProvidersStaticCall(): void * only asserts that it is a date calculated by the Holiday Provider. * * @throws Exception - * @throws ReflectionException - * @throws Exception - * @throws ReflectionException */ public function testIsHoliday(): void { @@ -396,9 +296,6 @@ public function testIsHoliday(): void * only asserts that it is a date calculated by the Holiday Provider. * * @throws Exception - * @throws ReflectionException - * @throws Exception - * @throws ReflectionException */ public function testIsNotHoliday(): void { @@ -426,9 +323,6 @@ public function testIsNotHoliday(): void * @TODO Add additional unit tests for those holiday providers that differ from the global definition * * @throws Exception - * @throws ReflectionException - * @throws Exception - * @throws ReflectionException */ public function testIsWorkingDay(): void { @@ -456,9 +350,6 @@ public function testIsWorkingDay(): void * @TODO Add additional unit tests for those holiday providers that differ from the global definition * * @throws Exception - * @throws ReflectionException - * @throws Exception - * @throws ReflectionException */ public function testIsNotWorkingDay(): void { @@ -479,11 +370,6 @@ public function testIsNotWorkingDay(): void unset($isNotWorkingDay); } - /** - * Tests that holidays successfully can be removed from the list of holidays of a provider. - * - * @throws ReflectionException - */ public function testRemoveHoliday(): void { $provider = Yasumi::create('Ireland', 2018); diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index 4a46b505d..0a794f1b3 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -19,14 +19,8 @@ use DateTimeZone; use Exception; use PHPUnit\Framework\TestCase; -use ReflectionException; use Yasumi\Yasumi; -/** - * Class YasumiWorkdayTest. - * - * Class for testing the workday functions. - */ class YasumiWorkdayTest extends TestCase { public const FORMAT_DATE = 'Y-m-d'; @@ -35,7 +29,6 @@ class YasumiWorkdayTest extends TestCase * Tests that the nextWorkingDay function returns an object that implements the DateTimeInterface (e.g. DateTime). * * @throws Exception - * @throws ReflectionException */ public function testNextWorkingDay(): void { @@ -64,7 +57,6 @@ public function testNextWorkingDay(): void * Tests that the prevWorkingDay function returns an object that implements the DateTimeInterface (e.g. DateTime). * * @throws Exception - * @throws ReflectionException */ public function testPreviousWorkingDay(): void { @@ -94,7 +86,6 @@ public function testPreviousWorkingDay(): void * DateTimeInterface (e.g. DateTime) when an interval is chosen that passes the year boundary (i.e. beyond 12/31). * * @throws Exception - * @throws ReflectionException */ public function testYearBoundary(): void { @@ -148,7 +139,6 @@ public function testYearBoundary(): void * * @dataProvider dataProviderWorkDayNextYear * - * @throws ReflectionException * @throws Exception */ public function testWorkDayIsNextYear(string $start, int $workdays, string $expectedNext): void @@ -185,7 +175,6 @@ public function dataProviderWorkDayNextYear(): array * * @dataProvider dataProviderWorkDayPreviousYear * - * @throws ReflectionException * @throws Exception */ public function testWorkDayIsPreviousYear(string $start, int $workdays, string $expectedNext): void From 93c4fab933592a86900a328b17c760a9aacdae83 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 09:02:56 +0900 Subject: [PATCH 333/687] Extracted generators to private functions as a foreach only accepts iterators. --- tests/Portugal/PortugueseRepublicDayTest.php | 40 ++++++++++++-------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index e70ea6ba7..8c5f2fb4e 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -37,10 +37,7 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements HolidayT */ public function testHolidayOnAfterRestoration(): void { - foreach (function () { - yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); - yield self::HOLIDAY_YEAR_RESTORED; - } as $year) { + foreach ($this->randomYearsOnAfterRestoration() as $year) { $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -68,10 +65,7 @@ public function testNotHolidayDuringAbolishment(): void */ public function testHolidayOnAfterEstablishment(): void { - foreach (function () { - yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - yield self::ESTABLISHMENT_YEAR; - } as $year) { + foreach ($this->randomYearsOnAfterEstablishment() as $year) { $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -86,10 +80,7 @@ public function testHolidayOnAfterEstablishment(): void */ public function testHolidayBeforeEstablishment(): void { - foreach (function () { - yield $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); - yield self::ESTABLISHMENT_YEAR - 1; - } as $year) { + foreach ($this->randomYearsBeforeEstablishment() as $year) { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } } @@ -124,12 +115,31 @@ public function testHolidayType(): void } } - /** - * @return \Generator - */ + /** @return \Generator */ private function randomEstablishedYear(): \Generator { yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); } + + /** @return \Generator */ + private function randomYearsBeforeEstablishment(): \Generator + { + yield $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + yield self::ESTABLISHMENT_YEAR - 1; + } + + /** @return \Generator */ + private function randomYearsOnAfterEstablishment(): \Generator + { + yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + yield self::ESTABLISHMENT_YEAR; + } + + /** @return \Generator */ + private function randomYearsOnAfterRestoration(): \Generator + { + yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + yield self::HOLIDAY_YEAR_RESTORED; + } } From 8e4c7e47cbba7a7af59323fe69985082e432ebc7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 21:12:26 +0900 Subject: [PATCH 334/687] Removed count from ProviderInterface as the AbstractProvider already implements the Countable interface. --- src/Yasumi/Provider/AbstractProvider.php | 9 +++++++-- src/Yasumi/ProviderInterface.php | 12 +----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 28f81e853..ae9886305 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -30,7 +30,7 @@ /** * Class AbstractProvider. */ -abstract class AbstractProvider implements ProviderInterface, Countable, IteratorAggregate +abstract class AbstractProvider implements Countable, ProviderInterface, IteratorAggregate { /** * Code to identify the Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective @@ -171,7 +171,12 @@ public function whatWeekDayIs(string $key): int return (int) $this->holidays[$key]->format('w'); } - /** {@inheritdoc} */ + /** + * Returns the number of defined holidays (for the given country and the given year). + * In case a holiday is substituted (e.g. observed), the holiday is only counted once. + * + * @return int number of holidays + */ public function count(): int { $names = array_map(static function ($holiday): string { diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 483806355..430ca4fdc 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -29,9 +29,7 @@ */ interface ProviderInterface extends \Countable { - /** - * Initialize country holidays. - */ + /** Initialize country holidays */ public function initialize(): void; /** @@ -156,14 +154,6 @@ public function whenIs(string $key): string; */ public function whatWeekDayIs(string $key): int; - /** - * Returns the number of defined holidays (for the given country and the given year). - * In case a holiday is substituted (e.g. observed), the holiday is only counted once. - * - * @return int number of holidays - */ - public function count(): int; - /** * Gets all the holiday names defined by this holiday provider (for the given year). * From 1f6db4ace316b7bf940422f60f1e3656c9d083ad Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 21:46:58 +0900 Subject: [PATCH 335/687] Updated the Changelog with the recent changes. --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e292b5485..4ac626dcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,21 @@ to [Semantic Versioning](https://semver.org). ### Changed +- Included the unit tests directory for checking by PHPStan. + ### Fixed +- Created the interface methods of the `ProviderInterface` that the abstract provider class implements. Since the return + type of the Yasumi factory methods is now `ProviderInterface`, those missing methods generated errors especially by + statistic analyzers. +- Included the data type for test methods that return an array. + ### Deprecated ### Removed +- Superfluous notes/comments. + ## [2.5.0] - 2022-01-30 ### Added From acf62a7bd0248d1e62bd826d91cd0c2a4b598cea Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 22:35:12 +0900 Subject: [PATCH 336/687] The test for Remembrance Day (Argentina) in that Remembrance Day was considered for all years: it is only celebrated since 2006. --- CHANGELOG.md | 2 ++ tests/Argentina/ArgentinaTest.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac626dcb..e2ee0927f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ to [Semantic Versioning](https://semver.org). ### Fixed +- The test for Remembrance Day (Argentina) in that Remembrance Day was considered for all years: it is only celebrated + since 2006. - Created the interface methods of the `ProviderInterface` that the abstract provider class implements. Since the return type of the Yasumi factory methods is now `ProviderInterface`, those missing methods generated errors especially by statistic analyzers. diff --git a/tests/Argentina/ArgentinaTest.php b/tests/Argentina/ArgentinaTest.php index 0f66d092a..6fb7983a0 100644 --- a/tests/Argentina/ArgentinaTest.php +++ b/tests/Argentina/ArgentinaTest.php @@ -47,7 +47,6 @@ public function testOfficialHolidays(): void $holidays = [ 'newYearsDay', 'internationalWorkersDay', - 'remembranceDay', 'malvinasDay', 'mayRevolution', 'generalMartinMigueldeGuemesDay', @@ -63,6 +62,10 @@ public function testOfficialHolidays(): void $holidays[] = 'independenceDay'; } + if ($this->year >= 2006) { + $holidays[] = 'remembranceDay'; + } + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } From a2788843bcbdfa80b3fd0dcd7ceed7be02d70ebb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 3 Feb 2022 23:38:15 +0900 Subject: [PATCH 337/687] Reverted visibility to protected. Accidentally the visibility was reduced during a cleanup of code. This causes these methods not being accessible when extending a provider class for example. --- src/Yasumi/Provider/CommonHolidays.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 8afb5131d..aea86a0eb 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -186,7 +186,7 @@ protected function internationalWomensDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function newYearsEve( + protected function newYearsEve( int $year, string $timezone, string $locale, @@ -217,7 +217,7 @@ private function newYearsEve( * @throws \InvalidArgumentException * @throws \Exception */ - private function valentinesDay( + protected function valentinesDay( int $year, string $timezone, string $locale, @@ -252,7 +252,7 @@ private function valentinesDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function worldAnimalDay( + protected function worldAnimalDay( int $year, string $timezone, string $locale, @@ -288,7 +288,7 @@ private function worldAnimalDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function fathersDay( + protected function fathersDay( int $year, string $timezone, string $locale, @@ -324,7 +324,7 @@ private function fathersDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function mothersDay( + protected function mothersDay( int $year, string $timezone, string $locale, @@ -360,7 +360,7 @@ private function mothersDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function victoryInEuropeDay( + protected function victoryInEuropeDay( int $year, string $timezone, string $locale, @@ -398,7 +398,7 @@ private function victoryInEuropeDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function armisticeDay( + protected function armisticeDay( int $year, string $timezone, string $locale, @@ -426,7 +426,7 @@ private function armisticeDay( * * @throws \Exception */ - private function summerTime( + protected function summerTime( int $year, string $timezone, string $locale, @@ -460,7 +460,7 @@ private function summerTime( * * @throws \Exception */ - private function winterTime( + protected function winterTime( int $year, string $timezone, string $locale, @@ -503,7 +503,7 @@ private function winterTime( * * @throws \Exception */ - private function calculateSummerWinterTime( + protected function calculateSummerWinterTime( int $year, string $timezone, bool $summer From 6f708f3964ac475c0a21d39f5bb74872837633e8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 00:11:57 +0900 Subject: [PATCH 338/687] Reverted visibility to protected. Accidentally the visibility was reduced during a cleanup of code. This causes these methods not being accessible when extending a provider class for example. --- src/Yasumi/Provider/ChristianHolidays.php | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 40e229a11..614b9fb25 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -477,7 +477,7 @@ protected function pentecost( * @throws \InvalidArgumentException * @throws \Exception */ - private function easterMonday( + protected function easterMonday( int $year, string $timezone, string $locale, @@ -512,7 +512,7 @@ private function easterMonday( * @throws \InvalidArgumentException * @throws \Exception */ - private function ascensionDay( + protected function ascensionDay( int $year, string $timezone, string $locale, @@ -544,7 +544,7 @@ private function ascensionDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function pentecostMonday( + protected function pentecostMonday( int $year, string $timezone, string $locale, @@ -580,7 +580,7 @@ private function pentecostMonday( * @throws \InvalidArgumentException * @throws \Exception */ - private function christmasEve( + protected function christmasEve( int $year, string $timezone, string $locale, @@ -613,7 +613,7 @@ private function christmasEve( * @throws \InvalidArgumentException * @throws \Exception */ - private function christmasDay( + protected function christmasDay( int $year, string $timezone, string $locale, @@ -646,7 +646,7 @@ private function christmasDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function secondChristmasDay( + protected function secondChristmasDay( int $year, string $timezone, string $locale, @@ -681,7 +681,7 @@ private function secondChristmasDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function ashWednesday( + protected function ashWednesday( int $year, string $timezone, string $locale, @@ -717,7 +717,7 @@ private function ashWednesday( * @throws \InvalidArgumentException * @throws \Exception */ - private function immaculateConception( + protected function immaculateConception( int $year, string $timezone, string $locale, @@ -754,7 +754,7 @@ private function immaculateConception( * @throws \InvalidArgumentException * @throws \Exception */ - private function stStephensDay( + protected function stStephensDay( int $year, string $timezone, string $locale, @@ -790,7 +790,7 @@ private function stStephensDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function maundyThursday( + protected function maundyThursday( int $year, string $timezone, string $locale, @@ -827,7 +827,7 @@ private function maundyThursday( * @throws \InvalidArgumentException * @throws \Exception */ - private function stJohnsDay( + protected function stJohnsDay( int $year, string $timezone, string $locale, @@ -858,7 +858,7 @@ private function stJohnsDay( * @throws \InvalidArgumentException * @throws \Exception */ - private function annunciation( + protected function annunciation( int $year, string $timezone, string $locale, From 76560bf9bd4ad490e5b616241166343d335944cc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 22:40:30 +0900 Subject: [PATCH 339/687] Removed exceptions in PHPDoc that are not thrown. Simplified variable assignment. --- tests/YasumiBase.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 8ade5c6e2..6b70a8f58 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -56,7 +56,6 @@ trait YasumiBase * @throws InvalidArgumentException * @throws RuntimeException * @throws UnknownLocaleException - * @throws ReflectionException */ public function assertDefinedHolidays( array $expectedHolidays, @@ -103,7 +102,6 @@ public function assertDefinedHolidays( * @throws InvalidArgumentException * @throws RuntimeException * @throws AssertionFailedError - * @throws ReflectionException */ public function assertHoliday( string $provider, @@ -132,7 +130,6 @@ public function assertHoliday( * @throws InvalidArgumentException * @throws RuntimeException * @throws AssertionFailedError - * @throws ReflectionException */ public function assertSubstituteHoliday( string $provider, @@ -186,7 +183,6 @@ public function assertNotSubstituteHoliday( * @throws UnknownLocaleException * @throws InvalidDateException * @throws AssertionFailedError - * @throws ReflectionException */ public function assertNotHoliday( string $provider, @@ -211,8 +207,7 @@ public function assertNotHoliday( * @throws RuntimeException * @throws UnknownLocaleException * @throws AssertionFailedError - * @throws ReflectionException - */ + */ public function assertTranslatedHolidayName( string $provider, string $key, @@ -259,7 +254,6 @@ public function assertTranslatedHolidayName( * @throws RuntimeException * @throws AssertionFailedError * @throws UnknownLocaleException - * @throws ReflectionException */ public function assertHolidayType( string $provider, @@ -287,7 +281,6 @@ public function assertHolidayType( * @throws InvalidArgumentException * @throws RuntimeException * @throws UnknownLocaleException - * @throws ReflectionException */ public function assertDayOfWeek( string $provider, @@ -310,7 +303,6 @@ public function assertDayOfWeek( * tested * @param int $expectedSourceCount the expected number of sources * - * @throws ReflectionException */ public function assertSources(string $provider, int $expectedSourceCount): void { @@ -340,7 +332,7 @@ public function generateRandomDates( int $range = null ): array { $data = []; - $range = $range ?? 1000; + $range ??= 1000; for ($y = 1; $y <= ($iterations ?? 10); ++$y) { $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC'))]; @@ -366,7 +358,7 @@ public function generateRandomEasterDates( int $range = null ): array { $data = []; - $range = $range ?? 1000; + $range ??= 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); @@ -394,7 +386,7 @@ public function generateRandomEasterMondayDates( int $iterations = null, int $range = null ): array { - $range = $range ?? 1000; + $range ??= 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P1D')); @@ -420,7 +412,7 @@ public function generateRandomModifiedEasterDates( int $range = null ): array { $data = []; - $range = $range ?? 1000; + $range ??= 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); $date = $this->calculateEaster($year, $timezone ?? 'UTC'); @@ -449,7 +441,7 @@ public function generateRandomGoodFridayDates( int $iterations = null, int $range = null ): array { - $range = $range ?? 1000; + $range ??= 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->sub(new DateInterval('P2D')); @@ -472,7 +464,7 @@ public function generateRandomPentecostDates( int $iterations = null, int $range = null ): array { - $range = $range ?? 1000; + $range ??= 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P49D')); From 87e545a26470c03bc0283ea29d1fd333cec63676 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 22:47:35 +0900 Subject: [PATCH 340/687] Included tests directory for analysis by Phan. --- .phan/config.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.phan/config.php b/.phan/config.php index 8d583c969..1b53e48ef 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -350,11 +350,13 @@ // your application should be included in this list. 'directory_list' => [ 'src', + 'test' ], // A list of individual files to include in analysis // with a path relative to the root directory of the // project. 'file_list' => [ + 'vendor/phpunit/phpunit/src/Framework/Assert.php' ], ]; From cee6cfbd988949232de8503ea1c031663c578ebd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 22:51:02 +0900 Subject: [PATCH 341/687] Upgraded PHPStan to v1.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 342460ac4..5b85e464c 100755 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^1.4", "phpunit/phpunit": "^8.5 | ^9.5", "vimeo/psalm": "^4.9" }, From 62c25211dfb815223017dad41351da8535ad7829 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 22:56:04 +0900 Subject: [PATCH 342/687] Added note what Exception is thrown and parameter types. Removed superfluous comments. --- tests/YasumiBase.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 6b70a8f58..fd74f6721 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -568,12 +568,10 @@ public function isWeekend( /** * Returns a random number between $int1 and $int2 (any order). * - * @param int $int1 default to 0 - * @param int $int2 defaults to 32 bit max integer, ie 2147483647 - * + * @throws Exception * @example 79907610 */ - public static function numberBetween($int1 = 0, $int2 = 2147483647): int + public static function numberBetween(int $int1 = 0, int $int2 = 2147483647): int { $min = $int1 < $int2 ? $int1 : $int2; $max = $int1 < $int2 ? $int2 : $int1; From dfb4ec111ecb2aab9e4229cb5afd3885481b1d31 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 22:57:08 +0900 Subject: [PATCH 343/687] Reformatting. --- tests/YasumiBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index fd74f6721..11b175dd6 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -207,7 +207,7 @@ public function assertNotHoliday( * @throws RuntimeException * @throws UnknownLocaleException * @throws AssertionFailedError - */ + */ public function assertTranslatedHolidayName( string $provider, string $key, @@ -302,7 +302,6 @@ public function assertDayOfWeek( * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be * tested * @param int $expectedSourceCount the expected number of sources - * */ public function assertSources(string $provider, int $expectedSourceCount): void { @@ -569,6 +568,7 @@ public function isWeekend( * Returns a random number between $int1 and $int2 (any order). * * @throws Exception + * * @example 79907610 */ public static function numberBetween(int $int1 = 0, int $int2 = 2147483647): int From d2889b79227fc31a684c9406ade0693bdb223131 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Feb 2022 23:10:42 +0900 Subject: [PATCH 344/687] Removed exceptions in PHPDoc that are not thrown and added one that is thrown. Throw an exception in case the timestamp of the start and end date in the `dateTimeBetween` method can't be established. Otherwise, a boolean would be used as an argument for the subsequent step which isn't accepted. --- tests/YasumiBase.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 11b175dd6..e5f183323 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -21,7 +21,6 @@ use Exception; use InvalidArgumentException; use PHPUnit\Framework\AssertionFailedError; -use ReflectionException; use RuntimeException; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; @@ -157,7 +156,6 @@ public function assertSubstituteHoliday( * @throws UnknownLocaleException * @throws InvalidDateException * @throws AssertionFailedError - * @throws ReflectionException */ public function assertNotSubstituteHoliday( string $provider, @@ -302,6 +300,8 @@ public function assertDayOfWeek( * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be * tested * @param int $expectedSourceCount the expected number of sources + * + * @throws Exception */ public function assertSources(string $provider, int $expectedSourceCount): void { @@ -541,6 +541,8 @@ public function generateRandomDatesWithModifier( * @param int|null $upperLimit the upper limit for generating a year number (default: 9999) * * @return int a year number + * + * @throws Exception */ public function generateRandomYear( int $lowerLimit = null, @@ -587,16 +589,27 @@ public static function numberBetween(int $int1 = 0, int $int2 = 2147483647): int * @param \DateTime|string $endDate Defaults to "now" * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * - * @example DateTime('1999-02-02 11:42:52') + * @throws Exception * * @see http://php.net/manual/en/timezones.php * @see http://php.net/manual/en/function.date-default-timezone-get.php + * + * @example DateTime('1999-02-02 11:42:52') */ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTime { $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); + + if (!$startTimestamp) { + throw new \RuntimeException('unable to get timestamp for the start date'); + } + $endTimestamp = static::getMaxTimestamp($endDate); + if (!$endTimestamp) { + throw new \RuntimeException('unable to get timestamp for the end date'); + } + if ($startTimestamp > $endTimestamp) { throw new \InvalidArgumentException('Start date must be anterior to end date.'); } From 504a129f0330b86f0e62d0ac3a8dd207158828d3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Feb 2022 16:54:15 +0900 Subject: [PATCH 345/687] Removed exceptions in PHPDoc that are not thrown and added ones that are. Added missing attribute data type in some classes. --- tests/Argentina/ArgentinaTest.php | 11 +-- tests/Argentina/CarnavalMondayTest.php | 8 +-- tests/Argentina/CarnavalTuesdayTest.php | 8 +-- tests/Argentina/ChristmasDayTest.php | 6 +- tests/Argentina/EasterTest.php | 6 +- tests/Argentina/FlagDayTest.php | 8 +-- .../Argentina/GeneralJoseSanMartinDayTest.php | 8 +-- .../GeneralMartinMigueldeGuemesDayTest.php | 8 +-- tests/Argentina/GoodFridayTest.php | 6 +- .../Argentina/ImmaculateConceptionDayTest.php | 8 +-- tests/Argentina/IndependenceDayTest.php | 8 +-- .../Argentina/InternationalWorkersDayTest.php | 6 +- tests/Argentina/MalvinasDayTest.php | 8 +-- tests/Argentina/MayRevolutionTest.php | 8 +-- .../Argentina/NationalSovereigntyDayTest.php | 8 +-- tests/Argentina/NewYearsDayTest.php | 6 +- tests/Argentina/RaceDayTest.php | 8 +-- tests/Argentina/RemembranceDayTest.php | 8 +-- tests/Australia/AnzacDayTest.php | 8 +-- tests/Australia/AustraliaDayTest.php | 8 +-- tests/Australia/AustraliaTest.php | 15 ++-- .../AustralianCapitalTerritoryTest.php | 7 +- .../CanberraDayTest.php | 6 +- .../EasterSaturdayTest.php | 6 +- .../EasterSundayTest.php | 6 +- .../LabourDayTest.php | 6 +- .../QueensBirthdayTest.php | 6 +- .../ReconciliationDayTest.php | 6 +- tests/Australia/BoxingDayTest.php | 6 +- tests/Australia/ChristmasDayTest.php | 6 +- tests/Australia/EasterMondayTest.php | 7 +- tests/Australia/GoodFridayTest.php | 6 +- .../NewSouthWales/BankHolidayTest.php | 6 +- .../NewSouthWales/EasterSaturdayTest.php | 6 +- .../NewSouthWales/EasterSundayTest.php | 6 +- .../Australia/NewSouthWales/LabourDayTest.php | 6 +- .../NewSouthWales/NewSouthWalesTest.php | 9 ++- .../NewSouthWales/QueensBirthdayTest.php | 6 +- tests/Australia/NewYearsDayTest.php | 6 +- .../NorthernTerritory/EasterSaturdayTest.php | 6 +- .../NorthernTerritory/MayDayTest.php | 6 +- .../NorthernTerritoryTest.php | 7 +- .../NorthernTerritory/PicnicDayTest.php | 6 +- .../NorthernTerritory/QueensBirthdayTest.php | 6 +- .../Queensland/Brisbane/BrisbaneTest.php | 7 +- .../Queensland/Brisbane/PeoplesDayTest.php | 6 +- tests/Australia/Queensland/LabourDayTest.php | 6 +- .../Queensland/QueensBirthdayTest.php | 6 +- tests/Australia/Queensland/QueenslandTest.php | 7 +- .../SouthAustralia/AdelaideCupDayTest.php | 6 +- .../SouthAustralia/ChristmasDayTest.php | 6 +- .../SouthAustralia/EasterSaturdayTest.php | 6 +- .../SouthAustralia/LabourDayTest.php | 6 +- .../SouthAustralia/ProclamationDayTest.php | 6 +- .../SouthAustralia/QueensBirthdayTest.php | 6 +- .../SouthAustralia/SouthAustraliaTest.php | 7 +- .../CentralNorth/CentralNorthTest.php | 5 +- .../CentralNorth/DevonportShowTest.php | 6 +- tests/Australia/Tasmania/EightHourDayTest.php | 6 +- .../FlindersIsland/FlindersIslandShowTest.php | 6 +- .../FlindersIsland/FlindersIslandTest.php | 5 +- .../KingIsland/KingIslandShowTest.php | 6 +- .../Tasmania/KingIsland/KingIslandTest.php | 5 +- .../Tasmania/Northeast/LauncestonShowTest.php | 6 +- .../Tasmania/Northeast/NortheastTest.php | 5 +- .../Tasmania/Northwest/BurnieShowTest.php | 6 +- .../Northwest/CircularHead/AGFESTTest.php | 6 +- .../CircularHead/CircularHeadTest.php | 5 +- .../Tasmania/Northwest/NorthwestTest.php | 5 +- .../Australia/Tasmania/QueensBirthdayTest.php | 6 +- .../Australia/Tasmania/RecreationDayTest.php | 6 +- .../Tasmania/South/HobartShowTest.php | 6 +- tests/Australia/Tasmania/South/SouthTest.php | 5 +- .../South/Southeast/HobartRegattaTest.php | 6 +- .../South/Southeast/SoutheastTest.php | 5 +- tests/Australia/Tasmania/TasmaniaTest.php | 5 +- .../Victoria/AFLGrandFinalFridayTest.php | 8 +-- .../Australia/Victoria/EasterSaturdayTest.php | 6 +- tests/Australia/Victoria/EasterSundayTest.php | 6 +- tests/Australia/Victoria/LabourDayTest.php | 6 +- .../Victoria/MelbourneCupDayTest.php | 6 +- .../Australia/Victoria/QueensBirthdayTest.php | 6 +- tests/Australia/Victoria/VictoriaTest.php | 7 +- .../WesternAustralia/LabourDayTest.php | 6 +- .../WesternAustralia/QueensBirthdayTest.php | 6 +- .../WesternAustraliaDayTest.php | 6 +- .../WesternAustralia/WesternAustraliaTest.php | 7 +- tests/Austria/AllSaintsDayTest.php | 7 +- tests/Austria/AscensionDayTest.php | 6 +- tests/Austria/AssumptionOfMaryTest.php | 7 +- tests/Austria/AustriaTest.php | 13 +--- tests/Austria/Burgenland/BurgenlandTest.php | 13 +--- tests/Austria/Burgenland/stMartinsDayTest.php | 7 +- tests/Austria/Carinthia/CarinthiaTest.php | 13 +--- tests/Austria/Carinthia/PlebisciteDayTest.php | 9 +-- tests/Austria/Carinthia/StJosephsDayTest.php | 7 +- tests/Austria/ChristmasTest.php | 7 +- tests/Austria/CorpusChristiTest.php | 6 +- tests/Austria/EasterMondayTest.php | 6 +- tests/Austria/EasterTest.php | 6 +- tests/Austria/EpiphanyTest.php | 7 +- tests/Austria/ImmaculateConceptionTest.php | 7 +- tests/Austria/InternationalWorkersDayTest.php | 7 +- .../Austria/LowerAustria/LowerAustriaTest.php | 13 +--- .../LowerAustria/StLeopoldsDayTest.php | 9 +-- tests/Austria/NationalDayTest.php | 8 +-- tests/Austria/NewYearsDayTest.php | 7 +- tests/Austria/PentecostMondayTest.php | 6 +- tests/Austria/PentecostTest.php | 6 +- tests/Austria/Salzburg/SalzburgTest.php | 13 +--- tests/Austria/Salzburg/StRupertsDayTest.php | 7 +- tests/Austria/SecondChristmasDayTest.php | 7 +- tests/Austria/Styria/StJosephsDayTest.php | 7 +- tests/Austria/Styria/StyriaTest.php | 13 +--- tests/Austria/Tyrol/StJosephsDayTest.php | 7 +- tests/Austria/Tyrol/TyrolTest.php | 13 +--- .../UpperAustria/StFloriansDayTest.php | 7 +- .../Austria/UpperAustria/UpperAustriaTest.php | 13 +--- tests/Austria/Vienna/StLeopoldsDayTest.php | 9 +-- tests/Austria/Vienna/ViennaTest.php | 13 +--- tests/Austria/Vorarlberg/StJosephsDayTest.php | 7 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 13 +--- tests/Base/TypographyTest.php | 1 + tests/Base/WeekendTest.php | 4 -- tests/Base/YasumiTest.php | 4 +- tests/Belgium/AllSaintsDayTest.php | 7 +- tests/Belgium/ArmisticeDayTest.php | 7 +- tests/Belgium/AscensionDayTest.php | 6 +- tests/Belgium/AssumptionOfMaryTest.php | 7 +- tests/Belgium/BelgiumTest.php | 13 +--- tests/Belgium/ChristmasTest.php | 7 +- tests/Belgium/EasterMondayTest.php | 6 +- tests/Belgium/EasterTest.php | 6 +- tests/Belgium/InternationalWorkersDayTest.php | 7 +- tests/Belgium/NationalDayTest.php | 7 +- tests/Belgium/NewYearsDayTest.php | 7 +- tests/Belgium/PentecostTest.php | 6 +- tests/Belgium/pentecostMondayTest.php | 6 +- tests/Bosnia/BosniaTest.php | 13 +--- tests/Bosnia/ChristmasDayTest.php | 7 +- tests/Bosnia/DayAfterNewYearsDay.php | 7 +- tests/Bosnia/EasterTest.php | 6 +- tests/Bosnia/IndependenceDayTest.php | 8 +-- tests/Bosnia/InternationalWorkersDayTest.php | 7 +- tests/Bosnia/NewYearsDayTest.php | 7 +- tests/Bosnia/OrthodoxChristmasDay.php | 7 +- tests/Bosnia/SecondLabourDay.php | 7 +- tests/Bosnia/StatehoodDayTest.php | 8 +-- tests/Brazil/AllSoulsDayTest.php | 8 +-- tests/Brazil/AshWednesdayTest.php | 6 +- tests/Brazil/BrazilTest.php | 13 +--- tests/Brazil/CarnavalMondayTest.php | 8 +-- tests/Brazil/CarnavalTuesdayTest.php | 8 +-- tests/Brazil/ChristmasDayTest.php | 6 +- tests/Brazil/CorpusChristiTest.php | 6 +- tests/Brazil/EasterTest.php | 6 +- tests/Brazil/GoodFridayTest.php | 6 +- tests/Brazil/IndependenceDayTest.php | 8 +-- tests/Brazil/InternationalWorkersDayTest.php | 6 +- tests/Brazil/NewYearsDayTest.php | 6 +- tests/Brazil/OurLadyOfAparecidaDayTest.php | 8 +-- .../Brazil/ProclamationOfRepublicDayTest.php | 8 +-- tests/Brazil/TiradentesDayTest.php | 8 +-- tests/Canada/Alberta/AlbertaTest.php | 13 +--- .../BritishColumbia/BritishColumbiaTest.php | 13 +--- tests/Canada/CanadaDayTest.php | 8 +-- tests/Canada/CanadaTest.php | 13 +--- tests/Canada/ChristmasDayTest.php | 6 +- tests/Canada/LabourDayTest.php | 8 +-- tests/Canada/Manitoba/ManitobaTest.php | 13 +--- .../Canada/NewBrunswick/NewBrunswickTest.php | 13 +--- tests/Canada/NewYearsDayTest.php | 6 +- .../NewfoundlandAndLabradorTest.php | 13 +--- .../NorthwestTerritoriesTest.php | 13 +--- tests/Canada/NovaScotia/NovaScotiaTest.php | 13 +--- tests/Canada/Nunavut/NunavutTest.php | 13 +--- tests/Canada/Ontario/OntarioTest.php | 13 +--- .../PrinceEdwardIslandTest.php | 13 +--- tests/Canada/Quebec/QuebecTest.php | 13 +--- tests/Canada/RemembranceDayTest.php | 8 +-- .../Canada/Saskatchewan/SaskatchewanTest.php | 13 +--- tests/Canada/ThanksgivingDayTest.php | 8 +-- .../Canada/TruthAndReconciliationDayTest.php | 8 +-- tests/Canada/Yukon/YukonTest.php | 13 +--- tests/Croatia/AllSaintsDayTest.php | 7 +- tests/Croatia/AntifascistStruggleDayTest.php | 8 +-- tests/Croatia/AssumptionOfMaryTest.php | 7 +- tests/Croatia/ChristmasDayTest.php | 7 +- tests/Croatia/CorpusChristiTest.php | 6 +- tests/Croatia/CroatiaTest.php | 13 +--- tests/Croatia/EasterMondayTest.php | 6 +- tests/Croatia/EasterTest.php | 6 +- tests/Croatia/EpiphanyTest.php | 7 +- tests/Croatia/HomelandThanksgivingDayTest.php | 8 +-- tests/Croatia/IndependenceDayTest.php | 10 ++- tests/Croatia/InternationalWorkersDayTest.php | 7 +- tests/Croatia/NewYearsDayTest.php | 7 +- tests/Croatia/RemembranceDayTest.php | 7 +- tests/Croatia/StStephensDayTest.php | 7 +- tests/Croatia/StatehoodDayTest.php | 8 +-- tests/CzechRepublic/ChristmasDayTest.php | 7 +- tests/CzechRepublic/ChristmasEveTest.php | 7 +- tests/CzechRepublic/CzechRepublicTest.php | 15 ++-- tests/CzechRepublic/CzechStateHoodDayTest.php | 7 +- tests/CzechRepublic/EasterMondayTest.php | 6 +- tests/CzechRepublic/GoodFridayTest.php | 6 +- .../IndependentCzechoslovakStateDayTest.php | 7 +- .../InternationalWorkersDayTest.php | 7 +- tests/CzechRepublic/JanHusDayTest.php | 7 +- tests/CzechRepublic/NewYearsDayTest.php | 7 +- .../RenewalOfIndependentCzechStateDayTest.php | 7 +- .../SaintsCyrilAndMethodiusDayTest.php | 7 +- .../CzechRepublic/SecondChristmasDayTest.php | 7 +- .../StruggleForFreedomAndDemocracyDayTest.php | 7 +- .../CzechRepublic/VictoryInEuropeDayTest.php | 7 +- tests/Denmark/AscensionDayTest.php | 6 +- tests/Denmark/ChristmasDayTest.php | 7 +- tests/Denmark/ChristmasEveTest.php | 7 +- tests/Denmark/ConstitutionDayTest.php | 8 +-- tests/Denmark/DenmarkTest.php | 13 ++-- tests/Denmark/EasterMondayTest.php | 6 +- tests/Denmark/EasterTest.php | 6 +- tests/Denmark/GoodFridayTest.php | 6 +- tests/Denmark/GreatPrayerDayTest.php | 8 +-- tests/Denmark/InternationalWorkersDayTest.php | 7 +- tests/Denmark/MaundyThursdayTest.php | 6 +- tests/Denmark/NewYearsDayTest.php | 7 +- tests/Denmark/NewYearsEveTest.php | 7 +- tests/Denmark/PentecostMondayTest.php | 6 +- tests/Denmark/PentecostTest.php | 6 +- tests/Denmark/SecondChristmasDayTest.php | 7 +- tests/Denmark/SummerTimeTest.php | 6 +- tests/Denmark/WinterTimeTest.php | 6 +- tests/Estonia/ChristmasDayTest.php | 7 +- tests/Estonia/ChristmasEveDayTest.php | 7 +- tests/Estonia/EasterDayTest.php | 6 +- tests/Estonia/EstoniaTest.php | 11 +-- tests/Estonia/GoodFridayDayTest.php | 6 +- tests/Estonia/IndependenceDayTest.php | 8 +-- tests/Estonia/InternationalWorkersDayTest.php | 7 +- tests/Estonia/NewYearsDayTest.php | 7 +- tests/Estonia/PentecostTest.php | 6 +- .../RestorationOfIndependenceDayTest.php | 8 +-- tests/Estonia/SecondChristmasDayTest.php | 7 +- tests/Estonia/StJohnsDayTest.php | 7 +- tests/Estonia/VictoryDayTest.php | 8 +-- tests/Finland/AllSaintsDayTest.php | 7 +- tests/Finland/AscensionDayTest.php | 6 +- tests/Finland/ChristmasDayTest.php | 7 +- tests/Finland/EasterMondayTest.php | 6 +- tests/Finland/EasterTest.php | 6 +- tests/Finland/EpiphanyTest.php | 7 +- tests/Finland/FinlandTest.php | 13 +--- tests/Finland/GoodFridayTest.php | 6 +- tests/Finland/IndependenceDayTest.php | 8 +-- tests/Finland/InternationalWorkersDayTest.php | 7 +- tests/Finland/NewYearsDayTest.php | 7 +- tests/Finland/PentecostTest.php | 6 +- tests/Finland/SecondChristmasDayTest.php | 7 +- tests/Finland/stJohnsDayTest.php | 8 +-- tests/France/AllSaintsDayTest.php | 7 +- tests/France/ArmisticeDayTest.php | 8 +-- tests/France/AscensionDayTest.php | 6 +- tests/France/AssumptionOfMaryTest.php | 7 +- tests/France/BasRhin/BasRhinTest.php | 13 +--- tests/France/BasRhin/GoodFridayTest.php | 6 +- tests/France/BasRhin/stStephensDayTest.php | 7 +- tests/France/BastilleDayTest.php | 8 +-- tests/France/ChristmasDayTest.php | 7 +- tests/France/EasterMondayTest.php | 6 +- tests/France/FranceTest.php | 13 +--- tests/France/HautRhin/GoodFridayTest.php | 6 +- tests/France/HautRhin/HautRhinTest.php | 13 +--- tests/France/HautRhin/stStephensDayTest.php | 7 +- tests/France/InternationalWorkersDayTest.php | 7 +- tests/France/Moselle/GoodFridayTest.php | 6 +- tests/France/Moselle/MoselleTest.php | 13 +--- tests/France/Moselle/stStephensDayTest.php | 7 +- tests/France/NewYearsDayTest.php | 7 +- tests/France/PentecostMondayTest.php | 6 +- tests/France/VictoryInEuropeDayTest.php | 8 +-- tests/Georgia/EasterTest.php | 6 +- tests/Georgia/GeorgiaTest.php | 13 +--- tests/Georgia/IndependenceDayTest.php | 6 -- tests/Georgia/InternationalWomensDayTest.php | 7 +- tests/Georgia/MtskhetobaDayTest.php | 7 +- tests/Georgia/NewYearsDayTest.php | 7 +- tests/Georgia/OrthodoxChristmasDayTest.php | 7 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 7 +- tests/Georgia/SecondNewYearDayTest.php | 7 +- tests/Georgia/StAndrewsDayTest.php | 7 +- tests/Georgia/StGeorgesDayTest.php | 7 +- tests/Georgia/StMarysDayTest.php | 7 +- tests/Georgia/UnityDayTest.php | 6 -- tests/Georgia/VictoryDayTest.php | 7 +- tests/Germany/AscensionDayTest.php | 6 +- .../BadenWurttemberg/AllSaintsDayTest.php | 7 +- .../BadenWurttemberg/BadenWurttembergTest.php | 13 +--- .../BadenWurttemberg/CorpusChristiTest.php | 6 +- .../Germany/BadenWurttemberg/EpiphanyTest.php | 7 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 7 +- tests/Germany/Bavaria/BavariaTest.php | 13 +--- tests/Germany/Bavaria/CorpusChristiTest.php | 6 +- tests/Germany/Bavaria/EpiphanyTest.php | 7 +- tests/Germany/Berlin/BerlinTest.php | 13 +--- .../Berlin/DayOfLiberation2020Test.php | 10 +-- .../Berlin/InternationalWomensDay2019Test.php | 10 ++- tests/Germany/Brandenburg/BrandenburgTest.php | 13 +--- .../Brandenburg/ReformationDayTest.php | 9 +-- tests/Germany/Bremen/BremenTest.php | 13 +--- tests/Germany/Bremen/ReformationDayTest.php | 9 +-- tests/Germany/ChristmasTest.php | 7 +- tests/Germany/EasterMondayTest.php | 6 +- tests/Germany/GermanUnityDayTest.php | 8 +-- tests/Germany/GermanyTest.php | 13 +--- tests/Germany/GoodFridayTest.php | 6 +- .../Germany/Hamburg/DayOfReformationTest.php | 9 +-- tests/Germany/Hamburg/HamburgTest.php | 13 +--- tests/Germany/Hesse/CorpusChristiTest.php | 6 +- tests/Germany/Hesse/HesseTest.php | 13 +--- tests/Germany/InternationalWorkersDayTest.php | 7 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 13 +--- .../LowerSaxony/ReformationDayTest.php | 9 +-- .../MecklenburgWesternPomeraniaTest.php | 13 +--- .../ReformationDayTest.php | 7 +- tests/Germany/NewYearsDayTest.php | 7 +- tests/Germany/NewYearsEveTest.php | 7 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 7 +- .../CorpusChristiTest.php | 6 +- .../NorthRhineWestphaliaTest.php | 13 +--- tests/Germany/PentecostMondayTest.php | 6 +- tests/Germany/PentecostTest.php | 6 +- tests/Germany/ReformationDay2017Test.php | 10 ++- .../RhinelandPalatinate/AllSaintsDayTest.php | 7 +- .../RhinelandPalatinate/CorpusChristiTest.php | 6 +- .../RhinelandPalatinateTest.php | 13 +--- tests/Germany/Saarland/AllSaintsDayTest.php | 7 +- .../Germany/Saarland/AssumptionOfMaryTest.php | 7 +- tests/Germany/Saarland/CorpusChristiTest.php | 6 +- tests/Germany/Saarland/SaarlandTest.php | 13 +--- tests/Germany/Saxony/ReformationDayTest.php | 9 +-- .../Saxony/RepentanceAndPrayerDayTest.php | 8 +-- tests/Germany/Saxony/SaxonyTest.php | 13 +--- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 7 +- .../SaxonyAnhalt/ReformationDayTest.php | 9 +-- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 13 +--- .../SchleswigHolstein/ReformationDayTest.php | 9 +-- .../SchleswigHolsteinTest.php | 13 +--- tests/Germany/SecondChristmasDayTest.php | 7 +- .../Germany/Thuringia/ReformationDayTest.php | 9 +-- tests/Germany/Thuringia/ThuringiaTest.php | 13 +--- .../Thuringia/WorldChildrensDayTest.php | 9 +-- tests/Greece/AnnunciationTest.php | 7 +- tests/Greece/AscensionDayTest.php | 6 +- tests/Greece/AssumptionOfMaryTest.php | 7 +- tests/Greece/ChristmasDayTest.php | 7 +- tests/Greece/CleanMondayTest.php | 6 +- tests/Greece/EasterMondayTest.php | 6 +- tests/Greece/EasterTest.php | 6 +- tests/Greece/EpiphanyTest.php | 7 +- tests/Greece/GreeceTest.php | 13 +--- tests/Greece/IndepencenceDayTest.php | 8 +-- tests/Greece/InternationalWorkersDayTest.php | 7 +- tests/Greece/NewYearsDayTest.php | 7 +- tests/Greece/OhiDayTest.php | 8 +-- tests/Greece/PentecostMondayTest.php | 6 +- tests/Greece/PentecostTest.php | 6 +- tests/Greece/PolytechnioTest.php | 8 +-- tests/Greece/ThreeHolyHierarchsTest.php | 7 +- tests/Greece/goodFridayTest.php | 6 +- tests/Hungary/AllSaintsDayTest.php | 7 +- tests/Hungary/ChristmasTest.php | 7 +- tests/Hungary/EasterMondayTest.php | 6 +- tests/Hungary/EasterTest.php | 6 +- tests/Hungary/HungaryTest.php | 13 +--- tests/Hungary/InternationalWorkersDayTest.php | 7 +- tests/Hungary/MemorialDay1848Test.php | 8 +-- tests/Hungary/MemorialDay1956Test.php | 8 +-- tests/Hungary/NewYearsDayTest.php | 7 +- tests/Hungary/PentecostMondayTest.php | 6 +- tests/Hungary/PentecostTest.php | 6 +- tests/Hungary/SecondChristmasDayTest.php | 7 +- tests/Hungary/StateFoundationDayTest.php | 8 +-- tests/Ireland/AugustHolidayTest.php | 6 +- tests/Ireland/ChristmasDayTest.php | 6 +- tests/Ireland/EasterMondayTest.php | 6 +- tests/Ireland/EasterTest.php | 6 +- tests/Ireland/GoodFridayTest.php | 6 +- tests/Ireland/IrelandTest.php | 13 +--- tests/Ireland/JuneHolidayTest.php | 8 +-- tests/Ireland/MayDayTest.php | 8 +-- tests/Ireland/NewYearsDayTest.php | 8 +-- tests/Ireland/OctoberHolidayTest.php | 8 +-- tests/Ireland/PentecostTest.php | 6 +- tests/Ireland/StPatricksDayTest.php | 8 +-- tests/Ireland/StStephensDayTest.php | 6 +- tests/Ireland/pentecostMondayTest.php | 8 +-- tests/Italy/AllSaintsDayTest.php | 7 +- tests/Italy/AssumptionOfMaryTest.php | 7 +- tests/Italy/ChristmasTest.php | 7 +- tests/Italy/EasterMondayTest.php | 6 +- tests/Italy/EasterTest.php | 6 +- tests/Italy/EpiphanyTest.php | 7 +- tests/Italy/ImmaculateConceptionTest.php | 7 +- tests/Italy/InternationalWorkersDayTest.php | 7 +- tests/Italy/ItalyTest.php | 13 +--- tests/Italy/LiberationDayTest.php | 8 +-- tests/Italy/NewYearsDayTest.php | 7 +- tests/Italy/RepublicDayTest.php | 8 +-- tests/Italy/stStephensDayTest.php | 7 +- tests/Japan/AutumnalEquinoxDayTest.php | 10 ++- tests/Japan/ChildrensDayTest.php | 9 +-- tests/Japan/ComingOfAgeDayTest.php | 9 +-- tests/Japan/ConstitutionMemorialDayTest.php | 9 +-- tests/Japan/CoronationDayTest.php | 10 +-- tests/Japan/CultureDayTest.php | 9 +-- tests/Japan/EmperorsBirthdayTest.php | 13 +--- .../EnthronementProclamationCeremonyTest.php | 10 +-- tests/Japan/GreeneryDayTest.php | 11 +-- tests/Japan/JapanTest.php | 15 +--- tests/Japan/LabourThanksgivingDayTest.php | 9 +-- tests/Japan/MarineDayTest.php | 11 +-- tests/Japan/MountainDayTest.php | 11 +-- tests/Japan/NationalFoundationDayTest.php | 9 +-- tests/Japan/NewYearsDayTest.php | 9 +-- tests/Japan/PublicBridgeDayTest.php | 6 -- tests/Japan/RespectForTheAgedDayTest.php | 10 +-- tests/Japan/ShowaDayTest.php | 9 +-- tests/Japan/SportsDayTest.php | 14 ++-- tests/Japan/VernalEquinoxDayTest.php | 10 ++- tests/Latvia/ChristmasDayTest.php | 7 +- tests/Latvia/ChristmasEveDayTest.php | 7 +- tests/Latvia/EasterDayTest.php | 6 +- tests/Latvia/EasterMondayDayTest.php | 6 +- tests/Latvia/GoodFridayDayTest.php | 6 +- tests/Latvia/InternationalWorkersDayTest.php | 7 +- tests/Latvia/LatviaTest.php | 11 +-- tests/Latvia/MidsummerEveDayTest.php | 7 +- tests/Latvia/NewYearsDayTest.php | 7 +- tests/Latvia/NewYearsEveDayTest.php | 7 +- ...oclamationOfTheRepublicOfLatviaDayTest.php | 8 +-- .../RestorationOfIndependenceDayTest.php | 8 +-- tests/Latvia/SecondChristmasDayTest.php | 7 +- tests/Latvia/StJohnsDayTest.php | 7 +- tests/Lithuania/AllSaintsDayTest.php | 7 +- tests/Lithuania/AllSoulsDayTest.php | 8 +-- tests/Lithuania/AssumptionOfMaryDayTest.php | 7 +- tests/Lithuania/ChristmasDayTest.php | 7 +- tests/Lithuania/ChristmasEveDayTest.php | 7 +- tests/Lithuania/EasterDayTest.php | 6 +- tests/Lithuania/EasterMondayDayTest.php | 6 +- .../Lithuania/InternationalWorkersDayTest.php | 7 +- tests/Lithuania/LithuaniaTest.php | 11 +-- tests/Lithuania/NewYearsDayTest.php | 7 +- ...rationOfIndependenceOfLithuaniaDayTest.php | 8 +-- ...estorationOfTheStateOfLithuaniaDayTest.php | 8 +-- tests/Lithuania/SecondChristmasDayTest.php | 7 +- tests/Lithuania/StJohnsDayTest.php | 7 +- tests/Lithuania/StatehoodDayTest.php | 8 +-- tests/Luxembourg/AllSaintsDayTest.php | 7 +- tests/Luxembourg/AscensionDayTest.php | 6 +- tests/Luxembourg/AssumptionOfMaryTest.php | 7 +- tests/Luxembourg/ChristmasDayTest.php | 7 +- tests/Luxembourg/EasterMondayTest.php | 6 +- tests/Luxembourg/EuropeDayTest.php | 8 +-- .../InternationalWorkersDayTest.php | 7 +- tests/Luxembourg/LuxembourgTest.php | 13 ++-- tests/Luxembourg/NationalDayTest.php | 7 +- tests/Luxembourg/NewYearsDayTest.php | 7 +- tests/Luxembourg/PentecostMondayTest.php | 6 +- tests/Luxembourg/SecondChristmasDayTest.php | 7 +- tests/Netherlands/AscensionDayTest.php | 6 +- tests/Netherlands/AshWednesdayTest.php | 6 +- tests/Netherlands/ChristmasDayTest.php | 7 +- tests/Netherlands/CommemorationDayTest.php | 8 +-- tests/Netherlands/EasterMondayTest.php | 6 +- tests/Netherlands/EasterTest.php | 6 +- tests/Netherlands/EpiphanyTest.php | 7 +- tests/Netherlands/FathersDayTest.php | 6 +- tests/Netherlands/GoodFridayTest.php | 6 +- tests/Netherlands/HalloweenTest.php | 7 +- .../InternationalWorkersDayTest.php | 7 +- tests/Netherlands/KingsDayTest.php | 9 +-- tests/Netherlands/LiberationDayTest.php | 8 +-- tests/Netherlands/MothersDayTest.php | 6 +- tests/Netherlands/NetherlandsTest.php | 15 ++-- tests/Netherlands/NewYearsDayTest.php | 7 +- tests/Netherlands/PentecostTest.php | 6 +- tests/Netherlands/QueensDayTest.php | 14 ++-- tests/Netherlands/SummertimeTest.php | 6 +- tests/Netherlands/ValentinesDayTest.php | 7 +- tests/Netherlands/WintertimeTest.php | 6 +- tests/Netherlands/WorldAnimalDayTest.php | 8 +-- tests/Netherlands/carnivalDayTest.php | 6 +- tests/Netherlands/pentecostMondayTest.php | 6 +- tests/Netherlands/princesDayTest.php | 6 +- tests/Netherlands/secondCarnivalDay.php | 6 +- tests/Netherlands/secondChristmasdayTest.php | 7 +- tests/Netherlands/stMartinsDayTest.php | 7 +- tests/Netherlands/stNicholasDayTest.php | 7 +- tests/Netherlands/thirdCarnivalDay.php | 6 +- tests/NewZealand/AnzacDayTest.php | 8 +-- tests/NewZealand/BoxingDayTest.php | 6 +- tests/NewZealand/ChristmasDayTest.php | 6 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 6 +- tests/NewZealand/EasterMondayTest.php | 6 +- tests/NewZealand/GoodFridayTest.php | 6 +- tests/NewZealand/LabourDayTest.php | 8 +-- tests/NewZealand/NewYearsDayTest.php | 6 +- tests/NewZealand/NewZealandTest.php | 15 ++-- tests/NewZealand/QueensBirthdayTest.php | 9 +-- tests/NewZealand/WaitangiDayTest.php | 8 +-- tests/Norway/AscensionDayTest.php | 6 +- tests/Norway/ChristmasDayTest.php | 7 +- tests/Norway/ConstitutionDayTest.php | 8 +-- tests/Norway/EasterMondayTest.php | 6 +- tests/Norway/EasterTest.php | 6 +- tests/Norway/GoodFridayTest.php | 6 +- tests/Norway/InternationalWorkersDayTest.php | 7 +- tests/Norway/MaundyThursdayTest.php | 6 +- tests/Norway/NewYearsDayTest.php | 7 +- tests/Norway/NorwayTest.php | 13 +--- tests/Norway/PentecostMondayTest.php | 6 +- tests/Norway/PentecostTest.php | 6 +- tests/Norway/SecondChristmasDayTest.php | 7 +- tests/Poland/AllSaintsDayTest.php | 7 +- tests/Poland/AssumptionOfMaryTest.php | 7 +- tests/Poland/ChristmasTest.php | 7 +- tests/Poland/ConstitutionDayTest.php | 8 +-- tests/Poland/CorpusChristiTest.php | 6 +- tests/Poland/EasterMondayTest.php | 6 +- tests/Poland/EasterTest.php | 6 +- tests/Poland/EpiphanyTest.php | 7 +- tests/Poland/IndependenceDayTest.php | 8 +-- tests/Poland/InternationalWorkersDayTest.php | 7 +- tests/Poland/NewYearsDayTest.php | 7 +- tests/Poland/PentecostTest.php | 6 +- tests/Poland/PolandTest.php | 13 +--- tests/Poland/SecondChristmasDayTest.php | 7 +- tests/Portugal/AllSaintsDayTest.php | 10 +-- tests/Portugal/AssumptionOfMaryTest.php | 7 +- tests/Portugal/CarnationRevolutionDayTest.php | 8 +-- tests/Portugal/ChristmasTest.php | 7 +- tests/Portugal/CorpusChristiTest.php | 8 +-- tests/Portugal/EasterTest.php | 6 +- tests/Portugal/GoodFridayTest.php | 6 +- tests/Portugal/ImmaculateConceptionTest.php | 7 +- .../Portugal/InternationalWorkersDayTest.php | 7 +- tests/Portugal/NewYearsDayTest.php | 7 +- tests/Portugal/PortugalDayTest.php | 9 +-- tests/Portugal/PortugalTest.php | 13 +--- tests/Portugal/PortugueseRepublicDayTest.php | 71 ++++++++++--------- .../RestorationOfIndependenceTest.php | 14 ++-- tests/Romania/AssumptionOfMaryTest.php | 8 +-- tests/Romania/ChildrensDayTest.php | 8 +-- tests/Romania/ChristmasDayTest.php | 7 +- tests/Romania/ConstantinBrancusiDayTest.php | 8 +-- tests/Romania/DayAfterNewYearsDayTest.php | 7 +- tests/Romania/EasterMondayTest.php | 6 +- tests/Romania/EasterTest.php | 6 +- tests/Romania/InternationalWorkersDayTest.php | 7 +- tests/Romania/NationalDayTest.php | 10 +-- tests/Romania/NewYearsDayTest.php | 7 +- tests/Romania/PentecostMondayTest.php | 8 +-- tests/Romania/PentecostTest.php | 8 +-- tests/Romania/RomaniaTest.php | 13 +--- tests/Romania/SecondChristmasDayTest.php | 7 +- tests/Romania/StAndrewsDayTest.php | 8 +-- tests/Romania/UnitedPrincipalitiesDayTest.php | 8 +-- .../Russia/DefenceOfTheFatherlandDayTest.php | 8 +-- tests/Russia/InternationalWomensDayTest.php | 7 +- tests/Russia/NewYearHolidaysDay2Test.php | 7 +- tests/Russia/NewYearHolidaysDay3Test.php | 7 +- tests/Russia/NewYearHolidaysDay4Test.php | 7 +- tests/Russia/NewYearHolidaysDay5Test.php | 7 +- tests/Russia/NewYearHolidaysDay6Test.php | 7 +- tests/Russia/NewYearHolidaysDay8Test.php | 7 +- tests/Russia/NewYearsDayTest.php | 7 +- tests/Russia/OrthodoxChristmasDayTest.php | 7 +- tests/Russia/RussiaDayTest.php | 8 +-- tests/Russia/RussiaTest.php | 11 +-- tests/Russia/SpringAndLabourDayTest.php | 7 +- tests/Russia/UnityDayTest.php | 8 +-- tests/Russia/VictoryDayTest.php | 7 +- tests/Slovakia/AllSaintsDayTest.php | 7 +- tests/Slovakia/ChristmasDayTest.php | 7 +- tests/Slovakia/ChristmasEveTest.php | 7 +- tests/Slovakia/EasterMondayTest.php | 7 +- tests/Slovakia/EpiphanyTest.php | 7 +- tests/Slovakia/GoodFridayTest.php | 7 +- .../Slovakia/InternationalWorkersDayTest.php | 7 +- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 7 +- .../SaintsCyrilAndMethodiusDayTest.php | 7 +- tests/Slovakia/SecondChristmasDayTest.php | 7 +- tests/Slovakia/SlovakConstitutionDayTest.php | 7 +- tests/Slovakia/SlovakIndependeceDayTest.php | 7 +- .../SlovakNationalUprisingDayTest.php | 7 +- tests/Slovakia/SlovakiaTest.php | 13 +--- .../StruggleForFreedomAndDemocracyDayTest.php | 7 +- tests/Slovakia/VictoryInEuropeDayTest.php | 7 +- tests/SouthAfrica/ChristmasDayTest.php | 8 +-- tests/SouthAfrica/FamilyDayTest.php | 8 +-- tests/SouthAfrica/FreedomDayTest.php | 8 +-- tests/SouthAfrica/GoodFridayTest.php | 8 +-- tests/SouthAfrica/HeritageDayTest.php | 8 +-- tests/SouthAfrica/HumanRightsDayTest.php | 8 +-- .../MunicipalElections2016DayTest.php | 10 ++- tests/SouthAfrica/NationalWomensDayTest.php | 8 +-- tests/SouthAfrica/NewYearsDayTest.php | 8 +-- tests/SouthAfrica/ReconciliationDayTest.php | 8 +-- tests/SouthAfrica/SecondChristmasDayTest.php | 8 +-- tests/SouthAfrica/SouthAfricaTest.php | 15 ++-- .../SubstituteDayOfGoodwillTest.php | 10 ++- tests/SouthAfrica/WorkersDayTest.php | 8 +-- tests/SouthAfrica/YouthDayTest.php | 8 +-- tests/SouthKorea/ArborDayTest.php | 10 ++- tests/SouthKorea/ArmedForcesDayTest.php | 10 ++- tests/SouthKorea/BuddhasBirthdayTest.php | 8 +-- tests/SouthKorea/ChildrensDayTest.php | 10 +-- tests/SouthKorea/ChristmasDayTest.php | 8 +-- tests/SouthKorea/ChuseokTest.php | 10 +-- tests/SouthKorea/ConstitutionDayTest.php | 10 ++- tests/SouthKorea/GaecheonjeolTest.php | 10 +-- tests/SouthKorea/HangulDayTest.php | 9 +-- .../IndependenceMovementDayTest.php | 9 +-- tests/SouthKorea/LiberationDayTest.php | 9 +-- tests/SouthKorea/MemorialDayTest.php | 8 +-- tests/SouthKorea/NewYearsDayTest.php | 10 ++- tests/SouthKorea/SeollalTest.php | 9 +-- tests/SouthKorea/SouthKoreaTest.php | 15 ++-- tests/Spain/AllSaintsDayTest.php | 7 +- tests/Spain/Andalusia/AndalusiaDayTest.php | 8 +-- tests/Spain/Andalusia/AndalusiaTest.php | 13 +--- tests/Spain/Aragon/AragonTest.php | 13 +--- tests/Spain/Aragon/StGeorgesDayTest.php | 6 +- tests/Spain/AssumptionOfMaryTest.php | 7 +- tests/Spain/Asturias/AsturiasDayTest.php | 8 +-- tests/Spain/Asturias/AsturiasTest.php | 13 +--- .../BalearicIslandsDayTest.php | 8 +-- .../BalearicIslands/BalearicIslandsTest.php | 13 +--- .../BasqueCountry/BasqueCountryDayTest.php | 10 ++- .../Spain/BasqueCountry/BasqueCountryTest.php | 13 +--- .../CanaryIslands/CanaryIslandsDayTest.php | 8 +-- .../Spain/CanaryIslands/CanaryIslandsTest.php | 13 +--- tests/Spain/Cantabria/CantabriaDayTest.php | 8 +-- tests/Spain/Cantabria/CantabriaTest.php | 13 +--- .../CastileAndLeon/CastileAndLeonDayTest.php | 8 +-- .../CastileAndLeon/CastileAndLeonTest.php | 13 +--- .../CastillaLaManchaDayTest.php | 8 +-- .../CastillaLaMancha/CastillaLaManchaTest.php | 13 +--- tests/Spain/Catalonia/CataloniaTest.php | 13 +--- .../Catalonia/nationalCataloniaDayTest.php | 8 +-- tests/Spain/Catalonia/stJohnsDayTest.php | 7 +- tests/Spain/Ceuta/CeutaTest.php | 13 +--- tests/Spain/Ceuta/ceutaDayTest.php | 8 +-- tests/Spain/ChristmasTest.php | 7 +- .../CommunityOfMadridTest.php | 13 +--- .../DosdeMayoUprisingDayTest.php | 6 +- tests/Spain/ConstitutionDayTest.php | 8 +-- tests/Spain/EasterMondayTest.php | 6 +- tests/Spain/EpiphanyTest.php | 7 +- .../Spain/Extremadura/ExtremaduraDayTest.php | 8 +-- tests/Spain/Extremadura/ExtremaduraTest.php | 13 +--- tests/Spain/Galicia/GaliciaTest.php | 13 +--- .../Galicia/GalicianLiteratureDayTest.php | 8 +-- tests/Spain/Galicia/stJamesDayTest.php | 8 +-- tests/Spain/GoodFridayTest.php | 6 +- tests/Spain/ImmaculateConceptionTest.php | 7 +- tests/Spain/InternationalWorkersDayTest.php | 7 +- tests/Spain/LaRioja/LaRiojaDayTest.php | 8 +-- tests/Spain/LaRioja/LaRiojaTest.php | 13 +--- tests/Spain/MaundyThursdayTest.php | 6 +- tests/Spain/Melilla/MelillaTest.php | 13 +--- tests/Spain/NationalDayTest.php | 8 +-- tests/Spain/Navarre/NavarreTest.php | 13 +--- tests/Spain/NewYearsDayTest.php | 7 +- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 8 +-- .../RegionOfMurcia/RegionOfMurciaTest.php | 13 +--- tests/Spain/SpainTest.php | 13 +--- .../ValencianCommunityDayTest.php | 8 +-- .../ValencianCommunityTest.php | 13 +--- tests/Spain/ValentinesDayTest.php | 7 +- tests/Spain/stJosephsDayTest.php | 7 +- tests/Sweden/AllSaintsDayTest.php | 7 +- tests/Sweden/AllSaintsEveTest.php | 7 +- tests/Sweden/AscensionDayTest.php | 6 +- tests/Sweden/ChristmasDayTest.php | 7 +- tests/Sweden/ChristmasEveTest.php | 7 +- tests/Sweden/EasterMondayTest.php | 6 +- tests/Sweden/EasterTest.php | 6 +- tests/Sweden/EpiphanyEveTest.php | 7 +- tests/Sweden/EpiphanyTest.php | 7 +- tests/Sweden/GoodFridayTest.php | 6 +- tests/Sweden/InternationalWorkersDayTest.php | 7 +- tests/Sweden/NationalDayTest.php | 10 ++- tests/Sweden/NewYearsDayTest.php | 7 +- tests/Sweden/NewYearsEveTest.php | 7 +- tests/Sweden/PentecostTest.php | 6 +- tests/Sweden/SecondChristmasDayTest.php | 7 +- tests/Sweden/StJohnsDayTest.php | 7 +- tests/Sweden/StJohnsEveTest.php | 7 +- tests/Sweden/SwedenTest.php | 13 +--- tests/Sweden/WalpurgisEveTest.php | 7 +- tests/Switzerland/Aargau/AargauTest.php | 17 ++--- tests/Switzerland/Aargau/AscensionDayTest.php | 6 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 7 +- tests/Switzerland/Aargau/GoodFridayTest.php | 6 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 7 +- .../AppenzellAusserrhodenTest.php | 17 ++--- .../AscensionDayTest.php | 6 +- .../ChristmasDayTest.php | 7 +- .../EasterMondayTest.php | 6 +- .../AppenzellAusserrhoden/GoodFridayTest.php | 6 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 7 +- .../PentecostMondayTest.php | 6 +- .../StStephensDayTest.php | 7 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 7 +- .../AppenzellInnerrhodenTest.php | 17 ++--- .../AppenzellInnerrhoden/AscensionDayTest.php | 6 +- .../AssumptionOfMaryTest.php | 7 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 7 +- .../CorpusChristiTest.php | 6 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 6 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 6 +- .../ImmaculateConceptionTest.php | 7 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 7 +- .../PentecostMondayTest.php | 6 +- .../StStephensDayTest.php | 7 +- .../BaselLandschaft/AscensionDayTest.php | 6 +- .../BaselLandschaft/BaselLandschaftTest.php | 17 ++--- .../BaselLandschaft/ChristmasDayTest.php | 7 +- .../BaselLandschaft/EasterMondayTest.php | 6 +- .../BaselLandschaft/GoodFridayTest.php | 6 +- .../BaselLandschaft/NewYearsDayTest.php | 7 +- .../BaselLandschaft/PentecostMondayTest.php | 6 +- .../BaselLandschaft/StStephensDayTest.php | 7 +- .../BaselLandschaft/WorkersDayTest.php | 6 +- .../BaselStadt/AscensionDayTest.php | 6 +- .../Switzerland/BaselStadt/BaselStadtTest.php | 17 ++--- .../BaselStadt/ChristmasDayTest.php | 7 +- .../BaselStadt/EasterMondayTest.php | 6 +- .../Switzerland/BaselStadt/GoodFridayTest.php | 6 +- .../BaselStadt/NewYearsDayTest.php | 7 +- .../BaselStadt/PentecostMondayTest.php | 6 +- .../BaselStadt/StStephensDayTest.php | 7 +- .../Switzerland/BaselStadt/WorkersDayTest.php | 6 +- tests/Switzerland/Bern/AscensionDayTest.php | 6 +- tests/Switzerland/Bern/BerchtoldsTagTest.php | 6 +- tests/Switzerland/Bern/BernTest.php | 17 ++--- tests/Switzerland/Bern/ChristmasDayTest.php | 7 +- tests/Switzerland/Bern/EasterMondayTest.php | 6 +- tests/Switzerland/Bern/GoodFridayTest.php | 6 +- tests/Switzerland/Bern/NewYearsDayTest.php | 7 +- .../Switzerland/Bern/PentecostMondayTest.php | 6 +- tests/Switzerland/Bern/StStephensDayTest.php | 7 +- .../Switzerland/Fribourg/AllSaintsDayTest.php | 7 +- .../Switzerland/Fribourg/AscensionDayTest.php | 6 +- .../Fribourg/AssumptionOfMaryTest.php | 7 +- .../Fribourg/BerchtoldsTagTest.php | 6 +- .../Switzerland/Fribourg/ChristmasDayTest.php | 7 +- .../Fribourg/CorpusChristiTest.php | 6 +- .../Switzerland/Fribourg/December26thTest.php | 6 +- .../Switzerland/Fribourg/EasterMondayTest.php | 6 +- tests/Switzerland/Fribourg/FribourgTest.php | 17 ++--- tests/Switzerland/Fribourg/GoodFridayTest.php | 6 +- .../Fribourg/ImmaculateConceptionTest.php | 7 +- .../Switzerland/Fribourg/NewYearsDayTest.php | 7 +- .../Fribourg/PentecostMondayTest.php | 6 +- tests/Switzerland/Geneva/AscensionDayTest.php | 6 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 7 +- tests/Switzerland/Geneva/EasterMondayTest.php | 6 +- tests/Switzerland/Geneva/GenevaTest.php | 17 ++--- tests/Switzerland/Geneva/GoodFridayTest.php | 6 +- .../Switzerland/Geneva/JeuneGenevoisTest.php | 9 +-- tests/Switzerland/Geneva/NewYearsDayTest.php | 7 +- .../Geneva/PentecostMondayTest.php | 6 +- .../Geneva/RestaurationGenevoiseTest.php | 6 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 7 +- tests/Switzerland/Glarus/AscensionDayTest.php | 6 +- .../Switzerland/Glarus/BerchtoldsTagTest.php | 6 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 7 +- tests/Switzerland/Glarus/EasterMondayTest.php | 6 +- tests/Switzerland/Glarus/GlarusTest.php | 17 ++--- tests/Switzerland/Glarus/GoodFridayTest.php | 6 +- .../Switzerland/Glarus/NafelserFahrtTest.php | 8 +-- tests/Switzerland/Glarus/NewYearsDayTest.php | 7 +- .../Glarus/PentecostMondayTest.php | 6 +- .../Switzerland/Glarus/StStephensDayTest.php | 7 +- .../Switzerland/Grisons/AscensionDayTest.php | 6 +- .../Switzerland/Grisons/ChristmasDayTest.php | 7 +- .../Switzerland/Grisons/EasterMondayTest.php | 6 +- tests/Switzerland/Grisons/GoodFridayTest.php | 6 +- tests/Switzerland/Grisons/GrisonsTest.php | 17 ++--- tests/Switzerland/Grisons/NewYearsDayTest.php | 7 +- .../Grisons/PentecostMondayTest.php | 6 +- .../Switzerland/Grisons/StStephensDayTest.php | 7 +- tests/Switzerland/Jura/AllSaintsDayTest.php | 7 +- tests/Switzerland/Jura/AscensionDayTest.php | 6 +- .../Switzerland/Jura/AssumptionOfMaryTest.php | 7 +- tests/Switzerland/Jura/BerchtoldsTagTest.php | 6 +- tests/Switzerland/Jura/BettagsMontagTest.php | 8 +-- tests/Switzerland/Jura/ChristmasDayTest.php | 7 +- tests/Switzerland/Jura/CorpusChristiTest.php | 6 +- tests/Switzerland/Jura/EasterMondayTest.php | 6 +- tests/Switzerland/Jura/EasterTest.php | 6 +- tests/Switzerland/Jura/GoodFridayTest.php | 6 +- tests/Switzerland/Jura/JuraTest.php | 17 ++--- tests/Switzerland/Jura/NewYearsDayTest.php | 7 +- .../Switzerland/Jura/PentecostMondayTest.php | 6 +- tests/Switzerland/Jura/PentecostTest.php | 6 +- .../Jura/PlebisciteJurassienTest.php | 8 +-- tests/Switzerland/Jura/WorkersDayTest.php | 6 +- .../Switzerland/Lucerne/AllSaintsDayTest.php | 7 +- .../Switzerland/Lucerne/AscensionDayTest.php | 6 +- .../Lucerne/AssumptionOfMaryTest.php | 7 +- .../Switzerland/Lucerne/BerchtoldsTagTest.php | 6 +- .../Switzerland/Lucerne/ChristmasDayTest.php | 7 +- .../Switzerland/Lucerne/CorpusChristiTest.php | 6 +- .../Switzerland/Lucerne/EasterMondayTest.php | 6 +- tests/Switzerland/Lucerne/GoodFridayTest.php | 6 +- .../Lucerne/ImmaculateConceptionTest.php | 7 +- tests/Switzerland/Lucerne/LucerneTest.php | 17 ++--- tests/Switzerland/Lucerne/NewYearsDayTest.php | 7 +- .../Lucerne/PentecostMondayTest.php | 6 +- .../Switzerland/Lucerne/StStephensDayTest.php | 7 +- .../Neuchatel/AscensionDayTest.php | 6 +- .../Neuchatel/BettagsMontagTest.php | 8 +-- .../Neuchatel/ChristmasDayTest.php | 7 +- .../Neuchatel/December26thTest.php | 6 -- .../Neuchatel/EasterMondayTest.php | 6 +- .../Switzerland/Neuchatel/GoodFridayTest.php | 6 +- .../Neuchatel/InstaurationRepubliqueTest.php | 8 +-- .../Switzerland/Neuchatel/January2ndTest.php | 6 -- tests/Switzerland/Neuchatel/NeuchatelTest.php | 17 ++--- .../Switzerland/Neuchatel/NewYearsDayTest.php | 7 +- .../Neuchatel/PentecostMondayTest.php | 6 +- .../Switzerland/Neuchatel/WorkersDayTest.php | 6 +- .../Nidwalden/AllSaintsDayTest.php | 7 +- .../Nidwalden/AscensionDayTest.php | 6 +- .../Nidwalden/AssumptionOfMaryTest.php | 7 +- .../Nidwalden/ChristmasDayTest.php | 7 +- .../Nidwalden/CorpusChristiTest.php | 6 +- .../Nidwalden/EasterMondayTest.php | 6 +- .../Switzerland/Nidwalden/GoodFridayTest.php | 6 +- .../Nidwalden/ImmaculateConceptionTest.php | 7 +- .../Switzerland/Nidwalden/NewYearsDayTest.php | 7 +- tests/Switzerland/Nidwalden/NidwaldenTest.php | 17 ++--- .../Nidwalden/PentecostMondayTest.php | 6 +- .../Switzerland/Nidwalden/StJosephDayTest.php | 7 +- .../Nidwalden/StStephensDayTest.php | 7 +- .../Switzerland/Obwalden/AllSaintsDayTest.php | 7 +- .../Switzerland/Obwalden/AscensionDayTest.php | 6 +- .../Obwalden/AssumptionOfMaryTest.php | 7 +- .../Obwalden/BerchtoldsTagTest.php | 6 +- .../Obwalden/BruderKlausenFestTest.php | 9 +-- .../Switzerland/Obwalden/ChristmasDayTest.php | 7 +- .../Obwalden/CorpusChristiTest.php | 6 +- .../Switzerland/Obwalden/EasterMondayTest.php | 6 +- tests/Switzerland/Obwalden/GoodFridayTest.php | 6 +- .../Obwalden/ImmaculateConceptionTest.php | 7 +- .../Switzerland/Obwalden/NewYearsDayTest.php | 7 +- tests/Switzerland/Obwalden/ObwaldenTest.php | 17 ++--- .../Obwalden/PentecostMondayTest.php | 6 +- .../Obwalden/StStephensDayTest.php | 7 +- .../Schaffhausen/AscensionDayTest.php | 6 +- .../Schaffhausen/BerchtoldsTagTest.php | 6 +- .../Schaffhausen/ChristmasDayTest.php | 7 +- .../Schaffhausen/EasterMondayTest.php | 6 +- .../Schaffhausen/GoodFridayTest.php | 6 +- .../Schaffhausen/NewYearsDayTest.php | 7 +- .../Schaffhausen/PentecostMondayTest.php | 6 +- .../Schaffhausen/SchaffhausenTest.php | 17 ++--- .../Schaffhausen/StStephensDayTest.php | 7 +- .../Schaffhausen/WorkersDayTest.php | 6 +- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 7 +- tests/Switzerland/Schwyz/AscensionDayTest.php | 6 +- .../Schwyz/AssumptionOfMaryTest.php | 7 +- tests/Switzerland/Schwyz/ChristmasDayTest.php | 7 +- .../Switzerland/Schwyz/CorpusChristiTest.php | 6 +- tests/Switzerland/Schwyz/EasterMondayTest.php | 6 +- tests/Switzerland/Schwyz/EpiphanyTest.php | 7 +- tests/Switzerland/Schwyz/GoodFridayTest.php | 6 +- .../Schwyz/ImmaculateConceptionTest.php | 7 +- tests/Switzerland/Schwyz/NewYearsDayTest.php | 7 +- .../Schwyz/PentecostMondayTest.php | 6 +- tests/Switzerland/Schwyz/SchwyzTest.php | 17 ++--- tests/Switzerland/Schwyz/StJosephDayTest.php | 7 +- .../Switzerland/Schwyz/StStephensDayTest.php | 7 +- .../Solothurn/AscensionDayTest.php | 6 +- .../Solothurn/BerchtoldsTagTest.php | 6 +- .../Solothurn/ChristmasDayTest.php | 7 +- .../Switzerland/Solothurn/GoodFridayTest.php | 6 +- .../Switzerland/Solothurn/NewYearsDayTest.php | 7 +- tests/Switzerland/Solothurn/SolothurnTest.php | 17 ++--- .../Switzerland/StGallen/AllSaintsDayTest.php | 7 +- .../Switzerland/StGallen/AscensionDayTest.php | 6 +- .../Switzerland/StGallen/ChristmasDayTest.php | 7 +- .../Switzerland/StGallen/EasterMondayTest.php | 6 +- tests/Switzerland/StGallen/GoodFridayTest.php | 6 +- .../Switzerland/StGallen/NewYearsDayTest.php | 7 +- .../StGallen/PentecostMondayTest.php | 6 +- tests/Switzerland/StGallen/StGallenTest.php | 17 ++--- .../StGallen/StStephensDayTest.php | 7 +- tests/Switzerland/SwissNationalDayTest.php | 14 ++-- tests/Switzerland/SwitzerlandTest.php | 15 ++-- .../Switzerland/Thurgau/AscensionDayTest.php | 6 +- .../Switzerland/Thurgau/BerchtoldsTagTest.php | 6 +- .../Switzerland/Thurgau/ChristmasDayTest.php | 7 +- .../Switzerland/Thurgau/EasterMondayTest.php | 6 +- tests/Switzerland/Thurgau/GoodFridayTest.php | 6 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 7 +- .../Thurgau/PentecostMondayTest.php | 6 +- .../Switzerland/Thurgau/StStephensDayTest.php | 7 +- tests/Switzerland/Thurgau/ThurgauTest.php | 17 ++--- tests/Switzerland/Thurgau/WorkersDayTest.php | 6 +- tests/Switzerland/Ticino/AllSaintsDayTest.php | 7 +- tests/Switzerland/Ticino/AscensionDayTest.php | 6 +- .../Ticino/AssumptionOfMaryTest.php | 7 +- tests/Switzerland/Ticino/ChristmasDayTest.php | 7 +- .../Switzerland/Ticino/CorpusChristiTest.php | 6 +- tests/Switzerland/Ticino/EasterMondayTest.php | 6 +- tests/Switzerland/Ticino/EpiphanyTest.php | 7 +- .../Ticino/ImmaculateConceptionTest.php | 7 +- tests/Switzerland/Ticino/NewYearsDayTest.php | 7 +- .../Ticino/PentecostMondayTest.php | 6 +- tests/Switzerland/Ticino/StJosephDayTest.php | 7 +- tests/Switzerland/Ticino/StPeterPaulTest.php | 7 +- .../Switzerland/Ticino/StStephensDayTest.php | 7 +- tests/Switzerland/Ticino/TicinoTest.php | 17 ++--- tests/Switzerland/Ticino/WorkersDayTest.php | 6 +- tests/Switzerland/Uri/AllSaintsDayTest.php | 7 +- tests/Switzerland/Uri/AscensionDayTest.php | 6 +- .../Switzerland/Uri/AssumptionOfMaryTest.php | 7 +- tests/Switzerland/Uri/ChristmasDayTest.php | 7 +- tests/Switzerland/Uri/CorpusChristiTest.php | 6 +- tests/Switzerland/Uri/EasterMondayTest.php | 6 +- tests/Switzerland/Uri/EpiphanyTest.php | 7 +- tests/Switzerland/Uri/GoodFridayTest.php | 6 +- .../Uri/ImmaculateConceptionTest.php | 7 +- tests/Switzerland/Uri/NewYearsDayTest.php | 7 +- tests/Switzerland/Uri/PentecostMondayTest.php | 6 +- tests/Switzerland/Uri/StJosephDayTest.php | 7 +- tests/Switzerland/Uri/StStephensDayTest.php | 7 +- tests/Switzerland/Uri/UriTest.php | 17 ++--- tests/Switzerland/Valais/AllSaintsDayTest.php | 7 +- tests/Switzerland/Valais/AscensionDayTest.php | 6 +- .../Valais/AssumptionOfMaryTest.php | 7 +- tests/Switzerland/Valais/ChristmasDayTest.php | 7 +- .../Switzerland/Valais/CorpusChristiTest.php | 6 +- .../Valais/ImmaculateConceptionTest.php | 7 +- tests/Switzerland/Valais/NewYearsDayTest.php | 7 +- tests/Switzerland/Valais/StJosephDayTest.php | 7 +- tests/Switzerland/Valais/ValaisTest.php | 17 ++--- tests/Switzerland/Vaud/AscensionDayTest.php | 6 +- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 6 +- tests/Switzerland/Vaud/BettagsMontagTest.php | 8 +-- tests/Switzerland/Vaud/ChristmasDayTest.php | 7 +- tests/Switzerland/Vaud/EasterMondayTest.php | 6 +- tests/Switzerland/Vaud/GoodFridayTest.php | 6 +- tests/Switzerland/Vaud/NewYearsDayTest.php | 7 +- .../Switzerland/Vaud/PentecostMondayTest.php | 6 +- tests/Switzerland/Vaud/VaudTest.php | 17 ++--- tests/Switzerland/Zug/AllSaintsDayTest.php | 7 +- tests/Switzerland/Zug/AscensionDayTest.php | 6 +- .../Switzerland/Zug/AssumptionOfMaryTest.php | 7 +- tests/Switzerland/Zug/BerchtoldsTagTest.php | 6 +- tests/Switzerland/Zug/ChristmasDayTest.php | 7 +- tests/Switzerland/Zug/CorpusChristiTest.php | 6 +- tests/Switzerland/Zug/EasterMondayTest.php | 6 +- tests/Switzerland/Zug/GoodFridayTest.php | 6 +- .../Zug/ImmaculateConceptionTest.php | 7 +- tests/Switzerland/Zug/NewYearsDayTest.php | 7 +- tests/Switzerland/Zug/PentecostMondayTest.php | 6 +- tests/Switzerland/Zug/StStephensDayTest.php | 7 +- tests/Switzerland/Zug/ZugTest.php | 17 ++--- tests/Switzerland/Zurich/AscensionDayTest.php | 6 +- tests/Switzerland/Zurich/ChristmasDayTest.php | 7 +- tests/Switzerland/Zurich/EasterMondayTest.php | 6 +- tests/Switzerland/Zurich/GoodFridayTest.php | 6 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 7 +- .../Zurich/PentecostMondayTest.php | 6 +- .../Switzerland/Zurich/StStephensDayTest.php | 7 +- tests/Switzerland/Zurich/WorkersDayTest.php | 6 +- tests/Switzerland/Zurich/ZurichTest.php | 17 ++--- tests/Turkey/CommemorationOfAtaturkTest.php | 8 +-- tests/Turkey/DemocracyDayTest.php | 9 ++- tests/Turkey/LabourDayTest.php | 7 +- tests/Turkey/NationalSovereigntyDayTest.php | 10 ++- tests/Turkey/NewYearsDayTest.php | 7 +- tests/Turkey/RepublicDayTest.php | 9 ++- tests/Turkey/TurkeyTest.php | 19 ++--- tests/Turkey/VictoryDayTest.php | 11 ++- tests/USA/ChristmasDayTest.php | 8 +-- tests/USA/ColumbusDayTest.php | 9 +-- tests/USA/IndependenceDayTest.php | 10 +-- tests/USA/JuneteenthTest.php | 10 +-- tests/USA/LabourDayTest.php | 8 +-- tests/USA/MartinLutherKingDayTest.php | 8 +-- tests/USA/MemorialDayTest.php | 9 +-- tests/USA/NewYearsDayTest.php | 8 +-- tests/USA/ThanksgivingDayTest.php | 8 +-- tests/USA/USATest.php | 13 +--- tests/USA/VeteransDayTest.php | 22 +++--- tests/USA/WashingtonsBirthdayTest.php | 9 +-- tests/Ukraine/CatholicChristmasDayTest.php | 9 +-- tests/Ukraine/ChristmasDayTest.php | 7 +- tests/Ukraine/ConstitutionDayTest.php | 6 -- tests/Ukraine/DefenderOfUkraineDayTest.php | 6 -- tests/Ukraine/EasterTest.php | 6 +- tests/Ukraine/IndependenceDayTest.php | 6 -- tests/Ukraine/InternationalWomensDayTest.php | 7 +- tests/Ukraine/InternationalWorkersDayTest.php | 7 +- tests/Ukraine/NewYearsDayTest.php | 7 +- tests/Ukraine/PentecostTest.php | 6 +- .../SecondInternationalWorkersDayTest.php | 9 +-- tests/Ukraine/SubstitutedHolidayTest.php | 2 - tests/Ukraine/UkraineTest.php | 13 +--- tests/Ukraine/VictoryDayTest.php | 7 +- tests/UnitedKingdom/BoxingDayTest.php | 6 +- tests/UnitedKingdom/ChristmasDayTest.php | 6 +- tests/UnitedKingdom/EasterMondayTest.php | 6 +- tests/UnitedKingdom/England/BoxingDayTest.php | 6 +- .../England/ChristmasDayTest.php | 6 +- .../England/EasterMondayTest.php | 6 +- tests/UnitedKingdom/England/EnglandTest.php | 15 ++-- .../UnitedKingdom/England/GoodFridayTest.php | 6 +- .../England/MayDayBankHolidayTest.php | 9 +-- .../UnitedKingdom/England/NewYearsDayTest.php | 10 ++- .../England/SpringBankHolidayTest.php | 9 +-- .../England/SummerBankHolidayTest.php | 11 ++- tests/UnitedKingdom/GoodFridayTest.php | 6 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 9 +-- tests/UnitedKingdom/MotheringSundayTest.php | 6 +- tests/UnitedKingdom/NewYearsDayTest.php | 10 ++- .../NorthernIreland/BattleOfTheBoyneTest.php | 8 +-- .../NorthernIreland/BoxingDayTest.php | 6 +- .../NorthernIreland/ChristmasDayTest.php | 6 +- .../NorthernIreland/EasterMondayTest.php | 6 +- .../NorthernIreland/GoodFridayTest.php | 6 +- .../NorthernIreland/MayDayBankHolidayTest.php | 9 +-- .../NorthernIreland/NewYearsDayTest.php | 10 ++- .../NorthernIreland/NorthernIrelandTest.php | 15 ++-- .../NorthernIreland/SpringBankHolidayTest.php | 8 +-- .../NorthernIreland/StPatricksDayTest.php | 8 +-- .../NorthernIreland/SummerBankHolidayTest.php | 12 ++-- .../PlatinumJubileeBankHolidayTest.php | 10 +-- .../UnitedKingdom/Scotland/BoxingDayTest.php | 6 +- .../Scotland/ChristmasDayTest.php | 6 +- .../UnitedKingdom/Scotland/GoodFridayTest.php | 6 +- .../Scotland/MayDayBankHolidayTest.php | 9 +-- .../Scotland/NewYearsDayTest.php | 10 ++- tests/UnitedKingdom/Scotland/ScotlandTest.php | 15 ++-- .../Scotland/SecondNewYearsDayTest.php | 10 ++- .../Scotland/SpringBankHolidayTest.php | 8 +-- .../Scotland/StAndrewsDayTest.php | 6 +- .../Scotland/SummerBankHolidayTest.php | 8 +-- tests/UnitedKingdom/SpringBankHolidayTest.php | 9 +-- tests/UnitedKingdom/SummerBankHolidayTest.php | 12 ++-- tests/UnitedKingdom/UnitedKingdomTest.php | 15 ++-- tests/UnitedKingdom/Wales/BoxingDayTest.php | 6 +- .../UnitedKingdom/Wales/ChristmasDayTest.php | 6 +- .../UnitedKingdom/Wales/EasterMondayTest.php | 6 +- tests/UnitedKingdom/Wales/GoodFridayTest.php | 6 +- .../Wales/MayDayBankHolidayTest.php | 9 +-- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 10 ++- .../Wales/SpringBankHolidayTest.php | 9 +-- .../Wales/SummerBankHolidayTest.php | 12 ++-- tests/UnitedKingdom/Wales/WalesTest.php | 15 ++-- tests/YasumiBase.php | 14 ++-- 1069 files changed, 2615 insertions(+), 5868 deletions(-) diff --git a/tests/Argentina/ArgentinaTest.php b/tests/Argentina/ArgentinaTest.php index 6fb7983a0..8b0fd47ce 100644 --- a/tests/Argentina/ArgentinaTest.php +++ b/tests/Argentina/ArgentinaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Argentina; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Argentina; use Yasumi\tests\ProviderTestCase; @@ -31,6 +30,8 @@ class ArgentinaTest extends ArgentinaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -39,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Argentina are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +70,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Argentina are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -84,9 +81,7 @@ public function testObservedHolidays(): void ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } - /** - * @throws ReflectionException - */ + /** @throws \Exception */ public function testSources(): void { $this->assertSources(self::REGION, 1); diff --git a/tests/Argentina/CarnavalMondayTest.php b/tests/Argentina/CarnavalMondayTest.php index d8b1aad25..870ab79be 100644 --- a/tests/Argentina/CarnavalMondayTest.php +++ b/tests/Argentina/CarnavalMondayTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class CarnavalMondayTest extends ArgentinaBaseTestCase implements HolidayTestCas * Tests Carnaval Monday on or after 1700. * * @throws Exception - * @throws ReflectionException */ public function testCarnavalMondayAfter1700(): void { @@ -58,7 +56,7 @@ public function testCarnavalMondayAfter1700(): void /** * Tests Carnaval Monday on or before 1700. * - * @throws ReflectionException + * @throws Exception */ public function testCarnavalMondayBefore1700(): void { @@ -69,7 +67,7 @@ public function testCarnavalMondayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -80,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/CarnavalTuesdayTest.php b/tests/Argentina/CarnavalTuesdayTest.php index d510bf5ec..25b5b6493 100644 --- a/tests/Argentina/CarnavalTuesdayTest.php +++ b/tests/Argentina/CarnavalTuesdayTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class CarnavalTuesdayTest extends ArgentinaBaseTestCase implements HolidayTestCa * Tests Carnaval Tuesday on or after 1700. * * @throws Exception - * @throws ReflectionException */ public function testCarnavalTuesdayAfter1700(): void { @@ -58,7 +56,7 @@ public function testCarnavalTuesdayAfter1700(): void /** * Tests Carnaval Tuesday on or before 1700. * - * @throws ReflectionException + * @throws Exception */ public function testCarnavalTuesdayBefore1700(): void { @@ -69,7 +67,7 @@ public function testCarnavalTuesdayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -80,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/ChristmasDayTest.php b/tests/Argentina/ChristmasDayTest.php index 2d120a733..52070ad1a 100644 --- a/tests/Argentina/ChristmasDayTest.php +++ b/tests/Argentina/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class ChristmasDayTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests Christmas Day. * * @throws Exception - * @throws ReflectionException */ public function testChristmasDay(): void { @@ -51,7 +49,7 @@ public function testChristmasDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/EasterTest.php b/tests/Argentina/EasterTest.php index 67c0cea68..e6527630a 100644 --- a/tests/Argentina/EasterTest.php +++ b/tests/Argentina/EasterTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Argentina; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -36,7 +35,6 @@ class EasterTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests Easter. * * @throws Exception - * @throws ReflectionException */ public function testEaster(): void { @@ -47,7 +45,7 @@ public function testEaster(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -62,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php index 65f4a0afd..fbe826af2 100644 --- a/tests/Argentina/FlagDayTest.php +++ b/tests/Argentina/FlagDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class FlagDayTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php index 458afa5d1..66d4c3fe2 100644 --- a/tests/Argentina/GeneralJoseSanMartinDayTest.php +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GeneralJoseSanMartinDayTest extends ArgentinaBaseTestCase implements Holid * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php index 648eaa108..119c45c1c 100644 --- a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GeneralMartinMigueldeGuemesDayTest extends ArgentinaBaseTestCase implement * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/GoodFridayTest.php b/tests/Argentina/GoodFridayTest.php index 8c4f95eea..fbe4b4ea6 100644 --- a/tests/Argentina/GoodFridayTest.php +++ b/tests/Argentina/GoodFridayTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class GoodFridayTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests Good Friday. * * @throws Exception - * @throws ReflectionException */ public function testGoodFriday(): void { @@ -53,7 +51,7 @@ public function testGoodFriday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php index ce495970d..94142b054 100644 --- a/tests/Argentina/ImmaculateConceptionDayTest.php +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ImmaculateConceptionDayTest extends ArgentinaBaseTestCase implements Holid * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php index 7a4a375f6..c187f2f61 100644 --- a/tests/Argentina/IndependenceDayTest.php +++ b/tests/Argentina/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndependenceDayTest extends ArgentinaBaseTestCase implements HolidayTestCa * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/InternationalWorkersDayTest.php b/tests/Argentina/InternationalWorkersDayTest.php index 346ab0438..c2e7baf2e 100644 --- a/tests/Argentina/InternationalWorkersDayTest.php +++ b/tests/Argentina/InternationalWorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class InternationalWorkersDayTest extends ArgentinaBaseTestCase implements Holid * Tests International Workers' Day. * * @throws Exception - * @throws ReflectionException */ public function testInternationalWorkersDay(): void { @@ -51,7 +49,7 @@ public function testInternationalWorkersDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/MalvinasDayTest.php b/tests/Argentina/MalvinasDayTest.php index af91840c6..14ff33536 100644 --- a/tests/Argentina/MalvinasDayTest.php +++ b/tests/Argentina/MalvinasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MalvinasDayTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of Malvinas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php index e5e7bd335..95a7a75f9 100644 --- a/tests/Argentina/MayRevolutionTest.php +++ b/tests/Argentina/MayRevolutionTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MayRevolutionTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of First National Government. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php index e55e04acb..7defe3529 100644 --- a/tests/Argentina/NationalSovereigntyDayTest.php +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NationalSovereigntyDayTest extends ArgentinaBaseTestCase implements Holida * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/NewYearsDayTest.php b/tests/Argentina/NewYearsDayTest.php index 5a7e1f11f..0342e37cf 100644 --- a/tests/Argentina/NewYearsDayTest.php +++ b/tests/Argentina/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class NewYearsDayTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests New Years Day. * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDay(): void { @@ -51,7 +49,7 @@ public function testNewYearsDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php index 389278ec1..46abbe4ed 100644 --- a/tests/Argentina/RaceDayTest.php +++ b/tests/Argentina/RaceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class RaceDayTest extends ArgentinaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,8 +53,6 @@ public function testHoliday(): void /** * Tests that holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -66,7 +62,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/RemembranceDayTest.php b/tests/Argentina/RemembranceDayTest.php index 83a88f75b..e414dfaca 100644 --- a/tests/Argentina/RemembranceDayTest.php +++ b/tests/Argentina/RemembranceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class RemembranceDayTest extends ArgentinaBaseTestCase implements HolidayTestCas * Tests Day of Remembrance for Truth and Justice on or after 2006. * * @throws Exception - * @throws ReflectionException */ public function testRemembranceDayAfter2006(): void { @@ -56,7 +54,7 @@ public function testRemembranceDayAfter2006(): void /** * Tests Day of Remembrance for Truth and Justice on or before 2006. * - * @throws ReflectionException + * @throws Exception */ public function testRemembranceDayBefore2006(): void { @@ -67,7 +65,7 @@ public function testRemembranceDayBefore2006(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 429cb3c0d..5df42057b 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class AnzacDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -59,8 +57,6 @@ public function testHoliday(int $year, string $expected): void /** * Tests that ANZAC Day is not present before 1921. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -93,7 +89,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +104,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 2461499c7..16bbbf238 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +37,6 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -54,7 +51,6 @@ public function testHoliday(int $year, DateTime $expected): void * @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 testSubstituteHoliday(int $year, ?string $expected): void @@ -78,7 +74,7 @@ public function testSubstituteHoliday(int $year, ?string $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 22a614269..18e86b074 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -26,10 +26,12 @@ class AustraliaTest extends AustraliaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Australia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -56,8 +56,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Australia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -66,8 +64,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Australia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -76,8 +72,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Australia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -86,8 +80,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Australia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -96,6 +88,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index 2d48c95b0..472d01650 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -26,10 +26,12 @@ class AustralianCapitalTerritoryTest extends AustralianCapitalTerritoryBaseTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Australian Capital Territory (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,6 +62,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index 2fa82fc2c..615b8e7e4 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index 103b15d7d..27ab89783 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implemen * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index 6ac520c26..2dd6297a7 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements * @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(int $year, string $expected): void @@ -76,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index 45393245b..bc3c02249 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements Ho * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index bc88b9d1d..e8606351b 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implemen * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index b92043159..01e16ff53 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase imple * @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(int $year, string $expected): void @@ -84,7 +82,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -99,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 85d5fe3d3..3757db122 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class BoxingDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @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 */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void @@ -93,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -114,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index c03dbab0a..2badfcd37 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ChristmasDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @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 */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void @@ -93,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -114,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index 68fc8b0a1..18088f406 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class EasterMondayTest extends AustraliaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -62,7 +60,6 @@ public function testHoliday(int $year, string $expected): void * @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 testHoliday2(int $year, string $expected): void @@ -115,7 +112,7 @@ public function HolidayDataProvider2(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -136,7 +133,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index 2d586fba0..f2ad138b6 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GoodFridayTest extends AustraliaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index c9b74de45..4fb19326d 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class BankHolidayTest extends NewSouthWalesBaseTestCase implements HolidayTestCa * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index 3e4c2ce89..cfb4040e8 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements HolidayTes * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index 94d833652..8bbc5d25a 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class EasterSundayTest extends NewSouthWalesBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -76,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index 1fab61ada..0a678ee10 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LabourDayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index cca33c8d9..0249ebbf4 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -26,10 +26,12 @@ class NewSouthWalesTest extends NewSouthWalesBaseTestCase implements ProviderTes /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in New South Wales (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all bank holidays in New South Wales (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,6 +70,7 @@ public function testBankHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index cf7277beb..81bee578b 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements HolidayTes * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index c0622cbb4..f36800828 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class NewYearsDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @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 */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void @@ -93,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -114,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index da8294475..4c164251d 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements Holida * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index 1547cb287..8b5675c44 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class MayDayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCas * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index 6b7a51150..cbe17acf8 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -26,10 +26,12 @@ class NorthernTerritoryTest extends NorthernTerritoryBaseTestCase implements Pro /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Northern Territory (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index 868c30ed2..fef8e3bb2 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class PicnicDayTest extends NorthernTerritoryBaseTestCase implements HolidayTest * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index 094742b5c..f31e35f1a 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements Holida * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 6982e325d..1d0c17ad0 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -26,10 +26,12 @@ class BrisbaneTest extends BrisbaneBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Queensland (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,6 +59,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 3d9089eba..89af7c121 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class PeoplesDayTest extends BrisbaneBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 9eddbda8c..a9d0177f9 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LabourDayTest extends QueenslandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index 199c7cef3..15d02035c 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends QueenslandBaseTestCase implements HolidayTestCa * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 8cc68abe3..393a32b99 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -26,10 +26,12 @@ class QueenslandTest extends QueenslandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Queensland (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,6 +58,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index ca06dae3e..3d4d768bd 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements HolidayTe * @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(int $year, string $expected): void @@ -92,7 +90,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -107,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 901f77531..9514d2089 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ChristmasDayTest extends SouthAustraliaBaseTestCase implements HolidayTest * @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 */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void @@ -93,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -114,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index be452f2c6..d19049985 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements HolidayTe * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index 4562a36b6..daf8d88df 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LabourDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCas * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index b31eb4de1..6ca469fbd 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class ProclamationDayTest extends SouthAustraliaBaseTestCase implements HolidayT * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index 9db861703..e5a880014 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements HolidayTe * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index 9f348c698..d35c0bad6 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -26,10 +26,12 @@ class SouthAustraliaTest extends SouthAustraliaBaseTestCase implements ProviderT /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in South Australia (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 2f96ca123..4c8a04c1d 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -30,6 +30,8 @@ class CentralNorthTest extends CentralNorthBaseTestCase implements ProviderTestC /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in central north Tasmania (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index 461adfc2d..c110d7469 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class DevonportShowTest extends CentralNorthBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index e56d0fcc8..bda06f4b9 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class EightHourDayTest extends TasmaniaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index b33fcc1e0..e4f293f71 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements Holid * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index fe612a37b..76bce01a5 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -30,6 +30,8 @@ class FlindersIslandTest extends FlindersIslandBaseTestCase implements ProviderT /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Flinders Island (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 943a95dd9..3dae93000 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class KingIslandShowTest extends KingIslandBaseTestCase implements HolidayTestCa * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index 2f1d23083..fc5464e25 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -30,6 +30,8 @@ class KingIslandTest extends KingIslandBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in King Island (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index aba05fe83..183f07977 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LauncestonShowTest extends NortheastBaseTestCase implements HolidayTestCas * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index e01db49eb..fe9933f9a 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -30,6 +30,8 @@ class NortheastTest extends NortheastBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in northeastern Tasmania (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index 527785c2a..99d7a2836 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class BurnieShowTest extends NorthwestBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index e723744ae..2be1d89e9 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class AGFESTTest extends CircularHeadBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 79b1ec73a..4c2d1d13d 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; -use ReflectionException; use Yasumi\Holiday; /** @@ -29,6 +28,8 @@ class CircularHeadTest extends CircularHeadBaseTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -37,8 +38,6 @@ protected function setUp(): void /** * Tests if all official holidays in Circular Head (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index 36466435e..aee008564 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -30,6 +30,8 @@ class NorthwestTest extends NorthwestBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in northwestern Tasmania (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index ca6f4a709..5aa0b7fd3 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends TasmaniaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index ded75ec5a..207ee6ba7 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class RecreationDayTest extends TasmaniaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index d2b4bde9b..63f91ab22 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class HobartShowTest extends SouthBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 7af73ab3e..2d65b97dc 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -30,6 +30,8 @@ class SouthTest extends SouthBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in northwestern Tasmania (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,6 +60,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index ed8ac69c3..e4e609ab2 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class HobartRegattaTest extends SoutheastBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index f0d42b0ad..abc999e9a 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; -use ReflectionException; use Yasumi\Holiday; /** @@ -29,6 +28,8 @@ class SoutheastTest extends SoutheastBaseTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -37,8 +38,6 @@ protected function setUp(): void /** * Tests if all official holidays in Circular Head (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index e1e40fcfa..a5157c60c 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -30,6 +30,8 @@ class TasmaniaTest extends TasmaniaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Tasmania (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,6 +59,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 2fdceaca2..114c710e0 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements HolidayTes * @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(int $year, string $expected): void @@ -58,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -73,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -87,8 +85,6 @@ public function testHolidayType(): void /** * Tests that Holiday is not present before establishment year. - * - * @throws ReflectionException */ public function testNotHoliday(): void { diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index 7c24a3ca9..9799c546e 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterSaturdayTest extends VictoriaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index 33ed6cec3..194f19685 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class EasterSundayTest extends VictoriaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -76,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 0bb0b40e6..602b5728a 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LabourDayTest extends VictoriaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 130864c8a..e106247f3 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class MelbourneCupDayTest extends VictoriaBaseTestCase implements HolidayTestCas * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index e56c77223..d569ee816 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends VictoriaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 73b0c7c26..112827c25 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -26,10 +26,12 @@ class VictoriaTest extends VictoriaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Victoria (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,6 +62,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index 9422ab63d..583bb8070 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class LabourDayTest extends WesternAustraliaBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index aa50f3a85..23dfedacb 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements Holiday * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index a58c0e515..ec55944ce 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements Ho * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index 6447710ef..42e2b05e7 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -26,10 +26,12 @@ class WesternAustraliaTest extends WesternAustraliaBaseTestCase implements Provi /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Western Australia (Australia) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,6 +59,7 @@ public function testOfficialHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index e8032d2a0..3a21f53e1 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index b952b6bb0..2598db313 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index c31d8569c..79b48b6a6 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 491a70ba6..76015bd23 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -30,6 +30,8 @@ class AustriaTest extends AustriaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Austria are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Austria are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,8 +70,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Austria are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,8 +78,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Austria are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,8 +86,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Austria are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -102,6 +94,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Burgenland/BurgenlandTest.php b/tests/Austria/Burgenland/BurgenlandTest.php index cdaf6f31e..72c872459 100644 --- a/tests/Austria/Burgenland/BurgenlandTest.php +++ b/tests/Austria/Burgenland/BurgenlandTest.php @@ -30,6 +30,8 @@ class BurgenlandTest extends BurgenlandBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Burgenland (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -68,8 +68,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Burgenland (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -78,8 +76,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Burgenland (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -88,8 +84,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Burgenland (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -98,8 +92,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Burgenland (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -108,6 +100,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index 0bb8ce04c..1600e642e 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stMartinsDayTest extends BurgenlandBaseTestCase implements HolidayTestCase * * @param int $year the year for which Saint Martins Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function teststMartinsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function stMartinsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Carinthia/CarinthiaTest.php b/tests/Austria/Carinthia/CarinthiaTest.php index 79e9acb3b..7b58a548c 100644 --- a/tests/Austria/Carinthia/CarinthiaTest.php +++ b/tests/Austria/Carinthia/CarinthiaTest.php @@ -30,6 +30,8 @@ class CarinthiaTest extends CarinthiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Carinthia (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -72,8 +72,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Carinthia (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -82,8 +80,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Carinthia (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -92,8 +88,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Carinthia (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -102,8 +96,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Carinthia (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -112,6 +104,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index ea0bda51c..7fcf95fcd 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class PlebisciteDayTest extends CarinthiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Plebiscite Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testPlebisciteDay(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function PlebisciteDayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index 6504849f7..be01f9ff7 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StJosephsDayTest extends CarinthiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 10c5eae0e..4373654bf 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends AustriaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index 1b5dfe0fa..2eb327f0d 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -53,7 +51,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index e3b3fafcd..3ac452316 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index 362f49c16..3228a0365 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 911541038..1373e4d8c 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends AustriaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index e508ecb96..0499dd59a 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements HolidayTes * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index 771d48d4f..652f25fdf 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements Holiday * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/LowerAustria/LowerAustriaTest.php b/tests/Austria/LowerAustria/LowerAustriaTest.php index 6295481fb..7bced1f7f 100644 --- a/tests/Austria/LowerAustria/LowerAustriaTest.php +++ b/tests/Austria/LowerAustria/LowerAustriaTest.php @@ -30,6 +30,8 @@ class LowerAustriaTest extends LowerAustriaBaseTestCase implements ProviderTestC /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Lower Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Lower Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lower Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lower Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lower Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 5436b7c84..d14f2ba22 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements HolidayTestC * * @param int $year the year for which Saint Leopold's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStLeopoldsDay(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function StLeopoldsDayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 4dae40559..8cba12015 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NationalDayTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 79e578fe2..73d5588a0 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends AustriaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index 8a9ef2cd4..779313ef1 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index caed66870..f7099bd0e 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends AustriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Salzburg/SalzburgTest.php b/tests/Austria/Salzburg/SalzburgTest.php index b0587b605..861598bff 100644 --- a/tests/Austria/Salzburg/SalzburgTest.php +++ b/tests/Austria/Salzburg/SalzburgTest.php @@ -30,6 +30,8 @@ class SalzburgTest extends SalzburgBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Salzburg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Salzburg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Salzburg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Salzburg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Salzburg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index b723e0a1b..880385ea2 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StRupertsDayTest extends SalzburgBaseTestCase implements HolidayTestCase * * @param int $year the year for which Saint Rupert's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStRupertsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StRupertsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index 582855b89..4d0a82886 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index 935e2abf9..c3d55e3bd 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StJosephsDayTest extends StyriaBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Styria/StyriaTest.php b/tests/Austria/Styria/StyriaTest.php index 5b1f24e6b..9e777e8c0 100644 --- a/tests/Austria/Styria/StyriaTest.php +++ b/tests/Austria/Styria/StyriaTest.php @@ -30,6 +30,8 @@ class StyriaTest extends StyriaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Styria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -68,8 +68,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Styria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -78,8 +76,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Styria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -88,8 +84,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Styria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -98,8 +92,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Styria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -108,6 +100,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index a5eae304c..6894d92e5 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StJosephsDayTest extends TyrolBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Tyrol/TyrolTest.php b/tests/Austria/Tyrol/TyrolTest.php index ac08b857c..211b0e21e 100644 --- a/tests/Austria/Tyrol/TyrolTest.php +++ b/tests/Austria/Tyrol/TyrolTest.php @@ -30,6 +30,8 @@ class TyrolTest extends TyrolBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Tyrol (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -68,8 +68,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Tyrol (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -78,8 +76,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Tyrol (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -88,8 +84,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Tyrol (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -98,8 +92,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Tyrol (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -108,6 +100,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index d5e9db4f7..5bdd1d540 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StFloriansDayTest extends UpperAustriaBaseTestCase implements HolidayTestC * * @param int $year the year for which Saint Florian's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStFloriansDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StFloriansDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/UpperAustria/UpperAustriaTest.php b/tests/Austria/UpperAustria/UpperAustriaTest.php index a6c91b0cf..36cbce30c 100644 --- a/tests/Austria/UpperAustria/UpperAustriaTest.php +++ b/tests/Austria/UpperAustria/UpperAustriaTest.php @@ -30,6 +30,8 @@ class UpperAustriaTest extends UpperAustriaBaseTestCase implements ProviderTestC /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Upper Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Upper Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Upper Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Upper Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Upper Austria (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index a40e0cf1d..ca1dbd237 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class StLeopoldsDayTest extends ViennaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Saint Leopold's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStLeopoldsDay(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function StLeopoldsDayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Vienna/ViennaTest.php b/tests/Austria/Vienna/ViennaTest.php index 8eebe56ce..6b2e56884 100644 --- a/tests/Austria/Vienna/ViennaTest.php +++ b/tests/Austria/Vienna/ViennaTest.php @@ -30,6 +30,8 @@ class ViennaTest extends ViennaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Vienna (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Vienna (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Vienna (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Vienna (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Vienna (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index ff2e21227..12b6ae4e0 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StJosephsDayTest extends VorarlbergBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Vorarlberg/VorarlbergTest.php b/tests/Austria/Vorarlberg/VorarlbergTest.php index 24c7713ac..5d9a1542c 100644 --- a/tests/Austria/Vorarlberg/VorarlbergTest.php +++ b/tests/Austria/Vorarlberg/VorarlbergTest.php @@ -30,6 +30,8 @@ class VorarlbergTest extends VorarlbergBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Vorarlberg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -68,8 +68,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Vorarlberg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -78,8 +76,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Vorarlberg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -88,8 +84,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Vorarlberg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -98,8 +92,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Vorarlberg (Austria) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -108,6 +100,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index b6f3b22c0..36e44b9f5 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -52,6 +52,7 @@ public function testTranslations(string $name, string $class, string $key, strin * @return array list of test translations * * @throws \ReflectionException + * @throws \Exception */ public function translationProvider(): array { diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index 8a2695b7d..fcf26574c 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -35,8 +35,6 @@ class WeekendTest extends TestCase * Holiday Provider is created. * * @dataProvider dataProviderWeekendDays - * - * @throws \ReflectionException */ public function testWeekendDay(\DateTimeImmutable $date): void { @@ -79,8 +77,6 @@ public function dataProviderWeekendDays(): array * Holiday Provider is created. * * @dataProvider dataProviderNonWeekendDays - * - * @throws \ReflectionException */ public function testNonWeekendDay(\DateTimeImmutable $date): void { diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 27d9dd0fe..9e164abc6 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -114,7 +114,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 Exception */ public function testNext(): void { @@ -141,7 +141,7 @@ public function testNextWithBlankKey(): void /** * Tests the previous function returns the previous date (i.e. previous year) for the given holiday. * - * @throws ReflectionException + * @throws Exception */ public function testPrevious(): void { diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 2d9bd2255..d45c5292e 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index fbffaad1d..0906630fd 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index d094730df..9a7c1c4a8 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends BelgiumBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index 2f11ee542..4461dfd4b 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index 28779e5ed..1cc601171 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -29,6 +29,8 @@ class BelgiumTest extends BelgiumBaseTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -37,8 +39,6 @@ protected function setUp(): void /** * Tests if all official holidays in Belgium are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Belgium are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Belgium are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Belgium are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Belgium are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -100,6 +92,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index abacc016e..1b0186712 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends BelgiumBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index 9ecfb2cfa..477d96e22 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends BelgiumBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index c09320ff3..1d5161837 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends BelgiumBaseTestCase implements HolidayTestCase * Tests Easter. * * @throws Exception - * @throws ReflectionException */ public function testEaster(): void { @@ -51,7 +49,7 @@ public function testEaster(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index d5a8640fb..2fd13c167 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements Holiday * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index b3d6c7086..43e4e2419 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NationalDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index 713975296..6a671f436 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 0a1dfbaf4..0703498e5 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends BelgiumBaseTestCase implements HolidayTestCase * Tests Pentecost. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 61c4607f8..5cc3b89d4 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class pentecostMondayTest extends BelgiumBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index 381461ef9..673532c57 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -30,6 +30,8 @@ class BosniaTest extends BosniaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Bosnia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bosnia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bosnia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bosnia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bosnia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index 5fdd54db6..2216185fa 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends BosniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index ffef673f6..8551a4cd7 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index 655fd6305..f81df105c 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends BosniaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index d57fdf9dd..c3080cdba 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndependenceDayTest extends BosniaBaseTestCase implements HolidayTestCase * Tests Independence Day on or after 1992. * * @throws Exception - * @throws ReflectionException */ public function testIndependenceDayOnAfter1992(): void { @@ -56,7 +54,7 @@ public function testIndependenceDayOnAfter1992(): void /** * Tests Independence Day before 1992. * - * @throws ReflectionException + * @throws Exception */ public function testIndependenceDayBefore1992(): void { @@ -70,7 +68,7 @@ public function testIndependenceDayBefore1992(): void /** * Tests translated name of Independence Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 2230e07de..d0867d17c 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements HolidayT * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index 36dd23b96..8928675cb 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends BosniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index eccde76df..90e7fdc93 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,8 +41,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 6790237a2..3848a82c8 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondLabourDay extends BosniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index 4d5f0c93f..0b2040a33 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class StatehoodDayTest extends BosniaBaseTestCase implements HolidayTestCase * Tests Statehood Day on or after 1943. * * @throws Exception - * @throws ReflectionException */ public function testStatehoodDayOnAfter1943(): void { @@ -56,7 +54,7 @@ public function testStatehoodDayOnAfter1943(): void /** * Tests Statehood Day before 1943. * - * @throws ReflectionException + * @throws Exception */ public function testStatehoodDayBefore1943(): void { @@ -70,7 +68,7 @@ public function testStatehoodDayBefore1943(): void /** * Tests translated name of Statehood Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index ed75ab3ba..cc6692835 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class AllSoulsDayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Dia dos Finados on or after 1300. * * @throws Exception - * @throws ReflectionException */ public function testDiaDosFinadosAfter1300(): void { @@ -56,7 +54,7 @@ public function testDiaDosFinadosAfter1300(): void /** * Tests Dia dos Finados on or before 1300. * - * @throws ReflectionException + * @throws Exception */ public function testDiaDosFinadosBefore1300(): void { @@ -67,7 +65,7 @@ public function testDiaDosFinadosBefore1300(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 69163062f..2342686b1 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AshWednesdayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of Ash Wednesday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index dfb60b96f..01396d761 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -30,6 +30,8 @@ class BrazilTest extends BrazilBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Brazil are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -57,8 +57,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Brazil are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Brazil are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Brazil are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Brazil are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index 26a2afd25..e4fad2483 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class CarnavalMondayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Carnaval Monday on or after 1700. * * @throws Exception - * @throws ReflectionException */ public function testCarnavalMondayAfter1700(): void { @@ -58,7 +56,7 @@ public function testCarnavalMondayAfter1700(): void /** * Tests Carnaval Monday on or before 1700. * - * @throws ReflectionException + * @throws Exception */ public function testCarnavalMondayBefore1700(): void { @@ -69,7 +67,7 @@ public function testCarnavalMondayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -80,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index ca3b1759b..d39111db3 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class CarnavalTuesdayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Carnaval Tuesday on or after 1700. * * @throws Exception - * @throws ReflectionException */ public function testCarnavalTuesdayAfter1700(): void { @@ -58,7 +56,7 @@ public function testCarnavalTuesdayAfter1700(): void /** * Tests Carnaval Tuesday on or before 1700. * - * @throws ReflectionException + * @throws Exception */ public function testCarnavalTuesdayBefore1700(): void { @@ -69,7 +67,7 @@ public function testCarnavalTuesdayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -80,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index 603102be9..bc3217a38 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class ChristmasDayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Christmas Day. * * @throws Exception - * @throws ReflectionException */ public function testChristmasDay(): void { @@ -51,7 +49,7 @@ public function testChristmasDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index 6752f3c4c..0d61b003e 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index b1191ac3b..765480f37 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Brazil; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -36,7 +35,6 @@ class EasterTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Easter. * * @throws Exception - * @throws ReflectionException */ public function testEaster(): void { @@ -47,7 +45,7 @@ public function testEaster(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -62,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 81bfb6758..866574985 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class GoodFridayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Good Friday. * * @throws Exception - * @throws ReflectionException */ public function testGoodFriday(): void { @@ -53,7 +51,7 @@ public function testGoodFriday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index 52cd0c361..393e327ae 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndependenceDayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Dia da independência do Brasil on or after 1822. * * @throws Exception - * @throws ReflectionException */ public function testDiaDaIndependenciaDoBrasilAfter1822(): void { @@ -56,7 +54,7 @@ public function testDiaDaIndependenciaDoBrasilAfter1822(): void /** * Tests Dia da independência do Brasil on or before 1822. * - * @throws ReflectionException + * @throws Exception */ public function testDiaDaIndependenciaDoBrasilBefore1822(): void { @@ -67,7 +65,7 @@ public function testDiaDaIndependenciaDoBrasilBefore1822(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index 65b25690d..06138c9b0 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class InternationalWorkersDayTest extends BrazilBaseTestCase implements HolidayT * Tests International Workers' Day. * * @throws Exception - * @throws ReflectionException */ public function testInternationalWorkersDay(): void { @@ -51,7 +49,7 @@ public function testInternationalWorkersDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index 2d07d76c5..221a30422 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class NewYearsDayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests New Years Day. * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDay(): void { @@ -51,7 +49,7 @@ public function testNewYearsDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index d485bb340..65b270fbe 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements HolidayTes * Tests Nossa Senhora Aparecida on or after 1980. * * @throws Exception - * @throws ReflectionException */ public function testNossaSenhoraAparecidaAfter1980(): void { @@ -56,7 +54,7 @@ public function testNossaSenhoraAparecidaAfter1980(): void /** * Tests Nossa Senhora Aparecida on or before 1980. * - * @throws ReflectionException + * @throws Exception */ public function testNossaSenhoraAparecidaBefore1980(): void { @@ -67,7 +65,7 @@ public function testNossaSenhoraAparecidaBefore1980(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index 7d07e71dc..6b7393eb6 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements Holida * Tests Proclamação da República on or after 1889. * * @throws Exception - * @throws ReflectionException */ public function testProclamacaoDaRepublicaAfter1889(): void { @@ -56,7 +54,7 @@ public function testProclamacaoDaRepublicaAfter1889(): void /** * Tests Proclamação da República on or before 1889. * - * @throws ReflectionException + * @throws Exception */ public function testProclamacaoDaRepublicaBefore1889(): void { @@ -67,7 +65,7 @@ public function testProclamacaoDaRepublicaBefore1889(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index 7ae9b3738..f80d9f07a 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class TiradentesDayTest extends BrazilBaseTestCase implements HolidayTestCase * Tests Dia de Tiradentes on or after 1792. * * @throws Exception - * @throws ReflectionException */ public function testDiaDeTiradentesAfter1792(): void { @@ -56,7 +54,7 @@ public function testDiaDeTiradentesAfter1792(): void /** * Tests Dia de Tiradentes on or before 1792. * - * @throws ReflectionException + * @throws Exception */ public function testDiaDeTiradentesBefore1792(): void { @@ -67,7 +65,7 @@ public function testDiaDeTiradentesBefore1792(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index b5282478a..921d74da0 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -30,6 +30,8 @@ class AlbertaTest extends AlbertaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Alberta are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Alberta are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Alberta are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Alberta are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Alberta are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index 0f81006bc..7eee55af8 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -30,6 +30,8 @@ class BritishColumbiaTest extends BritishColumbiaBaseTestCase implements Provide /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in BritishColumbia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in BritishColumbia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in BritishColumbia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in BritishColumbia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in BritishColumbia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 9271a1e04..3a1b10c38 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class CanadaDayTest extends CanadaBaseTestCase implements HolidayTestCase * Tests Canada Day on or after 1983. Canada Day was established in 1983 on July 1st. * * @throws Exception - * @throws ReflectionException */ public function testCanadaDayOnAfter1983(): void { @@ -63,7 +61,7 @@ public function testCanadaDayOnAfter1983(): void /** * Tests Canada Day before 1879. Canada Day was established as Dominion Day in 1879 on July 1st. * - * @throws ReflectionException + * @throws Exception */ public function testCanadaDayBefore1879(): void { @@ -77,7 +75,7 @@ public function testCanadaDayBefore1879(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php index 7658cc233..93c454dd6 100644 --- a/tests/Canada/CanadaTest.php +++ b/tests/Canada/CanadaTest.php @@ -30,6 +30,8 @@ class CanadaTest extends CanadaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the USA are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Canada are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Canada are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Canada are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Canada are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index a0804ee73..c5be59386 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class ChristmasDayTest extends CanadaBaseTestCase implements HolidayTestCase * Tests Christmas Day. Christmas Day is celebrated on December 25th. * * @throws Exception - * @throws ReflectionException */ public function testChristmasDay(): void { @@ -51,7 +49,7 @@ public function testChristmasDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index de1ea1044..d73c4851b 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class LabourDayTest extends CanadaBaseTestCase implements HolidayTestCase * Tests Labour Day on or after 1894. Labour Day was established since 1894 on the first Monday of September. * * @throws Exception - * @throws ReflectionException */ public function testLabourDayOnAfter1894(): void { @@ -56,7 +54,7 @@ public function testLabourDayOnAfter1894(): void /** * Tests Labour Day before 1894. Labour Day was established since 1894 on the first Monday of September. * - * @throws ReflectionException + * @throws Exception */ public function testLabourDayBefore1894(): void { @@ -70,7 +68,7 @@ public function testLabourDayBefore1894(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index 49db8947d..d7569c982 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -30,6 +30,8 @@ class ManitobaTest extends ManitobaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Manitoba are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Manitoba are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Manitoba are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Manitoba are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Manitoba are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index 1982907f9..4e3b05eb0 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -30,6 +30,8 @@ class NewBrunswickTest extends NewBrunswickBaseTestCase implements ProviderTestC /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in NewBrunswick are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in NewBrunswick are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in NewBrunswick are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in NewBrunswick are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in NewBrunswick are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 544dd784b..2413282e9 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class NewYearsDayTest extends CanadaBaseTestCase implements HolidayTestCase * Tests New Years Day. * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDay(): void { @@ -51,7 +49,7 @@ public function testNewYearsDay(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php index 54c39795b..cb6353994 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -30,6 +30,8 @@ class NewfoundlandAndLabradorTest extends NewfoundlandAndLabradorBaseTestCase im /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in NewfoundlandAndLabrador are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in NewfoundlandAndLabrador are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -62,8 +60,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in NewfoundlandAndLabrador are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -72,8 +68,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in NewfoundlandAndLabrador are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -85,8 +79,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in NewfoundlandAndLabrador are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -95,6 +87,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index ac47a50d1..3885e7bb6 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -30,6 +30,8 @@ class NorthwestTerritoriesTest extends NorthwestTerritoriesBaseTestCase implemen /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in NorthwestTerritories are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in NorthwestTerritories are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in NorthwestTerritories are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in NorthwestTerritories are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in NorthwestTerritories are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index 5806edfe5..f8ffcddd5 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -30,6 +30,8 @@ class NovaScotiaTest extends NovaScotiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Nova Scotia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in NovaScotia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in NovaScotia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in NovaScotia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in NovaScotia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php index 880323569..27913c836 100644 --- a/tests/Canada/Nunavut/NunavutTest.php +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -30,6 +30,8 @@ class NunavutTest extends NunavutBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Nunavut are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -53,8 +53,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Nunavut are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -63,8 +61,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Nunavut are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -73,8 +69,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Nunavut are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -83,8 +77,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Nunavut are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -93,6 +85,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index 871a0f207..d6746141a 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -30,6 +30,8 @@ class OntarioTest extends OntarioBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Ontario are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ontario are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ontario are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ontario are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ontario are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index c39180328..4624b6251 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -30,6 +30,8 @@ class PrinceEdwardIslandTest extends PrinceEdwardIslandBaseTestCase implements P /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Prince Edward Island are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in PrinceEdwardIsland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in PrinceEdwardIsland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in PrinceEdwardIsland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in PrinceEdwardIsland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index ab7339fdf..254dcb8bf 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -30,6 +30,8 @@ class QuebecTest extends QuebecBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Quebec are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Quebec are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Quebec are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Quebec are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Quebec are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index f9bfbac1a..6d14b88e3 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class RemembranceDayTest extends CanadaBaseTestCase implements HolidayTestCase * Tests Remembrance Day on or after 1919. Remembrance Day was established in 1919 on November 11. * * @throws Exception - * @throws ReflectionException */ public function testRemembranceDayOnAfter1919(): void { @@ -56,7 +54,7 @@ public function testRemembranceDayOnAfter1919(): void /** * Tests Remembrance Day before 1919. Remembrance Day was established in 1919 on November 11. * - * @throws ReflectionException + * @throws Exception */ public function testVeteransDayBefore1919(): void { @@ -70,7 +68,7 @@ public function testVeteransDayBefore1919(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index 37390de0f..811750143 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -30,6 +30,8 @@ class SaskatchewanTest extends SaskatchewanBaseTestCase implements ProviderTestC /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Saskatchewan are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saskatchewan are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saskatchewan are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saskatchewan are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saskatchewan are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index 18155736d..d57b1a54d 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ThanksgivingDayTest extends CanadaBaseTestCase implements HolidayTestCase * of October. * * @throws Exception - * @throws ReflectionException */ public function testThanksgivingDayOnAfter1879(): void { @@ -58,7 +56,7 @@ public function testThanksgivingDayOnAfter1879(): void * Tests Thanksgiving Day before 1879. ThanksgivingDay Day is celebrated since 1879 on the second Monday * of October. * - * @throws ReflectionException + * @throws Exception */ public function testThanksgivingDayBefore1879(): void { @@ -72,7 +70,7 @@ public function testThanksgivingDayBefore1879(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -87,7 +85,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/TruthAndReconciliationDayTest.php b/tests/Canada/TruthAndReconciliationDayTest.php index 3ee107938..648e539b3 100644 --- a/tests/Canada/TruthAndReconciliationDayTest.php +++ b/tests/Canada/TruthAndReconciliationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class TruthAndReconciliationDayTest extends CanadaBaseTestCase implements Holida * of September. * * @throws Exception - * @throws ReflectionException */ public function testTruthAndReconciliationDayOnAfter2021(): void { @@ -58,7 +56,7 @@ public function testTruthAndReconciliationDayOnAfter2021(): void * Tests TruthAndReconciliationDay before 2021. TruthAndReconciliationDay is celebrated since 2021 on the last day * of September. * - * @throws ReflectionException + * @throws Exception */ public function testTruthAndReconciliationDayBefore2021(): void { @@ -72,7 +70,7 @@ public function testTruthAndReconciliationDayBefore2021(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -87,7 +85,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index ac7549090..3f34cfe4a 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -30,6 +30,8 @@ class YukonTest extends YukonBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Yukon are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -69,8 +69,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Yukon are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -79,8 +77,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Yukon are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -89,8 +85,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Yukon are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -99,8 +93,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Yukon are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -109,6 +101,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 32eebfb8b..f642f0fae 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index ad5a50171..dd392b339 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements HolidayT * Tests Day of Antifascist Struggle on or after 1941. * * @throws Exception - * @throws ReflectionException */ public function testAntifascistStruggleDayOnAfter1941(): void { @@ -56,7 +54,7 @@ public function testAntifascistStruggleDayOnAfter1941(): void /** * Tests Day of Antifascist Struggle before 1941. * - * @throws ReflectionException + * @throws Exception */ public function testAntifascistStruggleDayBefore1941(): void { @@ -70,7 +68,7 @@ public function testAntifascistStruggleDayBefore1941(): void /** * Tests translated name of Day of Antifascist Struggle. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index 19697fe5a..384bc7308 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 48b2f62b0..759351789 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index 20b8bcf01..ff9bf6847 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends CroatiaBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/CroatiaTest.php b/tests/Croatia/CroatiaTest.php index 98652c6a7..50420f792 100644 --- a/tests/Croatia/CroatiaTest.php +++ b/tests/Croatia/CroatiaTest.php @@ -30,6 +30,8 @@ class CroatiaTest extends CroatiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Croatia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -81,8 +81,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Croatia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -91,8 +89,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Croatia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -101,8 +97,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Croatia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -111,8 +105,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Croatia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -121,6 +113,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 16fca9417..4336eeec5 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends CroatiaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index 1a20b505d..e75ae4918 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends CroatiaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 35b1b16d5..c3c7f3dff 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends CroatiaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 1671a54e7..91fe5721a 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements Holiday * Tests Homeland Thanksgiving Day on or after 1995. * * @throws Exception - * @throws ReflectionException */ public function testHomelandThanksgivingDayOnAfter1995(): void { @@ -61,7 +59,7 @@ public function testHomelandThanksgivingDayOnAfter1995(): void /** * Tests Homeland Thanksgiving Day before 1995. * - * @throws ReflectionException + * @throws Exception */ public function testHomelandThanksgivingDayBefore1995(): void { @@ -75,7 +73,7 @@ public function testHomelandThanksgivingDayBefore1995(): void /** * Tests translated name of Homeland Thanksgiving Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -101,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 2ea157559..63abb5f1b 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements HolidayTestCase * Tests Independence Day on or after 1991. * * @throws Exception - * @throws ReflectionException */ public function testIndependenceDayOnAfter1991(): void { @@ -61,7 +59,7 @@ public function testIndependenceDayOnAfter1991(): void /** * Tests Independence Day before 1991. * - * @throws ReflectionException + * @throws Exception */ public function testIndependenceDayBefore1991(): void { @@ -75,7 +73,7 @@ public function testIndependenceDayBefore1991(): void /** * Tests Independence Day before 1991. * - * @throws ReflectionException + * @throws Exception */ public function testIndependenceDayAfterDisbandment(): void { @@ -89,7 +87,7 @@ public function testIndependenceDayAfterDisbandment(): void /** * Tests translated name of Independence Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -104,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index fd81ac3e9..bacd804c2 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements Holiday * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index 43661610e..fe136f74e 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index 48ad1558c..376354dc9 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class RemembranceDayTest extends CroatiaBaseTestCase implements HolidayTestCase * Tests Remembrance Day. * * @throws Exception - * @throws ReflectionException */ public function testRemembranceDayAfterItWasEstablished(): void { @@ -57,7 +55,6 @@ public function testRemembranceDayAfterItWasEstablished(): void * Tests Remembrance Day. * * @throws Exception - * @throws ReflectionException */ public function testRemembranceDayBeforeItWasEstablished(): void { @@ -71,7 +68,7 @@ public function testRemembranceDayBeforeItWasEstablished(): void /** * Tests translated name of Remembrance Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index ae5171375..fe27bb07b 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function teststStephensDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function stStephensDayDataProvider(): array /** * Tests translated name of St. Stephen's Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 3de09184b..9b98d48c4 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements HolidayTestCase * Tests Statehood Day. * * @throws Exception - * @throws ReflectionException */ public function testStatehoodDay(): void { @@ -71,7 +69,7 @@ public function testStatehoodDay(): void /** * Tests Statehood Day before 1991. * - * @throws ReflectionException + * @throws Exception */ public function testStatehoodDayBefore1991(): void { @@ -85,7 +83,7 @@ public function testStatehoodDayBefore1991(): void /** * Tests translated name of Statehood Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -100,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 4dc6247d0..fa1ef6b41 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements HolidayTestC * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index f9cd7ac53..d3c0096b1 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements HolidayTestC * * @param int $year the year for which Christmas Eve needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index e69602492..f6170ed92 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -30,10 +30,12 @@ class CzechRepublicTest extends CzechRepublicBaseTestCase implements ProviderTes /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -42,8 +44,6 @@ protected function setUp(): void /** * Tests if all official holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -66,8 +66,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Czech Republic are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,8 +74,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Czech Republic are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -86,8 +82,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Czech Republic are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -96,8 +90,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Czech Republic are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -106,6 +98,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 721f22bec..3cdff1952 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements Holiday * * @param 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(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index 94ffccbb1..c0c190fc2 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class EasterMondayTest extends CzechRepublicBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -55,7 +53,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -70,7 +68,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 08533553f..40500243e 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class GoodFridayTest extends CzechRepublicBaseTestCase implements HolidayTestCas * Tests Good Friday. * * @throws Exception - * @throws ReflectionException */ public function testGoodFriday(): void { @@ -55,7 +53,7 @@ public function testGoodFriday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -70,7 +68,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index cbce326ce..baaf565b7 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ 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 */ public function testHoliday(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index f9bdb32fd..5fe46f617 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements H * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -52,7 +49,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests translated name of International Workers' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -67,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index a276145b4..82958228a 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 081d5b135..47f9b5529 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index e951b1a5a..4036ffbc0 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ 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 */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index 937f89015..63d3df693 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ 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 */ public function testHoliday(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 94f152f2e..72ba345a8 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Holida * * @param 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(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index 31e15f7e9..ef7a19c45 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ 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 */ public function testHoliday(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index fa1dcd128..8cb5f7041 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Holida * * @param 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(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index b17b9f86b..0d517c15c 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index da84ebb2e..1894672fd 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 8cdeeeb91..144678d9e 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index 7023256bd..a2787feb2 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ConstitutionDayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index 79cb6fca8..d5a3a928d 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -30,6 +30,8 @@ class DenmarkTest extends DenmarkBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Denmark are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Denmark are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,7 +74,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Denmark are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -86,8 +84,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Denmark are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -96,8 +92,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Denmark are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -106,6 +100,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index 87daa37a8..657a717aa 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index f328718b5..1a154c98c 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 77e94cb82..89a55047c 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index 66f494a1e..494ee5d17 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GreatPrayerDayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 8a6ed9686..c7cf4f642 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements Holiday * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index e3f6c5336..6d77b3805 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class MaundyThursdayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index e844f4c1d..c9ddc59c3 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index b16335eda..c281ad1a1 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index b62d2db43..1ee6251e5 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index 79f58903c..59fbdf37b 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index 6d93a34f9..e7de79ba1 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index d7af59a0c..dbdb66c95 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class SummerTimeTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testSummerTime(): void { @@ -60,7 +58,7 @@ public function testSummerTime(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 792499428..01fe35ad1 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class WinterTimeTest extends DenmarkBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testWinterTime(): void { @@ -61,7 +59,7 @@ public function testWinterTime(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 5aadd5ff9..0f99ddc6a 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index bdddf9630..c093d8dfb 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index b37d453a0..096583288 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index ec85bda72..41c3e8b07 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -30,7 +30,7 @@ class EstoniaTest extends EstoniaBaseTestCase implements ProviderTestCase /** * Tests if all official holidays in Estonia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOfficialHolidays(): void { @@ -66,7 +66,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Estonia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testObservedHolidays(): void { @@ -76,7 +76,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Estonia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -86,7 +86,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Estonia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testBankHolidays(): void { @@ -96,7 +96,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Estonia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOtherHolidays(): void { @@ -105,6 +105,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index adb757569..8aff83895 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index 4423b2ff3..d518c6760 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class IndependenceDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore(): void { @@ -53,7 +52,6 @@ public function testHolidayBefore(): void * Test if holiday is defined after. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfter(): void { @@ -70,7 +68,7 @@ public function testHolidayAfter(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index 0f6f8ff6e..01eb7a3c3 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index 6be904b9d..e33ef6753 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 5dc27dab7..b5ebdc056 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index a375a50ae..bc0e1fa07 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class RestorationOfIndependenceDayTest extends EstoniaBaseTestCase implements Ho /** * Test if holiday is not defined before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore(): void { @@ -53,7 +52,6 @@ public function testHolidayBefore(): void * Test if holiday is defined after. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfter(): void { @@ -70,7 +68,7 @@ public function testHolidayAfter(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 39780fe8f..4846a9054 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index 4b443670a..e6cfe998d 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 7ff5fda2a..853b7f329 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class VictoryDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore(): void { @@ -53,7 +52,6 @@ public function testHolidayBefore(): void * Test if holiday is defined after. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfter(): void { @@ -70,7 +68,7 @@ public function testHolidayAfter(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 60b944f89..22de63d6f 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,8 +38,6 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -78,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index a0dde23d2..d052f8fea 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 263bf9dc9..0c1ef4281 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends FinlandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index 51b1da3f0..ed1e5e3a7 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 6f2170361..10e0ffa1b 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index a66273efc..3b00cc05b 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends FinlandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 7f98f2580..16a8dc1db 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -30,6 +30,8 @@ class FinlandTest extends FinlandBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,8 +70,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,8 +78,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,8 +86,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -102,6 +94,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index 466d97c0b..196ff2288 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 07581f40b..4552495b2 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndependenceDayTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 1734c8238..787c37829 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements Holiday * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index 71c16aca5..f39819e55 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends FinlandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index dd67ed761..c3cb5edbd 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index f64bf1e3c..34e0b5c71 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 207ea0e67..ca7a7fe0b 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -44,7 +43,6 @@ class stJohnsDayTest extends FinlandBaseTestCase implements HolidayTestCase * Tests the holiday before it was adjusted. * * @throws Exception - * @throws ReflectionException */ public function testHolidayBeforeAdjustment(): void { @@ -60,7 +58,7 @@ public function testHolidayBeforeAdjustment(): void /** * Tests the holiday before it was adjusted. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterAdjustment(): void { @@ -84,7 +82,7 @@ public function testHolidayAfterAdjustment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -99,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index 70d28516b..5ed7e9df7 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends FranceBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index d467049df..b9a44cebd 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ArmisticeDayTest extends FranceBaseTestCase implements HolidayTestCase * Tests Armistice Day on or after 1919. * * @throws Exception - * @throws ReflectionException */ public function testArmisticeDayOnAfter1919(): void { @@ -56,7 +54,7 @@ public function testArmisticeDayOnAfter1919(): void /** * Tests Armistice Day before 1919. * - * @throws ReflectionException + * @throws Exception */ public function testArmisticeDayBefore1919(): void { @@ -70,7 +68,7 @@ public function testArmisticeDayBefore1919(): void /** * Tests translated name of Armistice Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index 484e1e18c..2d9b2d24a 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends FranceBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index 6448fd9da..b24757763 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index fe0242897..3d7733a62 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -30,6 +30,8 @@ class BasRhinTest extends BasRhinBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Bas-Rhin are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bas-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,8 +70,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bas-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,8 +78,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bas-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,8 +86,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bas-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -102,6 +94,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index f4900022b..17b09c753 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends BasRhinBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index 0e1c09764..ea894a4dc 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stStephensDayTest extends BasRhinBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index 7e5904013..fda55e4e0 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BastilleDayTest extends FranceBaseTestCase implements HolidayTestCase * Tests Bastille Day on or after 1790. * * @throws Exception - * @throws ReflectionException */ public function testBastilleDayOnAfter1790(): void { @@ -56,7 +54,7 @@ public function testBastilleDayOnAfter1790(): void /** * Tests Bastille Day before 1790. * - * @throws ReflectionException + * @throws Exception */ public function testBastilleDayBefore1790(): void { @@ -70,7 +68,7 @@ public function testBastilleDayBefore1790(): void /** * Tests translated name of Bastille Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index 93132590c..073605881 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends FranceBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 55a90cdf5..63b506330 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends FranceBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index 518a2bd3b..84228f7e7 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -30,6 +30,8 @@ class FranceTest extends FranceBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in France are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in France are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in France are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in France are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in France are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -100,6 +92,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index 421e5c5dd..4e06aaeca 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends HautRhinBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index d7e3964bf..3bdefdaaa 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -30,6 +30,8 @@ class HautRhinTest extends HautRhinBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Haut-Rhin are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Haut-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,8 +70,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Haut-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,8 +78,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Haut-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,8 +86,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Haut-Rhin (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -102,6 +94,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 76a82e6c8..ea428f6f9 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stStephensDayTest extends HautRhinBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index bd94a58ea..d04950b96 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements HolidayT * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of International Workers' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index a39f5025b..05c2cb6cd 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends MoselleBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index 71842d52c..8a097222c 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -30,6 +30,8 @@ class MoselleTest extends MoselleBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Moselle are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Moselle (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,8 +70,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Moselle (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,8 +78,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Moselle (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,8 +86,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Moselle (France) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -102,6 +94,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 559020362..0ee3ec544 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stStephensDayTest extends MoselleBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index d87bb62f5..e4fa8176f 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends FranceBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index c422a82e0..789b0316e 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 7d5359a43..3b1dc75b1 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class VictoryInEuropeDayTest extends FranceBaseTestCase implements HolidayTestCa * Tests Victory In Europe Day on or after 1945. * * @throws Exception - * @throws ReflectionException */ public function testVictoryInEuropeDayOnAfter1945(): void { @@ -56,7 +54,7 @@ public function testVictoryInEuropeDayOnAfter1945(): void /** * Tests Victory In Europe Day before 1945. * - * @throws ReflectionException + * @throws Exception */ public function testVictoryInEuropeDayBefore1945(): void { @@ -70,7 +68,7 @@ public function testVictoryInEuropeDayBefore1945(): void /** * Tests translated name of Victory in Europe Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php index 8a2801be8..d2207f46c 100644 --- a/tests/Georgia/EasterTest.php +++ b/tests/Georgia/EasterTest.php @@ -7,7 +7,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -22,7 +21,6 @@ class EasterTest extends GeorgiaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -39,7 +37,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -54,7 +52,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php index d86642c37..c135e9b52 100644 --- a/tests/Georgia/GeorgiaTest.php +++ b/tests/Georgia/GeorgiaTest.php @@ -34,6 +34,8 @@ class GeorgiaTest extends GeorgiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -42,8 +44,6 @@ protected function setUp(): void /** * Tests if all official holidays in Georgia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -74,8 +74,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Georgia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -84,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Georgia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -94,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Georgia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -104,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Georgia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -114,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index 79b53ed0b..90afd51f2 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,6 @@ class IndependenceDayTest extends GeorgiaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'independenceDay'; /** - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -46,8 +44,6 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -63,8 +59,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index 43edbaf15..c1a8eca7c 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class InternationalWomensDayTest extends GeorgiaBaseTestCase implements HolidayT /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index 76e9ea612..a1be83ad6 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class MtskhetobaDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 601ea55d7..f76898cec 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class NewYearsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index 4cfc569b7..e6356a5bb 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class OrthodoxChristmasDayTest extends GeorgiaBaseTestCase implements HolidayTes /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index 022aa469d..aae496458 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class OrthodoxEpiphanyDayTest extends GeorgiaBaseTestCase implements HolidayTest /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index c5aaf49c5..0c3a34100 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class SecondNewYearDayTest extends GeorgiaBaseTestCase implements HolidayTestCas /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index 44c3c3521..0e6d3c404 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class StAndrewsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index eb5529115..be8f8b8ed 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class StGeorgesDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index 77f7c3ee9..78a4b9d40 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class StMarysDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index 0b3492da3..c0a9724de 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,6 @@ class UnityDayTest extends GeorgiaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'unityDay'; /** - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -46,8 +44,6 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -63,8 +59,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index 12d8822d0..700a8872c 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,8 +29,6 @@ class VictoryDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -53,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index a3950edc5..9b6fb6f42 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends GermanyBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 1def6b656..a1d7cf32b 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index c409c9c17..d3c13b388 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -30,6 +30,8 @@ class BadenWurttembergTest extends BadenWurttembergBaseTestCase implements Provi /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Baden-Württemberg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Baden-Württemberg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Baden-Württemberg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Baden-Württemberg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Baden-Württemberg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -105,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index 8b17388f3..b82749505 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,6 @@ class CorpusChristiTest extends BadenWurttembergBaseTestCase implements HolidayT * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -50,7 +48,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -65,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index b9d418ddf..9d0e5eaba 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index d5caef2c0..7bb9bef2e 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index d9dbe3947..08e7069d6 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -30,6 +30,8 @@ class BavariaTest extends BavariaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Bavaria (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bavaria (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bavaria (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bavaria (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bavaria (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -105,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index b806ff93c..bb41077a0 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Germany\Bavaria; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,6 @@ class CorpusChristiTest extends BavariaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -50,7 +48,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -65,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index 997e250d5..99d5c8a22 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends BavariaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index fa551e4ec..63cfd5473 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -30,6 +30,8 @@ class BerlinTest extends BerlinBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Berlin (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Berlin (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Berlin (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Berlin (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Berlin (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberation2020Test.php index 75c724390..ca001dccc 100644 --- a/tests/Germany/Berlin/DayOfLiberation2020Test.php +++ b/tests/Germany/Berlin/DayOfLiberation2020Test.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class DayOfLiberation2020Test extends BerlinBaseTestCase implements HolidayTestC * Test the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHolidayInYear(): void { @@ -55,7 +53,7 @@ public function testHolidayInYear(): void /** * Test the holiday defined in this test in the years before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeYear(): void { @@ -69,7 +67,7 @@ public function testHolidayBeforeYear(): void /** * Test the holiday defined in this test in the years after. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterYear(): void { @@ -82,8 +80,6 @@ public function testHolidayAfterYear(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -97,8 +93,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index d339363e0..7b90c41b0 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class InternationalWomensDay2019Test extends BerlinBaseTestCase implements Holid * Test the holiday defined in this test upon establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnEstablishment(): void { @@ -55,7 +53,7 @@ public function testHolidayOnEstablishment(): void /** * Test the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -69,7 +67,7 @@ public function testHolidayBeforeEstablishment(): void /** * Test the holiday defined in this test after completion. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterCompletion(): void { @@ -79,7 +77,7 @@ public function testHolidayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index 3fda8a19d..080281e13 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -30,6 +30,8 @@ class BrandenburgTest extends BrandenburgBaseTestCase implements ProviderTestCas /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Brandenburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -69,8 +69,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Brandenburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -79,8 +77,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Brandenburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -89,8 +85,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Brandenburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -99,8 +93,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Brandenburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -109,6 +101,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 50736d85c..e9f6072a2 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index 49ae20575..e5f3472b9 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -30,6 +30,8 @@ class BremenTest extends BremenBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Bremen (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bremen (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bremen (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bremen (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bremen (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 9a399fade..6ab7107cf 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends BremenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index dd4da91cb..157327f86 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends GermanyBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 745eed5ee..4bbe6c792 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends GermanyBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index 26633b7eb..1dcae3c36 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GermanUnityDayTest extends GermanyBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 6c0fde0ba..ce8cc9c1c 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -30,6 +30,8 @@ class GermanyTest extends GermanyBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Finland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Germany are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Germany are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Germany are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Germany are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index d37bbd56e..f4c2486ac 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends GermanyBaseTestCase implements HolidayTestCase * Tests Good Friday. * * @throws Exception - * @throws ReflectionException */ public function testGoodFriday(): void { @@ -51,7 +49,7 @@ public function testGoodFriday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index f17ec8d0b..1fc660422 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class DayOfReformationTest extends HamburgBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index 5b84a54ae..eceee6d43 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -30,6 +30,8 @@ class HamburgTest extends HamburgBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Hamburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Hamburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Hamburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Hamburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Hamburg (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index dd6871470..c20838f8f 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Germany\Hesse; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,6 @@ class CorpusChristiTest extends HesseBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -50,7 +48,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -65,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index 21d6b8610..5858f2de9 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -30,6 +30,8 @@ class HesseTest extends HesseBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Hesse (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Hesse (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Hesse (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Hesse (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Hesse (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index ff8312ade..02d2d9453 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements Holiday * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests translated name of International Workers' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index b27d90e32..3ec102887 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -30,6 +30,8 @@ class LowerSaxonyTest extends LowerSaxonyBaseTestCase implements ProviderTestCas /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Lower Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Lower Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lower Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lower Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lower Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 4b6b2fc6b..9060aa3c1 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 78bd9b14c..595910468 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -30,6 +30,8 @@ class MecklenburgWesternPomeraniaTest extends MecklenburgWesternPomeraniaBaseTes /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -67,8 +67,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -77,8 +75,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -87,8 +83,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -97,8 +91,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -107,6 +99,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index 368b6e098..ee8de3318 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -58,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -72,7 +71,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -87,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index ce226496a..344af79e2 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends GermanyBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index 64e5c9b06..9ece28007 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsEveTest extends GermanyBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index 25a33a18a..1a1b9e504 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Holid * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index 3066cdd03..dc116b24f 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,6 @@ class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements Holi * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -50,7 +48,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -65,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index 35751c641..fee44f16a 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -30,6 +30,8 @@ class NorthRhineWestphaliaTest extends NorthRhineWestphaliaBaseTestCase implemen /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in North Rhine-Westphalia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in North Rhine-Westphalia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in North Rhine-Westphalia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in North Rhine-Westphalia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in North Rhine-Westphalia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -100,6 +92,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 7a84d6265..09b48b042 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends GermanyBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 221ce94cb..1f87a4c02 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends GermanyBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +69,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index c12b505a1..4c6b9f1cd 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ReformationDay2017Test extends GermanyBaseTestCase implements HolidayTestC * Test the holiday defined in this test upon establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnEstablishment(): void { @@ -55,7 +53,7 @@ public function testHolidayOnEstablishment(): void /** * Test the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -69,7 +67,7 @@ public function testHolidayBeforeEstablishment(): void /** * Test the holiday defined in this test after completion. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterCompletion(): void { @@ -79,7 +77,7 @@ public function testHolidayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index cbfd274be..629da43ab 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Holida * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index 445ebc955..1dc96c1d7 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,6 @@ class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements Holid * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -50,7 +48,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -65,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index de2f76461..cdc672098 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -30,6 +30,8 @@ class RhinelandPalatinateTest extends RhinelandPalatinateBaseTestCase implements /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Rhineland Palatinate (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Rhineland Palatinate (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Rhineland Palatinate (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Rhineland Palatinate (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Rhineland Palatinate (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -100,6 +92,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index d4d5fc1db..b0eff6eb5 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 78f70797d..94ff9966b 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index a266d6bd7..231347ab7 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Germany\Saarland; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,6 @@ class CorpusChristiTest extends SaarlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -50,7 +48,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -65,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 2524fbdec..988c317b5 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -30,6 +30,8 @@ class SaarlandTest extends SaarlandBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Saarland (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saarland (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,8 +68,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saarland (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,8 +76,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saarland (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,8 +84,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saarland (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -100,6 +92,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index c89b88ca0..34f05982d 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends SaxonyBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index ef9429e7d..100724347 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements HolidayTe /** * Tests the holiday defined in this test on or after establishment. * - * @throws ReflectionException * @throws Exception */ public function testHolidayOnAfterEstablishment(): void @@ -64,7 +62,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -78,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index b3713cc58..53e3741a2 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -30,6 +30,8 @@ class SaxonyTest extends SaxonyBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saxony (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index 8b637ba86..e6ffc3272 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index f840dbf16..0b07bfef7 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index f15d9d599..1b3f5949e 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -30,6 +30,8 @@ class SaxonyAnhaltTest extends SaxonyAnhaltBaseTestCase implements ProviderTestC /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Saxony-Anhalt (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -67,8 +67,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saxony-Anhalt (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -77,8 +75,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saxony-Anhalt (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -87,8 +83,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saxony-Anhalt (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -97,8 +91,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saxony-Anhalt (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -107,6 +99,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 09c4909c8..b5e2cd06d 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Holida * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index 28eb39bc6..9ccc65097 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -30,6 +30,8 @@ class SchleswigHolsteinTest extends SchleswigHolsteinBaseTestCase implements Pro /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Schleswig-Holstein (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Schleswig-Holstein (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Schleswig-Holstein (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Schleswig-Holstein (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Schleswig-Holstein (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index 13eb7d195..4caf6f494 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index d750bbad2..5fb7bea47 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index de62a7adf..49b1b3921 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -30,6 +30,8 @@ class ThuringiaTest extends ThuringiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Thuringia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Thuringia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Thuringia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Thuringia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Thuringia (Germany) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index fb1f90e74..1a835680c 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class WorldChildrensDayTest extends ThuringiaBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -73,7 +70,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 97a960d63..201e53173 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AnnunciationTest extends GreeceBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index 442ac7ab8..e4ff78766 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index 5f246e201..1ac912272 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 1fcf452e3..8bb6ddec5 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends GreeceBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index 025fc6c1e..c05a66a16 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class CleanMondayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 000efc060..51c8e28a7 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index d8c44a9ec..76d80df04 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of Easter. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index c9b973e42..54b27544f 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends GreeceBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Epiphany. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index 78024df39..095a5bf6d 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -30,6 +30,8 @@ class GreeceTest extends GreeceBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Greece are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -64,8 +64,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Greece are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Greece are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Greece are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Greece are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -109,6 +101,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index 4f96f8c92..df94009f1 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndepencenceDayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index da146b5a3..5544f9d54 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements HolidayT * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests translated name of International Workers' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index 6be5a507c..209b69bb9 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends GreeceBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index 6ba7b42ca..091a8d40b 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class OhiDayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index 593b8c9d7..d74eb66b5 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index fb255be6a..56081bf19 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index a68c70b56..7c428218a 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class PolytechnioTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 8d8a7ab36..e119737a8 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index c328a7578..b9f912639 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class goodFridayTest extends GreeceBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index d2dc4fd3e..7fb1bce58 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index ed3f7d5e7..0b05b7de6 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends HungaryBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index 1de531198..526c2f208 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends HungaryBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index 97eb06ec2..45356ebff 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends HungaryBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index 2189669f4..eb3d8b7fb 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -30,6 +30,8 @@ class HungaryTest extends HungaryBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Hungary are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -75,8 +75,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Hungary are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -85,8 +83,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Hungary are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -95,8 +91,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Hungary are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -105,8 +99,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Hungary are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -115,6 +107,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index 6665d4a5f..dd168dff3 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements Holiday * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 97b4d32a0..bbac4e42e 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MemorialDay1848Test extends HungaryBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index ce181e8c3..3e746ca28 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MemorialDay1956Test extends HungaryBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index f04a1c451..4e569703c 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends HungaryBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index c5c7d1cc3..772ef2b54 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends HungaryBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index 6518f5c55..eec9d311b 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends HungaryBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index 48e2c5a8a..ac2c11c22 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 50aff2bdd..8cc745393 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class StateFoundationDayTest extends HungaryBaseTestCase implements HolidayTestC * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index d3d8e89ae..bbbe28e77 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class AugustHolidayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -98,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index fbacaa90e..fd577c0f9 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class ChristmasDayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -76,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index 288c3a5a2..235b699dd 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterMondayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -99,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index d67e648cc..c0c235a53 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class EasterTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -76,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index ea83651b8..95e4adc4a 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GoodFridayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -98,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index dd9787043..0fe62a448 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -30,6 +30,8 @@ class IrelandTest extends IrelandBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -70,8 +70,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -80,8 +78,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -90,8 +86,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -100,8 +94,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -110,6 +102,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 53dd8cd30..1e8e0d216 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class JuneHolidayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -96,7 +94,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -117,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 71e553a1a..90b8cb541 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class MayDayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -96,7 +94,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -117,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index c1c22ae78..7c33d94af 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class NewYearsDayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -81,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -95,7 +93,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index f5eaaa55a..a210e335c 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class OctoberHolidayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -96,7 +94,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -117,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 5ff81dbc4..60a2c311a 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class PentecostTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -99,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 24cca4d57..0ad3e91cb 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class StPatricksDayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -81,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -95,7 +93,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index dc654abce..b0f10b88f 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class StStephensDayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -76,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -97,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index 5a859f746..f1028a971 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class pentecostMondayTest extends IrelandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -82,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test after abolishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayDayAfterAbolishment(): void { @@ -92,7 +90,7 @@ public function testHolidayDayAfterAbolishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -113,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 2a67908b3..4442a07e2 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function AllSaintsDayDataProvider(): array /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index 74c5e1558..e2143675d 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function AssumptionOfMaryDataProvider(): array /** * Tests translated name of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index cf365feac..3c52d4f41 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends ItalyBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 96ee4fdf1..8ccd7e6f5 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends ItalyBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 9b3780730..7a7e9887f 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends ItalyBaseTestCase implements HolidayTestCase * Tests Easter. * * @throws Exception - * @throws ReflectionException */ public function testEaster(): void { @@ -51,7 +49,7 @@ public function testEaster(): void /** * Tests translated name of Easter. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index b5bec4d86..1810d0382 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends ItalyBaseTestCase implements HolidayTestCase * * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testEpiphany(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function EpiphanyDataProvider(): array /** * Tests translated name of Epiphany. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index 735d0f3ca..8f6a68e51 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements HolidayTestC * * @param int $year the year for which the day of Immaculate Conception needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testImmaculateConception(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ImmaculateConceptionDataProvider(): array /** * Tests translated name of the day of Immaculate Conception. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index aedfeb4f3..87ccf3a45 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements HolidayTe * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests translated name of International Workers' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index 5f17253e9..30d7a5632 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -30,6 +30,8 @@ class ItalyTest extends ItalyBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Italy are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -61,8 +61,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Italy are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,8 +69,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Italy are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -81,8 +77,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Italy are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -91,8 +85,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Italy are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -101,6 +93,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 7d4845fdf..626aedf22 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -47,7 +46,6 @@ class LiberationDayTest extends ItalyBaseTestCase implements HolidayTestCase * Tests Liberation Day on or after 1949. * * @throws Exception - * @throws ReflectionException */ public function testLiberationDayOnAfter1949(): void { @@ -63,7 +61,7 @@ public function testLiberationDayOnAfter1949(): void /** * Tests Liberation Day before 1949. * - * @throws ReflectionException + * @throws Exception */ public function testLiberationDayBefore1949(): void { @@ -77,7 +75,7 @@ public function testLiberationDayBefore1949(): void /** * Tests translated name of Liberation Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index 5e1875602..19d15c69e 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends ItalyBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function NewYearsDayDataProvider(): array /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 859bd5d75..91fda23f2 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -47,7 +46,6 @@ class RepublicDayTest extends ItalyBaseTestCase implements HolidayTestCase * Tests Republic Day on or after 1946. * * @throws Exception - * @throws ReflectionException */ public function testRepublicDayOnAfter1946(): void { @@ -63,7 +61,7 @@ public function testRepublicDayOnAfter1946(): void /** * Tests Republic Day before 1946. * - * @throws ReflectionException + * @throws Exception */ public function testRepublicDayBefore1946(): void { @@ -77,7 +75,7 @@ public function testRepublicDayBefore1946(): void /** * Tests translated name of Republic Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 83fe92e53..8e5e62a23 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stStephensDayTest extends ItalyBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function teststStephensDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function stStephensDayDataProvider(): array /** * Tests translated name of St. Stephen's Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index d1931c739..29fca97ed 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +42,7 @@ class AutumnalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCas * * After 2150 no calculations are available yet. * - * @throws ReflectionException + * @throws Exception */ public function testAutumnalEquinoxDayOnAfter2150(): void { @@ -63,7 +62,6 @@ public function testAutumnalEquinoxDayOnAfter2150(): void * @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 */ public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, int $day): void @@ -97,7 +95,7 @@ public function autumnalEquinoxHolidaysProvider(): array * 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 Exception */ public function testAutumnalEquinoxDayBefore1948(): void { @@ -111,7 +109,7 @@ public function testAutumnalEquinoxDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -126,7 +124,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index e5f4aef89..b99c04bda 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChildrensDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests Children's Day after 1948. Children's Day was established after 1948. * * @throws Exception - * @throws ReflectionException */ public function testChildrensDayOnAfter1948(): void { @@ -57,7 +55,6 @@ public function testChildrensDayOnAfter1948(): void * Tests Children's Day after 1948 substituted next working day (when Children's Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -73,7 +70,7 @@ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay(): void /** * Tests Children's Day before 1948. Children's Day was established after 1948. * - * @throws ReflectionException + * @throws Exception */ public function testChildrensDayBefore1948(): void { @@ -87,7 +84,7 @@ public function testChildrensDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index 5fe9295e0..717a07c04 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ComingOfAgeDayTest extends JapanBaseTestCase implements HolidayTestCase * was changed to be the second monday of January. * * @throws Exception - * @throws ReflectionException */ public function testComingOfAgeDayOnAfter2000(): void { @@ -59,7 +57,6 @@ public function testComingOfAgeDayOnAfter2000(): void * After 2000 it was changed to be the second monday of January. * * @throws Exception - * @throws ReflectionException */ public function testComingOfAgeDayBetween1948And2000(): void { @@ -76,7 +73,7 @@ public function testComingOfAgeDayBetween1948And2000(): void * 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 Exception */ public function testConstitutionMemorialDayBefore1948(): void { @@ -90,7 +87,7 @@ public function testConstitutionMemorialDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index 37bb00c3a..7f8601adf 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ConstitutionMemorialDayTest extends JapanBaseTestCase implements HolidayTe * Tests Constitution Memorial Day after 1948. Constitution Memorial Day was established after 1948. * * @throws Exception - * @throws ReflectionException */ public function testConstitutionMemorialDayOnAfter1948(): void { @@ -58,7 +56,6 @@ public function testConstitutionMemorialDayOnAfter1948(): void * a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -74,7 +71,7 @@ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay( /** * Tests Constitution Memorial Day before 1948. Constitution Memorial Day was established after 1948. * - * @throws ReflectionException + * @throws Exception */ public function testConstitutionMemorialDayBefore1948(): void { @@ -88,7 +85,7 @@ public function testConstitutionMemorialDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -103,7 +100,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index d3f1a05c6..4c007674d 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,6 @@ class CoronationDayTest extends JapanBaseTestCase implements HolidayTestCase /** * @throws Exception - * @throws ReflectionException */ public function testEmperorsCoronationDay(): void { @@ -51,7 +49,7 @@ public function testEmperorsCoronationDay(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testEmperorsBirthdayBefore2019(): void { @@ -63,7 +61,7 @@ public function testEmperorsBirthdayBefore2019(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testEmperorsBirthdayAfter2020(): void { @@ -76,8 +74,6 @@ public function testEmperorsBirthdayAfter2020(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -91,8 +87,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index c068223cb..150c29e9f 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class CultureDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests Culture Day after 1948. Culture Day Day was established after 1948. * * @throws Exception - * @throws ReflectionException */ public function testCultureDayOnAfter1948(): void { @@ -57,7 +55,6 @@ public function testCultureDayOnAfter1948(): void * Tests Culture Day after 1948 substituted next working day (when Culture Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -73,7 +70,7 @@ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay(): void /** * Tests Culture Day before 1948. Culture Day was established after 1948. * - * @throws ReflectionException + * @throws Exception */ public function testCultureDayBefore1948(): void { @@ -87,7 +84,7 @@ public function testCultureDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index 3791aa770..da34dbad5 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements HolidayTestCase * 1949. * * @throws Exception - * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter1949(): void { @@ -61,7 +59,6 @@ public function testEmperorsBirthdayOnAfter1949(): void * Day". * * @throws Exception - * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter1989(): void { @@ -79,7 +76,6 @@ public function testEmperorsBirthdayOnAfter1989(): void * 2020. * * @throws Exception - * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter2020(): void { @@ -97,7 +93,6 @@ public function testEmperorsBirthdayOnAfter2020(): void * Sunday). * * @throws Exception - * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void { @@ -115,7 +110,7 @@ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void * 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 Exception */ public function testEmperorsBirthdayBefore1989(): void { @@ -128,8 +123,6 @@ public function testEmperorsBirthdayBefore1989(): void /** * Tests the Emperors Birthday at 2019. - * - * @throws ReflectionException */ public function testEmperorsBirthdayAt2019(): void { @@ -143,7 +136,7 @@ public function testEmperorsBirthdayAt2019(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -158,7 +151,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index 7ab798f3c..412ac45cb 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,6 @@ class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements /** * @throws Exception - * @throws ReflectionException */ public function testEmperorsCoronationDay(): void { @@ -51,7 +49,7 @@ public function testEmperorsCoronationDay(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testEmperorsBirthdayBefore2019(): void { @@ -63,7 +61,7 @@ public function testEmperorsBirthdayBefore2019(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testEmperorsBirthdayAfter2020(): void { @@ -76,8 +74,6 @@ public function testEmperorsBirthdayAfter2020(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -91,8 +87,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index 55158feff..6ae952511 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class GreeneryDayTest extends JapanBaseTestCase implements HolidayTestCase * it was changed to be May 4th. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfter2007(): void { @@ -58,7 +56,6 @@ public function testHolidayOnAfter2007(): void * Tests Greenery Day after 2007 substituted next working day (when Greenery Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void { @@ -76,7 +73,6 @@ public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void * it was changed to be May 4th. * * @throws Exception - * @throws ReflectionException */ public function testHolidayBetween1989And2007(): void { @@ -93,7 +89,6 @@ public function testHolidayBetween1989And2007(): void * Tests Greenery Day between 1989 and 2007 substituted next working day (when Greenery Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void { @@ -110,7 +105,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void * 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 Exception */ public function testHolidayBefore1989(): void { @@ -124,7 +119,7 @@ public function testHolidayBefore1989(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -139,7 +134,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index ec22e3eeb..d10a1b223 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -30,6 +30,8 @@ class JapanTest extends JapanBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Japan are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -65,8 +65,6 @@ public function testOfficialHolidays(): void /** * Tests if all official holidays in Japan At 2019 are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidaysAt2019(): void { @@ -93,8 +91,6 @@ public function testOfficialHolidaysAt2019(): void /** * Tests if all observed holidays in Japan are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -103,8 +99,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Japan are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -113,8 +107,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Japan are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -123,8 +115,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Japan are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -133,6 +123,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 2f3183bdc..34f7dc716 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class LabourThanksgivingDayTest extends JapanBaseTestCase implements HolidayTest * 1948. * * @throws Exception - * @throws ReflectionException */ public function testLabourThanksgivingDayOnAfter1948(): void { @@ -59,7 +57,6 @@ public function testLabourThanksgivingDayOnAfter1948(): void * Sunday). * * @throws Exception - * @throws ReflectionException */ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -76,7 +73,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 Exception */ public function testLabourThanksgivingDayBefore1948(): void { @@ -90,7 +87,7 @@ public function testLabourThanksgivingDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index c1c11ed1e..1f22f8b82 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MarineDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests Marine Day in 2021. Marine Day in 2021 is July 22th for rescheduled Olympic Games after COVID-19. * * @throws Exception - * @throws ReflectionException */ public function testMarineDayIn2021(): void { @@ -58,7 +56,6 @@ public function testMarineDayIn2021(): void * to be the third monday of July. * * @throws Exception - * @throws ReflectionException */ public function testMarineDayOnAfter2003(): void { @@ -81,7 +78,6 @@ public function testMarineDayOnAfter2003(): void * changed to be the third monday of July. * * @throws Exception - * @throws ReflectionException */ public function testMarineDayBetween1996And2003(): void { @@ -98,7 +94,6 @@ public function testMarineDayBetween1996And2003(): void * Tests Marine Day between 1996 and 2003 substituted next working day (when Marine Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void { @@ -115,7 +110,7 @@ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void * 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 Exception */ public function testMarineDayBefore1996(): void { @@ -129,7 +124,7 @@ public function testMarineDayBefore1996(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -144,7 +139,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 302298864..4f29af8e5 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MountainDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests Mountain Day in 2021. Mountain Day in 2021 is August 8th for rescheduled Olympic Games after COVID-19. * * @throws Exception - * @throws ReflectionException */ public function testMountainDayIn2021(): void { @@ -57,7 +55,6 @@ public function testMountainDayIn2021(): void * Tests Mountain Day in 2020. Mountain Day in 2020 is August 10th for the Olympic Games. * * @throws Exception - * @throws ReflectionException */ public function testMountainDayIn2020(): void { @@ -74,7 +71,6 @@ public function testMountainDayIn2020(): void * Tests Mountain Day after 2016. Mountain Day was established in 2014 and is held from 2016 on August 11th. * * @throws Exception - * @throws ReflectionException */ public function testMountainDayOnAfter2016(): void { @@ -91,7 +87,6 @@ public function testMountainDayOnAfter2016(): void * Tests Mountain Day after 2016 substituted next working day (when Mountain Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay(): void { @@ -107,7 +102,7 @@ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay(): void /** * Tests Mountain Day before 2016. Mountain Day was established in 2014 and is held from 2016 on August 11th. * - * @throws ReflectionException + * @throws Exception */ public function testMountainDayBefore2016(): void { @@ -121,7 +116,7 @@ public function testMountainDayBefore2016(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -136,7 +131,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 052d2f81f..d08e402b2 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NationalFoundationDayTest extends JapanBaseTestCase implements HolidayTest * Tests National Foundation Day after 1966. National Foundation day was established after 1966. * * @throws Exception - * @throws ReflectionException */ public function testNationalFoundationDayOnAfter1966(): void { @@ -58,7 +56,6 @@ public function testNationalFoundationDayOnAfter1966(): void * Sunday). * * @throws Exception - * @throws ReflectionException */ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay(): void { @@ -74,7 +71,7 @@ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay(): /** * Tests National Foundation Day before 1966. National Foundation day was established after 1966. * - * @throws ReflectionException + * @throws Exception */ public function testNationalFoundationDayBefore1966(): void { @@ -88,7 +85,7 @@ public function testNationalFoundationDayBefore1966(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -103,7 +100,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 5a7e19e8c..fbc815aff 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NewYearsDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests New Years Day after 1948. New Years Day was established after 1948. * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDayOnAfter1948(): void { @@ -57,7 +55,6 @@ public function testNewYearsDayOnAfter1948(): void * Tests New Years Day after 1948 substituted next working day (when New Years Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -73,7 +70,7 @@ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay(): void /** * Tests New Years Day before 1948. New Years Day was established after 1948. * - * @throws ReflectionException + * @throws Exception */ public function testNewYearsDayBefore1948(): void { @@ -87,7 +84,7 @@ public function testNewYearsDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index ae02cc53d..261481d7a 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -47,7 +46,6 @@ protected function setUp(): void * Tests public bridge days. * * @throws Exception - * @throws ReflectionException */ public function testPublicBridgeDay(): void { @@ -67,8 +65,6 @@ public function testPublicBridgeDay(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -77,8 +73,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index bd3739435..3c98b810e 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class RespectForTheAgedDayTest extends JapanBaseTestCase implements HolidayTestC * 15th. After 2003 it was changed to be the third monday of September. * * @throws Exception - * @throws ReflectionException */ public function testRespectForTheAgedDayOnAfter2003(): void { @@ -59,7 +57,6 @@ public function testRespectForTheAgedDayOnAfter2003(): void * September 15th. After 2003 it was changed to be the third monday of September. * * @throws Exception - * @throws ReflectionException */ public function testRespectForTheAgedDayBetween1996And2003(): void { @@ -77,7 +74,6 @@ public function testRespectForTheAgedDayBetween1996And2003(): void * falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorkingDay(): void { @@ -94,7 +90,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 Exception */ public function testRespectForTheAgedDayBefore1996(): void { @@ -108,7 +104,7 @@ public function testRespectForTheAgedDayBefore1996(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -123,7 +119,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index 251f03674..2c131bc75 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ShowaDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests the holiday defined in the test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfter2007(): void { @@ -57,7 +55,6 @@ public function testHolidayOnAfter2007(): void * Tests the holiday defined in the test on or after the establishment and substituted next working day. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay(): void { @@ -73,7 +70,7 @@ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay(): void /** * Tests the holiday defined in the test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -87,7 +84,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 80bb0cf79..1b0f4fb66 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class SportsDayTest extends JapanBaseTestCase implements HolidayTestCase * after COVID-19. * * @throws Exception - * @throws ReflectionException */ public function testSportsDayIn2021(): void { @@ -58,7 +56,6 @@ public function testSportsDayIn2021(): void * Tests Health And Sports Day in 2020. Health And Sports Day in 2020 is July 24th for the Olympic Games. * * @throws Exception - * @throws ReflectionException */ public function testSportsDayIn2020(): void { @@ -76,7 +73,6 @@ public function testSportsDayIn2020(): void * 2000 it was changed to be the second monday of October. * * @throws Exception - * @throws ReflectionException */ public function testSportsDayOnAfter2000(): void { @@ -94,7 +90,6 @@ public function testSportsDayOnAfter2000(): void * 10th. After 2000 it was changed to be the second monday of October. * * @throws Exception - * @throws ReflectionException */ public function testSportsDayBetween1996And2000(): void { @@ -112,7 +107,6 @@ public function testSportsDayBetween1996And2000(): void * on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void { @@ -129,7 +123,7 @@ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void * 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 Exception */ public function testSportsDayBefore1996(): void { @@ -144,7 +138,7 @@ public function testSportsDayBefore1996(): void * Tests the translated name of the holiday defined in this test. * 1996-2019:Health And Sports Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -160,7 +154,7 @@ public function testTranslation(): void * Tests the translated name of the holiday defined in this test. * 2020 - :Sports Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslationFrom2020(): void { @@ -176,7 +170,7 @@ public function testTranslationFrom2020(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index cdc015e03..19d90f7b0 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +42,7 @@ class VernalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCase * * After 2150 no calculations are available yet. * - * @throws ReflectionException + * @throws Exception */ public function testVernalEquinoxDayOnAfter2150(): void { @@ -63,7 +62,6 @@ public function testVernalEquinoxDayOnAfter2150(): void * @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 */ public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, int $day): void @@ -97,7 +95,7 @@ public function vernalEquinoxHolidaysProvider(): array * 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 Exception */ public function testVernalEquinoxDayBefore1948(): void { @@ -111,7 +109,7 @@ public function testVernalEquinoxDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -126,7 +124,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 61257cb51..b62ca87a3 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index cf1665771..2c68a36e8 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index 05a464e60..76676758d 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 76e8595d2..7bf4b20ae 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index 66c02497b..cd67382cf 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index 5d6161566..fe3d76a44 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index c2ba79116..eb87dd5a5 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -30,7 +30,7 @@ class LatviaTest extends LatviaBaseTestCase implements ProviderTestCase /** * Tests if all official holidays in Latvia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOfficialHolidays(): void { @@ -64,7 +64,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Latvia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testObservedHolidays(): void { @@ -74,7 +74,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Latvia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -84,7 +84,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Latvia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testBankHolidays(): void { @@ -94,7 +94,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Latvia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOtherHolidays(): void { @@ -103,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index e2a6ac2a6..8c626949d 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index 04caa1309..9459b8ddf 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index b37c24e69..eb9aa2155 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 3f6e6f577..f53cd107b 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class ProclamationOfTheRepublicOfLatviaDayTest extends LatviaBaseTestCase implem /** * Test if holiday is not defined before proclamation. * - * @throws ReflectionException + * @throws Exception */ public function testNotHoliday(): void { @@ -73,7 +72,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -89,7 +87,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -107,7 +105,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index 1011987cb..769c5d342 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class RestorationOfIndependenceDayTest extends LatviaBaseTestCase implements Hol /** * Test if holiday is not defined before restoration. * - * @throws ReflectionException + * @throws Exception */ public function testNotHoliday(): void { @@ -73,7 +72,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -89,7 +87,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -107,7 +105,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index b6f8e5d76..faab1bc69 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index db3d67077..ff3772828 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index 5438552f2..bcb82da10 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index 7373e3376..d8a008a9e 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -36,7 +35,7 @@ class AllSoulsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'allSoulsDay'; /** - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeAnnounce(): void { @@ -51,7 +50,6 @@ public function testHolidayBeforeAnnounce(): void * Test if holiday is defined after restoration. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfterAnnounce(): void { @@ -68,7 +66,7 @@ public function testHolidayAfterAnnounce(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index 9073f0cf7..f86e221d2 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 85343e6f1..0fac9cb87 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 4794ac8c2..9609ef309 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index 4196a7798..b7dfce109 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index f8c31e50c..8a42568d3 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -52,7 +51,6 @@ 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 */ public function testHoliday(int $year, string $expected): void @@ -68,7 +66,7 @@ public function testHoliday(int $year, string $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -83,7 +81,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index aae7d5ed6..c4886a033 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index bfce4afb0..9213e832c 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -29,7 +29,7 @@ class LithuaniaTest extends LithuaniaBaseTestCase /** * Tests if all official holidays in Lithuania are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOfficialHolidays(): void { @@ -66,7 +66,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Lithuania are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testObservedHolidays(): void { @@ -76,7 +76,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lithuania are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -86,7 +86,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lithuania are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testBankHolidays(): void { @@ -96,7 +96,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lithuania are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOtherHolidays(): void { @@ -105,6 +105,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 00fa10092..d845ce473 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 4881296de..7c7ce62b4 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class RestorationOfIndependenceOfLithuaniaDayTest extends LithuaniaBaseTestCase /** * Test if holiday is not defined before restoration. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeRestoration(): void { @@ -53,7 +52,6 @@ public function testHolidayBeforeRestoration(): void * Test if holiday is defined after restoration. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfterRestoration(): void { @@ -70,7 +68,7 @@ public function testHolidayAfterRestoration(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 7ecf6c601..97b2d4f0b 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class RestorationOfTheStateOfLithuaniaDayTest extends LithuaniaBaseTestCase impl /** * Test if holiday is not defined before restoration. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeRestoration(): void { @@ -53,7 +52,6 @@ public function testHolidayBeforeRestoration(): void * Test if holiday is defined after restoration. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfterRestoration(): void { @@ -70,7 +68,7 @@ public function testHolidayAfterRestoration(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index b05554e21..74594d52c 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index 392bff7b5..36dfa04df 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index f3cf30983..6fff94765 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class StatehoodDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before restoration. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeRestoration(): void { @@ -53,7 +52,6 @@ public function testHolidayBeforeRestoration(): void * Test if holiday is defined after restoration. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfterRestoration(): void { @@ -70,7 +68,7 @@ public function testHolidayAfterRestoration(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index 44a388f8a..efa0f17fd 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index 83cf3a9e4..192bd6276 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index f611451cd..a24070707 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index cbb6cc9c4..7eed1a545 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index df5664acf..b09e98b5c 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends LuxembourgBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index 3d89b3274..95c35624d 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EuropeDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * Tests Europe Day on or after 2019. * * @throws Exception - * @throws ReflectionException */ public function testEuropeDayOnAfter2019(): void { @@ -56,7 +54,7 @@ public function testEuropeDayOnAfter2019(): void /** * Tests Europe Day before 2019. * - * @throws ReflectionException + * @throws Exception */ public function testEuropeDayBefore2019(): void { @@ -70,7 +68,7 @@ public function testEuropeDayBefore2019(): void /** * Tests translated name of Europe Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index 9838ef820..cb3cf6b6d 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements Holi * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of International Workers' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/LuxembourgTest.php b/tests/Luxembourg/LuxembourgTest.php index c262c2054..8abe1b8da 100644 --- a/tests/Luxembourg/LuxembourgTest.php +++ b/tests/Luxembourg/LuxembourgTest.php @@ -27,12 +27,12 @@ class LuxembourgTest extends LuxembourgBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Tests if all official holidays in Luxembourg are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOfficialHolidays(): void { @@ -61,7 +61,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Luxembourg are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testObservedHolidays(): void { @@ -71,7 +71,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Luxembourg are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -81,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Luxembourg are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testBankHolidays(): void { @@ -91,7 +91,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Luxembourg are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOtherHolidays(): void { @@ -100,6 +100,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index 6b586e173..811514fe4 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NationalDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index ab90746f7..0243ce68a 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index 5546f1382..9af50c120 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends LuxembourgBaseTestCase implements HolidayTestC * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index 65b03ebf5..0584b7586 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 9f8ad4ad0..f4fd68b63 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index efddc1113..d757817c3 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AshWednesdayTest extends NetherlandsBaseTestCase implements HolidayTestCas * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of Ash Wednesday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 95e0e8936..6101e7e86 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 28fdbf911..993cfcc05 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ class CommemorationDayTest extends NetherlandsBaseTestCase implements HolidayTes /** * Tests Commemoration Day before 1947. Commemoration Day was established after WWII in 1947. * - * @throws ReflectionException + * @throws Exception */ public function testCommemorationDayBefore1947(): void { @@ -54,7 +53,6 @@ public function testCommemorationDayBefore1947(): void * Tests Commemoration Day after 1947. Commemoration Day was established after WWII in 1947. * * @throws Exception - * @throws ReflectionException */ public function testCommemorationDayOnAfter1947(): void { @@ -70,7 +68,7 @@ public function testCommemorationDayOnAfter1947(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index 178912930..fcc5f1d88 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends NetherlandsBaseTestCase implements HolidayTestCas * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 50eef008d..c62304672 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Easter. * * @throws Exception - * @throws ReflectionException */ public function testEaster(): void { @@ -51,7 +49,7 @@ public function testEaster(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index b18d77e09..c9db4a0ab 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements HolidayTestCase * * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testEpiphany(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function EpiphanyDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index d90653786..10f943eb3 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class FathersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index d674af476..c99d1048e 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Good Friday. * * @throws Exception - * @throws ReflectionException */ public function testGoodFriday(): void { @@ -51,7 +49,7 @@ public function testGoodFriday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index c8d8d9d79..783949fec 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class HalloweenTest extends NetherlandsBaseTestCase implements HolidayTestCase * * @param int $year the year for which Halloween needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HalloweenDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index 1f47024d4..a00e1e2f1 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Hol * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index 7ab2d81b1..38139c985 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class KingsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Kings Day on or after 2014. King's Day is celebrated from 2014 onwards on April 27th. * * @throws Exception - * @throws ReflectionException */ public function testKingsDayOnAfter2014(): void { @@ -57,7 +55,6 @@ public function testKingsDayOnAfter2014(): void * Tests Kings Day substituted on Saturday (when Kings Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testKingsDayOnAfter2014SubstitutedDay(): void { @@ -73,7 +70,7 @@ public function testKingsDayOnAfter2014SubstitutedDay(): void /** * Tests Kings Day before 2014. King's Day is celebrated from 2014 onwards on April 27th. * - * @throws ReflectionException + * @throws Exception */ public function testKingsDayBefore2014(): void { @@ -87,7 +84,7 @@ public function testKingsDayBefore2014(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 24106ecfd..39cdc4ce7 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ class LiberationDayTest extends NetherlandsBaseTestCase implements HolidayTestCa /** * Tests Liberation Day before 1947. Liberation Day was established after WWII in 1947. * - * @throws ReflectionException + * @throws Exception */ public function testLiberationDayBefore1947(): void { @@ -54,7 +53,6 @@ public function testLiberationDayBefore1947(): void * Tests Liberation Day after 1947. Liberation Day was established after WWII in 1947. * * @throws Exception - * @throws ReflectionException */ public function testLiberationDayOnAfter1947(): void { @@ -70,7 +68,7 @@ public function testLiberationDayOnAfter1947(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index e9ea418b6..fccd58c64 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class MothersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Mother's Day. * * @throws Exception - * @throws ReflectionException */ public function testMothersDay(): void { @@ -51,7 +49,7 @@ public function testMothersDay(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 99387f1d0..b10b702ce 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -26,10 +26,12 @@ class NetherlandsTest extends NetherlandsBaseTestCase implements ProviderTestCas /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Netherlands are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Netherlands are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -80,7 +78,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Netherlands are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -90,8 +88,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Netherlands are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -100,8 +96,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Netherlands are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -118,6 +112,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 66eb9b681..e71cc80f9 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function NewYearsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index 2ee6e3a07..136c7e4df 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index ea9c5ff26..3ab39c73f 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class QueensDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Queens Day between 1891 and 1948. * * @throws Exception - * @throws ReflectionException */ public function testQueensBetween1891and1948(): void { @@ -52,7 +50,6 @@ public function testQueensBetween1891and1948(): void * Tests Queens Day between 1891 and 1948 substituted one day later (when Queens Day falls on a Sunday). * * @throws Exception - * @throws ReflectionException */ public function testQueensBetween1891and1948SubstitutedLater(): void { @@ -69,7 +66,6 @@ public function testQueensBetween1891and1948SubstitutedLater(): void * Tests Queens Day between 1949 and 2013. * * @throws Exception - * @throws ReflectionException */ public function testQueensBetween1949and2013(): void { @@ -86,7 +82,6 @@ public function testQueensBetween1949and2013(): void * Tests Queens Day between 1949 and 2013 substituted one day later. * * @throws Exception - * @throws ReflectionException */ public function testQueensBetween1949and2013SubstitutedLater(): void { @@ -103,7 +98,6 @@ public function testQueensBetween1949and2013SubstitutedLater(): void * Tests Queens Day between 1949 and 2013 substituted one day earlier. * * @throws Exception - * @throws ReflectionException */ public function testQueensBetween1949and2013SubstitutedEarlier(): void { @@ -119,7 +113,7 @@ public function testQueensBetween1949and2013SubstitutedEarlier(): void /** * Tests Queen's Day before 1891. * - * @throws ReflectionException + * @throws Exception */ public function testQueensDayBefore1891(): void { @@ -129,7 +123,7 @@ public function testQueensDayBefore1891(): void /** * Tests Queen's Day after 2013. * - * @throws ReflectionException + * @throws Exception */ public function testQueensDayAfter2013(): void { @@ -139,7 +133,7 @@ public function testQueensDayAfter2013(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -154,7 +148,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index 1cf348cd8..e5707f104 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class SummertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Summertime. * * @throws Exception - * @throws ReflectionException */ public function testSummertime(): void { @@ -61,7 +59,7 @@ public function testSummertime(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 4bb8b2a3b..5c302cf54 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements HolidayTestCa * * @param int $year the year for which Valentines Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testValentinesDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ValentinesDayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -70,7 +67,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index 050024092..d496ec237 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class WintertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Wintertime. * * @throws Exception - * @throws ReflectionException */ public function testWintertime(): void { @@ -61,7 +59,7 @@ public function testWintertime(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index cb4431624..b589a8dc0 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class WorldAnimalDayTest extends NetherlandsBaseTestCase implements HolidayTestC * Tests World Animal Day on or after 1931. * * @throws Exception - * @throws ReflectionException */ public function testWorldAnimalDayOnAfter1931(): void { @@ -56,7 +54,7 @@ public function testWorldAnimalDayOnAfter1931(): void /** * Tests World Animal Day before 1931. * - * @throws ReflectionException + * @throws Exception */ public function testWorldAnimalBefore1931(): void { @@ -70,7 +68,7 @@ public function testWorldAnimalBefore1931(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -85,7 +83,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index b860ef3be..a6d134fc2 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class carnivalDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -61,7 +59,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 07def2ae6..92fc4b66c 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class pentecostMondayTest extends NetherlandsBaseTestCase implements HolidayTest * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index c561adc5f..5610b2818 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class princesDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * Tests Prince's Day. * * @throws Exception - * @throws ReflectionException */ public function testPrincesDay(): void { @@ -51,7 +49,7 @@ public function testPrincesDay(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index d88173d66..98ea9f19f 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -18,7 +18,6 @@ use DateTimeZone; use Exception; use InvalidArgumentException; -use ReflectionException; use RuntimeException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -40,7 +39,6 @@ class secondCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCa * @throws UnknownLocaleException * @throws InvalidArgumentException * @throws RuntimeException - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -60,7 +58,7 @@ public function testHoliday(): void * @throws InvalidArgumentException * @throws RuntimeException * @throws UnknownLocaleException - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -73,7 +71,7 @@ public function testHolidayType(): void * @throws InvalidArgumentException * @throws RuntimeException * @throws UnknownLocaleException - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index 218effec2..f8858adbd 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements HolidayT * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 5aeecdd96..f64e5b72a 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * * @param int $year the year for which Sint Martins Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function teststMartinsDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function stMartinsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index e816f5139..bc690befe 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements HolidayTestCa * * @param int $year the year for which Sint Nicholas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function teststNicholasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function stNicholasDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index 33cd25a3a..0943572af 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -18,7 +18,6 @@ use DateTimeZone; use Exception; use InvalidArgumentException; -use ReflectionException; use RuntimeException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -40,7 +39,6 @@ class thirdCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCas * @throws UnknownLocaleException * @throws InvalidArgumentException * @throws RuntimeException - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -60,7 +58,7 @@ public function testHoliday(): void * @throws InvalidArgumentException * @throws RuntimeException * @throws UnknownLocaleException - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -73,7 +71,7 @@ public function testHolidayType(): void * @throws InvalidArgumentException * @throws RuntimeException * @throws UnknownLocaleException - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index e1d321e35..48025121f 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class AnzacDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -59,8 +57,6 @@ public function testHoliday(int $year, string $expected): void /** * Tests that Labour Day is not present before 1921. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -87,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 939b8819d..7957adddf 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BoxingDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -81,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -96,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 895701da2..1cfbd4639 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChristmasDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -81,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -96,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index 1efaca72a..6924635cb 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements HolidayT * @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(int $year, string $expected): void @@ -56,7 +54,7 @@ public function testHoliday(int $year, string $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +69,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index 5d41f6461..b3380d7ca 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterMondayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index 80ac99751..00a83a9f8 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GoodFridayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -77,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index dbd5d4464..9bbdfa020 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class LabourDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -59,8 +57,6 @@ public function testHoliday(int $year, string $expected): void /** * Tests that Labour Day is not present before 1900. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -94,7 +90,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -109,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 57d251a18..d1cf7b913 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NewYearsDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -86,7 +84,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -101,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index a46c47b7d..e17ef47b8 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -26,10 +26,12 @@ class NewZealandTest extends NewZealandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in New Zealand are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in New Zealand are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -68,8 +66,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in New Zealand are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,8 +74,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in New Zealand are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in New Zealand are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 1d0b5e2c2..9cb0ba085 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -53,8 +50,6 @@ public function testHoliday(int $year, DateTime $expected): void /** * Tests that Holiday is not present before 1952. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -84,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -99,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 85a9188b3..ea79aa5ca 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class WaitangiDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -59,8 +57,6 @@ public function testHoliday(int $year, string $expected): void /** * Tests that Holiday is not present before 1974. - * - * @throws ReflectionException */ public function testNotHoliday(): void { @@ -70,7 +66,7 @@ public function testNotHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index 92a7e9f75..6fc44b880 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends NorwayBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index a867d0ee5..0abbdfe3e 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index b59f06842..03946d6ff 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ConstitutionDayTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 0d82ecaaa..333f8374b 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index 6a41148d5..098b921cf 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index 032c80066..274d6ab66 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 64fb62ed3..9e00706b1 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements HolidayT * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index 9338ab5eb..f2c0a03b8 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class MaundyThursdayTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index acbe32565..6cefaa2c0 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends NorwayBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index 426178240..f2a8a0713 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -30,6 +30,8 @@ class NorwayTest extends NorwayBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Norway are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -61,8 +61,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Norway are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,8 +69,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Norway are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -81,8 +77,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Norway are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -91,8 +85,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Norway are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -101,6 +93,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 3678bd599..a472d8f81 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index 36bd46d12..ee793c19c 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends NorwayBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index dcabc13c5..64689767a 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index 05932e8fe..31e1996fe 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends PolandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 1030ee8da..2802444c1 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 8285fffde..f0b72abf1 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends PolandBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index f2817f7a7..1376c3995 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ConstitutionDayTest extends PolandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index 7cee1e486..c3b446cd6 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class CorpusChristiTest extends PolandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of Corpus Christi. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 4a48c85e7..3c9f29b08 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends PolandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 144b2cbb0..cf3a22d3c 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends PolandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index ec64bd019..9c8ed6cc5 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends PolandBaseTestCase implements HolidayTestCase * * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testEpiphany(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function EpiphanyDataProvider(): array /** * Tests translated name of Epiphany. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index 2a3a85c76..7f51f3f74 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndependenceDayTest extends PolandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index 2c4f08536..b0574a4a9 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements HolidayT * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index eb42740e5..1062802ef 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends PolandBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index a1160c394..324862c4d 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends PolandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index 5c1cd0023..cb143e78a 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -30,6 +30,8 @@ class PolandTest extends PolandBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Poland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Poland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,8 +70,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Poland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,8 +78,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Poland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,8 +86,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Poland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -102,6 +94,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index 364ff76ba..2b5d9f935 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index ad72287bf..877d69f11 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,9 +43,6 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws ReflectionException - * @throws Exception - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -63,7 +59,7 @@ public function testHoliday(): void /** * Test that the holiday did not happen in 2013-2015. * - * @throws ReflectionException + * @throws Exception */ public function testNotHoliday(): void { @@ -74,7 +70,7 @@ public function testNotHoliday(): void /** * Tests translated name of Corpus Christi. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -90,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index e6bc4060e..667aadd4d 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index d7445b877..38a464542 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements Holiday /** * Test that the holiday is valid after the year of establishment. * - * @throws ReflectionException * @throws Exception */ public function testHolidayAfterEstablishment(): void @@ -52,7 +50,7 @@ public function testHolidayAfterEstablishment(): void /** * Tests that the holiday is not a holiday before the year of establishment. * - * @throws ReflectionException + * @throws Exception */ public function testNotHolidayBeforeEstablishment(): void { @@ -63,7 +61,7 @@ public function testNotHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -74,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index eabff06f8..8545ea1c8 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends PortugalBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 8fa96fe05..07450e48c 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class CorpusChristiTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -57,7 +55,7 @@ public function testHoliday(): void /** * Test that the holiday did not happen in 2013-2015. * - * @throws ReflectionException + * @throws Exception */ public function testNotHoliday(): void { @@ -68,7 +66,7 @@ public function testNotHoliday(): void /** * Tests translated name of Corpus Christi. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index d3665dde3..f1d701ea2 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends PortugalBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index ba58e83df..33d85bb58 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends PortugalBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index 3127130b6..dff7a043f 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 7a1dbac55..34ce61ac8 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Holida * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index f8fe56a36..83219907f 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends PortugalBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 4e82be7f6..14802fef8 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Portugal; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class PortugalDayTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test before it was abolished. * - * @throws ReflectionException * @throws Exception * * @see Portugal::calculatePortugalDay() @@ -60,7 +58,6 @@ public function testHolidayBeforeAbolishment(): void /** * Tests the holiday defined in this test after it was restored. * - * @throws ReflectionException * @throws Exception * * @see Portugal::calculatePortugalDay() @@ -75,7 +72,7 @@ public function testHolidayAfterRestoration(): void /** * Tests that the holiday defined in this test does not exist during the period that it was abolished. * - * @throws ReflectionException + * @throws Exception * * @see Portugal::calculatePortugalDay() */ @@ -91,7 +88,7 @@ public function testNotHolidayDuringAbolishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index c61842d08..943cdd3fe 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -30,6 +30,8 @@ class PortugalTest extends PortugalBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Portugal are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -66,8 +66,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Portugal are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,8 +74,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Portugal are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -86,8 +82,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Portugal are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -96,8 +90,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in PortugalPortugal are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -112,6 +104,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 8c5f2fb4e..78159720f 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,7 +31,6 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements HolidayT public const HOLIDAY = 'portugueseRepublic'; /** - * @throws ReflectionException * @throws Exception */ public function testHolidayOnAfterRestoration(): void @@ -48,7 +46,7 @@ public function testHolidayOnAfterRestoration(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testNotHolidayDuringAbolishment(): void { @@ -60,7 +58,6 @@ public function testNotHolidayDuringAbolishment(): void } /** - * @throws ReflectionException * @throws Exception */ public function testHolidayOnAfterEstablishment(): void @@ -75,68 +72,76 @@ public function testHolidayOnAfterEstablishment(): void } } - /** - * @throws ReflectionException - */ public function testHolidayBeforeEstablishment(): void { - foreach ($this->randomYearsBeforeEstablishment() as $year) { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + try { + foreach ($this->randomYearsBeforeEstablishment() as $year) { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + } catch (Exception $e) { } } - /** - * @throws ReflectionException - */ public function testTranslation(): void { - foreach ($this->randomEstablishedYear() as $year) { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $year, - [self::LOCALE => 'Implantação da República Portuguesa'] - ); + try { + foreach ($this->randomEstablishedYear() as $year) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Implantação da República Portuguesa'] + ); + } + } catch (Exception $e) { } } - /** - * @throws ReflectionException - */ public function testHolidayType(): void { - foreach ($this->randomEstablishedYear() as $year) { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $year, - Holiday::TYPE_OFFICIAL - ); + try { + foreach ($this->randomEstablishedYear() as $year) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + } + } catch (Exception $e) { } } - /** @return \Generator */ + /** @return \Generator + * @throws Exception + */ private function randomEstablishedYear(): \Generator { yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); } - /** @return \Generator */ + /** @return \Generator + * @throws Exception + */ private function randomYearsBeforeEstablishment(): \Generator { yield $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); yield self::ESTABLISHMENT_YEAR - 1; } - /** @return \Generator */ + /** @return \Generator + * @throws Exception + */ private function randomYearsOnAfterEstablishment(): \Generator { yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR); yield self::ESTABLISHMENT_YEAR; } - /** @return \Generator */ + /** @return \Generator + * @throws Exception + */ private function randomYearsOnAfterRestoration(): \Generator { yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 87f2b362b..87204ab9d 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,9 +48,6 @@ class RestorationOfIndependenceTest extends PortugalBaseTestCase implements Holi /** * Tests the holiday defined in this test on or after establishment. * - * @throws ReflectionException - * @throws Exception - * @throws ReflectionException * @throws Exception */ public function testHolidayOnAfterEstablishment(): void @@ -69,9 +65,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Test that the holiday if in effect in 2016 and later dates. * - * @throws ReflectionException * @throws Exception - * @throws ReflectionException * @throws Exception */ public function testHolidayOnAfterRestoration(): void @@ -90,7 +84,7 @@ public function testHolidayOnAfterRestoration(): void /** * Test that the holiday did not happen in 2013-2015. * - * @throws ReflectionException + * @throws Exception */ public function testNotHolidayDuringAbolishment(): void { @@ -101,7 +95,7 @@ public function testNotHolidayDuringAbolishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -115,7 +109,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -139,7 +133,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 913f3034c..22073f325 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class AssumptionOfMaryTest extends RomaniaBaseTestCase implements HolidayTestCas * Tests Assumption Of Mary Day on or after 2008. * * @throws Exception - * @throws ReflectionException */ public function testAssumptionOfMaryDayOnAfter2008(): void { @@ -56,7 +54,7 @@ public function testAssumptionOfMaryDayOnAfter2008(): void /** * Tests Assumption of Mary Day before 2008. * - * @throws ReflectionException + * @throws Exception */ public function testAssumptionOfMaryDayBefore2008(): void { @@ -70,7 +68,7 @@ public function testAssumptionOfMaryDayBefore2008(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index eca6ecfb0..c4d676297 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChildrensDayTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests Children's Day on or after 1950. * * @throws Exception - * @throws ReflectionException */ public function testChildrensDayOnAfter1950(): void { @@ -56,7 +54,7 @@ public function testChildrensDayOnAfter1950(): void /** * Tests Children's Day before 1950. * - * @throws ReflectionException + * @throws Exception */ public function testChildrensDayBefore1950(): void { @@ -70,7 +68,7 @@ public function testChildrensDayBefore1950(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 3ac3d95b9..884446359 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index 92fa37f8b..761907f19 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements HolidayTe * Tests Constantin Brancusi Day on or after 2016. * * @throws Exception - * @throws ReflectionException */ public function testConstantinBrancusiDayOnAfter2016(): void { @@ -56,7 +54,7 @@ public function testConstantinBrancusiDayOnAfter2016(): void /** * Tests Constantin Brancusi Day before 2016. * - * @throws ReflectionException + * @throws Exception */ public function testConstantinBrancusiDayBefore2016(): void { @@ -70,7 +68,7 @@ public function testConstantinBrancusiDayBefore2016(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index 4f3287b71..d4137c9fa 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index a890d352f..a918af0a3 100755 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index e0d369553..ff87b3532 100755 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 9688f852b..5f9e5f672 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements Holiday * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index b6a4caf8a..151a1d83d 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NationalDayTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests National Day on or after 1990. * * @throws Exception - * @throws ReflectionException */ public function testNationalDayOnAfter1990(): void { @@ -57,7 +55,6 @@ public function testNationalDayOnAfter1990(): void * Tests National Day between 1948 - 1989. * * @throws Exception - * @throws ReflectionException */ public function testNationalDayBetween19481989(): void { @@ -74,7 +71,6 @@ public function testNationalDayBetween19481989(): void * Tests National Day between 1866 - 1947. * * @throws Exception - * @throws ReflectionException */ public function testNationalDayBetween18661947(): void { @@ -90,7 +86,7 @@ public function testNationalDayBetween18661947(): void /** * Tests National Day before 1865. * - * @throws ReflectionException + * @throws Exception */ public function testNationalDayBefore1865(): void { @@ -104,7 +100,7 @@ public function testNationalDayBefore1865(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -119,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 7364e5666..0057acbc7 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index 2d8bfeb49..c9116adcd 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class PentecostMondayTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests the Pentecost Monday Day on and after 2008. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMondayOnAfter2008(): void { @@ -56,7 +54,7 @@ public function testPentecostMondayOnAfter2008(): void /** * Tests the Pentecost Day before 2008. * - * @throws ReflectionException + * @throws Exception */ public function testPentecostMondayBefore2008(): void { @@ -70,7 +68,7 @@ public function testPentecostMondayBefore2008(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index a913ab387..a8eeff335 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class PentecostTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests the Pentecost Day on and after 2008. * * @throws Exception - * @throws ReflectionException */ public function testPentecostDayOnAfter2008(): void { @@ -56,7 +54,7 @@ public function testPentecostDayOnAfter2008(): void /** * Tests the Pentecost Day before 2008. * - * @throws ReflectionException + * @throws Exception */ public function testPentecostDayBefore2008(): void { @@ -70,7 +68,7 @@ public function testPentecostDayBefore2008(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index da4d4ea9c..1d4d48a7e 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -31,6 +31,8 @@ class RomaniaTest extends RomaniaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -39,8 +41,6 @@ protected function setUp(): void /** * Tests if all official holidays in Romania are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -69,8 +69,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Romania are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -89,8 +87,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Romania are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -99,8 +95,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Romania are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -109,8 +103,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Romania are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -119,6 +111,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index 70ccfc7fb..f7f8229fa 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index 744d47c1f..f1dfe979a 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class StAndrewsDayTest extends RomaniaBaseTestCase implements HolidayTestCase * Tests Saint Andrew Day on or after 2012. * * @throws Exception - * @throws ReflectionException */ public function testStAndrewDayOnAfter2012(): void { @@ -56,7 +54,7 @@ public function testStAndrewDayOnAfter2012(): void /** * Tests Saint Andrew before 2012. * - * @throws ReflectionException + * @throws Exception */ public function testStAndrewDayBefore2012(): void { @@ -70,7 +68,7 @@ public function testStAndrewDayBefore2012(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index 53e8a5a0d..9030e9f22 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements Holiday * Tests united Principalities Day on or after 2015. * * @throws Exception - * @throws ReflectionException */ public function testUnitedPrincipalitiesDayOnAfter2015(): void { @@ -56,7 +54,7 @@ public function testUnitedPrincipalitiesDayOnAfter2015(): void /** * Tests unitedPrincipalitiesDay before 2015. * - * @throws ReflectionException + * @throws Exception */ public function testUnitedPrincipalitiesDayBefore2015(): void { @@ -70,7 +68,7 @@ public function testUnitedPrincipalitiesDayBefore2015(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index 88b552b60..a99f46505 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,7 @@ class DefenceOfTheFatherlandDayTest extends RussiaBaseTestCase implements Holida /** * Test if holiday is not defined before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore(): void { @@ -52,7 +51,6 @@ public function testHolidayBefore(): void * Test if holiday is defined after. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfter(): void { @@ -69,7 +67,7 @@ public function testHolidayAfter(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -90,7 +88,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index 0e176fc74..90e9554b7 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index e8a5294cc..09e4de01b 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 202deec1f..cc43b19dd 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index cb4a3c4e0..a8b8f3fc6 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,8 +43,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -55,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -70,7 +67,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index fcf7b15f2..d58e6494a 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 0ec5eea47..064b3fe0f 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index a044061ba..4d16962af 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,8 +43,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -55,7 +52,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -70,7 +67,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index ddda23516..2d987158b 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index d06f102a6..a6d71f1ca 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index 65b39e495..ed068bed7 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class RussiaDayTest extends RussiaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore(): void { @@ -53,7 +52,6 @@ public function testHolidayBefore(): void * Test if holiday is defined after. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfter(): void { @@ -70,7 +68,7 @@ public function testHolidayAfter(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index 0bcb60236..bb8fde6bf 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -30,7 +30,7 @@ class RussiaTest extends RussiaBaseTestCase implements ProviderTestCase /** * Tests if all official holidays in Russia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOfficialHolidays(): void { @@ -68,7 +68,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Russia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testObservedHolidays(): void { @@ -78,7 +78,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Russia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testSeasonalHolidays(): void { @@ -88,7 +88,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Russia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testBankHolidays(): void { @@ -98,7 +98,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Russia are defined by the provider class. * - * @throws ReflectionException + * @throws \Exception */ public function testOtherHolidays(): void { @@ -107,6 +107,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index bce11c436..3801c7393 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index 64287fea7..2d071adab 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\HolidayTestCase; @@ -38,7 +37,7 @@ class UnityDayTest extends RussiaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore(): void { @@ -53,7 +52,6 @@ public function testHolidayBefore(): void * Test if holiday is defined after. * * @throws Exception - * @throws ReflectionException */ public function testHolidayAfter(): void { @@ -70,7 +68,7 @@ public function testHolidayAfter(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -91,7 +89,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index 2b2d29acd..db7980ac9 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,8 +44,6 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -56,7 +53,7 @@ public function testHoliday(int $year, DateTime $expected): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index af032e4d7..1183fa017 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index 3e07372b3..a36d375e5 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index eb94b65a7..94a6b9945 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasEve(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Eve. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index 4aecaf8ad..385a52674 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 273ad8dd7..438759f41 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 8a19a81b8..3bf9ce0f2 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index ff3c4ac88..a82d1dfa6 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Holida * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 86f1ba46d..be773eec0 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTes * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index 12b9cf024..fc88c8d4e 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Hol * * @param 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(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index 1d2ffc773..1abc8bce3 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTest * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Second Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 0393a0129..08bc7c15c 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayT * * @param 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(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index ae1ef9d71..a81ba13ec 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,8 +40,6 @@ class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index dbb667c89..2cef159b6 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Holi * * @param 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(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 305821833..5cb85e7bf 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -33,6 +33,8 @@ class SlovakiaTest extends SlovakiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -42,8 +44,6 @@ protected function setUp(): void /** * Tests if all official holidays in Slovakia are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,8 +58,6 @@ public function testOfficialHolidays(): void /** * Tests if all bank holidays in Slovakia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -79,8 +77,6 @@ public function testBankHolidays(): void /** * Tests if all observed holidays in Slovakia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -89,8 +85,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Slovakia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -99,8 +93,6 @@ public function testSeasonalHolidays(): void /** * Tests if all other holidays in Slovakia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -109,6 +101,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 5946e66f6..162ac5a68 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ 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 */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index ee3b13e20..f8947bb31 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements HolidayTest * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 5145ec17f..2cc97e540 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class ChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayTestCas * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 1f635a0ef..751a70a48 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class FamilyDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -86,7 +84,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -100,7 +98,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -115,7 +113,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index fc9d7f641..4b9184b95 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class FreedomDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 440deff88..9bc753408 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class GoodFridayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -86,7 +84,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -100,7 +98,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -115,7 +113,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index db48aefd8..06bb662f4 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class HeritageDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index acc33a3e2..bfbd2d47e 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class HumanRightsDayTest extends SouthAfricaBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 644b7d90c..47c1ee4c9 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class MunicipalElections2016DayTest extends SouthAfricaBaseTestCase implements H * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -59,7 +57,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -73,7 +71,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the holiday defined in this test after completion. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayDayAfterCompletion(): void { @@ -83,7 +81,7 @@ public function testHolidayDayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -98,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index a75b61783..6c5c7bbd3 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class NationalWomensDayTest extends SouthAfricaBaseTestCase implements HolidayTe * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index ac177ddf5..d8735dfe5 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class NewYearsDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index e47f08359..010656e65 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class ReconciliationDayTest extends SouthAfricaBaseTestCase implements HolidayTe * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 6ef19f7d8..f4519ed06 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayT * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index c3dc937eb..66a882034 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -29,10 +29,12 @@ class SouthAfricaTest extends SouthAfricaBaseTestCase implements ProviderTestCas /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -41,8 +43,6 @@ protected function setUp(): void /** * Tests if all official holidays in SouthAfrica are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -71,8 +71,6 @@ public function testOfficialHolidays(): void /** * Tests if all bank holidays in South Africa are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -81,8 +79,6 @@ public function testBankHolidays(): void /** * Tests if all observed holidays in South Africa are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -91,8 +87,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in South Africa are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -101,8 +95,6 @@ public function testSeasonalHolidays(): void /** * Tests if all other holidays in South Africa are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index 0b660ee1a..26aaadb16 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class SubstituteDayOfGoodwillTest extends SouthAfricaBaseTestCase implements Hol * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -59,7 +57,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -73,7 +71,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the holiday defined in this test after completion. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayDayAfterCompletion(): void { @@ -83,7 +81,7 @@ public function testHolidayDayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -98,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index 4c3f1d994..a0be0cf41 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class WorkersDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index b736fded7..81ce3c8d7 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class YouthDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -87,7 +85,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -101,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -116,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 396f8e92a..0e14aeea1 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -50,7 +49,6 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -74,7 +72,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test after removal. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterRemoval(): void { @@ -88,7 +86,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -102,7 +100,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -120,7 +118,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index 93169afc9..2a1399755 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -46,7 +45,6 @@ class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements HolidayTestCa * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -62,7 +60,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test after removal. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterRemoval(): void { @@ -76,7 +74,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index aade35964..100e043f9 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -60,7 +58,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -74,7 +72,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -92,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 5fd2a8b01..151a09430 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -58,7 +56,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test (conflict with Buddha's Birthday). * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHolidayByBuddhasBirthday(): void { @@ -85,7 +82,6 @@ public function testSubstituteHolidayByBuddhasBirthday(): void * Tests the substitute holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -120,7 +116,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -134,7 +130,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -149,7 +145,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index 700358ce5..6ffa74eab 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ChristmasDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -57,7 +55,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -71,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 3061323aa..18998348f 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -19,7 +19,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; @@ -43,7 +42,6 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -80,7 +78,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test (conflict with Gaecheonjeol). * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHolidayByGaecheonjeol(): void { @@ -125,7 +122,6 @@ public function testSubstituteHolidayByGaecheonjeol(): void * Tests the substitute holiday defined in this test (conflict with Sunday). * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -163,7 +159,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -177,7 +173,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -211,7 +207,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 58e5de3ea..0933b6f1a 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -46,7 +45,6 @@ class ConstitutionDayTest extends SouthKoreaBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -62,7 +60,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test after removal. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterRemoval(): void { @@ -76,7 +74,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index 96e1e3f95..eea712535 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class GaecheonjeolTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -58,7 +56,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test (conflict with Chuseok). * * @throws Exception - * @throws ReflectionException */ public function testSubstituteByChuseok(): void { @@ -85,7 +82,6 @@ public function testSubstituteByChuseok(): void * Tests the substitute holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -121,7 +117,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -135,7 +131,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -150,7 +146,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index b1680a802..dd540e8a4 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class HangulDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -66,7 +64,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -101,7 +98,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -115,7 +112,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -133,7 +130,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 2985afb3b..9bc657de6 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements Holi * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -58,7 +56,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -100,7 +97,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -114,7 +111,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -129,7 +126,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index bfb501cde..24ffec961 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class LiberationDayTest extends SouthKoreaBaseTestCase implements HolidayTestCas * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -58,7 +56,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -95,7 +92,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -109,7 +106,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -124,7 +121,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index d4e41a8c7..7e71fbdf2 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class MemorialDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -57,7 +55,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -71,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index a16c08613..7954c4e7c 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -19,7 +19,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class NewYearsDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -76,7 +74,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test after removal. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterRemoval(): void { @@ -95,7 +93,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -109,7 +107,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -136,7 +134,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 933366b77..5da618126 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -19,7 +19,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; @@ -43,7 +42,6 @@ class SeollalTest extends SouthKoreaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -78,7 +76,6 @@ public function testHoliday(): void * Tests the substitute holiday defined in this test (conflict with Sunday). * * @throws Exception - * @throws ReflectionException */ public function testSubstituteHoliday(): void { @@ -117,7 +114,7 @@ public function testSubstituteHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -131,7 +128,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -163,7 +160,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 85acd3b1d..00775c6f3 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -28,10 +28,12 @@ class SouthKoreaTest extends SouthKoreaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -40,8 +42,6 @@ protected function setUp(): void /** * Tests if all official holidays in South Korea are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -103,8 +103,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in South Korea are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -113,8 +111,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in South Korea are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -123,8 +119,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in South Korea are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -133,8 +127,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in South Korea are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -143,6 +135,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index ff7dbe2fd..1987ae311 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index 12e17e2fc..41d42e714 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class AndalusiaDayTest extends AndalusiaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 6a2c8313f..028ecb24d 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -30,6 +30,8 @@ class AndalusiaTest extends AndalusiaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Andalusia (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Andalusia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Andalusia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Andalusia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Andalusia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 8948f83fd..4e4ab5a19 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -30,6 +30,8 @@ class AragonTest extends AragonBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Aragon (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Aragon are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Aragon are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Aragon are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Aragon are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index 5487aa677..bbf9c7167 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class StGeorgesDayTest extends AragonBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index 9809dca74..7aca19680 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index 60740befd..09415ae02 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class AsturiasDayTest extends AsturiasBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index 4606589e3..2ad468457 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -30,6 +30,8 @@ class AsturiasTest extends AsturiasBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Asturias (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Asturias are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Asturias are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Asturias are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Asturias are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index 089a8c38c..586a07618 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements Holi * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 287740337..62447a408 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -30,6 +30,8 @@ class BalearicIslandsTest extends BalearicIslandsBaseTestCase implements Provide /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the Balearic Islands (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -65,8 +65,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Balearic Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -81,8 +79,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Balearic Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -91,8 +87,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Balearic Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -101,8 +95,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Balearic Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -111,6 +103,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index d01fac12b..783c2acf0 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements HolidayT * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -61,7 +59,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -75,7 +73,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the holiday defined in this test after abolishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayDayAfterAbolishment(): void { @@ -85,7 +83,7 @@ public function testHolidayDayAfterAbolishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -100,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index 190999d8f..f447b6d23 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -30,6 +30,8 @@ class BasqueCountryTest extends BasqueCountryBaseTestCase implements ProviderTes /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Basque Country (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Basque Country are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Basque Country are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Basque Country are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Basque Country are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index 25b690ed5..a1e7f035f 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements HolidayT * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 330a2abd9..97b996cb1 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -30,6 +30,8 @@ class CanaryIslandsTest extends CanaryIslandsBaseTestCase implements ProviderTes /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the Canary Islands (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Canary Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Canary Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Canary Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Canary Islands are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index 7d42068a7..a8ca80019 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class CantabriaDayTest extends CantabriaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index 3a4068286..276bfb00a 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -30,6 +30,8 @@ class CantabriaTest extends CantabriaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Cantabria (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Cantabria are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Cantabria are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Cantabria are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Cantabria are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index 1896c1fbb..b408bf96b 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements Holida * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index 674b1ac96..2a23d3a8c 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -30,6 +30,8 @@ class CastileAndLeonTest extends CastileAndLeonBaseTestCase implements ProviderT /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Castile And Leon (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Castile And Leon are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Castile And Leon are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Castile And Leon are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Castile And Leon are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index c6a562083..966de18e0 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements Ho * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 252494046..6849f981f 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -30,6 +30,8 @@ class CastillaLaManchaTest extends CastillaLaManchaBaseTestCase implements Provi /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Castilla-La Mancha (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Castilla-La Mancha are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Castilla-La Mancha are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Castilla-La Mancha are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Castilla-La Mancha are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 0f3f0c49f..4a4a9381c 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -30,6 +30,8 @@ class CataloniaTest extends CataloniaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Catalonia (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Catalonia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,8 +73,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Catalonia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,8 +81,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Catalonia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -95,8 +89,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Catalonia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -105,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index 8f11b7807..6f1a8ad55 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class nationalCataloniaDayTest extends CataloniaBaseTestCase implements HolidayT * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -88,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 6c807c7f5..2a37fc6b5 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index babeb778b..db8fc7f67 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -30,6 +30,8 @@ class CeutaTest extends CeutaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Ceuta (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ceuta are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ceuta are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ceuta are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ceuta are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index aca7596e9..f02c89d76 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ceutaDayTest extends CeutaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 47df8e030..66a835b97 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 49f5f17f9..f246a0fff 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -30,6 +30,8 @@ class CommunityOfMadridTest extends CommunityOfMadridBaseTestCase implements Pro /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the Community of Madrid (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Community of Madrid are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,8 +73,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Community of Madrid are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,8 +81,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Community of Madrid are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -95,8 +89,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Community of Madrid are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -105,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index 278ecea4d..1fbb84d8f 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index 2ce558f0a..224a8073a 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ConstitutionDayTest extends SpainBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index 4a7f65bcc..bd6e8dc07 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class EasterMondayTest extends SpainBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -57,7 +55,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index 89c1b1874..35daabb4e 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index 3a44bee42..3bd8f3525 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements HolidayTestC * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 888b9f27f..494e93749 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -30,6 +30,8 @@ class ExtremaduraTest extends ExtremaduraBaseTestCase implements ProviderTestCas /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Extremadura (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Extremadura are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Extremadura are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Extremadura are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Extremadura are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index 4bdc29dca..45113848e 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -30,6 +30,8 @@ class GaliciaTest extends GaliciaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Galicia (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -61,8 +61,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Galicia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,8 +73,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Galicia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,8 +81,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Galicia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -95,8 +89,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Galicia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -105,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index 1ccac9795..f35fe8364 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements HolidayTe * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index 548096095..3b753e87d 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class stJamesDayTest extends GaliciaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index 574af79f2..061b6adb0 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends SpainBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 89baa7c87..566157422 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 76697626a..579992e57 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index 12fb2e81e..aec5ff065 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class LaRiojaDayTest extends LaRiojaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 34b39bf60..a58849595 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -30,6 +30,8 @@ class LaRiojaTest extends LaRiojaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in La Rioja (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in La Rioja are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in La Rioja are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in La Rioja are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in La Rioja are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index ae1697191..50c17e007 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class MaundyThursdayTest extends SpainBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -57,7 +55,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index 150e3e05c..ff0b17475 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -30,6 +30,8 @@ class MelillaTest extends MelillaBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Melilla (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Melilla are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,8 +71,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Melilla are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,8 +79,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Melilla are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,8 +87,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Melilla are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -103,6 +95,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index 2863ea09f..a466e23a5 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NationalDayTest extends SpainBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index 81225c9f3..980e7634b 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -30,6 +30,8 @@ class NavarreTest extends NavarreBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Navarre (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Navarre are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Navarre are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Navarre are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Navarre are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index 4cde99773..e56b2c2a0 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index 351626ad7..a6e57311e 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements Holida * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index a7989d3f3..8e0d5a411 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -30,6 +30,8 @@ class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase implements ProviderT /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the Region of Murcia (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Region of Murcia are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Region of Murcia are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Region of Murcia are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Region of Murcia are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index 829b84c54..891e184a2 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -30,6 +30,8 @@ class SpainTest extends SpainBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Spain are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,8 +59,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Spain are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,8 +67,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Spain are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,8 +75,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Spain are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,8 +83,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Spain are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -99,6 +91,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index 5f19ccbda..d5207e89c 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implement * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 732deea27..d284ca657 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -30,6 +30,8 @@ class ValencianCommunityTest extends ValencianCommunityBaseTestCase implements P /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the Valencian Community (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,8 +60,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Valencian Community are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,8 +72,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Valencian Community are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,8 +80,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Valencian Community are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,8 +88,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Valencian Community are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -104,6 +96,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index dd830d65d..1ad39240f 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ValentinesDayTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index 3c811e549..de1c563df 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,8 +42,6 @@ class stJosephsDayTest extends SpainBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -66,7 +63,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index c2b0450a5..29dd0866e 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,8 +38,6 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -78,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index f1228d348..a78d0ab93 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,8 +38,6 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -78,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 646d56268..93a7bee3b 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends SwedenBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index d1414856d..26ba55640 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index 3f4aa1fb2..45574c0df 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index cd7965f4b..01cf4fcd8 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends SwedenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index 4da370867..4ac2ac7ce 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends SwedenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index 0e3f53c54..8d2ecb0b9 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index 1e1bf999b..6084bf01d 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 3c1fb2e77..29bb6c651 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends SwedenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 10b818889..0aa5eab57 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements HolidayT * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index 80ad69072..6be166472 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class NationalDayTest extends SwedenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test on or after establishment. * * @throws Exception - * @throws ReflectionException */ public function testHolidayOnAfterEstablishment(): void { @@ -56,7 +54,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test on or after establishment. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { @@ -100,7 +98,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test on or after establishment. * - * @throws ReflectionException + * @throws Exception */ public function testTranslationOnAfterNameChange(): void { diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index 7dbf2cb77..bb291757d 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index d00fe33dd..8e12c7b07 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index 586badd4e..bd8f13281 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends SwedenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 8b6ca7ad5..e66f9a523 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCa * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index 4890117ba..91d5ea47a 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Sweden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -32,7 +31,7 @@ class StJohnsDayTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testHoliday(): void { @@ -56,7 +55,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -71,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index 05dcac7bf..c540b5493 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Sweden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -32,7 +31,7 @@ class StJohnsEveTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testHoliday(): void { @@ -56,7 +55,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -71,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index 111cd0755..bc688edaa 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -30,6 +30,8 @@ class SwedenTest extends SwedenBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Sweden (Spain) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,8 +62,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Sweden are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -79,8 +77,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Sweden are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -89,8 +85,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Sweden are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -99,8 +93,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Sweden are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -109,6 +101,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index 4422afbd1..542cab9f0 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index 1897542c2..e0bfab4b9 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -26,10 +26,12 @@ class AargauTest extends AargauBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Aargau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all official holidays in Aargau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -67,8 +65,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Aargau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -82,8 +78,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Aargau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -92,8 +86,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Aargau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -102,8 +94,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Aargau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -112,6 +102,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index 6955ce258..552f92c76 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends AargauBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index c15531c02..1536b1889 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends AargauBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index d5b8881f4..405727beb 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends AargauBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index 082609218..6594e5a8f 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends AargauBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index aebf1ead1..f556be1d9 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -26,10 +26,12 @@ class AppenzellAusserrhodenTest extends AppenzellAusserrhodenBaseTestCase implem /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -70,8 +68,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -85,8 +81,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -95,8 +89,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -105,8 +97,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -115,6 +105,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index 5e072aa6d..c18542a83 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends AppenzellAusserrhodenBaseTestCase implements Holi * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index 7a9656248..333ec69dd 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Holi * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index eff613788..5e53dc321 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends AppenzellAusserrhodenBaseTestCase implements Holi * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 1c5d4ba2e..46cecf959 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends AppenzellAusserrhodenBaseTestCase implements Holida * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 105f9102a..a00afc38f 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Holid * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index 46805ccdc..911f20286 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends AppenzellAusserrhodenBaseTestCase implements H * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index 18ba2953a..58ea4a56d 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Hol * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index d33b8fc7a..6eb3c8e56 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index d45a9379e..b56fb97b3 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -26,10 +26,12 @@ class AppenzellInnerrhodenTest extends AppenzellInnerrhodenBaseTestCase implemen /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -74,8 +72,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -89,8 +85,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -99,8 +93,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -109,8 +101,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -119,6 +109,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index 3ea14f4e2..b092728ba 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index a344238b5..a2a954a58 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements H * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index e656e644b..b41d31d81 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index 3fe9d4a77..5e1f4290c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends AppenzellInnerrhodenBaseTestCase implements Holi * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index 6718592f6..5abe0ba1b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index 387a3f389..97be1b50b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends AppenzellInnerrhodenBaseTestCase implements Holiday * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index d708e4664..07f83542a 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ 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 */ public function testHoliday(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index caf6d3e44..32f9ad85a 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holida * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index e086d9df4..823912e12 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends AppenzellInnerrhodenBaseTestCase implements Ho * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index e300a8db6..3a804ec7d 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Holi * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 6c663465a..6ec32e6f3 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends BaselLandschaftBaseTestCase implements HolidayTes * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index ed0c82d01..096f286e4 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -26,10 +26,12 @@ class BaselLandschaftTest extends BaselLandschaftBaseTestCase implements Provide /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in BaselLandschaft (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in BaselLandschaft (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in BaselLandschaft (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in BaselLandschaft (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in BaselLandschaft (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in BaselLandschaft (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index cc5026060..d12d55c88 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements HolidayTes * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index 3e239c195..ce78317cc 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends BaselLandschaftBaseTestCase implements HolidayTes * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index 29c777812..cd352aa16 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends BaselLandschaftBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index c4419aa44..e8654a7a8 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements HolidayTest * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index b23b41756..15cb63e86 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends BaselLandschaftBaseTestCase implements Holiday * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index 0807b582a..b8c101bee 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index fe2656b60..46844b970 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends BaselLandschaftBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index 9bb6d03e3..3c4e0dcba 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index ccaa745e6..15db71787 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -26,10 +26,12 @@ class BaselStadtTest extends BaselStadtBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Basel Stadt (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Basel Stadt (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Basel Stadt (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Basel Stadt (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Basel Stadt (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Basel Stadt (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index 2e4fb20c2..d85d0b6c0 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index 08196decb..c924c35bc 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends BaselStadtBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index effafe53c..01453c993 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends BaselStadtBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index f8be83c24..d0c0b84a2 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index b15614b64..a56c0c32e 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends BaselStadtBaseTestCase implements HolidayTestC * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 864939106..535038947 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index 2a772b678..0eb1d1ff0 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index a0c120914..cde186594 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends BernBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index 13663debd..4b302fbc4 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends BernBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index 4ac9b2a0d..fb4ae83a2 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -26,10 +26,12 @@ class BernTest extends BernBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Bern (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Bern (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Bern (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bern (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bern (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bern (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index b6585c5ce..2e35a2770 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends BernBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 191ac1d5f..4a080cdb7 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends BernBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index 666c512df..0d03e3e39 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends BernBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index e2e06f262..002a0222d 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends BernBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index 0c537c754..3ee459695 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends BernBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index a98ac2519..2df96af62 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends BernBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index 7f109391a..f5e419d4c 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends FribourgBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index 3c409fa35..3278a8e5d 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends FribourgBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 85f457e24..53b2e23f0 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends FribourgBaseTestCase implements HolidayTestCa * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php index 1509d6e66..c19cb47b2 100644 --- a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 6673ba0c8..74204244d 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends FribourgBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/CorpusChristiTest.php b/tests/Switzerland/Fribourg/CorpusChristiTest.php index 0272d7a99..61e7fd979 100644 --- a/tests/Switzerland/Fribourg/CorpusChristiTest.php +++ b/tests/Switzerland/Fribourg/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends FribourgBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index dd923e46a..ec6ccca35 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class December26thTest extends FribourgBaseTestCase implements HolidayTestCase * Tests December 26th. * * @throws Exception - * @throws ReflectionException */ public function testDecember26th(): void { @@ -51,7 +49,7 @@ public function testDecember26th(): void /** * Tests translated name of December 26th. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index 938044500..b6c718054 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends FribourgBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index f1825b9d6..ff7095556 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -26,10 +26,12 @@ class FribourgTest extends FribourgBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Fribourg (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Fribourg (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -75,8 +73,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Fribourg (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -90,8 +86,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Fribourg (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -100,8 +94,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Fribourg (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -110,8 +102,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Fribourg (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -120,6 +110,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index bd68f874b..922a6bc26 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends FribourgBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index 2d65589c6..912fcd005 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends FribourgBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index d09cf73a3..22689c564 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends FribourgBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index ab5abf75e..2e489fe6a 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends FribourgBaseTestCase implements HolidayTestCas * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index 172b4178e..7e50d76d0 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends GenevaBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 9592b1fb6..07196b248 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends GenevaBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index f4f24f69e..98ec27e7d 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends GenevaBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index dc5e60b39..3e9c0e1af 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -26,10 +26,12 @@ class GenevaTest extends GenevaBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Geneva (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Geneva (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -75,8 +73,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Geneva (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -94,8 +90,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Geneva (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -104,8 +98,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Geneva (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -114,8 +106,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Geneva (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -129,6 +119,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index ee1a30a91..6463a4d51 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends GenevaBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 235db191d..0ba45a649 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Switzerland\Geneva; use Yasumi\tests\HolidayTestCase; @@ -36,7 +35,6 @@ class JeuneGenevoisTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests Jeune Genevois between 1870 and 1965. * - * @throws ReflectionException * @throws Exception */ public function testJeuneGenevoisBetween1870And1965(): void @@ -54,7 +52,6 @@ public function testJeuneGenevoisBetween1870And1965(): void /** * Tests Jeune Genevois between 1840 and 1869. * - * @throws ReflectionException * @throws Exception */ public function testJeuneGenevoisBetween1840And1869(): void @@ -72,7 +69,7 @@ public function testJeuneGenevoisBetween1840And1869(): void /** * Tests Jeune Genevois before 1840. * - * @throws ReflectionException + * @throws Exception */ public function testJeuneGenevoisBefore1840(): void { @@ -83,7 +80,7 @@ public function testJeuneGenevoisBefore1840(): void /** * Tests translated name of Jeune Genevois. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -98,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index d3ea0a9d8..3dbca00d9 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends GenevaBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index 30220280b..6a547dcbd 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends GenevaBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index 8a8dd64d5..94a7c9950 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class RestaurationGenevoiseTest extends GenevaBaseTestCase implements HolidayTes * Tests Restauration Genevoise. * * @throws Exception - * @throws ReflectionException */ public function testRestaurationGenevoiseAfter1813(): void { @@ -52,7 +50,7 @@ public function testRestaurationGenevoiseAfter1813(): void /** * Tests translated name of Restauration Genevoise. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -67,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 1aa755a79..44366b1f0 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index e9de23fd1..cb679fe65 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends GlarusBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index a744f5e9b..65f547647 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index e5a7fd966..5a50ca300 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index fbf2d73aa..01695bcad 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends GlarusBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index 39fa4994a..f545a7b83 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -26,10 +26,12 @@ class GlarusTest extends GlarusBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Glarus (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Glarus (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -73,8 +71,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Glarus (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -88,8 +84,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Glarus (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -98,8 +92,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Glarus (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -108,8 +100,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Glarus (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -118,6 +108,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index ce0b420cf..46f25f2be 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends GlarusBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index 26aa978a2..27ce99a41 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class NafelserFahrtTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests Näfelser Fahrt on or after 1389. * - * @throws ReflectionException * @throws Exception */ public function testNafelserFahrtOnAfter1389(): void @@ -53,7 +51,7 @@ public function testNafelserFahrtOnAfter1389(): void /** * Tests Näfelser Fahrt before 1389. * - * @throws ReflectionException + * @throws Exception */ public function testNafelserFahrtBefore1389(): void { @@ -64,7 +62,7 @@ public function testNafelserFahrtBefore1389(): void /** * Tests translated name of Näfelser Fahrt. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index a1f01d1a1..de3a2bcae 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index 35f54fcd1..65cedcd95 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends GlarusBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 80e5283c6..4a3d77caa 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index 54ef008f1..ef6d8e7c2 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends GrisonsBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index a42b1d742..a929b45b2 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index 2e4d2eb96..457fcded1 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends GrisonsBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index eaebbf307..f4e46e512 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends GrisonsBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index 1cdbe9360..f9098036f 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -26,10 +26,12 @@ class GrisonsTest extends GrisonsBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Grisons (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Grisons (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -70,8 +68,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Grisons (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -85,8 +81,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Grisons (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -95,8 +89,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Grisons (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -105,8 +97,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Grisons (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -115,6 +105,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index cf596ac82..3019b3eca 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index 9f3b97518..61e3a33b2 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends GrisonsBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index ddb5cf96a..d9fde825f 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends GrisonsBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index 2452b2bef..68a19acae 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends JuraBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index 498acc1d6..dc6a7e892 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends JuraBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index 97ae5e632..f5edcb659 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/BerchtoldsTagTest.php b/tests/Switzerland/Jura/BerchtoldsTagTest.php index 82e8d1d2d..2d3c7c6a7 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index 65422e706..b5d47655a 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class BettagsMontagTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Bettags Montag on or after 1832. * - * @throws ReflectionException * @throws Exception */ public function testBettagsMontagOnAfter1832(): void @@ -53,7 +51,7 @@ public function testBettagsMontagOnAfter1832(): void /** * Tests Bettags Montag before 1832. * - * @throws ReflectionException + * @throws Exception */ public function testBettagsMontagBefore1832(): void { @@ -64,7 +62,7 @@ public function testBettagsMontagBefore1832(): void /** * Tests translated name of Bettags Montag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index a8918601a..4e98c93f9 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends JuraBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index c873bd806..2275752de 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends JuraBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index 5337477e2..6e227c418 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends JuraBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php index d0461b975..99b5eef91 100644 --- a/tests/Switzerland/Jura/EasterTest.php +++ b/tests/Switzerland/Jura/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends JuraBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index cc18f8703..007849631 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends JuraBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index 4ef2af3c2..92c329d10 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -26,10 +26,12 @@ class JuraTest extends JuraBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Jura (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Jura (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -78,8 +76,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Jura (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -93,8 +89,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Jura (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -103,8 +97,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Jura (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -113,8 +105,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Jura (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -123,6 +113,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 01928d6bd..3f55f1f12 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends JuraBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index 34ec5edea..790dcf51b 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends JuraBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php index d15f3364e..82b49296d 100644 --- a/tests/Switzerland/Jura/PentecostTest.php +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends JuraBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index 3a2855690..1da9b798b 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class PlebisciteJurassienTest extends JuraBaseTestCase implements HolidayTestCas * Tests Plébiscite jurassien on or after 1975. * * @throws Exception - * @throws ReflectionException */ public function testInstaurationRepubliqueOnAfter1975(): void { @@ -56,7 +54,7 @@ public function testInstaurationRepubliqueOnAfter1975(): void /** * Tests Plébiscite jurassien before 1975. * - * @throws ReflectionException + * @throws Exception */ public function testInstaurationRepubliqueBefore1975(): void { @@ -70,7 +68,7 @@ public function testInstaurationRepubliqueBefore1975(): void /** * Tests translated name of Plébiscite jurassien. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index 6a6d7ab8a..ac2991b8b 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends JuraBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index 17ba5b196..f01b394c1 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index eb69158bc..6ab3eea6b 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends LucerneBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index 2396238b7..8aca43508 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements HolidayTestCas * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php index b68e0168e..d92c078a5 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 50cb199c9..df4857e02 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index ee68d13d6..9abf07f8c 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends LucerneBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index 6c0db1b8f..3eba31f36 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends LucerneBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index 66dd75231..9b23bfda8 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends LucerneBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 9f6299c67..f8cde7ea2 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements HolidayTes * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index c75ea0e5d..f9b78d4cb 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -26,10 +26,12 @@ class LucerneTest extends LucerneBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Lucerne (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Lucerne (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -75,8 +73,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Lucerne (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -90,8 +86,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lucerne (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -100,8 +94,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lucerne (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -110,8 +102,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lucerne (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -120,6 +110,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index c0b1b305d..be40eac19 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index 73aa38138..14d3c2d78 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends LucerneBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index cc42010da..25dc1a879 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index 3c7a98a0f..08d5d9364 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index ee5e504af..d0ab6cc20 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class BettagsMontagTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests Bettags Montag on or after 1832. * - * @throws ReflectionException * @throws Exception */ public function testBettagsMontagOnAfter1832(): void @@ -53,7 +51,7 @@ public function testBettagsMontagOnAfter1832(): void /** * Tests Bettags Montag before 1832. * - * @throws ReflectionException + * @throws Exception */ public function testBettagsMontagBefore1832(): void { @@ -64,7 +62,7 @@ public function testBettagsMontagBefore1832(): void /** * Tests translated name of Bettags Montag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 556fd9367..758fe9a3e 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/December26thTest.php b/tests/Switzerland/Neuchatel/December26thTest.php index a05031dc0..6fe797816 100644 --- a/tests/Switzerland/Neuchatel/December26thTest.php +++ b/tests/Switzerland/Neuchatel/December26thTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class December26thTest extends NeuchatelBaseTestCase implements HolidayTestCase * Tests December 26th. * * @throws Exception - * @throws ReflectionException */ public function testDecember26th(): void { @@ -74,8 +72,6 @@ public function testDecember26th(): void /** * Tests translated name of December 26th. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -89,8 +85,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 35325a2c9..8ad62dffc 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends NeuchatelBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 39c5c56d9..80d39fad8 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends NeuchatelBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 5f21ede43..95e94fd3b 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements Holida * Tests Instauration de la République on or after 1849. * * @throws Exception - * @throws ReflectionException */ public function testInstaurationRepubliqueOnAfter1849(): void { @@ -56,7 +54,7 @@ public function testInstaurationRepubliqueOnAfter1849(): void /** * Tests Instauration de la République before 1849. * - * @throws ReflectionException + * @throws Exception */ public function testInstaurationRepubliqueBefore1849(): void { @@ -70,7 +68,7 @@ public function testInstaurationRepubliqueBefore1849(): void /** * Tests translated name of Instauration de la République. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/January2ndTest.php b/tests/Switzerland/Neuchatel/January2ndTest.php index 34ebbc503..2c5ce1253 100644 --- a/tests/Switzerland/Neuchatel/January2ndTest.php +++ b/tests/Switzerland/Neuchatel/January2ndTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class January2ndTest extends NeuchatelBaseTestCase implements HolidayTestCase * Tests January 2nd. * * @throws Exception - * @throws ReflectionException */ public function testJanuary2nd(): void { @@ -74,8 +72,6 @@ public function testJanuary2nd(): void /** * Tests translated name of January 2nd. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -89,8 +85,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index 23ec6e30a..b01b82c46 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -26,10 +26,12 @@ class NeuchatelTest extends NeuchatelBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Neuchatel (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Neuchatel (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -72,8 +70,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Neuchatel (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -87,8 +83,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Neuchatel (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -97,8 +91,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Neuchatel (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -107,8 +99,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Neuchatel (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -117,6 +107,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index 67dd2a8ef..c67696996 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index 97204f46a..ed7b7f8de 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends NeuchatelBaseTestCase implements HolidayTestCa * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index 102f3fb93..55cd66f90 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index 93a0ff464..cee7976bc 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index a1572c6b1..ab23f23a0 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index 572742fac..dc3994b96 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements HolidayTestC * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index e905354a4..22a844dfd 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index d50c8b9a0..77c6fa2f9 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends NidwaldenBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index 3480461f8..d11aa845d 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends NidwaldenBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index ae61d1cc7..b655dff09 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends NidwaldenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index b49a246bf..330107f09 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements HolidayT * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 3b3573f40..36ac14093 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index e98427d7e..303f06f77 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -26,10 +26,12 @@ class NidwaldenTest extends NidwaldenBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Nidwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Nidwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -75,8 +73,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Nidwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -90,8 +86,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Nidwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -100,8 +94,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Nidwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -110,8 +102,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Nidwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -120,6 +110,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index 4f321e905..adc57673e 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends NidwaldenBaseTestCase implements HolidayTestCa * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index c755e1687..369b1d107 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephDay(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 222b738fe..baba85bd9 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index e45f7a03f..e18040ef1 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index e093ad669..b4ba96c35 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index b984c240a..960714b49 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements HolidayTestCa * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php index 94ef8c76b..c29fa8f09 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index 7f3cee3df..bdb19f111 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BruderKlausenFestTest extends ObwaldenBaseTestCase implements HolidayTestC /** * Tests Bruder-Klausen-Fest on or after 1947. * - * @throws ReflectionException * @throws Exception */ public function testBruderKlausenFestOnAfter1947(): void @@ -49,7 +47,6 @@ public function testBruderKlausenFestOnAfter1947(): void /** * Tests Bruder-Klausen-Fest between 1649 and 1946. * - * @throws ReflectionException * @throws Exception */ public function testBruderKlausenFestBetween1649And1946(): void @@ -64,7 +61,7 @@ public function testBruderKlausenFestBetween1649And1946(): void /** * Tests Bruder-Klausen-Fest before 1648. * - * @throws ReflectionException + * @throws Exception */ public function testBruderKlausenFestBefore1648(): void { @@ -75,7 +72,7 @@ public function testBruderKlausenFestBefore1648(): void /** * Tests translated name of Bruder-Klausen-Fest. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 859ddeaa1..9099e56a9 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index 990cca57a..261ccac23 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends ObwaldenBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index 2885fd534..d4798722e 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends ObwaldenBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index 822ab27aa..7c9759c43 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends ObwaldenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index f9d7a5cc9..5873e0341 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements HolidayTe * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index 23e29fdc4..8fa8b48d5 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index 956a5cee5..764f41412 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -26,10 +26,12 @@ class ObwaldenTest extends ObwaldenBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Obwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Obwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -76,8 +74,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Obwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -91,8 +87,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Obwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -101,8 +95,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Obwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -111,8 +103,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Obwalden (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -121,6 +111,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index 94e1882b9..f5a8af66d 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends ObwaldenBaseTestCase implements HolidayTestCas * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 32d427e3d..8b84213aa 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index 164171d2b..eee06a1bd 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends SchaffhausenBaseTestCase implements HolidayTestCa * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index 2f0915943..5b07a942c 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements HolidayTestC /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index 274e8ced9..a91ffb037 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements HolidayTestCa * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 45cd9f651..5e85be451 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends SchaffhausenBaseTestCase implements HolidayTestCa * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index 3f674c86e..c46dc49a4 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends SchaffhausenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 42eff7880..ac2828ae5 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements HolidayTestCas * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index ae7436e1b..b3cce3e22 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends SchaffhausenBaseTestCase implements HolidayTes * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index da7885121..b46aac95e 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -26,10 +26,12 @@ class SchaffhausenTest extends SchaffhausenBaseTestCase implements ProviderTestC /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Schaffhausen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Schaffhausen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -72,8 +70,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Schaffhausen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -87,8 +83,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Schaffhausen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -97,8 +91,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Schaffhausen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -107,8 +99,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Schaffhausen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -117,6 +107,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 2af128680..85564d411 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements HolidayTestC * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index efe1fe5d6..af78bacd2 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index 29f38fbc0..b2fb1177d 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index f6122f01b..1735a4960 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends SchwyzBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index d3923041f..1d232dfd5 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index 9a71d4e02..340e73c47 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index 5b20cbc4e..65fa94b84 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends SchwyzBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index 0c3119ff8..fef0231ff 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends SchwyzBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 38ff413c4..811415bd0 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends SchwyzBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index 5e61365ae..c869a1793 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends SchwyzBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index af29abe19..2f273071d 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index cd7494ae5..dbd6b5495 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index dcf085522..d7ffd26ca 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends SchwyzBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index fc23c1365..d1f9650ed 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -26,10 +26,12 @@ class SchwyzTest extends SchwyzBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Schwyz (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Schwyz (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -76,8 +74,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Schwyz (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -91,8 +87,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Schwyz (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -101,8 +95,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Schwyz (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -111,8 +103,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Schwyz (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -121,6 +111,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index 48a1bfd67..785686258 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class StJosephDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephDay(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 8843a3dc4..8408f56a1 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index e59d39c75..2b4253fa5 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends SolothurnBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index 124cd8071..9b51471a4 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends SolothurnBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index e3117293d..b0b2b00da 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 96e48ecad..8b1361c31 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends SolothurnBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 658e4dc5f..35541d83f 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index aa5f93eb2..ce2c28dfc 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -26,10 +26,12 @@ class SolothurnTest extends SolothurnBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Solothurn (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -53,8 +53,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Solothurn (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -69,8 +67,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Solothurn (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -84,8 +80,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Solothurn (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -94,8 +88,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Solothurn (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -104,8 +96,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Solothurn (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -114,6 +104,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index c8bb3cf9c..60989720d 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index 9606ed4bd..ac22c2588 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends StGallenBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 8eef44970..3bd4e13ef 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index a44b54e15..682cc2633 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends StGallenBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index ac917bb4e..dea1c7c96 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends StGallenBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index 80c22cb2e..bae4e38f5 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index 9ae921586..972cc621c 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends StGallenBaseTestCase implements HolidayTestCas * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index d87f698c4..23046de5c 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -26,10 +26,12 @@ class StGallenTest extends StGallenBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in St. Gallen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in St. Gallen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in St. Gallen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in St. Gallen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in St. Gallen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in St. Gallen (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 83e8d1470..89c3cced1 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index a0fa465b1..579b38228 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -50,7 +49,6 @@ class SwissNationalDayTest extends SwitzerlandBaseTestCase implements HolidayTes * Tests National Day on or after 1994. * * @throws Exception - * @throws ReflectionException */ public function testNationalDayOnAfter1994(): void { @@ -66,9 +64,7 @@ public function testNationalDayOnAfter1994(): void /** * Tests National Day on or after 1899 and before 1994. * - * @throws ReflectionException * @throws Exception - * @throws ReflectionException */ public function testNationalDayOnAfter1899(): void { @@ -85,9 +81,7 @@ public function testNationalDayOnAfter1899(): void /** * Tests National Day on 1891. * - * @throws ReflectionException * @throws Exception - * @throws ReflectionException */ public function testNationalDayOn1891(): void { @@ -104,7 +98,7 @@ public function testNationalDayOn1891(): void /** * Tests National Day before 1891. * - * @throws ReflectionException + * @throws Exception */ public function testNationalDayBefore1891(): void { @@ -118,7 +112,7 @@ public function testNationalDayBefore1891(): void /** * Tests National Day between 1891 and 1899. * - * @throws ReflectionException + * @throws Exception */ public function testNationalDayBetween1891And1899(): void { @@ -129,7 +123,7 @@ public function testNationalDayBetween1891And1899(): void /** * Tests translated name of National Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -144,7 +138,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index 1aab01217..28bded230 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -26,10 +26,12 @@ class SwitzerlandTest extends SwitzerlandBaseTestCase implements ProviderTestCas /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Switzerland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Switzerland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -67,8 +65,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Switzerland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -77,8 +73,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Switzerland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,8 +81,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Switzerland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -97,6 +89,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index 808c6c865..a0a90bb72 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends ThurgauBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index f8a25f391..23a138dcf 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index f8944fa49..e30bb9d22 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index 1ae22747f..bbfea0fcf 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends ThurgauBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index ff1f43abe..9729446c6 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends ThurgauBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index 731276734..7aaf432ed 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index e7ba6ac25..344c9e7c1 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends ThurgauBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index 19a1eebff..8b8a72fc9 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends ThurgauBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 30f1f6704..494a1999d 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -26,10 +26,12 @@ class ThurgauTest extends ThurgauBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Thurgau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Thurgau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -72,8 +70,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Thurgau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -87,8 +83,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Thurgau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -97,8 +91,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Thurgau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -107,8 +99,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Thurgau (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -117,6 +107,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index f01f8926b..f65c71514 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends ThurgauBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 3495fc29e..91a7196c1 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index e4e23dd8d..1867ea58d 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends TicinoBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 940f711ad..eedf1144c 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index 861d96a92..2e7fb5ed2 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index 458d8ffdb..d345a7a0d 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends TicinoBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index dbd42a209..9db726d3a 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends TicinoBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index f7ee9df0f..9b5e69922 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends TicinoBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index 613bd96bd..d707c44cb 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index e91d08956..345238ce4 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index 0b9d28174..90fd7b218 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends TicinoBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 24562f239..0ec537701 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class StJosephDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephDay(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index 80af96580..df595e7b1 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StPeterPaulTest extends TicinoBaseTestCase implements HolidayTestCase * * @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 */ public function testStPeterPaul(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function StPeterPaulDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index c753c859c..532286355 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index 549853f56..18f22380b 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -26,10 +26,12 @@ class TicinoTest extends TicinoBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Ticino (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Ticino (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -77,8 +75,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Ticino (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -92,8 +88,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ticino (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -102,8 +96,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ticino (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -112,8 +104,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ticino (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -122,6 +112,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index 3562dd3e6..bba2bf48a 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends TicinoBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index 41c7f8ac5..a8372cad6 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends UriBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 2b6a2adc2..f9daafea8 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends UriBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 3328befff..9db214b1b 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index 128d3814e..c90737c2a 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends UriBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index 0293d9e1e..95fba1201 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends UriBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index c2da0431a..24e14025f 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends UriBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index a3ab97aab..88e3d3d24 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class EpiphanyTest extends UriBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index 66dbdf721..f27e9418b 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends UriBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 565cfeaca..1a1ce7351 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 2c96268e6..1d241eeee 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends UriBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index 56dc947a3..6203a26c4 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends UriBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 15527ccfd..ef1247487 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class StJosephDayTest extends UriBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephDay(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index c24a86761..4e52a9858 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends UriBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index 491aebf1c..b6b9882f0 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -26,10 +26,12 @@ class UriTest extends UriBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Uri (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Uri (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -76,8 +74,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Uri (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -91,8 +87,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Uri (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -101,8 +95,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Uri (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -111,8 +103,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Uri (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -121,6 +111,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 4d4afebde..8e65a2e6a 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index c9c0accd0..247a38047 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends ValaisBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 7caa0c699..80331eac5 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index 3f6aff06f..42683bc37 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index 3d73b2672..84f2c7bdd 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends ValaisBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index db7bde5d0..2e6167448 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements HolidayTest * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 0a6dc8dbb..2209567b2 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index 0df7761f6..c385e900a 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,8 +39,6 @@ class StJosephDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testStJosephDay(int $year, DateTime $expected): void { @@ -63,7 +60,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -78,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index 3d7199e3e..ff3f3bac8 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -26,10 +26,12 @@ class ValaisTest extends ValaisBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Valais (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Valais (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Valais (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Valais (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Valais (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Valais (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index 6a033fcfb..7a5d17893 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends VaudBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index 3b2b066df..d579d136a 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 91683f0f6..191983a7b 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class BettagsMontagTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests Bettags Montag on or after 1832. * - * @throws ReflectionException * @throws Exception */ public function testBettagsMontagOnAfter1832(): void @@ -53,7 +51,7 @@ public function testBettagsMontagOnAfter1832(): void /** * Tests Bettags Montag before 1832. * - * @throws ReflectionException + * @throws Exception */ public function testBettagsMontagBefore1832(): void { @@ -64,7 +62,7 @@ public function testBettagsMontagBefore1832(): void /** * Tests translated name of Bettags Montag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -79,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 4d5a2c1de..b4cbad386 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends VaudBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index 482b041c2..1c8296a26 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends VaudBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index 16ea9b198..a50740efd 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends VaudBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 859a9f2e5..36f21f89c 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends VaudBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index b114c71fa..ab5f4fbc6 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends VaudBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index 76cbe97bd..c6a1f36bc 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -26,10 +26,12 @@ class VaudTest extends VaudBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Vaud (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Vaud (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Vaud (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Vaud (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Vaud (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Vaud (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 09b360dba..08de7d99d 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AllSaintsDayTest extends ZugBaseTestCase implements HolidayTestCase * * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testAllSaintsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAllSaintsDay(int $year, DateTime $expected): void /** * Tests translated name of All Saints' Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index 01a2e35a7..b302d214a 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends ZugBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index debe5c3e4..5c44ef067 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements HolidayTestCase * * @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 */ public function testAssumptionOfMary(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testAssumptionOfMary(int $year, DateTime $expected): void /** * Tests translated name of the day of the Assumption of Mary. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/BerchtoldsTagTest.php b/tests/Switzerland/Zug/BerchtoldsTagTest.php index 0e21d1409..6aa48e330 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,6 @@ class BerchtoldsTagTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws ReflectionException * @throws Exception */ public function testBerchtoldsTag(): void @@ -49,7 +47,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 0ecd66210..a4db02be6 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends ZugBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index 07687af9e..d1d83cb20 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -16,7 +16,6 @@ use DateInterval; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,7 +36,6 @@ class CorpusChristiTest extends ZugBaseTestCase implements HolidayTestCase * Tests Corpus Christi. * * @throws Exception - * @throws ReflectionException */ public function testCorpusChristi(): void { @@ -53,7 +51,7 @@ public function testCorpusChristi(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -68,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 155dcac3b..54dec7651 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends ZugBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index 285cb82a8..908868ac9 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends ZugBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index ac2cd7d1a..0247e06ca 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements HolidayTestCas * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index 4bbefbfac..0b254e59b 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends ZugBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index 51b48e677..c096f9cc0 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends ZugBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 2f0e0a4cd..6f7bbbe3a 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends ZugBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 007de3982..a5c3822c9 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -26,10 +26,12 @@ class ZugTest extends ZugBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Zug (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Zug (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -75,8 +73,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Zug (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -90,8 +86,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Zug (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -100,8 +94,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Zug (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -110,8 +102,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Zug (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -120,6 +110,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index d4eb92dae..482052bb8 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class AscensionDayTest extends ZurichBaseTestCase implements HolidayTestCase * Tests Ascension Day. * * @throws Exception - * @throws ReflectionException */ public function testAscensionDay(): void { @@ -51,7 +49,7 @@ public function testAscensionDay(): void /** * Tests translated name of Ascension Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 6b5d8c464..9866f263a 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends ZurichBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index 56d99ee15..ef2d00989 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterMondayTest extends ZurichBaseTestCase implements HolidayTestCase * Tests Easter Monday. * * @throws Exception - * @throws ReflectionException */ public function testEasterMonday(): void { @@ -51,7 +49,7 @@ public function testEasterMonday(): void /** * Tests translated name of Easter Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index 6fd945738..a599f9b93 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends ZurichBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 46568c6ba..d3603237c 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends ZurichBaseTestCase implements HolidayTestCase * * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testNewYearsDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testNewYearsDay(int $year, DateTime $expected): void /** * Tests translated name of New Years Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index 4b43eb833..94c642bde 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostMondayTest extends ZurichBaseTestCase implements HolidayTestCase * Tests Pentecost Monday. * * @throws Exception - * @throws ReflectionException */ public function testPentecostMonday(): void { @@ -51,7 +49,7 @@ public function testPentecostMonday(): void /** * Tests translated name of Pentecost Monday. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index 426b0dd45..23748f3a6 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class StStephensDayTest extends ZurichBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index 3ca643dc4..e858ad7b2 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,6 @@ class WorkersDayTest extends ZurichBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -71,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -86,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index 69aa7d830..d0524262a 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -26,10 +26,12 @@ class ZurichTest extends ZurichBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Zurich (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,8 +52,6 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Zurich (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -71,8 +69,6 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Zurich (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -86,8 +82,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Zurich (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -96,8 +90,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Zurich (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,8 +98,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Zurich (Switzerland) are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -116,6 +106,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Turkey/CommemorationOfAtaturkTest.php b/tests/Turkey/CommemorationOfAtaturkTest.php index 0867b75e9..6f4f07739 100644 --- a/tests/Turkey/CommemorationOfAtaturkTest.php +++ b/tests/Turkey/CommemorationOfAtaturkTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Turkey; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -26,7 +25,7 @@ class CommemorationOfAtaturkTest extends TurkeyBaseTestCase implements HolidayTe public const ESTABLISHMENT_YEAR = 1920; /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -38,7 +37,6 @@ public function testHolidayBeforeEstablishment(): void } /** - * @throws ReflectionException * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void @@ -53,7 +51,7 @@ public function testHolidayOnAfterEstablishment(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/DemocracyDayTest.php b/tests/Turkey/DemocracyDayTest.php index c1417c808..6836183e3 100644 --- a/tests/Turkey/DemocracyDayTest.php +++ b/tests/Turkey/DemocracyDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Turkey; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -26,7 +25,7 @@ class DemocracyDayTest extends TurkeyBaseTestCase implements HolidayTestCase public const ESTABLISHMENT_YEAR = 2017; /** - * @throws ReflectionException + * @throws \Exception */ public function testHoliday(): void { @@ -41,7 +40,7 @@ public function testHoliday(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -53,7 +52,7 @@ public function testHolidayBeforeEstablishment(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +65,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php index 20069558b..af84b7786 100644 --- a/tests/Turkey/LabourDayTest.php +++ b/tests/Turkey/LabourDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -29,8 +28,6 @@ class LabourDayTest extends TurkeyBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -38,7 +35,7 @@ public function testHoliday(int $year, DateTime $expected): void } /** - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -51,7 +48,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/NationalSovereigntyDayTest.php b/tests/Turkey/NationalSovereigntyDayTest.php index b8d7352bb..28d4e6c91 100644 --- a/tests/Turkey/NationalSovereigntyDayTest.php +++ b/tests/Turkey/NationalSovereigntyDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Turkey; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -30,7 +29,7 @@ class NationalSovereigntyDayTest extends TurkeyBaseTestCase implements HolidayTe public const NAME_CHANGED_YEAR = 1981; /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -42,7 +41,6 @@ public function testHolidayBeforeEstablishment(): void } /** - * @throws ReflectionException * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void @@ -57,7 +55,7 @@ public function testHolidayOnAfterEstablishment(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -70,7 +68,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testTranslationOnAfterNameChange(): void { @@ -83,7 +81,7 @@ public function testTranslationOnAfterNameChange(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php index 5480a2757..0d3c3da0e 100644 --- a/tests/Turkey/NewYearsDayTest.php +++ b/tests/Turkey/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -29,8 +28,6 @@ class NewYearsDayTest extends TurkeyBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function HolidayDataProvider(): array } /** - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -61,7 +58,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/RepublicDayTest.php b/tests/Turkey/RepublicDayTest.php index 770a788f3..98424f9d8 100644 --- a/tests/Turkey/RepublicDayTest.php +++ b/tests/Turkey/RepublicDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Turkey; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -26,7 +25,7 @@ class RepublicDayTest extends TurkeyBaseTestCase implements HolidayTestCase public const ESTABLISHMENT_YEAR = 1924; /** - * @throws ReflectionException + * @throws \Exception */ public function testHoliday(): void { @@ -41,7 +40,7 @@ public function testHoliday(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -53,7 +52,7 @@ public function testHolidayBeforeEstablishment(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +65,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php index 1edffc74c..390b3a65f 100755 --- a/tests/Turkey/TurkeyTest.php +++ b/tests/Turkey/TurkeyTest.php @@ -26,14 +26,14 @@ class TurkeyTest extends TurkeyBaseTestCase implements ProviderTestCase */ protected int $year; + /** + * @throws \Exception + */ protected function setUp(): void { $this->year = $this->generateRandomYear(); } - /** - * @throws ReflectionException - */ public function testOfficialHolidays(): void { $holidays = [ @@ -69,9 +69,6 @@ public function testOfficialHolidays(): void $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } - /** - * @throws ReflectionException - */ public function testObservedHolidays(): void { $holidays = []; @@ -83,25 +80,16 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } - /** - * @throws ReflectionException - */ public function testSeasonalHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); } - /** - * @throws ReflectionException - */ public function testBankHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); } - /** - * @throws ReflectionException - */ public function testOtherHolidays(): void { $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); @@ -109,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Turkey/VictoryDayTest.php b/tests/Turkey/VictoryDayTest.php index 9d796b035..21559f849 100644 --- a/tests/Turkey/VictoryDayTest.php +++ b/tests/Turkey/VictoryDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Turkey; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -28,7 +27,7 @@ class VictoryDayTest extends TurkeyBaseTestCase implements HolidayTestCase public const CELEBRATION_YEAR = 1923; /** - * @throws ReflectionException + * @throws \Exception */ public function testHoliday(): void { @@ -43,7 +42,7 @@ public function testHoliday(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayBeforeCelebration(): void { @@ -55,7 +54,7 @@ public function testHolidayBeforeCelebration(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -68,7 +67,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { @@ -81,7 +80,7 @@ public function testHolidayType(): void } /** - * @throws ReflectionException + * @throws \Exception */ public function testHolidayTypeBeforeEstablishment(): void { diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index 41405bed3..e3e00ee09 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class ChristmasDayTest extends USABaseTestCase implements HolidayTestCase * Tests Christmas Day. Christmas Day is celebrated on December 25th. * * @throws Exception - * @throws ReflectionException */ public function testChristmasDay(): void { @@ -52,7 +50,6 @@ public function testChristmasDay(): void * Tests Christmas Day substituted on Monday (when Christmas Day falls on Sunday). * * @throws Exception - * @throws ReflectionException */ public function testChristmasDaySubstitutedMonday(): void { @@ -70,7 +67,6 @@ public function testChristmasDaySubstitutedMonday(): void * Tests Christmas Day substituted on Monday (when Christmas Day falls on Saturday). * * @throws Exception - * @throws ReflectionException */ public function testChristmasDaySubstitutedFriday(): void { @@ -87,7 +83,7 @@ public function testChristmasDaySubstitutedFriday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -102,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index 100cf175f..3ce5c3b11 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ColumbusDayTest extends USABaseTestCase implements HolidayTestCase * the second Monday in October since 1970. * * @throws Exception - * @throws ReflectionException */ public function testColumbusDayOnAfter1970(): void { @@ -59,7 +57,6 @@ public function testColumbusDayOnAfter1970(): void * fixed to the second Monday in October since 1970. * * @throws Exception - * @throws ReflectionException */ public function testColumbusBetween1937And1969(): void { @@ -76,7 +73,7 @@ public function testColumbusBetween1937And1969(): void * 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 Exception */ public function testColumbusDayBefore1937(): void { @@ -90,7 +87,7 @@ public function testColumbusDayBefore1937(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index da1e3dac2..6b6dad10b 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class IndependenceDayTest extends USABaseTestCase implements HolidayTestCase * Tests Independence Day on or after 1776. Independence Day is celebrated since 1776 on July 4th. * * @throws Exception - * @throws ReflectionException */ public function testIndependenceDayOnAfter1776(): void { @@ -57,7 +55,6 @@ public function testIndependenceDayOnAfter1776(): void * Tests Independence Day on or after 1776 when substituted on Monday (when Independence Day falls on Sunday). * * @throws Exception - * @throws ReflectionException */ public function testIndependenceDayOnAfter1776SubstitutedMonday(): void { @@ -74,7 +71,6 @@ public function testIndependenceDayOnAfter1776SubstitutedMonday(): void * Tests Independence Day on or after 1776 when substituted on Friday (when Independence Day falls on Saturday). * * @throws Exception - * @throws ReflectionException */ public function testIndependenceDayOnAfter1776SubstitutedFriday(): void { @@ -90,7 +86,7 @@ public function testIndependenceDayOnAfter1776SubstitutedFriday(): void /** * Tests Independence Day before 1776. Independence Day is celebrated since 1776 on July 4th. * - * @throws ReflectionException + * @throws Exception */ public function testIndependenceDayBefore1776(): void { @@ -104,7 +100,7 @@ public function testIndependenceDayBefore1776(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -119,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index 56427c7f6..7df2d81cd 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class JuneteenthTest extends USABaseTestCase implements HolidayTestCase * Tests Juneteenth on or after 2021. Juneteenth is celebrated since 2021 on June 19th. * * @throws Exception - * @throws ReflectionException */ public function testJuneteenthOnAfter2021(): void { @@ -57,7 +55,6 @@ public function testJuneteenthOnAfter2021(): void * Tests Juneteenth on or after 2021 when substituted on Monday (when Juneteenth falls on Sunday). * * @throws Exception - * @throws ReflectionException */ public function testJuneteenthOnAfter2021SubstitutedMonday(): void { @@ -74,7 +71,6 @@ public function testJuneteenthOnAfter2021SubstitutedMonday(): void * Tests Juneteenth on or after 2021 when substituted on Friday (when Juneteenth falls on Saturday). * * @throws Exception - * @throws ReflectionException */ public function testJuneteenthOnAfter2021SubstitutedFriday(): void { @@ -90,7 +86,7 @@ public function testJuneteenthOnAfter2021SubstitutedFriday(): void /** * Tests Juneteenth before 2021. Juneteenth is celebrated since 2021 on June 19th. * - * @throws ReflectionException + * @throws Exception */ public function testJuneteenthBefore2021(): void { @@ -104,7 +100,7 @@ public function testJuneteenthBefore2021(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -119,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 00f46ee78..5b4dad368 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class LabourDayTest extends USABaseTestCase implements HolidayTestCase * Tests Labour Day on or after 1887. Labour Day was established since 1887 on the first Monday of September. * * @throws Exception - * @throws ReflectionException */ public function testLabourDayOnAfter1887(): void { @@ -56,7 +54,7 @@ public function testLabourDayOnAfter1887(): void /** * Tests Labour Day before 1887. Labour Day was established since 1887 on the first Monday of September. * - * @throws ReflectionException + * @throws Exception */ public function testLabourDayBefore1887(): void { @@ -70,7 +68,7 @@ public function testLabourDayBefore1887(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index 6151b1f97..fc9c4c18c 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class MartinLutherKingDayTest extends USABaseTestCase implements HolidayTestCase * third Monday of January. * * @throws Exception - * @throws ReflectionException */ public function testMartinLutherKingDayOnAfter1986(): void { @@ -58,7 +56,7 @@ public function testMartinLutherKingDayOnAfter1986(): void * 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 Exception */ public function testMartinLutherKingDayBefore1986(): void { @@ -72,7 +70,7 @@ public function testMartinLutherKingDayBefore1986(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -87,7 +85,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index 880174a2c..4d2011b51 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class MemorialDayTest extends USABaseTestCase implements HolidayTestCase * to the last Monday in May. * * @throws Exception - * @throws ReflectionException */ public function testMemorialDayOnAfter1968(): void { @@ -59,7 +57,6 @@ public function testMemorialDayOnAfter1968(): void * 1968 to the last Monday in May. * * @throws Exception - * @throws ReflectionException */ public function testMemorialDayBetween1865And1967(): void { @@ -76,7 +73,7 @@ public function testMemorialDayBetween1865And1967(): void * 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 Exception */ public function testMemorialDayBefore1865(): void { @@ -90,7 +87,7 @@ public function testMemorialDayBefore1865(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 24496b593..456a9b084 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class NewYearsDayTest extends USABaseTestCase implements HolidayTestCase * Tests New Years Day. * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDay(): void { @@ -52,7 +50,6 @@ public function testNewYearsDay(): void * Tests New Years Day when substituted on Monday (when New Years Day falls on Sunday). * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDaySubstitutedMonday(): void { @@ -69,7 +66,6 @@ public function testNewYearsDaySubstitutedMonday(): void * Tests New Years Day when substituted on Friday (when New Years Day falls on Saturday). * * @throws Exception - * @throws ReflectionException */ public function testNewYearsDaySubstitutedFriday(): void { @@ -86,7 +82,7 @@ public function testNewYearsDaySubstitutedFriday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -101,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index bd581c37a..47c7e8e60 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class ThanksgivingDayTest extends USABaseTestCase implements HolidayTestCase * of November. * * @throws Exception - * @throws ReflectionException */ public function testThanksgivingDayOnAfter1863(): void { @@ -58,7 +56,7 @@ public function testThanksgivingDayOnAfter1863(): void * Tests Thanksgiving Day before 1863. ThanksgivingDay Day is celebrated since 1863 on the fourth Thursday * of November. * - * @throws ReflectionException + * @throws Exception */ public function testThanksgivingDayBefore1863(): void { @@ -72,7 +70,7 @@ public function testThanksgivingDayBefore1863(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -87,7 +85,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 235f702af..df8e01d9e 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -30,6 +30,8 @@ class USATest extends USABaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the USA are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -65,8 +65,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the USA are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,8 +73,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the USA are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,8 +81,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the USA are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -95,8 +89,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the USA are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -105,6 +97,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index 7c976db51..b7a4bdb89 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Exception\MissingTranslationException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,6 @@ class VeteransDayTest extends USABaseTestCase implements HolidayTestCase * Tests Veterans Day on or after 1919. Veterans Day was established in 1919 on November 11. * * @throws Exception - * @throws ReflectionException */ public function testVeteransDayOnAfter1919(): void { @@ -59,7 +57,6 @@ public function testVeteransDayOnAfter1919(): void * Tests Veterans Day on or after 1919 when substituted on Monday (when Veterans Day falls on Sunday). * * @throws Exception - * @throws ReflectionException */ public function testVeteransDayOnAfter1919SubstitutedMonday(): void { @@ -76,7 +73,6 @@ public function testVeteransDayOnAfter1919SubstitutedMonday(): void * Tests Veterans Day on or after 1919 when substituted on Friday (when Veterans Day falls on Saturday). * * @throws Exception - * @throws ReflectionException */ public function testVeteransDayOnAfter1919SubstitutedFriday(): void { @@ -92,7 +88,7 @@ public function testVeteransDayOnAfter1919SubstitutedFriday(): void /** * Tests Veterans Day before 1919. Veterans Day was established in 1919 on November 11. * - * @throws ReflectionException + * @throws Exception */ public function testVeteransDayBefore1919(): void { @@ -106,12 +102,14 @@ public function testVeteransDayBefore1919(): void /** * Tests name of Veterans Day before 1954. Veterans Day was named 'Armistice Day' before 1954. * - * @throws ReflectionException * @throws MissingTranslationException */ public function testVeteransDayNameBefore1954(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); + try { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); + } catch (Exception $e) { + } $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -121,12 +119,14 @@ public function testVeteransDayNameBefore1954(): void /** * Tests name of Veterans Day after 1954. Veterans Day was named 'Armistice Day' before 1954. * - * @throws ReflectionException * @throws MissingTranslationException */ public function testVeteransDayNameAfter1954(): void { - $year = $this->generateRandomYear(1954); + try { + $year = $this->generateRandomYear(1954); + } catch (Exception $e) { + } $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -136,7 +136,7 @@ public function testVeteransDayNameAfter1954(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -151,7 +151,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index e6aa98c93..be5778f85 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,6 @@ class WashingtonsBirthdayTest extends USABaseTestCase implements HolidayTestCase * and was changed in 1968 to the third Monday in February. * * @throws Exception - * @throws ReflectionException */ public function testWashingtonsBirthdayOnAfter1968(): void { @@ -59,7 +57,6 @@ public function testWashingtonsBirthdayOnAfter1968(): void * 22 and was changed in 1968 to the third Monday in February. * * @throws Exception - * @throws ReflectionException */ public function testWashingtonsBirthdayBetween1879And1967(): void { @@ -76,7 +73,7 @@ public function testWashingtonsBirthdayBetween1879And1967(): void * 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 Exception */ public function testWashingtonsBirthdayBefore1879(): void { @@ -90,7 +87,7 @@ public function testWashingtonsBirthdayBefore1879(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 6f55216d6..6118e7b57 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -17,7 +17,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -39,8 +38,6 @@ class CatholicChristmasDayTest extends UkraineBaseTestCase implements HolidayTes * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testCatholicChristmasDay(int $year, DateTime $expected): void { @@ -50,7 +47,7 @@ public function testCatholicChristmasDay(int $year, DateTime $expected): void /** * Tests Catholic Christmas Day before 2017. * - * @throws ReflectionException + * @throws Exception */ public function testNoCatholicChristmasDayBefore2017(): void { @@ -66,7 +63,7 @@ public function testNoCatholicChristmasDayBefore2017(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 4db0562f5..0eddc717a 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class ChristmasDayTest extends UkraineBaseTestCase implements HolidayTestCase * * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testChristmasDay(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index 3daedd9a6..471bd9f53 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,7 +31,6 @@ class ConstitutionDayTest extends UkraineBaseTestCase implements HolidayTestCase public const HOLIDAY = 'constitutionDay'; /** - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -48,8 +46,6 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -58,8 +54,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index 7615d2963..bb3725ddb 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,7 +31,6 @@ class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements HolidayTes public const HOLIDAY = 'defenderOfUkraineDay'; /** - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -48,8 +46,6 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -63,8 +59,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index ca153ea56..b5eefe709 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class EasterTest extends UkraineBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index 3b1933b18..55bacedea 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,7 +31,6 @@ class IndependenceDayTest extends UkraineBaseTestCase implements HolidayTestCase public const HOLIDAY = 'independenceDay'; /** - * @throws ReflectionException * @throws Exception */ public function testHoliday(): void @@ -48,8 +46,6 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -58,8 +54,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index a46b46f21..09e4aaf0b 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,8 +31,6 @@ class InternationalWomensDayTest extends UkraineBaseTestCase implements HolidayT /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -55,7 +52,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -70,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 46407353d..231a36c1a 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements Holiday * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testInternationalWorkersDay(int $year, DateTime $expected): void { @@ -48,7 +45,7 @@ public function testInternationalWorkersDay(int $year, DateTime $expected): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -63,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 6899ec9e1..017418786 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +36,6 @@ class NewYearsDayTest extends UkraineBaseTestCase implements HolidayTestCase * * @param 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(int $year, DateTime $expected): void { @@ -60,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -75,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 95efecd72..5a00d538c 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class PentecostTest extends UkraineBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 55bc24cf3..63b01456e 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -16,7 +16,6 @@ namespace Yasumi\tests\Ukraine; use DateTime; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -38,8 +37,6 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements H * * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date - * - * @throws ReflectionException */ public function testSecondInternationalWorkersDay(int $year, DateTime $expected): void { @@ -49,7 +46,7 @@ public function testSecondInternationalWorkersDay(int $year, DateTime $expected) /** * Tests International Workers' Day since 2018. * - * @throws ReflectionException + * @throws \Exception */ public function testNoSecondInternationalWorkersDaySince2018(): void { @@ -65,7 +62,7 @@ public function testNoSecondInternationalWorkersDaySince2018(): void /** * Tests translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -80,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 000fef5bf..a409f6104 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -60,8 +60,6 @@ public function testSaturdaySubstitution(): void * @param int $year holiday calendar year * @param DateTime $expectedOfficial the official date to be checked against * @param DateTime|null $expectedSubstitution the substituted date to be checked against - * - * @throws ReflectionException */ public function assertHolidayWithSubstitution( string $provider, diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index f142186a5..6df25c7f9 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -31,6 +31,8 @@ class UkraineTest extends UkraineBaseTestCase implements ProviderTestCase /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -39,8 +41,6 @@ protected function setUp(): void /** * Tests if all official holidays in Ukraine are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -84,8 +84,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ukraine are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -94,8 +92,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ukraine are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -104,8 +100,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ukraine are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -114,8 +108,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ukraine are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -124,6 +116,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index 08c573511..4d686b93b 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -16,7 +16,6 @@ use DateTime; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,8 +31,6 @@ class VictoryDayTest extends UkraineBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider - * - * @throws ReflectionException */ public function testHoliday(int $year, DateTime $expected): void { @@ -55,7 +52,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -70,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 1bb47bb2c..1c2015824 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BoxingDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 3b4c3f4f8..9c46a7d30 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChristmasDayTest extends UnitedKingdomBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 29806a8b0..3d8b181fd 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterMondayTest extends UnitedKingdomBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index f5ac58fbf..7b5216a22 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BoxingDayTest extends EnglandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 1a244d78f..e292d6c70 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChristmasDayTest extends EnglandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 0bc947d45..44621dea9 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterMondayTest extends EnglandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index a03903792..8ee8ca65a 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -26,10 +26,12 @@ class EnglandTest extends EnglandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in England are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -51,8 +51,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in England are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,8 +59,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in England are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,8 +67,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in England are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,8 +81,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in England are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -97,6 +89,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index 601b64b55..dbefe0c33 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends EnglandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index 8c4dc869e..8844c7daf 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MayDayBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCa * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 1995 and 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayExceptions(): void @@ -79,7 +76,7 @@ public function testHolidayExceptions(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 8aadfd6e8..c62264820 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class NewYearsDayTest extends EnglandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -65,7 +63,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -79,7 +77,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -106,7 +104,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -121,7 +119,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index 738ed55b6..5bb5d6744 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class SpringBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCa * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exceptions in 2002 and 2012. * - * @throws ReflectionException * @throws Exception */ public function testHolidayException(): void @@ -79,7 +76,7 @@ public function testHolidayException(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index 54070539a..f292efbd1 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -43,7 +43,6 @@ class SummerBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCa * Tests the holiday defined in this test. * * @throws \Exception - * @throws \ReflectionException */ public function testHoliday(): void { @@ -60,7 +59,6 @@ public function testHoliday(): void * Tests the holiday exception in 2020. * * @throws \Exception - * @throws \ReflectionException */ public function testHolidayBefore1965(): void { @@ -76,7 +74,6 @@ public function testHolidayBefore1965(): void /** * Tests the holiday during trial period in 1965-1970. * - * @throws \ReflectionException * @throws \Exception */ public function testHolidayTrialPeriod(): void @@ -122,7 +119,7 @@ public function testHolidayTrialPeriod(): void /** * Tests the holiday defined in this test before establishment. * - * @throws \ReflectionException + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -136,7 +133,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws \Exception */ public function testTranslation(): void { @@ -151,7 +148,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws \Exception */ public function testTranslationBeforeRename(): void { @@ -166,7 +163,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index 3e8170d8f..e1b6c2d66 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends UnitedKingdomBaseTestCase implements HolidayTestCas * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index d4f91680e..dd444a56d 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MayDayBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 1995 and 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayExceptions(): void @@ -79,7 +76,7 @@ public function testHolidayExceptions(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/MotheringSundayTest.php b/tests/UnitedKingdom/MotheringSundayTest.php index 4717b09d8..75db801ba 100644 --- a/tests/UnitedKingdom/MotheringSundayTest.php +++ b/tests/UnitedKingdom/MotheringSundayTest.php @@ -19,7 +19,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\tests\UnitedKingdom\England\EnglandBaseTestCase; @@ -31,7 +30,6 @@ class MotheringSundayTest extends EnglandBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider * - * @throws ReflectionException * @throws Exception */ public function testHoliday(int $year, string $expected): void @@ -69,7 +67,7 @@ public function HolidayDataProvider(): array } /** - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -82,7 +80,7 @@ public function testTranslation(): void } /** - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 7c20b464f..322de63bd 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class NewYearsDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCa * @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(int $year, string $expected): void @@ -65,7 +63,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -79,7 +77,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -106,7 +104,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -121,7 +119,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index e7afbc512..6e7ebb871 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements Holida * @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(int $year, string $expected): void @@ -61,7 +59,7 @@ public function testHoliday(int $year, string $expected): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -95,7 +93,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -110,7 +108,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 61b11a906..c878a95c9 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BoxingDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCa * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index a95578df8..d850fdff8 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChristmasDayTest extends NorthernIrelandBaseTestCase implements HolidayTes * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index ea65fae74..6b507e5b7 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterMondayTest extends NorthernIrelandBaseTestCase implements HolidayTes * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index 74bbcbdcd..48a9a20d2 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends NorthernIrelandBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index a60cb5f4d..d8005ad3d 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 1995 and 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayExceptions(): void @@ -79,7 +76,7 @@ public function testHolidayExceptions(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index 54d318d15..3e2bae4c5 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class NewYearsDayTest extends NorthernIrelandBaseTestCase implements HolidayTest * @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(int $year, string $expected): void @@ -65,7 +63,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -79,7 +77,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -106,7 +104,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -121,7 +119,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index 203b91f2f..025f804a8 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -26,10 +26,12 @@ class NorthernIrelandTest extends NorthernIrelandBaseTestCase implements Provide /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Northern Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -51,8 +51,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Northern Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,8 +59,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Northern Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,8 +67,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Northern Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,8 +82,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Northern Ireland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -98,6 +90,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index dedf403a3..1e52e9d81 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 85430e391..c104f7a83 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class StPatricksDayTest extends NorthernIrelandBaseTestCase implements HolidayTe * @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(int $year, string $expected): void @@ -61,7 +59,7 @@ public function testHoliday(int $year, string $expected): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -95,7 +93,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -110,7 +108,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index 6678181c9..7528be410 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -61,7 +59,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayBefore1965(): void @@ -78,7 +75,6 @@ public function testHolidayBefore1965(): void /** * Tests the holiday during trial period in 1965-1970. * - * @throws ReflectionException * @throws Exception */ public function testHolidayTrialPeriod(): void @@ -124,7 +120,7 @@ public function testHolidayTrialPeriod(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -138,7 +134,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -153,7 +149,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslationBeforeRename(): void { @@ -168,7 +164,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php index 1a5200b2d..2dd9bbbb7 100644 --- a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php +++ b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class PlatinumJubileeBankHolidayTest extends UnitedKingdomBaseTestCase implement * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -60,7 +58,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before the year in which it occurred. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeActive(): void { @@ -74,7 +72,7 @@ public function testHolidayBeforeActive(): void /** * Tests the holiday defined in this test after the year in which it occurred. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterActive(): void { @@ -87,8 +85,6 @@ public function testHolidayAfterActive(): void /** * Tests the translated name of the holiday defined in this test. - * - * @throws ReflectionException */ public function testTranslation(): void { @@ -102,8 +98,6 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * - * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index 37e14d9f5..bc70ff8f2 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BoxingDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index c00ae6d06..2b74cac48 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChristmasDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index b33bf19c0..af9c34112 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends ScotlandBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index d2616bfa0..6b58ed22d 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MayDayBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 1995 and 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayExceptions(): void @@ -79,7 +76,7 @@ public function testHolidayExceptions(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index 08913d82a..275e382f1 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -50,7 +49,6 @@ class NewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -67,7 +65,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -81,7 +79,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -116,7 +114,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -131,7 +129,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 53162b0ef..49d78a0c1 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -26,10 +26,12 @@ class ScotlandTest extends ScotlandBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Scotland are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,8 +49,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Scotland are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,8 +57,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Scotland are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,8 +65,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Scotland are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -86,8 +80,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Scotland are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -96,6 +88,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index a4492d69c..9abfc0a8d 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -50,7 +49,6 @@ class SecondNewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestC * @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(int $year, string $expected): void @@ -67,7 +65,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -81,7 +79,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -116,7 +114,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -131,7 +129,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 5e6a83e3f..4c3a26747 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class SpringBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index a2b39a341..a5d5980b8 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,6 @@ class StAndrewsDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -81,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -96,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index 59dad9593..dc5823834 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class SummerBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -70,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -85,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 9762e0078..c969a4d37 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class SpringBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exceptions in 2002, 2012 and 2022. * - * @throws ReflectionException * @throws Exception */ public function testHolidayException(): void @@ -86,7 +83,7 @@ public function testHolidayException(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -100,7 +97,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index 104a6a95e..7a5d6856b 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -61,7 +59,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayBefore1965(): void @@ -78,7 +75,6 @@ public function testHolidayBefore1965(): void /** * Tests the holiday during trial period in 1965-1970. * - * @throws ReflectionException * @throws Exception */ public function testHolidayTrialPeriod(): void @@ -124,7 +120,7 @@ public function testHolidayTrialPeriod(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -138,7 +134,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -153,7 +149,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslationBeforeRename(): void { @@ -168,7 +164,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index e50979293..4a4a049f3 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -26,10 +26,12 @@ class UnitedKingdomTest extends UnitedKingdomBaseTestCase implements ProviderTes /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in the United Kingdom are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -51,8 +51,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the United Kingdom are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,8 +59,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the United Kingdom are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,8 +67,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the United Kingdom are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,8 +81,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the United Kingdom are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -97,6 +89,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index dcd153923..b16cebac0 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class BoxingDayTest extends WalesBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 2fb282aef..27ab6f961 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class ChristmasDayTest extends WalesBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -79,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -94,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index 8e07b0d95..a7c6fc014 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -18,7 +18,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class EasterMondayTest extends WalesBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -78,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -93,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index d31ee8e8a..6883ffc44 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,7 +34,6 @@ class GoodFridayTest extends WalesBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -51,7 +49,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index f43fe3d68..7a4429788 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class MayDayBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 1995 and 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayExceptions(): void @@ -79,7 +76,7 @@ public function testHolidayExceptions(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index 77d673e3f..a845eadbd 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,7 +48,6 @@ class NewYearsDayTest extends WalesBaseTestCase implements HolidayTestCase * @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(int $year, string $expected): void @@ -65,7 +63,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -79,7 +77,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -106,7 +104,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -121,7 +119,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 1bed1806d..0aebb0e3c 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +39,6 @@ class SpringBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -56,7 +54,6 @@ public function testHoliday(): void /** * Tests the holiday exceptions in 2002 and 2012. * - * @throws ReflectionException * @throws Exception */ public function testHolidayException(): void @@ -79,7 +76,7 @@ public function testHolidayException(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index 9cc37231e..f874b675c 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -17,7 +17,6 @@ use DateTime; use DateTimeZone; use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,6 @@ class SummerBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase * Tests the holiday defined in this test. * * @throws Exception - * @throws ReflectionException */ public function testHoliday(): void { @@ -61,7 +59,6 @@ public function testHoliday(): void /** * Tests the holiday exception in 2020. * - * @throws ReflectionException * @throws Exception */ public function testHolidayBefore1965(): void @@ -78,7 +75,6 @@ public function testHolidayBefore1965(): void /** * Tests the holiday during trial period in 1965-1970. * - * @throws ReflectionException * @throws Exception */ public function testHolidayTrialPeriod(): void @@ -124,7 +120,7 @@ public function testHolidayTrialPeriod(): void /** * Tests the holiday defined in this test before establishment. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayBeforeEstablishment(): void { @@ -138,7 +134,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslation(): void { @@ -153,7 +149,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testTranslationBeforeRename(): void { @@ -168,7 +164,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws ReflectionException + * @throws Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index 7eda1f42e..3d7b0835e 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -26,10 +26,12 @@ class WalesTest extends WalesBaseTestCase implements ProviderTestCase /** * @var int year random year number used for all tests in this Test Case */ - protected $year; + protected int $year; /** * Initial setup of this Test Case. + * + * @throws \Exception */ protected function setUp(): void { @@ -38,8 +40,6 @@ protected function setUp(): void /** * Tests if all official holidays in Wales are defined by the provider class. - * - * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -51,8 +51,6 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Wales are defined by the provider class. - * - * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,8 +59,6 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Wales are defined by the provider class. - * - * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,8 +67,6 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Wales are defined by the provider class. - * - * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,8 +81,6 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Wales are defined by the provider class. - * - * @throws ReflectionException */ public function testOtherHolidays(): void { @@ -97,6 +89,7 @@ public function testOtherHolidays(): void /** * @throws ReflectionException + * @throws \Exception */ public function testSources(): void { diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index e5f183323..b391c7cda 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -218,7 +218,7 @@ public function assertTranslatedHolidayName( self::assertInstanceOf(Holiday::class, $holiday); self::assertTrue($holidays->isHoliday($holiday)); - if (\is_array($translations) && !empty($translations)) { + if (!empty($translations)) { foreach ($translations as $locale => $name) { $locales = [$locale]; $parts = explode('_', $locale); @@ -709,14 +709,14 @@ protected function calculateEaster(int $year, string $timezone): DateTimeInterfa protected static function getMaxTimestamp($max = 'now') { if (is_numeric($max)) { - return (int) $max; - } - - if ($max instanceof \DateTime) { - return $max->getTimestamp(); + $ts = (int) $max; + } elseif ($max instanceof \DateTime) { + $ts = $max->getTimestamp(); + } else { + $ts = strtotime(empty($max) ? 'now' : $max); } - return strtotime(empty($max) ? 'now' : $max); + return $ts; } /** From abdaa729e7cfd39f3192d5a960650d16210fc186 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Feb 2022 16:59:50 +0900 Subject: [PATCH 346/687] Reverted Phan's config to analyse only the src directory. --- .phan/config.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index 1b53e48ef..5ec6e6b5f 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -349,14 +349,12 @@ // Thus, both first-party and third-party code being used by // your application should be included in this list. 'directory_list' => [ - 'src', - 'test' + 'src' ], // A list of individual files to include in analysis // with a path relative to the root directory of the // project. 'file_list' => [ - 'vendor/phpunit/phpunit/src/Framework/Assert.php' ], ]; From 4632a8283cf0aae2aad06224fb268be8dbd7e48b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Feb 2022 17:15:54 +0900 Subject: [PATCH 347/687] Cast the output to allow for strict type comparison. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index fbefba16e..edc389a5b 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -90,7 +90,7 @@ public static function nextWorkingDay( if (!$provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); - } elseif ($provider->getYear() !== $date->format('Y')) { + } elseif ($provider->getYear() !== (int) $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } @@ -280,7 +280,7 @@ public static function prevWorkingDay( if (!$provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); - } elseif ($provider->getYear() !== $date->format('Y')) { + } elseif ($provider->getYear() !== (int) $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } From 7e4fcc3c3aebf1cc04a0271d1a7b4addaadcf1e5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Feb 2022 17:40:55 +0900 Subject: [PATCH 348/687] `calculateSummerWinterTime` is an internal method and shouldn't be accessible directly. --- 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 aea86a0eb..23eb17759 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -503,7 +503,7 @@ protected function winterTime( * * @throws \Exception */ - protected function calculateSummerWinterTime( + private function calculateSummerWinterTime( int $year, string $timezone, bool $summer From 039edc923cb195872f96c3d76ce68fe562c9861b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Feb 2022 17:42:02 +0900 Subject: [PATCH 349/687] Removed tests folder from analysis (the large number of files make running analysis take a long time). --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index d5383d22d..2faf82185 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,7 +2,6 @@ parameters: level: 6 paths: - src - - tests ignoreErrors: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' From f0904c3cfcb5ad44bc6605fc1af247cc088a1dbb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Feb 2022 17:51:01 +0900 Subject: [PATCH 350/687] Documented correct data type for arrays. --- src/Yasumi/Filters/BetweenFilter.php | 11 ++++++----- src/Yasumi/Filters/OnFilter.php | 5 +++-- src/Yasumi/Provider/AbstractProvider.php | 6 +++--- src/Yasumi/Translations.php | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 8bb8865ba..5f3096811 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -17,6 +17,7 @@ use Iterator; use Yasumi\Provider\AbstractProvider; +use Yasumi\ProviderInterface; /** * BetweenFilter is a class used for filtering holidays based on given date range. @@ -40,11 +41,11 @@ class BetweenFilter extends AbstractFilter /** * Construct the Between FilterIterator Object. * - * @param Iterator $iterator Iterator object of the Holidays Provider - * @param \DateTimeInterface $startDate Start date of the time frame to check against - * @param \DateTimeInterface $endDate End date of the time frame to check against - * @param bool $equal Indicate whether the start and end dates should be included in the - * comparison + * @param Iterator $iterator Iterator object of the Holidays Provider + * @param \DateTimeInterface $startDate Start date of the time frame to check against + * @param \DateTimeInterface $endDate End date of the time frame to check against + * @param bool $equal Indicate whether the start and end dates should be included in the + * comparison */ public function __construct( Iterator $iterator, diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index b45fcc7d1..ccf4f8565 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -17,6 +17,7 @@ use Iterator; use Yasumi\Provider\AbstractProvider; +use Yasumi\ProviderInterface; /** * OnFilter is a class used for filtering holidays based on a given date. @@ -33,8 +34,8 @@ class OnFilter extends AbstractFilter /** * Construct the On FilterIterator Object. * - * @param Iterator $iterator Iterator object of the Holidays Provider - * @param \DateTimeInterface $date Start date of the time frame to check against + * @param Iterator $iterator Iterator object of the Holidays Provider + * @param \DateTimeInterface $date Start date of the time frame to check against */ public function __construct( Iterator $iterator, diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index ae9886305..1e13d69dd 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -39,9 +39,9 @@ abstract class AbstractProvider implements Countable, ProviderInterface, Iterato public const ID = 'US'; /** - * @var array list of the days of the week (the index of the weekdays) that are considered weekend days. - * This list only concerns those countries that deviate from the global common definition, - * where the weekend starts on Saturday and ends on Sunday (0 = Sunday, 1 = Monday, etc.). + * @var array> list of the days of the week (the index of the weekdays) that are considered weekend days. + * This list only concerns those countries that deviate from the global common definition, + * where the weekend starts on Saturday and ends on Sunday (0 = Sunday, 1 = Monday, etc.). */ public const WEEKEND_DATA = [ // Thursday and Friday diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 9717e592c..5f3990e50 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -25,7 +25,7 @@ class Translations implements TranslationsInterface { /** - * @var array translations array: ['' => ['' => 'translation', ...], ... ] + * @var array> translations array: ['' => ['' => 'translation', ...], ... ] */ public array $translations = []; From f629bafb02da6c8c6deae940a41703514e354bce Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 26 Mar 2022 01:06:46 +0900 Subject: [PATCH 351/687] Removed executable flag. Signed-off-by: Sacha Telgenhof --- composer.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 composer.json diff --git a/composer.json b/composer.json old mode 100755 new mode 100644 From b2267903d6197a8d1f3c59c54b74ef60523c5ffd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 7 Apr 2022 00:42:21 +0900 Subject: [PATCH 352/687] Upgraded PHP CS Fixer. CS fixes. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- src/Yasumi/Provider/Romania.php | 10 +++++----- tests/Ireland/PentecostTest.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 5b85e464c..718d7f715 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v2.19 | v3.5", + "friendsofphp/php-cs-fixer": "v2.19 | v3.8", "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 6efb5fa0c..13042e1f5 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -68,10 +68,10 @@ public function initialize(): void } // Add other holidays - $this->calculateDayAfterNewYearsDay(); //2nd of January - $this->calculateUnitedPrincipalitiesDay(); //since 21.12.2014 (Law 171/2014), celebrated on 24th of January - $this->calculateStAndrewDay(); //since 24.07.2012 (Law 147/2012), celebrated on 30th of November - $this->calculateNationalDay(); //after 1990, celebrated on December 1st + $this->calculateDayAfterNewYearsDay(); // 2nd of January + $this->calculateUnitedPrincipalitiesDay(); // since 21.12.2014 (Law 171/2014), celebrated on 24th of January + $this->calculateStAndrewDay(); // since 24.07.2012 (Law 147/2012), celebrated on 30th of November + $this->calculateNationalDay(); // after 1990, celebrated on December 1st $this->calculateConstantinBrancusiDay(); $this->calculateChildrensDay(); // Since 18.11.2016 (Law 220/2016), Celebrated on 1st of June } @@ -185,7 +185,7 @@ private function calculateNationalDay(): void { $nationalDay = null; - //@link https://en.wikipedia.org/wiki/Great_Union_Day + // @link https://en.wikipedia.org/wiki/Great_Union_Day if ($this->year >= 1990) { $nationalDay = "$this->year-12-01"; } diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 60a2c311a..61bf739a3 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array { $data = []; - //for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + // for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { for ($y = 0; $y < 2; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); From 7971dc0b55c69bea5335c123754292f400cefc41 Mon Sep 17 00:00:00 2001 From: Daan Roet Date: Wed, 11 May 2022 14:28:13 +0200 Subject: [PATCH 353/687] Netherlands Liberation day is only an official holiday every 5 years (#280) * fix: Liberation day is only an official holiday every 5 years * fix: add test cases for liberation day and run php-cs-fixer * fix: resolve the official/observed holiday tests * feat: add changelog entry for the addressed changes --- CHANGELOG.md | 1 + src/Yasumi/Provider/Netherlands.php | 4 +++- tests/Netherlands/LiberationDayTest.php | 16 ++++++++++++++-- tests/Netherlands/NetherlandsTest.php | 13 ++++++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ee0927f..695f3ed1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ to [Semantic Versioning](https://semver.org). type of the Yasumi factory methods is now `ProviderInterface`, those missing methods generated errors especially by statistic analyzers. - Included the data type for test methods that return an array. +- Liberation day for the Netherlands is only an official holiday every 5 years [\#280](https://github.com/azuyalabs/yasumi/pull/280) ### Deprecated diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 0c81a78a7..ff95d4796 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -319,12 +319,14 @@ private function calculateCommemorationLiberationDay(): void $this->locale, Holiday::TYPE_OBSERVANCE )); + // Liberation day is only an official holiday every 5 years + $holidayType = (0 === $this->year % 5) ? Holiday::TYPE_OFFICIAL : Holiday::TYPE_OBSERVANCE; $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, - Holiday::TYPE_OFFICIAL + $holidayType )); } } diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 39cdc4ce7..b90be24e8 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -81,7 +81,7 @@ public function testTranslation(): void } /** - * Tests type of the holiday defined in this test. + * Tests Liberation Day official holiday type every 5 years, observance type on other years. * * @throws Exception */ @@ -90,7 +90,19 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(2001, 2004), + Holiday::TYPE_OBSERVANCE + ); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + 2000, + Holiday::TYPE_OFFICIAL + ); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + 2005, Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index b10b702ce..d082935e0 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -51,10 +51,17 @@ public function testOfficialHolidays(): void 'ascensionDay', 'pentecost', 'pentecostMonday', - 'liberationDay', 'christmasDay', 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + + $this->assertDefinedHolidays([ + 'liberationDay', + ], self::REGION, 2015, Holiday::TYPE_OFFICIAL); + + $this->assertDefinedHolidays([ + 'liberationDay', + ], self::REGION, 2020, Holiday::TYPE_OFFICIAL); } /** @@ -73,6 +80,10 @@ public function testObservedHolidays(): void 'secondCarnivalDay', 'thirdCarnivalDay', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + + $this->assertDefinedHolidays([ + 'liberationDay', + ], self::REGION, $this->generateRandomYear(2011, 2014), Holiday::TYPE_OBSERVANCE); } /** From e6973e711e95a6b0efebc441fe3aaeb3b71e9530 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Jun 2022 15:41:34 +0900 Subject: [PATCH 354/687] Removed redundant class comment. Signed-off-by: Sacha Telgenhof --- src/Yasumi/TranslationsInterface.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Yasumi/TranslationsInterface.php b/src/Yasumi/TranslationsInterface.php index b20abe1c8..8b37128ee 100644 --- a/src/Yasumi/TranslationsInterface.php +++ b/src/Yasumi/TranslationsInterface.php @@ -14,9 +14,6 @@ namespace Yasumi; -/** - * Interface TranslationsInterface. - */ interface TranslationsInterface { /** From badc878d5ee1dfb143f5ccecb03455514e9f0a84 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 5 Jun 2022 15:59:49 +0900 Subject: [PATCH 355/687] Removed execute permissions of some files. Yasumi is a library and does not have any files that require execute permissions. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 0 src/Yasumi/Provider/AbstractProvider.php | 0 src/Yasumi/Provider/Australia.php | 0 src/Yasumi/Provider/Austria/Burgenland.php | 0 src/Yasumi/Provider/Austria/Carinthia.php | 0 src/Yasumi/Provider/Austria/LowerAustria.php | 0 src/Yasumi/Provider/Austria/Salzburg.php | 0 src/Yasumi/Provider/Austria/Styria.php | 0 src/Yasumi/Provider/Austria/Tyrol.php | 0 src/Yasumi/Provider/Austria/UpperAustria.php | 0 src/Yasumi/Provider/Austria/Vienna.php | 0 src/Yasumi/Provider/Austria/Vorarlberg.php | 0 src/Yasumi/Provider/Belgium.php | 0 src/Yasumi/Provider/France.php | 0 src/Yasumi/Provider/France/BasRhin.php | 0 src/Yasumi/Provider/France/HautRhin.php | 0 src/Yasumi/Provider/France/Moselle.php | 0 src/Yasumi/Provider/Germany/BadenWurttemberg.php | 0 src/Yasumi/Provider/Germany/Bavaria.php | 0 src/Yasumi/Provider/Germany/Berlin.php | 0 src/Yasumi/Provider/Germany/Brandenburg.php | 0 src/Yasumi/Provider/Germany/Bremen.php | 0 src/Yasumi/Provider/Germany/Hamburg.php | 0 src/Yasumi/Provider/Germany/Hesse.php | 0 src/Yasumi/Provider/Germany/LowerSaxony.php | 0 src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php | 0 src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 0 src/Yasumi/Provider/Germany/RhinelandPalatinate.php | 0 src/Yasumi/Provider/Germany/Saarland.php | 0 src/Yasumi/Provider/Germany/Saxony.php | 0 src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 0 src/Yasumi/Provider/Germany/SchleswigHolstein.php | 0 src/Yasumi/Provider/Germany/Thuringia.php | 0 src/Yasumi/Provider/Italy.php | 0 src/Yasumi/Provider/Japan.php | 0 src/Yasumi/Provider/Luxembourg.php | 0 src/Yasumi/Provider/Netherlands.php | 0 src/Yasumi/Provider/Poland.php | 0 src/Yasumi/Provider/Romania.php | 0 src/Yasumi/Provider/Spain.php | 0 src/Yasumi/Provider/Spain/Andalusia.php | 0 src/Yasumi/Provider/Spain/Aragon.php | 0 src/Yasumi/Provider/Spain/Asturias.php | 0 src/Yasumi/Provider/Spain/BalearicIslands.php | 0 src/Yasumi/Provider/Spain/BasqueCountry.php | 0 src/Yasumi/Provider/Spain/CanaryIslands.php | 0 src/Yasumi/Provider/Spain/Cantabria.php | 0 src/Yasumi/Provider/Spain/CastileAndLeon.php | 0 src/Yasumi/Provider/Spain/CastillaLaMancha.php | 0 src/Yasumi/Provider/Spain/Catalonia.php | 0 src/Yasumi/Provider/Spain/Ceuta.php | 0 src/Yasumi/Provider/Spain/CommunityOfMadrid.php | 0 src/Yasumi/Provider/Spain/Extremadura.php | 0 src/Yasumi/Provider/Spain/Galicia.php | 0 src/Yasumi/Provider/Spain/LaRioja.php | 0 src/Yasumi/Provider/Spain/Melilla.php | 0 src/Yasumi/Provider/Spain/Navarre.php | 0 src/Yasumi/Provider/Spain/RegionOfMurcia.php | 0 src/Yasumi/Provider/Spain/ValencianCommunity.php | 0 src/Yasumi/Provider/Turkey.php | 0 src/Yasumi/Provider/USA.php | 0 src/Yasumi/ProviderInterface.php | 0 src/Yasumi/SubstituteHoliday.php | 0 src/Yasumi/Yasumi.php | 0 src/Yasumi/data/translations/allSaintsDay.php | 0 src/Yasumi/data/translations/allSaintsEve.php | 0 src/Yasumi/data/translations/assumptionOfMary.php | 0 src/Yasumi/data/translations/christmasDay.php | 0 src/Yasumi/data/translations/christmasEve.php | 0 src/Yasumi/data/translations/dayOfReformation.php | 0 src/Yasumi/data/translations/fathersDay.php | 0 src/Yasumi/data/translations/internationalWomensDay.php | 0 src/Yasumi/data/translations/internationalWorkersDay.php | 0 src/Yasumi/data/translations/mothersDay.php | 0 src/Yasumi/data/translations/newYearsDay.php | 0 src/Yasumi/data/translations/newYearsEve.php | 0 src/Yasumi/data/translations/pentecost.php | 0 src/Yasumi/data/translations/pentecostMonday.php | 0 src/Yasumi/data/translations/reformationDay.php | 0 src/Yasumi/data/translations/secondChristmasDay.php | 0 src/Yasumi/data/translations/secondNewYearsDay.php | 0 src/Yasumi/data/translations/substituteHoliday.php | 0 src/Yasumi/data/translations/walpurgisEve.php | 0 tests/Romania/EasterMondayTest.php | 0 tests/Romania/EasterTest.php | 0 tests/Romania/InternationalWorkersDayTest.php | 0 tests/Romania/RomaniaBaseTestCase.php | 0 tests/Romania/RomaniaTest.php | 0 tests/Turkey/TurkeyBaseTestCase.php | 0 tests/Turkey/TurkeyTest.php | 0 90 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/Yasumi/Holiday.php mode change 100755 => 100644 src/Yasumi/Provider/AbstractProvider.php mode change 100755 => 100644 src/Yasumi/Provider/Australia.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Burgenland.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Carinthia.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/LowerAustria.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Salzburg.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Styria.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Tyrol.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/UpperAustria.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Vienna.php mode change 100755 => 100644 src/Yasumi/Provider/Austria/Vorarlberg.php mode change 100755 => 100644 src/Yasumi/Provider/Belgium.php mode change 100755 => 100644 src/Yasumi/Provider/France.php mode change 100755 => 100644 src/Yasumi/Provider/France/BasRhin.php mode change 100755 => 100644 src/Yasumi/Provider/France/HautRhin.php mode change 100755 => 100644 src/Yasumi/Provider/France/Moselle.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/BadenWurttemberg.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Bavaria.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Berlin.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Brandenburg.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Bremen.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Hamburg.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Hesse.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/LowerSaxony.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/NorthRhineWestphalia.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/RhinelandPalatinate.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Saarland.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Saxony.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/SaxonyAnhalt.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/SchleswigHolstein.php mode change 100755 => 100644 src/Yasumi/Provider/Germany/Thuringia.php mode change 100755 => 100644 src/Yasumi/Provider/Italy.php mode change 100755 => 100644 src/Yasumi/Provider/Japan.php mode change 100755 => 100644 src/Yasumi/Provider/Luxembourg.php mode change 100755 => 100644 src/Yasumi/Provider/Netherlands.php mode change 100755 => 100644 src/Yasumi/Provider/Poland.php mode change 100755 => 100644 src/Yasumi/Provider/Romania.php mode change 100755 => 100644 src/Yasumi/Provider/Spain.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Andalusia.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Aragon.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Asturias.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/BalearicIslands.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/BasqueCountry.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/CanaryIslands.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Cantabria.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/CastileAndLeon.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/CastillaLaMancha.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Catalonia.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Ceuta.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/CommunityOfMadrid.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Extremadura.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Galicia.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/LaRioja.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Melilla.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/Navarre.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/RegionOfMurcia.php mode change 100755 => 100644 src/Yasumi/Provider/Spain/ValencianCommunity.php mode change 100755 => 100644 src/Yasumi/Provider/Turkey.php mode change 100755 => 100644 src/Yasumi/Provider/USA.php mode change 100755 => 100644 src/Yasumi/ProviderInterface.php mode change 100755 => 100644 src/Yasumi/SubstituteHoliday.php mode change 100755 => 100644 src/Yasumi/Yasumi.php mode change 100755 => 100644 src/Yasumi/data/translations/allSaintsDay.php mode change 100755 => 100644 src/Yasumi/data/translations/allSaintsEve.php mode change 100755 => 100644 src/Yasumi/data/translations/assumptionOfMary.php mode change 100755 => 100644 src/Yasumi/data/translations/christmasDay.php mode change 100755 => 100644 src/Yasumi/data/translations/christmasEve.php mode change 100755 => 100644 src/Yasumi/data/translations/dayOfReformation.php mode change 100755 => 100644 src/Yasumi/data/translations/fathersDay.php mode change 100755 => 100644 src/Yasumi/data/translations/internationalWomensDay.php mode change 100755 => 100644 src/Yasumi/data/translations/internationalWorkersDay.php mode change 100755 => 100644 src/Yasumi/data/translations/mothersDay.php mode change 100755 => 100644 src/Yasumi/data/translations/newYearsDay.php mode change 100755 => 100644 src/Yasumi/data/translations/newYearsEve.php mode change 100755 => 100644 src/Yasumi/data/translations/pentecost.php mode change 100755 => 100644 src/Yasumi/data/translations/pentecostMonday.php mode change 100755 => 100644 src/Yasumi/data/translations/reformationDay.php mode change 100755 => 100644 src/Yasumi/data/translations/secondChristmasDay.php mode change 100755 => 100644 src/Yasumi/data/translations/secondNewYearsDay.php mode change 100755 => 100644 src/Yasumi/data/translations/substituteHoliday.php mode change 100755 => 100644 src/Yasumi/data/translations/walpurgisEve.php mode change 100755 => 100644 tests/Romania/EasterMondayTest.php mode change 100755 => 100644 tests/Romania/EasterTest.php mode change 100755 => 100644 tests/Romania/InternationalWorkersDayTest.php mode change 100755 => 100644 tests/Romania/RomaniaBaseTestCase.php mode change 100755 => 100644 tests/Romania/RomaniaTest.php mode change 100755 => 100644 tests/Turkey/TurkeyBaseTestCase.php mode change 100755 => 100644 tests/Turkey/TurkeyTest.php diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Burgenland.php b/src/Yasumi/Provider/Austria/Burgenland.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/LowerAustria.php b/src/Yasumi/Provider/Austria/LowerAustria.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Styria.php b/src/Yasumi/Provider/Austria/Styria.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Tyrol.php b/src/Yasumi/Provider/Austria/Tyrol.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Vienna.php b/src/Yasumi/Provider/Austria/Vienna.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Austria/Vorarlberg.php b/src/Yasumi/Provider/Austria/Vorarlberg.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/France/BasRhin.php b/src/Yasumi/Provider/France/BasRhin.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/France/HautRhin.php b/src/Yasumi/Provider/France/HautRhin.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/France/Moselle.php b/src/Yasumi/Provider/France/Moselle.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Brandenburg.php b/src/Yasumi/Provider/Germany/Brandenburg.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Bremen.php b/src/Yasumi/Provider/Germany/Bremen.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Hesse.php b/src/Yasumi/Provider/Germany/Hesse.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/LowerSaxony.php b/src/Yasumi/Provider/Germany/LowerSaxony.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Saarland.php b/src/Yasumi/Provider/Germany/Saarland.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/SchleswigHolstein.php b/src/Yasumi/Provider/Germany/SchleswigHolstein.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Aragon.php b/src/Yasumi/Provider/Spain/Aragon.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Melilla.php b/src/Yasumi/Provider/Spain/Melilla.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/Navarre.php b/src/Yasumi/Provider/Spain/Navarre.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/dayOfReformation.php b/src/Yasumi/data/translations/dayOfReformation.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/secondNewYearsDay.php b/src/Yasumi/data/translations/secondNewYearsDay.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/substituteHoliday.php b/src/Yasumi/data/translations/substituteHoliday.php old mode 100755 new mode 100644 diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php old mode 100755 new mode 100644 diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php old mode 100755 new mode 100644 diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php old mode 100755 new mode 100644 diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php old mode 100755 new mode 100644 diff --git a/tests/Romania/RomaniaBaseTestCase.php b/tests/Romania/RomaniaBaseTestCase.php old mode 100755 new mode 100644 diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php old mode 100755 new mode 100644 diff --git a/tests/Turkey/TurkeyBaseTestCase.php b/tests/Turkey/TurkeyBaseTestCase.php old mode 100755 new mode 100644 diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php old mode 100755 new mode 100644 From 538a89af96eb5bb0eb1833228fb59969a611b36b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 14 Jun 2022 01:31:54 +0900 Subject: [PATCH 356/687] Altered test to include condition that Pentecost Monday was only a holiday up to 2004. Signed-off-by: Sacha Telgenhof --- tests/France/PentecostMondayTest.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index 789b0316e..1326970a4 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -22,6 +22,12 @@ /** * Class for testing Pentecost Monday in France. + * + * Until 2004, Pentecost Monday was an official holiday. Since 2004, the holiday is considered a 'working holiday', + * imposed by law to be by default on Pentecost Monday. Pentecost Monday is still a holiday (but a working holiday). + * + * @see: https://en.wikipedia.org/wiki/Journ%C3%A9e_de_solidarit%C3%A9_envers_les_personnes_%C3%A2g%C3%A9es + * @see: https://fr.wikipedia.org/w/index.php?title=Journ%C3%A9e_de_solidarit%C3%A9_envers_les_personnes_%C3%A2g%C3%A9es_et_handicap%C3%A9es&tableofcontents=0 */ class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase { @@ -30,6 +36,8 @@ class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'pentecostMonday'; + public const EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY = 2004; + /** * Tests Pentecost Monday. * @@ -68,6 +76,18 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(null, self::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY - 1), + Holiday::TYPE_OFFICIAL + ); + + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY), + Holiday::TYPE_OBSERVANCE + ); } } From d47b7c45dbfc08d33deb047139396384477c8aed Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 14 Jun 2022 09:15:01 +0900 Subject: [PATCH 357/687] Extracted method to determine Pentecost Monday. Adjusted the France base test accordingly. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/France.php | 26 +++++++++++++++++- tests/France/FranceTest.php | 40 ++++++++++++++++++---------- tests/France/PentecostMondayTest.php | 13 +++------ 3 files changed, 54 insertions(+), 25 deletions(-) diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 7be3329eb..291e70753 100644 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -33,6 +33,8 @@ class France extends AbstractProvider */ public const ID = 'FR'; + public const EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY = 2004; + /** * Initialize holidays for France. * @@ -56,7 +58,6 @@ public function initialize(): void $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale)); - $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); @@ -68,6 +69,7 @@ public function initialize(): void // Calculate other holidays $this->calculateBastilleDay(); + $this->calculatePentecostMonday(); } public function getSources(): array @@ -103,4 +105,26 @@ private function calculateBastilleDay(): void ], new DateTime("$this->year-7-14", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } + + /** + * Pentecost Monday. + * + * Until 2004, Pentecost Monday was an official holiday. Since 2004, the holiday is considered a 'working holiday', + * imposed by law to be by default on Pentecost Monday. Pentecost Monday is still a holiday (but a working holiday). + * + * @see: https://en.wikipedia.org/wiki/Journ%C3%A9e_de_solidarit%C3%A9_envers_les_personnes_%C3%A2g%C3%A9es + * @see: https://fr.wikipedia.org/w/index.php?title=Journ%C3%A9e_de_solidarit%C3%A9_envers_les_personnes_%C3%A2g%C3%A9es_et_handicap%C3%A9es&tableofcontents=0 + * + * @throws \Exception + */ + private function calculatePentecostMonday(): void + { + $type = Holiday::TYPE_OFFICIAL; + + if ($this->year >= 2004) { + $type = Holiday::TYPE_OBSERVANCE; + } + + $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale, $type)); + } } diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index 84228f7e7..2803d2b20 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -16,6 +16,7 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; /** @@ -43,19 +44,25 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ - 'newYearsDay', - 'victoryInEuropeDay', - 'easterMonday', - 'internationalWorkersDay', - 'ascensionDay', - 'pentecostMonday', - 'assumptionOfMary', - 'allSaintsDay', - 'armisticeDay', - 'christmasDay', - 'bastilleDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + $holidays = + [ + 'newYearsDay', + 'victoryInEuropeDay', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'assumptionOfMary', + 'allSaintsDay', + 'armisticeDay', + 'christmasDay', + 'bastilleDay', + ]; + + if ($this->year < France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** @@ -63,7 +70,12 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + $holidays = []; + if ($this->year >= France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } /** diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index 1326970a4..8b9060f06 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -18,16 +18,11 @@ use DateTimeZone; use Exception; use Yasumi\Holiday; +use Yasumi\Provider\France; use Yasumi\tests\HolidayTestCase; /** * Class for testing Pentecost Monday in France. - * - * Until 2004, Pentecost Monday was an official holiday. Since 2004, the holiday is considered a 'working holiday', - * imposed by law to be by default on Pentecost Monday. Pentecost Monday is still a holiday (but a working holiday). - * - * @see: https://en.wikipedia.org/wiki/Journ%C3%A9e_de_solidarit%C3%A9_envers_les_personnes_%C3%A2g%C3%A9es - * @see: https://fr.wikipedia.org/w/index.php?title=Journ%C3%A9e_de_solidarit%C3%A9_envers_les_personnes_%C3%A2g%C3%A9es_et_handicap%C3%A9es&tableofcontents=0 */ class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase { @@ -36,8 +31,6 @@ class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'pentecostMonday'; - public const EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY = 2004; - /** * Tests Pentecost Monday. * @@ -79,14 +72,14 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(null, self::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY - 1), + $this->generateRandomYear(null, France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY - 1), Holiday::TYPE_OFFICIAL ); $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY), + $this->generateRandomYear(France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY), Holiday::TYPE_OBSERVANCE ); } From 6306fc763b8d16620b896b742aa2d2eb0b20d868 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 14 Jun 2022 21:05:27 +0900 Subject: [PATCH 358/687] Adjusted tests for the regions Bas-Rhin, Haut-Rhin and Moselle accordingly. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 7 +++-- tests/France/BasRhin/BasRhinTest.php | 43 ++++++++++++++++---------- tests/France/FranceTest.php | 1 + tests/France/HautRhin/HautRhinTest.php | 43 ++++++++++++++++---------- tests/France/Moselle/MoselleTest.php | 43 ++++++++++++++++---------- 5 files changed, 87 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 695f3ed1f..db8d5074a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,13 +15,16 @@ to [Semantic Versioning](https://semver.org). ### Fixed +- Pentecost Monday in France was only until 2004 recognized as an official holiday. Since 2004 it is considered a + special holiday, a so called 'working holiday'. Hence, it is therefore classified as an observed holiday in Yasumi + from 2004 and forward. [\#281](https://github.com/azuyalabs/yasumi/issues/281). - The test for Remembrance Day (Argentina) in that Remembrance Day was considered for all years: it is only celebrated since 2006. - Created the interface methods of the `ProviderInterface` that the abstract provider class implements. Since the return type of the Yasumi factory methods is now `ProviderInterface`, those missing methods generated errors especially by - statistic analyzers. + statistic analysers. - Included the data type for test methods that return an array. -- Liberation day for the Netherlands is only an official holiday every 5 years [\#280](https://github.com/azuyalabs/yasumi/pull/280) +- Liberation day for the Netherlands is only an official holiday every 5 years [\#280](https://github.com/azuyalabs/yasumi/pull/280). ### Deprecated diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index 3d7733a62..f9989c4be 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -16,6 +16,7 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; /** @@ -43,21 +44,25 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ - 'newYearsDay', - 'victoryInEuropeDay', - 'goodFriday', - 'easterMonday', - 'internationalWorkersDay', - 'ascensionDay', - 'pentecostMonday', - 'assumptionOfMary', - 'allSaintsDay', - 'armisticeDay', - 'christmasDay', - 'stStephensDay', - 'bastilleDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + $holidays = + [ + 'newYearsDay', + 'victoryInEuropeDay', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'assumptionOfMary', + 'allSaintsDay', + 'armisticeDay', + 'christmasDay', + 'bastilleDay', + ]; + + if ($this->year < France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** @@ -65,7 +70,13 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + $holidays = []; + + if ($this->year >= France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } /** diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index 2803d2b20..d73298a89 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -71,6 +71,7 @@ public function testOfficialHolidays(): void public function testObservedHolidays(): void { $holidays = []; + if ($this->year >= France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { $holidays[] = 'pentecostMonday'; } diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 3bdefdaaa..245177756 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -16,6 +16,7 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; /** @@ -43,21 +44,25 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ - 'newYearsDay', - 'victoryInEuropeDay', - 'goodFriday', - 'easterMonday', - 'internationalWorkersDay', - 'ascensionDay', - 'pentecostMonday', - 'assumptionOfMary', - 'allSaintsDay', - 'armisticeDay', - 'christmasDay', - 'stStephensDay', - 'bastilleDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + $holidays = + [ + 'newYearsDay', + 'victoryInEuropeDay', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'assumptionOfMary', + 'allSaintsDay', + 'armisticeDay', + 'christmasDay', + 'bastilleDay', + ]; + + if ($this->year < France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** @@ -65,7 +70,13 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + $holidays = []; + + if ($this->year >= France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } /** diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index 8a097222c..12ed17a99 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -16,6 +16,7 @@ use ReflectionException; use Yasumi\Holiday; +use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; /** @@ -43,21 +44,25 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ - 'newYearsDay', - 'victoryInEuropeDay', - 'goodFriday', - 'easterMonday', - 'internationalWorkersDay', - 'ascensionDay', - 'pentecostMonday', - 'assumptionOfMary', - 'allSaintsDay', - 'armisticeDay', - 'christmasDay', - 'stStephensDay', - 'bastilleDay', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + $holidays = + [ + 'newYearsDay', + 'victoryInEuropeDay', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'assumptionOfMary', + 'allSaintsDay', + 'armisticeDay', + 'christmasDay', + 'bastilleDay', + ]; + + if ($this->year < France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } /** @@ -65,7 +70,13 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + $holidays = []; + + if ($this->year >= France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY) { + $holidays[] = 'pentecostMonday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } /** From abdcbf88755aa89d35f0995ea4e3441bdefd12c7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 15 Jun 2022 00:30:53 +0900 Subject: [PATCH 359/687] Formatting cleanup. Signed-off-by: Sacha Telgenhof --- CONTRIBUTING.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3317cab59..49c1c9f31 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,8 +10,8 @@ When contributing there are a few guidelines we'd like you to keep in mind: - **[PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** Please use the following command after you have completed your work: - ``` bash - $ composer format + ``` shell + composer format ``` This will check/correct all the code for the PSR-12 Coding Standard using the @@ -20,9 +20,9 @@ When contributing there are a few guidelines we'd like you to keep in mind: - **Add unit tests!** - Your Pull Request won't be accepted if it does not have tests: 1. Ensure your new Holiday Provider contains all the necessary unit tests. - 2. Next to the file 'BaseTestCase.php', a file called 'Test.php' needs to be present. This + 2. Next to the file `{REGIONNAME}BaseTestCase.php`, a file called `{REGIONNAME}Test.php` needs to be present. This file needs to include region/country level tests and requires assertion of all expected holidays. - 3. All the unit tests and the implementation Holiday Provider require to have the correct locale, timezone and + 3. All the unit tests and the implementation Holiday Provider require to have the correct locale, time zone and region/country name. 4. As almost all tests use automatic iterations, make sure the year for which the test is executed is a valid year. Some holidays are only established from a certain year and having the test year number smaller than the minimum @@ -39,12 +39,12 @@ When contributing there are a few guidelines we'd like you to keep in mind: ## Running Tests -``` bash -$ composer test +``` shell +composer test ``` -or alternatively run with: +Or, alternatively run with: -``` bash -$ vendor/bin/phpunit +``` shell +vendor/bin/phpunit ``` From beb85aa0167095f35209f981da0c3a2003771eee Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Aug 2022 16:24:41 +0900 Subject: [PATCH 360/687] Upgraded rector configuration. Signed-off-by: Sacha Telgenhof --- rector.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/rector.php b/rector.php index 0b826aa72..d9bd2f07f 100644 --- a/rector.php +++ b/rector.php @@ -2,21 +2,23 @@ declare(strict_types=1); -use Rector\Core\Configuration\Option; +use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; +use Rector\Config\RectorConfig; use Rector\Set\ValueObject\SetList; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -return static function (ContainerConfigurator $containerConfigurator): void { - $parameters = $containerConfigurator->parameters(); - $parameters->set(Option::PATHS, [ +return static function (RectorConfig $rectorConfig): void { + $rectorConfig->paths([ __DIR__.'/src', ]); - $parameters->set(Option::AUTOLOAD_PATHS, [ - ]); + // single rules + $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); - $containerConfigurator->import(SetList::CODE_QUALITY); - $containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT); - $containerConfigurator->import(SetList::PHP_74); - $containerConfigurator->import(SetList::DEAD_CODE); + // sets of rules + $rectorConfig->sets([ + SetList::PHP_74, + SetList::CODE_QUALITY, + SetList::TYPE_DECLARATION_STRICT, + SetList::DEAD_CODE, + ]); }; From d775b3ef54595bacf6d46fefa86997bae3e45ba1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Aug 2022 16:25:51 +0900 Subject: [PATCH 361/687] Added missing type. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 1e13d69dd..82115ab11 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -73,10 +73,8 @@ abstract class AbstractProvider implements Countable, ProviderInterface, Iterato 'IN' => [0], // India ]; - /** - * @var int the object's current year - */ - protected $year; + /** @var int the object's current year */ + protected int $year; /** the object's current timezone */ protected string $timezone; From a57bf1878be97f2ef0f384cea8ba88a041824a49 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Aug 2022 18:43:27 +0900 Subject: [PATCH 362/687] Added missing method return type. Signed-off-by: Sacha Telgenhof --- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/EpiphanyTest.php | 2 +- tests/Netherlands/HalloweenTest.php | 2 +- tests/Netherlands/InternationalWorkersDayTest.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/QueensBirthdayTest.php | 2 +- tests/NewZealand/WaitangiDayTest.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 6101e7e86..35af70baa 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index c9db4a0ab..0ae287ac4 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements HolidayTestCase * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date */ - public function testEpiphany(int $year, DateTime $expected): void + public function testEpiphany(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index 783949fec..d3857c14e 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -37,7 +37,7 @@ class HalloweenTest extends NetherlandsBaseTestCase implements HolidayTestCase * @param int $year the year for which Halloween needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index a00e1e2f1..259d62bb1 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Hol * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index e71cc80f9..5bcbe7845 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 5c302cf54..1d4445749 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -37,7 +37,7 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements HolidayTestCa * @param int $year the year for which Valentines Day needs to be tested * @param DateTime $expected the expected date */ - public function testValentinesDay(int $year, DateTime $expected): void + public function testValentinesDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index f8858adbd..8fed083af 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -37,7 +37,7 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index f64e5b72a..f3a1dbe5c 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -37,7 +37,7 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * @param int $year the year for which Sint Martins Day needs to be tested * @param DateTime $expected the expected date */ - public function teststMartinsDay(int $year, DateTime $expected): void + public function teststMartinsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index bc690befe..010ffa124 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -37,7 +37,7 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements HolidayTestCa * @param int $year the year for which Sint Nicholas Day needs to be tested * @param DateTime $expected the expected date */ - public function teststNicholasDay(int $year, DateTime $expected): void + public function teststNicholasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index 48025121f..c5d58576f 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -72,7 +72,7 @@ public function testNotHoliday(): void */ public function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(4, 25, function ($year, DateTime $date) { + return $this->generateRandomDatesWithModifier(4, 25, function ($year, DateTime $date): void { // 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/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 9cb0ba085..e5189c918 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -43,7 +43,7 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index ea79aa5ca..c03902f14 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -102,7 +102,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): void { // 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'); From 0829e012a637e35ce02be027b4423612698149f4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Aug 2022 20:13:18 +0900 Subject: [PATCH 363/687] Replaced DateTime with DateTimeInterface (Always use interface where possible). Signed-off-by: Sacha Telgenhof --- tests/Australia/AustraliaDayTest.php | 2 +- tests/Austria/AllSaintsDayTest.php | 2 +- tests/Austria/AssumptionOfMaryTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.php | 2 +- tests/Austria/ChristmasTest.php | 2 +- tests/Austria/EpiphanyTest.php | 2 +- tests/Austria/ImmaculateConceptionTest.php | 2 +- tests/Austria/InternationalWorkersDayTest.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Belgium/AllSaintsDayTest.php | 2 +- tests/Belgium/ArmisticeDayTest.php | 2 +- tests/Belgium/AssumptionOfMaryTest.php | 2 +- tests/Belgium/ChristmasTest.php | 2 +- tests/Belgium/InternationalWorkersDayTest.php | 2 +- tests/Belgium/NationalDayTest.php | 2 +- tests/Belgium/NewYearsDayTest.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 | 3 +-- tests/Bosnia/SecondLabourDay.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/CzechStateHoodDayTest.php | 2 +- .../IndependentCzechoslovakStateDayTest.php | 2 +- .../CzechRepublic/InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- .../RenewalOfIndependentCzechStateDayTest.php | 2 +- .../SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/CzechRepublic/SecondChristmasDayTest.php | 2 +- .../StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/CzechRepublic/VictoryInEuropeDayTest.php | 2 +- tests/Denmark/ChristmasDayTest.php | 2 +- tests/Denmark/ChristmasEveTest.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 | 3 +-- tests/Estonia/ChristmasEveDayTest.php | 3 +-- tests/Estonia/InternationalWorkersDayTest.php | 3 +-- tests/Estonia/NewYearsDayTest.php | 3 +-- tests/Estonia/SecondChristmasDayTest.php | 3 +-- tests/Estonia/StJohnsDayTest.php | 3 +-- tests/Finland/AllSaintsDayTest.php | 2 +- tests/Finland/ChristmasDayTest.php | 2 +- tests/Finland/EpiphanyTest.php | 2 +- tests/Finland/InternationalWorkersDayTest.php | 2 +- tests/Finland/NewYearsDayTest.php | 2 +- tests/Finland/SecondChristmasDayTest.php | 2 +- tests/France/AllSaintsDayTest.php | 2 +- tests/France/AssumptionOfMaryTest.php | 2 +- tests/France/BasRhin/stStephensDayTest.php | 2 +- tests/France/ChristmasDayTest.php | 2 +- tests/France/HautRhin/stStephensDayTest.php | 2 +- tests/France/InternationalWorkersDayTest.php | 2 +- tests/France/Moselle/stStephensDayTest.php | 2 +- tests/France/NewYearsDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 3 +-- tests/Georgia/MtskhetobaDayTest.php | 3 +-- tests/Georgia/NewYearsDayTest.php | 3 +-- tests/Georgia/OrthodoxChristmasDayTest.php | 3 +-- tests/Georgia/OrthodoxEpiphanyDayTest.php | 3 +-- tests/Georgia/SecondNewYearDayTest.php | 3 +-- tests/Georgia/StAndrewsDayTest.php | 3 +-- tests/Georgia/StGeorgesDayTest.php | 3 +-- tests/Georgia/StMarysDayTest.php | 3 +-- tests/Georgia/VictoryDayTest.php | 3 +-- .../Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/EpiphanyTest.php | 2 +- tests/Germany/Brandenburg/ReformationDayTest.php | 2 +- tests/Germany/Bremen/ReformationDayTest.php | 2 +- tests/Germany/ChristmasTest.php | 2 +- tests/Germany/Hamburg/DayOfReformationTest.php | 2 +- tests/Germany/InternationalWorkersDayTest.php | 2 +- tests/Germany/LowerSaxony/ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../RhinelandPalatinate/AllSaintsDayTest.php | 2 +- tests/Germany/Saarland/AllSaintsDayTest.php | 2 +- tests/Germany/Saarland/AssumptionOfMaryTest.php | 2 +- tests/Germany/Saxony/ReformationDayTest.php | 2 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 2 +- tests/Germany/SaxonyAnhalt/ReformationDayTest.php | 2 +- .../SchleswigHolstein/ReformationDayTest.php | 2 +- tests/Germany/SecondChristmasDayTest.php | 2 +- tests/Germany/Thuringia/ReformationDayTest.php | 2 +- tests/Germany/Thuringia/WorldChildrensDayTest.php | 2 +- tests/Greece/AnnunciationTest.php | 2 +- tests/Greece/AssumptionOfMaryTest.php | 2 +- tests/Greece/ChristmasDayTest.php | 2 +- tests/Greece/EpiphanyTest.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/InternationalWorkersDayTest.php | 2 +- tests/Hungary/NewYearsDayTest.php | 2 +- tests/Hungary/SecondChristmasDayTest.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/NewYearsDayTest.php | 2 +- tests/Italy/stStephensDayTest.php | 2 +- tests/Latvia/ChristmasDayTest.php | 3 +-- tests/Latvia/ChristmasEveDayTest.php | 3 +-- tests/Latvia/InternationalWorkersDayTest.php | 3 +-- tests/Latvia/MidsummerEveDayTest.php | 3 +-- tests/Latvia/NewYearsDayTest.php | 3 +-- tests/Latvia/NewYearsEveDayTest.php | 3 +-- tests/Latvia/SecondChristmasDayTest.php | 3 +-- tests/Latvia/StJohnsDayTest.php | 3 +-- tests/Lithuania/AllSaintsDayTest.php | 3 +-- tests/Lithuania/AssumptionOfMaryDayTest.php | 3 +-- tests/Lithuania/ChristmasDayTest.php | 3 +-- tests/Lithuania/ChristmasEveDayTest.php | 3 +-- tests/Lithuania/InternationalWorkersDayTest.php | 3 +-- tests/Lithuania/NewYearsDayTest.php | 3 +-- tests/Lithuania/SecondChristmasDayTest.php | 3 +-- tests/Lithuania/StJohnsDayTest.php | 3 +-- tests/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Norway/ChristmasDayTest.php | 2 +- tests/Norway/InternationalWorkersDayTest.php | 2 +- tests/Norway/NewYearsDayTest.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/SecondChristmasDayTest.php | 2 +- tests/Portugal/AssumptionOfMaryTest.php | 2 +- tests/Portugal/ChristmasTest.php | 2 +- tests/Portugal/ImmaculateConceptionTest.php | 2 +- tests/Portugal/InternationalWorkersDayTest.php | 2 +- tests/Portugal/NewYearsDayTest.php | 2 +- tests/Romania/ChristmasDayTest.php | 2 +- tests/Romania/DayAfterNewYearsDayTest.php | 2 +- tests/Romania/InternationalWorkersDayTest.php | 2 +- tests/Romania/NewYearsDayTest.php | 2 +- tests/Romania/SecondChristmasDayTest.php | 2 +- tests/Russia/InternationalWomensDayTest.php | 3 +-- tests/Russia/NewYearHolidaysDay2Test.php | 3 +-- tests/Russia/NewYearHolidaysDay3Test.php | 3 +-- tests/Russia/NewYearHolidaysDay4Test.php | 3 +-- tests/Russia/NewYearHolidaysDay5Test.php | 3 +-- tests/Russia/NewYearHolidaysDay6Test.php | 3 +-- tests/Russia/NewYearHolidaysDay8Test.php | 3 +-- tests/Russia/NewYearsDayTest.php | 3 +-- tests/Russia/OrthodoxChristmasDayTest.php | 3 +-- tests/Russia/SpringAndLabourDayTest.php | 3 +-- tests/Russia/VictoryDayTest.php | 3 +-- 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 +- .../StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/Slovakia/VictoryInEuropeDayTest.php | 2 +- tests/Spain/AllSaintsDayTest.php | 2 +- tests/Spain/AssumptionOfMaryTest.php | 2 +- tests/Spain/Catalonia/stJohnsDayTest.php | 2 +- tests/Spain/ChristmasTest.php | 2 +- tests/Spain/EpiphanyTest.php | 2 +- tests/Spain/ImmaculateConceptionTest.php | 2 +- tests/Spain/InternationalWorkersDayTest.php | 2 +- tests/Spain/NewYearsDayTest.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/WalpurgisEveTest.php | 2 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 2 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhoden/StStephensDayTest.php | 2 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- .../ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../AppenzellInnerrhoden/StStephensDayTest.php | 2 +- .../BaselLandschaft/ChristmasDayTest.php | 2 +- .../BaselLandschaft/NewYearsDayTest.php | 2 +- .../BaselLandschaft/StStephensDayTest.php | 2 +- tests/Switzerland/BaselStadt/ChristmasDayTest.php | 2 +- tests/Switzerland/BaselStadt/NewYearsDayTest.php | 2 +- tests/Switzerland/BaselStadt/StStephensDayTest.php | 2 +- tests/Switzerland/Bern/ChristmasDayTest.php | 2 +- tests/Switzerland/Bern/NewYearsDayTest.php | 2 +- tests/Switzerland/Bern/StStephensDayTest.php | 2 +- tests/Switzerland/Fribourg/AllSaintsDayTest.php | 2 +- .../Switzerland/Fribourg/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- .../Fribourg/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Fribourg/NewYearsDayTest.php | 2 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 2 +- tests/Switzerland/Geneva/NewYearsDayTest.php | 2 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 2 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 2 +- tests/Switzerland/Glarus/NewYearsDayTest.php | 2 +- tests/Switzerland/Glarus/StStephensDayTest.php | 2 +- tests/Switzerland/Grisons/ChristmasDayTest.php | 2 +- tests/Switzerland/Grisons/NewYearsDayTest.php | 2 +- tests/Switzerland/Grisons/StStephensDayTest.php | 2 +- tests/Switzerland/Jura/AllSaintsDayTest.php | 2 +- tests/Switzerland/Jura/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/NewYearsDayTest.php | 2 +- tests/Switzerland/Lucerne/AllSaintsDayTest.php | 2 +- tests/Switzerland/Lucerne/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Lucerne/ChristmasDayTest.php | 2 +- .../Lucerne/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 2 +- tests/Switzerland/Lucerne/StStephensDayTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/NewYearsDayTest.php | 2 +- tests/Switzerland/Nidwalden/AllSaintsDayTest.php | 2 +- .../Switzerland/Nidwalden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Nidwalden/ChristmasDayTest.php | 2 +- .../Nidwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Nidwalden/NewYearsDayTest.php | 2 +- tests/Switzerland/Nidwalden/StJosephDayTest.php | 2 +- tests/Switzerland/Nidwalden/StStephensDayTest.php | 2 +- tests/Switzerland/Obwalden/AllSaintsDayTest.php | 2 +- .../Switzerland/Obwalden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Obwalden/ChristmasDayTest.php | 2 +- .../Obwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Obwalden/NewYearsDayTest.php | 2 +- tests/Switzerland/Obwalden/StStephensDayTest.php | 2 +- .../Switzerland/Schaffhausen/ChristmasDayTest.php | 2 +- tests/Switzerland/Schaffhausen/NewYearsDayTest.php | 2 +- .../Switzerland/Schaffhausen/StStephensDayTest.php | 2 +- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 2 +- tests/Switzerland/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/StJosephDayTest.php | 2 +- tests/Switzerland/Schwyz/StStephensDayTest.php | 2 +- tests/Switzerland/Solothurn/ChristmasDayTest.php | 2 +- tests/Switzerland/Solothurn/NewYearsDayTest.php | 2 +- tests/Switzerland/StGallen/AllSaintsDayTest.php | 2 +- tests/Switzerland/StGallen/ChristmasDayTest.php | 2 +- tests/Switzerland/StGallen/NewYearsDayTest.php | 2 +- tests/Switzerland/StGallen/StStephensDayTest.php | 2 +- tests/Switzerland/Thurgau/ChristmasDayTest.php | 2 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 2 +- tests/Switzerland/Thurgau/StStephensDayTest.php | 2 +- tests/Switzerland/Ticino/AllSaintsDayTest.php | 2 +- tests/Switzerland/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 +- tests/Switzerland/Ticino/StStephensDayTest.php | 2 +- tests/Switzerland/Uri/AllSaintsDayTest.php | 2 +- tests/Switzerland/Uri/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Uri/ChristmasDayTest.php | 2 +- tests/Switzerland/Uri/EpiphanyTest.php | 2 +- tests/Switzerland/Uri/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Uri/NewYearsDayTest.php | 2 +- tests/Switzerland/Uri/StJosephDayTest.php | 2 +- tests/Switzerland/Uri/StStephensDayTest.php | 2 +- tests/Switzerland/Valais/AllSaintsDayTest.php | 2 +- tests/Switzerland/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/Vaud/ChristmasDayTest.php | 2 +- tests/Switzerland/Vaud/NewYearsDayTest.php | 2 +- tests/Switzerland/Zug/AllSaintsDayTest.php | 2 +- tests/Switzerland/Zug/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Zug/ChristmasDayTest.php | 2 +- tests/Switzerland/Zug/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Zug/NewYearsDayTest.php | 2 +- tests/Switzerland/Zug/StStephensDayTest.php | 2 +- tests/Switzerland/Zurich/ChristmasDayTest.php | 2 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 2 +- tests/Switzerland/Zurich/StStephensDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Ukraine/CatholicChristmasDayTest.php | 2 +- tests/Ukraine/ChristmasDayTest.php | 2 +- tests/Ukraine/InternationalWomensDayTest.php | 3 +-- tests/Ukraine/InternationalWorkersDayTest.php | 2 +- tests/Ukraine/NewYearsDayTest.php | 2 +- .../Ukraine/SecondInternationalWorkersDayTest.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 14 +++++++------- tests/Ukraine/VictoryDayTest.php | 3 +-- tests/YasumiBase.php | 8 ++++---- 345 files changed, 354 insertions(+), 400 deletions(-) diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 16bbbf238..e07497ee0 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -38,7 +38,7 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday($this->region, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 3a21f53e1..959a41a60 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 79b48b6a6..f74fcdd31 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index 1600e642e..1f311c859 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -37,7 +37,7 @@ class stMartinsDayTest extends BurgenlandBaseTestCase implements HolidayTestCase * @param int $year the year for which Saint Martins Day needs to be tested * @param DateTime $expected the expected date */ - public function teststMartinsDay(int $year, DateTime $expected): void + public function teststMartinsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 7fcf95fcd..0ac7d171e 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -43,7 +43,7 @@ class PlebisciteDayTest extends CarinthiaBaseTestCase implements HolidayTestCase * @param int $year the year for which Plebiscite Day needs to be tested * @param DateTime $expected the expected date */ - public function testPlebisciteDay(int $year, DateTime $expected): void + public function testPlebisciteDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index be01f9ff7..10ccad1d6 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -37,7 +37,7 @@ class StJosephsDayTest extends CarinthiaBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date */ - public function testStJosephsDay(int $year, DateTime $expected): void + public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 4373654bf..6a5922f59 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends AustriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 1373e4d8c..1b63331d2 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends AustriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index 0499dd59a..d298ab70e 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index 652f25fdf..5770f53f3 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index d14f2ba22..ab2b194c6 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -43,7 +43,7 @@ class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements HolidayTestC * @param int $year the year for which Saint Leopold's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStLeopoldsDay(int $year, DateTime $expected): void + public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 73d5588a0..5f913882a 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends AustriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index 880385ea2..c199bee71 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -37,7 +37,7 @@ class StRupertsDayTest extends SalzburgBaseTestCase implements HolidayTestCase * @param int $year the year for which Saint Rupert's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStRupertsDay(int $year, DateTime $expected): void + public function testStRupertsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index 4d0a82886..bb5376350 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index c3d55e3bd..e298986f1 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -37,7 +37,7 @@ class StJosephsDayTest extends StyriaBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date */ - public function testStJosephsDay(int $year, DateTime $expected): void + public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index 6894d92e5..66fffedc7 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -37,7 +37,7 @@ class StJosephsDayTest extends TyrolBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date */ - public function testStJosephsDay(int $year, DateTime $expected): void + public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index 5bdd1d540..2183a031b 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -37,7 +37,7 @@ class StFloriansDayTest extends UpperAustriaBaseTestCase implements HolidayTestC * @param int $year the year for which Saint Florian's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStFloriansDay(int $year, DateTime $expected): void + public function testStFloriansDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index ca1dbd237..d045331ee 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -43,7 +43,7 @@ class StLeopoldsDayTest extends ViennaBaseTestCase implements HolidayTestCase * @param int $year the year for which Saint Leopold's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStLeopoldsDay(int $year, DateTime $expected): void + public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index 12b6ae4e0..83c7d622a 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -37,7 +37,7 @@ class StJosephsDayTest extends VorarlbergBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested. * @param DateTime $expected the expected date */ - public function testStJosephsDay(int $year, DateTime $expected): void + public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index d45c5292e..84170fec1 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index 0906630fd..7293e01a6 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -37,7 +37,7 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index 4461dfd4b..c76bc9b5c 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 1b0186712..525096eda 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends BelgiumBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index 2fd13c167..da29b5ba5 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index 43e4e2419..5021959b0 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -37,7 +37,7 @@ class NationalDayTest extends BelgiumBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index 6a671f436..926e7b4f2 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index 2216185fa..e3cd0b347 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends BosniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index 8551a4cd7..061987323 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -37,7 +37,7 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index d0867d17c..84a25f8be 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index 8928675cb..5dc429897 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends BosniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index 90e7fdc93..d94e12391 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +41,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 3848a82c8..52bb1968d 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -37,7 +37,7 @@ class SecondLabourDay extends BosniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index f642f0fae..5c5f61e89 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index 384bc7308..c3ffcd3d1 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 759351789..a70edc9f1 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index c3c7f3dff..90db244f4 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends CroatiaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index bacd804c2..565b3ef37 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index fe136f74e..077ab71e2 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index fe27bb07b..93df24861 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends CroatiaBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date */ - public function teststStephensDay(int $year, DateTime $expected): void + public function teststStephensDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index fa1ef6b41..968017c27 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -41,7 +41,7 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements HolidayTestC * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index d3c0096b1..130317e36 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -41,7 +41,7 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements HolidayTestC * @param int $year the year for which Christmas Eve needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 3cdff1952..1e5430395 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -41,7 +41,7 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index baaf565b7..a38e8a6cf 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -37,7 +37,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 */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index 5fe46f617..e6dc56f3f 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -41,7 +41,7 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements H * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index 82958228a..a3c0ede63 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -37,7 +37,7 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 47f9b5529..0b47a9b48 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -41,7 +41,7 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index 4036ffbc0..30bbddfdc 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -40,7 +40,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 */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index 63d3df693..1452b5e51 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -41,7 +41,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 */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 72ba345a8..31af974a9 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -41,7 +41,7 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index ef7a19c45..fa0976c6e 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -37,7 +37,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 */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index 8cb5f7041..6ace79694 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -41,7 +41,7 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 1894672fd..3bc60f908 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 144678d9e..87ada4ad5 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -37,7 +37,7 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index c7cf4f642..217ec8f07 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements Holiday * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index c9ddc59c3..fdb9555f8 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index c281ad1a1..55508ce67 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -37,7 +37,7 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index e7de79ba1..f6e5b4773 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 0f99ddc6a..a55638381 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index c093d8dfb..3b6fd804e 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index 01eb7a3c3..a55bfc4fc 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index e33ef6753..fc8222463 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 4846a9054..46d134394 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index e6cfe998d..f1bd2207d 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 22de63d6f..3deefeaa3 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -39,7 +39,7 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 0c1ef4281..d5142fee6 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends FinlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index 3b00cc05b..ede0e1bc8 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends FinlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 787c37829..eca26f759 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index f39819e55..7d5da8c16 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends FinlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 34e0b5c71..f5910b22d 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index 5ed7e9df7..4801936cb 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends FranceBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index b24757763..64bdcfcb5 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index ea894a4dc..ae97de54a 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -37,7 +37,7 @@ class stStephensDayTest extends BasRhinBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index 073605881..b23b24a16 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends FranceBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index ea428f6f9..523cc1b04 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -37,7 +37,7 @@ class stStephensDayTest extends HautRhinBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index d04950b96..3d8dbb63f 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements HolidayT * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 0ee3ec544..894b40288 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -37,7 +37,7 @@ class stStephensDayTest extends MoselleBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index e4fa8176f..86ebe9251 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends FranceBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index c1a8eca7c..83d9ddf47 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class InternationalWomensDayTest extends GeorgiaBaseTestCase implements HolidayT /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index a1be83ad6..80724e2d5 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class MtskhetobaDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index f76898cec..03de05be4 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class NewYearsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index e6356a5bb..298514f29 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class OrthodoxChristmasDayTest extends GeorgiaBaseTestCase implements HolidayTes /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index aae496458..a16b21afb 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class OrthodoxEpiphanyDayTest extends GeorgiaBaseTestCase implements HolidayTest /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 0c3a34100..778a41967 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class SecondNewYearDayTest extends GeorgiaBaseTestCase implements HolidayTestCas /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index 0e6d3c404..6e4fe4fb8 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class StAndrewsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index be8f8b8ed..5a38a1a6b 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class StGeorgesDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index 78a4b9d40..a8789ef16 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class StMarysDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index 700a8872c..58ace6026 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -30,7 +29,7 @@ class VictoryDayTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index a1d7cf32b..7f5226326 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 9d0e5eaba..f91873b30 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index 7bb9bef2e..9134ce1be 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index 99d5c8a22..bdbecab0a 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends BavariaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index e9f6072a2..e1458c633 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 6ab7107cf..5a3168940 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends BremenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index 157327f86..6ffcb2651 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends GermanyBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 1fc660422..0dc54bd27 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -43,7 +43,7 @@ class DayOfReformationTest extends HamburgBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index 02d2d9453..40523162c 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements Holiday * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 9060aa3c1..9d10fffbc 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index 344af79e2..ba88d480a 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends GermanyBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index 9ece28007..3e49390b3 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -37,7 +37,7 @@ class NewYearsEveTest extends GermanyBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index 1a1b9e504..0e3f54dd1 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Holid * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index 629da43ab..a0ced8577 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index b0eff6eb5..5f2d8af18 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 94ff9966b..572051290 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 34f05982d..c137d5a49 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends SaxonyBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index e6ffc3272..adab06704 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index 0b07bfef7..f06249426 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index b5e2cd06d..16de48d67 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index 4caf6f494..a7cacc5f6 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 5fb7bea47..80e017d60 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -43,7 +43,7 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index 1a835680c..d8b76dee9 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -43,7 +43,7 @@ class WorldChildrensDayTest extends ThuringiaBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 201e53173..cd28e0cb3 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -37,7 +37,7 @@ class AnnunciationTest extends GreeceBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index 1ac912272..e4cf358d7 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 8bb6ddec5..612a2e0cc 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends GreeceBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index 54b27544f..517888148 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends GreeceBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index 5544f9d54..d461dfb65 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index 209b69bb9..bb3a76cce 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends GreeceBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index e119737a8..1174055c1 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -37,7 +37,7 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 7fb1bce58..4093e11c8 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index 0b05b7de6..8e399c930 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends HungaryBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index dd168dff3..436868a31 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 4e569703c..055a14d47 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends HungaryBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index ac2c11c22..ac0cd37ca 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 4442a07e2..73ae8a0c7 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index e2143675d..a8c0fd748 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 3c52d4f41..343c4de23 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends ItalyBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 1810d0382..a11c21734 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends ItalyBaseTestCase implements HolidayTestCase * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date */ - public function testEpiphany(int $year, DateTime $expected): void + public function testEpiphany(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index 8f6a68e51..cc3507025 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements HolidayTestC * @param int $year the year for which the day of Immaculate Conception needs to be tested * @param DateTime $expected the expected date */ - public function testImmaculateConception(int $year, DateTime $expected): void + public function testImmaculateConception(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 87ccf3a45..55fbe57f0 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements HolidayTe * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index 19d15c69e..e8e3d2bf5 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends ItalyBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 8e5e62a23..217782c29 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -37,7 +37,7 @@ class stStephensDayTest extends ItalyBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date */ - public function teststStephensDay(int $year, DateTime $expected): void + public function teststStephensDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index b62ca87a3..3aa83584e 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index 2c68a36e8..68778223c 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index fe3d76a44..86841f009 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 8c626949d..127fac9f2 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index 9459b8ddf..a035e2d8c 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index eb9aa2155..855de4afd 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index faab1bc69..cffb75249 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index ff3772828..367145fa4 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index bcb82da10..116f72c3f 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index f86e221d2..e97513224 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 0fac9cb87..d2d5cee36 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 9609ef309..48f88b828 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index c4886a033..6ce049ce7 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index d845ce473..e3163cffa 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 74594d52c..6973f03de 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index 36dfa04df..898d65379 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index efa0f17fd..2183d6c44 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index a24070707..03498d83e 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index 7eed1a545..2c186e27c 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index cb3cf6b6d..aafa0bcc5 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements Holi * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index 811514fe4..8c0261140 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -37,7 +37,7 @@ class NationalDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index 0243ce68a..1e9f2a3ac 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index 0584b7586..a64dfb3f8 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 0abbdfe3e..a9d7daf00 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 9e00706b1..b79334b04 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements HolidayT * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index 6cefaa2c0..451096fd2 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends NorwayBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index 64689767a..d068e09b6 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index 31e1996fe..a04330ad6 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends PolandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 2802444c1..0f42bb4c0 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index f0b72abf1..90945d0d7 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends PolandBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index 9c8ed6cc5..abc4c72c1 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends PolandBaseTestCase implements HolidayTestCase * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date */ - public function testEpiphany(int $year, DateTime $expected): void + public function testEpiphany(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index b0574a4a9..ba0c0c14e 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements HolidayT * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index 1062802ef..d0b28620a 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends PolandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index 2b5d9f935..83dfcf003 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index 667aadd4d..f51f2fe57 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index 8545ea1c8..f6a837e51 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends PortugalBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index dff7a043f..a169721de 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 34ce61ac8..3a2c4fd75 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Holida * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index 83219907f..9c64ede83 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends PortugalBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 884446359..ca6dea968 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index d4137c9fa..85e4c14e4 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -37,7 +37,7 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 5f9e5f672..6db5dc108 100644 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements Holiday * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 0057acbc7..7d7723dd7 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index f7f8229fa..7f89cc0ef 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index 90e9554b7..6450afd76 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index 09e4de01b..94b2a94b0 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index cc43b19dd..40e414232 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index a8b8f3fc6..d8ed91802 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index d58e6494a..331b28071 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 064b3fe0f..4eab9c016 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index 4d16962af..d5073cbbb 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +43,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 2d987158b..d69155c9a 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index a6d71f1ca..81d1a5d8e 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 3801c7393..99f330001 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index db7980ac9..4dea7d929 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +44,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index 1183fa017..26a546d3c 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -40,7 +40,7 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index a36d375e5..a7a04a7f8 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -40,7 +40,7 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index 94a6b9945..9ef38715f 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -40,7 +40,7 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasEve(int $year, DateTime $expected): void + public function testChristmasEve(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index 385a52674..c615c18e0 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -41,7 +41,7 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 438759f41..024857486 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -40,7 +40,7 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 3bf9ce0f2..19b22433c 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -41,7 +41,7 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index a82d1dfa6..1bdf0c46f 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -40,7 +40,7 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Holida * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index be773eec0..fe1ad0554 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -40,7 +40,7 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTes * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index fc88c8d4e..d5fd7b164 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -40,7 +40,7 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Hol * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index 1abc8bce3..f758ad64c 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -40,7 +40,7 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTest * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 08bc7c15c..b991ef989 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -40,7 +40,7 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index a81ba13ec..6a91fbddd 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -41,7 +41,7 @@ class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index 2cef159b6..dc9e872b7 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -40,7 +40,7 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Holi * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 162ac5a68..f264fa3d9 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -40,7 +40,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 */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index f8947bb31..8c84b564a 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -40,7 +40,7 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements HolidayTest * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 1987ae311..7751c91f5 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index 7aca19680..cd67bf140 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 2a37fc6b5..26109d08d 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -37,7 +37,7 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 66a835b97..49f0bd685 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -37,7 +37,7 @@ class ChristmasTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index 35daabb4e..6598de1fb 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 566157422..5c0d81a12 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 579992e57..4c7085a18 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index e56b2c2a0..8cd03eca2 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 1ad39240f..4f70db12d 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -37,7 +37,7 @@ class ValentinesDayTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index de1c563df..dba1418ac 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -43,7 +43,7 @@ class stJosephsDayTest extends SpainBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 29dd0866e..6ade5fa87 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -39,7 +39,7 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index a78d0ab93..706451d14 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -39,7 +39,7 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 26ba55640..6e809a349 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index 45574c0df..bda99a473 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -37,7 +37,7 @@ class ChristmasEveTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index 8d2ecb0b9..b5b10fdd6 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -37,7 +37,7 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index 6084bf01d..4432af1ad 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 0aa5eab57..f890e6e20 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements HolidayT * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index bb291757d..adec93cfa 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index 8e12c7b07..aad3ab15d 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -37,7 +37,7 @@ class NewYearsEveTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index e66f9a523..18560239c 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -37,7 +37,7 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index 542cab9f0..b29b4ec80 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -37,7 +37,7 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 1536b1889..b985c8642 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends AargauBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index 6594e5a8f..3cb73a780 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends AargauBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index 333ec69dd..d9eae80a0 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Holi * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index a00afc38f..0b522d6f0 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Holid * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index 58ea4a56d..2e71b6fc9 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Hol * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index 6eb3c8e56..e32fa7979 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index a2a954a58..681b213da 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements H * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index b41d31d81..913bed476 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index 07f83542a..44e9d09f7 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -37,7 +37,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 */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index 32f9ad85a..41de674bc 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holida * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 3a804ec7d..1607571e1 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Holi * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index d12d55c88..786a92ec1 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements HolidayTes * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index e8654a7a8..65f689433 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements HolidayTest * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index b8c101bee..945fc24e7 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index d85d0b6c0..f455d94f5 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index d0c0b84a2..a658b1fdc 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 535038947..8ea498c17 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index 2e35a2770..ba5d92019 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends BernBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 002a0222d..59afad745 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends BernBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index 2df96af62..f6260d5e8 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends BernBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index f5e419d4c..9afeff288 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends FribourgBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 53b2e23f0..315c6c5dd 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends FribourgBaseTestCase implements HolidayTestCa * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 74204244d..691634ffd 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends FribourgBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index 912fcd005..174ef6b9c 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends FribourgBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index 22689c564..1c6bf751e 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends FribourgBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 07196b248..6e077687f 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends GenevaBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 3dbca00d9..e484d6dc9 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends GenevaBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 44366b1f0..6055f2dca 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index 5a50ca300..a44c1c8bd 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends GlarusBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index de3a2bcae..6de323d91 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends GlarusBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 4a3d77caa..413349877 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends GlarusBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index a929b45b2..2f03b5894 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index 3019b3eca..eecb9310b 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index d9fde825f..e2dddfaf8 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends GrisonsBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index 68a19acae..8c678ff60 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends JuraBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index f5edcb659..efe5931e2 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index 4e98c93f9..f81de2386 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends JuraBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 3f55f1f12..3d22a0acb 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends JuraBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index f01b394c1..d3f23ade5 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index 8aca43508..b94a4ed2f 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements HolidayTestCas * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index df4857e02..8bef33955 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends LucerneBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index f8cde7ea2..6f17a77e8 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index be40eac19..55e8fd612 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends LucerneBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index 25dc1a879..a331953a0 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends LucerneBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 758fe9a3e..8af9393d3 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index c67696996..c68dc509d 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index cee7976bc..edc49a934 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index dc3994b96..ec3950fb7 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements HolidayTestC * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 22a844dfd..af9b9cca8 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index 330107f09..7fe1ca63c 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 36ac14093..4eab06436 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 369b1d107..5eebb4a9f 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -40,7 +40,7 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStJosephDay(int $year, DateTime $expected): void + public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index baba85bd9..1aef71904 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index e18040ef1..63cb9a530 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index 960714b49..149a8e4f2 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements HolidayTestCa * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 9099e56a9..55dacca6d 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 5873e0341..64e551ada 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index 8fa8b48d5..940d834db 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 8b84213aa..3f8259ed2 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index a91ffb037..39e6cb156 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements HolidayTestCa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index ac2828ae5..a252328ce 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements HolidayTestCas * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 85564d411..bc6130368 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index b2fb1177d..a6b4225f4 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index 1d232dfd5..9e54a3d39 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index 340e73c47..fd3e33d95 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 811415bd0..c47c66b30 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index 2f273071d..9c040d94b 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index dbd6b5495..471689821 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index 785686258..81227c2fa 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -40,7 +40,7 @@ class StJosephDayTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStJosephDay(int $year, DateTime $expected): void + public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 8408f56a1..a84c13c76 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends SchwyzBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index b0b2b00da..4918274fe 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 35541d83f..3989e7799 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index 60989720d..2c6f3a22b 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 3bd4e13ef..30f10cdb9 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends StGallenBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index bae4e38f5..4f204d789 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends StGallenBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 89c3cced1..e8486d5aa 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends StGallenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index e30bb9d22..b8cab2e5a 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index 7aaf432ed..bf9879738 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index 8b8a72fc9..287baed36 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends ThurgauBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 91a7196c1..87977ce56 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index eedf1144c..81dacfa4e 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index 2e7fb5ed2..ef945d09f 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 9b5e69922..3dcd58409 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index d707c44cb..ad2cf3483 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index 345238ce4..427b76e03 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 0ec537701..437637c4f 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -40,7 +40,7 @@ class StJosephDayTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStJosephDay(int $year, DateTime $expected): void + public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index df595e7b1..3bbf91e79 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -37,7 +37,7 @@ class StPeterPaulTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which Feast of Saints Peter and Paul needs to be tested * @param DateTime $expected the expected date */ - public function testStPeterPaul(int $year, DateTime $expected): void + public function testStPeterPaul(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index 532286355..cf0a1208e 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index a8372cad6..d16b2f67a 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 9db214b1b..48c6c6d1d 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index c90737c2a..8620d24c6 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 88e3d3d24..281897933 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -37,7 +37,7 @@ class EpiphanyTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 1a1ce7351..8f4a6997a 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 1d241eeee..c4025783a 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index ef1247487..9709013ee 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -40,7 +40,7 @@ class StJosephDayTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStJosephDay(int $year, DateTime $expected): void + public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 4e52a9858..5383310c3 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends UriBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 8e65a2e6a..ff38ba76c 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 80331eac5..b576c673d 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index 42683bc37..7311165e0 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends ValaisBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index 2e6167448..e89881d83 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 2209567b2..4f79ba136 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends ValaisBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index c385e900a..e995d181e 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -40,7 +40,7 @@ class StJosephDayTest extends ValaisBaseTestCase implements HolidayTestCase * @param int $year the year for which St. Joseph's Day needs to be tested * @param DateTime $expected the expected date */ - public function testStJosephDay(int $year, DateTime $expected): void + public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index b4cbad386..60ab6252e 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends VaudBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 36f21f89c..36bed24a8 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends VaudBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 08de7d99d..aa45782a0 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -37,7 +37,7 @@ class AllSaintsDayTest extends ZugBaseTestCase implements HolidayTestCase * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date */ - public function testAllSaintsDay(int $year, DateTime $expected): void + public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 5c44ef067..43607bdab 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -37,7 +37,7 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements HolidayTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date */ - public function testAssumptionOfMary(int $year, DateTime $expected): void + public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index a4db02be6..cea2de8e5 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends ZugBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 0247e06ca..2002c2ce4 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -37,7 +37,7 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index 0b254e59b..93d535b59 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends ZugBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 6f7bbbe3a..6764c861d 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends ZugBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 9866f263a..32959b252 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends ZurichBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index d3603237c..326b88c49 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends ZurichBaseTestCase implements HolidayTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date */ - public function testNewYearsDay(int $year, DateTime $expected): void + public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index 23748f3a6..f4182f665 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -37,7 +37,7 @@ class StStephensDayTest extends ZurichBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php index af84b7786..10ec0fe34 100644 --- a/tests/Turkey/LabourDayTest.php +++ b/tests/Turkey/LabourDayTest.php @@ -29,7 +29,7 @@ class LabourDayTest extends TurkeyBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php index 0d3c3da0e..48424d29b 100644 --- a/tests/Turkey/NewYearsDayTest.php +++ b/tests/Turkey/NewYearsDayTest.php @@ -29,7 +29,7 @@ class NewYearsDayTest extends TurkeyBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 6118e7b57..b507a7b6f 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -39,7 +39,7 @@ class CatholicChristmasDayTest extends UkraineBaseTestCase implements HolidayTes * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testCatholicChristmasDay(int $year, DateTime $expected): void + public function testCatholicChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 0eddc717a..6dcc53276 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends UkraineBaseTestCase implements HolidayTestCase * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date */ - public function testChristmasDay(int $year, DateTime $expected): void + public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index 09e4aaf0b..fbca0d04d 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,7 +31,7 @@ class InternationalWomensDayTest extends UkraineBaseTestCase implements HolidayT /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 231a36c1a..4ba8bfe19 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -37,7 +37,7 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements Holiday * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testInternationalWorkersDay(int $year, DateTime $expected): void + public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 017418786..20fb1b25c 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends UkraineBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 63b01456e..1cc683821 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements H * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date */ - public function testSecondInternationalWorkersDay(int $year, DateTime $expected): void + public function testSecondInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index a409f6104..eb2ae3c57 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -55,18 +55,18 @@ public function testSaturdaySubstitution(): void /** * 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 $key string the key of the holiday to be checked against - * @param int $year holiday calendar year - * @param DateTime $expectedOfficial the official date to be checked against - * @param DateTime|null $expectedSubstitution the substituted 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 $key string the key of the holiday to be checked against + * @param int $year holiday calendar year + * @param \DateTimeInterface $expectedOfficial the official date to be checked against + * @param \DateTimeImmutable $expectedSubstitution the substituted date to be checked against */ public function assertHolidayWithSubstitution( string $provider, string $key, int $year, - DateTime $expectedOfficial, - DateTime $expectedSubstitution = null + \DateTimeInterface $expectedOfficial, + \DateTimeInterface $expectedSubstitution = null ): void { $holidays = Yasumi::create($provider, $year); diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index 4d686b93b..942530533 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -32,7 +31,7 @@ class VictoryDayTest extends UkraineBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider */ - public function testHoliday(int $year, DateTime $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index b391c7cda..70fd925c0 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -106,7 +106,7 @@ public function assertHoliday( string $provider, string $key, int $year, - DateTime $expected + DateTimeInterface $expected ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); @@ -134,7 +134,7 @@ public function assertSubstituteHoliday( string $provider, string $key, int $year, - DateTime $expected + DateTimeInterface $expected ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday('substituteHoliday:'.$key); @@ -596,7 +596,7 @@ public static function numberBetween(int $int1 = 0, int $int2 = 2147483647): int * * @example DateTime('1999-02-02 11:42:52') */ - public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTime + public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTimeInterface { $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); @@ -722,7 +722,7 @@ protected static function getMaxTimestamp($max = 'now') /** * Internal method to set the time zone on a DateTime. */ - private static function setTimezone(DateTime $dt, ?string $timezone): DateTime + private static function setTimezone(DateTimeInterface $dt, ?string $timezone): DateTimeInterface { return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); } From 19ca165a6eedfa70f9b9d328ec2f25bfb30e05ed Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Aug 2022 20:14:10 +0900 Subject: [PATCH 364/687] Included unit tests to be checked by rector. Signed-off-by: Sacha Telgenhof --- rector.php | 1 + 1 file changed, 1 insertion(+) diff --git a/rector.php b/rector.php index d9bd2f07f..b445a189c 100644 --- a/rector.php +++ b/rector.php @@ -9,6 +9,7 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ __DIR__.'/src', + __DIR__.'/tests', ]); // single rules From 97eecb85a6c32cb2444523284da116ce6e3cc1e4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Aug 2022 20:32:43 +0900 Subject: [PATCH 365/687] Removed unused import statements. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 1 - src/Yasumi/Filters/OnFilter.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 5f3096811..b3fcd122c 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -16,7 +16,6 @@ namespace Yasumi\Filters; use Iterator; -use Yasumi\Provider\AbstractProvider; use Yasumi\ProviderInterface; /** diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index ccf4f8565..22431c644 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -16,7 +16,6 @@ namespace Yasumi\Filters; use Iterator; -use Yasumi\Provider\AbstractProvider; use Yasumi\ProviderInterface; /** From a49cd0ec5fe11b72c2aaa3105fb24764ed22b184 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 30 Aug 2022 22:22:37 +0900 Subject: [PATCH 366/687] Use return type with closures. Signed-off-by: Sacha Telgenhof --- tests/YasumiBase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 70fd925c0..7c0c1c3ec 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -387,7 +387,7 @@ public function generateRandomEasterMondayDates( ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { + return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { $date->add(new DateInterval('P1D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -442,7 +442,7 @@ public function generateRandomGoodFridayDates( ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { + return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { $date->sub(new DateInterval('P2D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -465,7 +465,7 @@ public function generateRandomPentecostDates( ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { + return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { $date->add(new DateInterval('P49D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -491,7 +491,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( int $iterations = null, int $range = null ): array { - return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date) { + return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date): void { if ($this->isWeekend($date)) { $date->modify('next monday'); } From 288ea2f71a39f6802739a8ead37813e663a69e93 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 30 Aug 2022 23:44:23 +0900 Subject: [PATCH 367/687] Bumped levels as no other statistic analysis errors have been discovered. Signed-off-by: Sacha Telgenhof --- phpstan.neon.dist | 2 +- psalm.xml.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2faf82185..3973e7452 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,5 @@ parameters: - level: 6 + level: 7 paths: - src ignoreErrors: diff --git a/psalm.xml.dist b/psalm.xml.dist index afd0d2d07..856ff93dc 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -11,7 +11,7 @@ --> Date: Tue, 30 Aug 2022 23:46:43 +0900 Subject: [PATCH 368/687] Made calculation for summer/winter time a bit more defensive by adding a check the timestamps are created successfully. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/CommonHolidays.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 23eb17759..5f2648fe3 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -510,7 +510,17 @@ private function calculateSummerWinterTime( ): ?\DateTimeImmutable { $zone = DateTimeZoneFactory::getDateTimeZone($timezone); - $transitions = $zone->getTransitions(mktime(0, 0, 0, 1, 1, $year), mktime(23, 59, 59, 12, 31, $year)); + $tsBegin = mktime(0, 0, 0, 1, 1, $year); + if (!$tsBegin) { + throw new \RuntimeException('unable to create a beginning timestamp'); + } + + $tsEnd = mktime(23, 59, 59, 12, 31, $year); + if (!$tsEnd) { + throw new \RuntimeException('unable to create an ending timestamp'); + } + + $transitions = $zone->getTransitions($tsBegin, $tsEnd); $transition = array_shift($transitions); $dst = $transition['isdst']; From cbf72461e0473089e52a95db2fa817bfc20088f5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 09:39:15 +0900 Subject: [PATCH 369/687] Reordered entries. Signed-off-by: Sacha Telgenhof --- .gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b71a1e059..00cc7cd98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ .DS_Store .idea/ -vendor -composer.lock .php-cs-fixer.cache .php_cs.cache -bin/_* .phpunit.result.cache +bin/_* +composer.lock var +vendor From c96180e0c2fa921e580458823eb1d8363181f5ab Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 09:39:47 +0900 Subject: [PATCH 370/687] Upgraded PHP CS Fixer. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 718d7f715..21b99f450 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v2.19 | v3.8", + "friendsofphp/php-cs-fixer": "v2.19 | v3.11", "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", From 3a2158e54998646021cccf682dee00f4ce48bbfa Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 09:41:34 +0900 Subject: [PATCH 371/687] Code style formatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Argentina.php | 172 +++++++++--------- src/Yasumi/Provider/Georgia.php | 4 +- src/Yasumi/Provider/Greece.php | 4 +- src/Yasumi/Provider/Romania.php | 4 +- src/Yasumi/Provider/Ukraine.php | 4 +- src/Yasumi/Yasumi.php | 8 +- tests/Argentina/FlagDayTest.php | 16 +- .../Argentina/GeneralJoseSanMartinDayTest.php | 20 +- .../GeneralMartinMigueldeGuemesDayTest.php | 16 +- .../Argentina/ImmaculateConceptionDayTest.php | 16 +- tests/Argentina/IndependenceDayTest.php | 16 +- tests/Argentina/MayRevolutionTest.php | 16 +- .../Argentina/NationalSovereigntyDayTest.php | 16 +- tests/Argentina/RaceDayTest.php | 16 +- tests/Base/YasumiTest.php | 2 +- 15 files changed, 165 insertions(+), 165 deletions(-) diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 42870d937..cf4a0d27c 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -101,14 +101,14 @@ private function addCarnvalHolidays(): void $carnavalMondayDate = $carnavalMonday->sub(new DateInterval('P48D')); if (false !== $carnavalMondayDate) { $this->addHoliday(new Holiday( - 'carnavalMonday', - [ - 'en' => 'Carnival Monday', - 'es' => 'Lunes de Carnaval', - ], - $carnavalMondayDate, - $this->locale, - Holiday::TYPE_OBSERVANCE + 'carnavalMonday', + [ + 'en' => 'Carnival Monday', + 'es' => 'Lunes de Carnaval', + ], + $carnavalMondayDate, + $this->locale, + Holiday::TYPE_OBSERVANCE )); } @@ -116,14 +116,14 @@ private function addCarnvalHolidays(): void $carnavalTuesdayDate = $carnavalTuesday->sub(new DateInterval('P47D')); if (false !== $carnavalTuesdayDate) { $this->addHoliday(new Holiday( - 'carnavalTuesday', - [ - 'en' => 'Carnival Tuesday', - 'es' => 'Martes de Carnaval', - ], - $carnavalTuesdayDate, - $this->locale, - Holiday::TYPE_OBSERVANCE + 'carnavalTuesday', + [ + 'en' => 'Carnival Tuesday', + 'es' => 'Martes de Carnaval', + ], + $carnavalTuesdayDate, + $this->locale, + Holiday::TYPE_OBSERVANCE )); } } @@ -144,13 +144,13 @@ private function addRemembranceDay(): void { if ($this->year >= 2006) { $this->addHoliday(new Holiday( - 'remembranceDay', - [ - 'en' => 'Day of Remembrance for Truth and Justice', - 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', - ], - new DateTime("$this->year-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'remembranceDay', + [ + 'en' => 'Day of Remembrance for Truth and Justice', + 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', + ], + new DateTime("$this->year-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -170,13 +170,13 @@ private function addMalvinasDay(): void { if ($this->year >= 1982) { $this->addHoliday(new Holiday( - 'malvinasDay', - [ - 'en' => 'Malvinas Day', - 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', - ], - new DateTime("$this->year-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'malvinasDay', + [ + 'en' => 'Malvinas Day', + 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', + ], + new DateTime("$this->year-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -198,13 +198,13 @@ private function addMayRevolution(): void { if ($this->year >= 1810) { $this->addHoliday(new Holiday( - 'mayRevolution', - [ - 'en' => 'May Revolution', - 'es' => 'Día de la Revolución de Mayo', - ], - new DateTime("$this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'mayRevolution', + [ + 'en' => 'May Revolution', + 'es' => 'Día de la Revolución de Mayo', + ], + new DateTime("$this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -219,13 +219,13 @@ private function addGeneralMartinMigueldeGuemesDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( - 'generalMartinMigueldeGuemesDay', - [ - 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', - 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', - ], - new DateTime("$this->year-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'generalMartinMigueldeGuemesDay', + [ + 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', + 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', + ], + new DateTime("$this->year-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -242,13 +242,13 @@ private function addFlagDay(): void { if ($this->year >= 1938) { $this->addHoliday(new Holiday( - 'flagDay', - [ - 'en' => 'General Manuel Belgrano Memorial Day', - 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', - ], - new DateTime("$this->year-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'flagDay', + [ + 'en' => 'General Manuel Belgrano Memorial Day', + 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', + ], + new DateTime("$this->year-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -264,13 +264,13 @@ private function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday( - 'independenceDay', - [ - 'en' => 'Independence Day', - 'es' => 'Día de la Independencia', - ], - new DateTime("$this->year-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'independenceDay', + [ + 'en' => 'Independence Day', + 'es' => 'Día de la Independencia', + ], + new DateTime("$this->year-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -285,13 +285,13 @@ private function addGeneralJoseSanMartinDay(): void { if ($this->year >= 1850) { $this->addHoliday(new Holiday( - 'generalJoseSanMartinDay', - [ - 'en' => 'General José de San Martín Memorial Day', - 'es' => 'Paso a la Inmortalidad del General José de San Martín', - ], - new DateTime("$this->year-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'generalJoseSanMartinDay', + [ + 'en' => 'General José de San Martín Memorial Day', + 'es' => 'Paso a la Inmortalidad del General José de San Martín', + ], + new DateTime("$this->year-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -308,13 +308,13 @@ private function addRaceDay(): void { if ($this->year >= 1492) { $this->addHoliday(new Holiday( - 'raceDay', - [ - 'en' => 'Day of Respect for Cultural Diversity', - 'es' => 'Día del Respeto a la Diversidad Cultural', - ], - new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'raceDay', + [ + 'en' => 'Day of Respect for Cultural Diversity', + 'es' => 'Día del Respeto a la Diversidad Cultural', + ], + new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -331,13 +331,13 @@ private function addNationalSovereigntyDay(): void { if ($this->year >= 2010) { $this->addHoliday(new Holiday( - 'nationalSovereigntyDay', - [ - 'en' => 'National Sovereignty Day', - 'es' => 'Día de la Soberanía Nacional', - ], - new DateTime("$this->year-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'nationalSovereigntyDay', + [ + 'en' => 'National Sovereignty Day', + 'es' => 'Día de la Soberanía Nacional', + ], + new DateTime("$this->year-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } @@ -354,13 +354,13 @@ private function addImmaculateConceptionDay(): void { if ($this->year >= 1900) { $this->addHoliday(new Holiday( - 'immaculateConceptionDay', - [ - 'en' => 'Immaculate Conception Day', - 'es' => 'Día de la Inmaculada Concepción de María', - ], - new DateTime("$this->year-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'immaculateConceptionDay', + [ + 'en' => 'Immaculate Conception Day', + 'es' => 'Día de la Inmaculada Concepción de María', + ], + new DateTime("$this->year-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 8822ee289..ee3ca6eb2 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -73,9 +73,9 @@ public function getSources(): array } /** - * @throws \Exception - * * @return \DateTime|\DateTimeImmutable + * + * @throws \Exception */ protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index f6c0635f3..7cbdfe886 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -129,9 +129,9 @@ private function calculateCleanMonday(): void /** * Orthodox Easter. * - * @throws \Exception - * * @return \DateTime|\DateTimeImmutable + * + * @throws \Exception */ private function calculateEaster(int $year, string $timezone): \DateTimeInterface { diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 13042e1f5..9f4ebb2f4 100644 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -85,9 +85,9 @@ public function getSources(): array } /** - * @throws \Exception - * * @return \DateTime|\DateTimeImmutable + * + * @throws \Exception */ protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 1ab5a440a..039286d3d 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -114,9 +114,9 @@ public function addHoliday(Holiday $holiday, bool $substitutable = true): void } /** - * @throws \Exception - * * @return \DateTime|\DateTimeImmutable + * + * @throws \Exception */ protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index edc389a5b..858038442 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -225,10 +225,10 @@ public static function getProviders(): array foreach ($filesIterator as $file) { if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( - $file->getBasename('.php'), - self::$ignoredProvider, - true - )) { + $file->getBasename('.php'), + self::$ignoredProvider, + true + )) { continue; } diff --git a/tests/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php index fbe826af2..861654587 100644 --- a/tests/Argentina/FlagDayTest.php +++ b/tests/Argentina/FlagDayTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-06-20", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-06-20", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Paso a la Inmortalidad del General Manuel Belgrano'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Paso a la Inmortalidad del General Manuel Belgrano'] ); } diff --git a/tests/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php index 66d4c3fe2..d36dfb288 100644 --- a/tests/Argentina/GeneralJoseSanMartinDayTest.php +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -44,11 +44,11 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-08-17", new DateTimeZone(self::TIMEZONE)) - ); + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-08-17", new DateTimeZone(self::TIMEZONE)) + ); } /** @@ -67,11 +67,11 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Paso a la Inmortalidad del General José de San Martín'] - ); + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Paso a la Inmortalidad del General José de San Martín'] + ); } /** diff --git a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php index 119c45c1c..3202d4e65 100644 --- a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-06-17", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-06-17", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Paso a la Inmortalidad del General Martín Miguel de Güemes'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Paso a la Inmortalidad del General Martín Miguel de Güemes'] ); } diff --git a/tests/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php index 94142b054..b2693e0b3 100644 --- a/tests/Argentina/ImmaculateConceptionDayTest.php +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-12-08", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-12-08", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Día de la Inmaculada Concepción de María'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Inmaculada Concepción de María'] ); } diff --git a/tests/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php index c187f2f61..499f58689 100644 --- a/tests/Argentina/IndependenceDayTest.php +++ b/tests/Argentina/IndependenceDayTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-07-09", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-07-09", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Día de la Independencia'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Independencia'] ); } diff --git a/tests/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php index 95a7a75f9..5e36faad1 100644 --- a/tests/Argentina/MayRevolutionTest.php +++ b/tests/Argentina/MayRevolutionTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-05-25", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-05-25", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Día de la Revolución de Mayo'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Revolución de Mayo'] ); } diff --git a/tests/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php index 7defe3529..f82a04f92 100644 --- a/tests/Argentina/NationalSovereigntyDayTest.php +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-11-20", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-11-20", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Día de la Soberanía Nacional'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Soberanía Nacional'] ); } diff --git a/tests/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php index 46abbe4ed..be28f4d75 100644 --- a/tests/Argentina/RaceDayTest.php +++ b/tests/Argentina/RaceDayTest.php @@ -44,10 +44,10 @@ public function testHoliday(): void { $year = self::ESTABLISHMENT_YEAR; $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) ); } @@ -67,10 +67,10 @@ public function testNotHoliday(): void public function testTranslation(): void { $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Día del Respeto a la Diversidad Cultural'] + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día del Respeto a la Diversidad Cultural'] ); } diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 9e164abc6..5bf8d1cd7 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -155,7 +155,7 @@ public function testPrevious(): void $this->assertHoliday( $country, $name, - (($year > $year_lower_limit) ? $year - 1 : $year_lower_limit), + ($year > $year_lower_limit) ? $year - 1 : $year_lower_limit, $holidays->previous($name) ); } From 08db3fb33bdcd2134ef4ed0cdfbed6d19a46acec Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 11:35:21 +0900 Subject: [PATCH 372/687] Corrected return types. Add check in case strtok function returns false. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Exception/MissingTranslationException.php | 4 ++-- src/Yasumi/Holiday.php | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Exception/MissingTranslationException.php b/src/Yasumi/Exception/MissingTranslationException.php index 7aa69c82c..accfdd16d 100644 --- a/src/Yasumi/Exception/MissingTranslationException.php +++ b/src/Yasumi/Exception/MissingTranslationException.php @@ -24,8 +24,8 @@ class MissingTranslationException extends BaseException implements Exception /** * Initializes the Exception instance. * - * @param string $key The holiday key - * @param array $locales The locales that was searched + * @param string $key The holiday key + * @param array $locales The locales that was searched */ public function __construct(string $key, array $locales) { diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 8b0c52c13..9dc4b5305 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -229,7 +229,7 @@ public function mergeGlobalTranslations(TranslationsInterface $globalTranslation * * @param array|null $locales Array of locales, or null if the display locale should be used * - * @return array an array of locales to check for translations + * @return array an array of locales to check for translations * * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY @@ -247,6 +247,10 @@ protected function getLocales(?array $locales): array // Expand e.g. ['de_DE', 'en_GB'] into ['de_DE', 'de', 'en_GB', 'en']. foreach (array_reverse($locales) as $locale) { $parent = strtok($locale, '_'); + if (!$parent) { + continue; + } + while ($child = strtok('_')) { $expanded[] = $parent; $parent .= '_'.$child; From 04940c56917d3d6a0104ea3eab17b800d3595a53 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 11:50:43 +0900 Subject: [PATCH 373/687] Used literal separator for large numbers. Removed redundant check for empty array. Signed-off-by: Sacha Telgenhof --- tests/YasumiBase.php | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 7c0c1c3ec..f186459b4 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -218,25 +218,23 @@ public function assertTranslatedHolidayName( self::assertInstanceOf(Holiday::class, $holiday); self::assertTrue($holidays->isHoliday($holiday)); - if (!empty($translations)) { - foreach ($translations as $locale => $name) { - $locales = [$locale]; - $parts = explode('_', $locale); - while (array_pop($parts) && $parts) { - $locales[] = implode('_', $parts); - } + foreach ($translations as $locale => $name) { + $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; - } + $translation = null; + foreach ($locales as $l) { + if (isset($holiday->translations[$l])) { + $translation = $holiday->translations[$l]; + break; } - - self::assertTrue(isset($translation)); - self::assertEquals($name, $translation); } + + self::assertTrue(isset($translation)); + self::assertEquals($name, $translation); } } @@ -573,7 +571,7 @@ public function isWeekend( * * @example 79907610 */ - public static function numberBetween(int $int1 = 0, int $int2 = 2147483647): int + public static function numberBetween(int $int1 = 0, int $int2 = 2_147_483_647): int { $min = $int1 < $int2 ? $int1 : $int2; $max = $int1 < $int2 ? $int2 : $int1; From 40cd66ede69d21c2b5b8c964737bf57f3e623b83 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 12:13:23 +0900 Subject: [PATCH 374/687] Reverting phpstan level as some errors require some effort refactoring. Signed-off-by: Sacha Telgenhof --- phpstan.neon.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3973e7452..2faf82185 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,5 @@ parameters: - level: 7 + level: 6 paths: - src ignoreErrors: From acf84578ac13155a3e38f6eb63ced3448ea0d58f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 12:16:28 +0900 Subject: [PATCH 375/687] Use preferred/idiomatic way of getting an immutable date from an mutable one. Added extra checks if modifying date methods are not succesful. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 14 ++++++++++---- tests/Base/YasumiWorkdayTest.php | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 858038442..b876c8855 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -80,13 +80,16 @@ public static function nextWorkingDay( \DateTimeInterface $startDate, int $workingDays = 1 ): \DateTimeInterface { - // Setup start date, if it's an instance of \DateTime, clone to prevent modification to original - $date = $startDate instanceof \DateTime ? clone $startDate : $startDate; + // convert to immutable date to prevent modification of the original + $date = $startDate instanceof \DateTime ? \DateTimeImmutable::createFromMutable($startDate) : $startDate; $provider = null; while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); + if (!$date instanceof \DateTimeInterface) { + throw new \RuntimeException('unable to perform addition'); + } if (!$provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); @@ -270,13 +273,16 @@ public static function prevWorkingDay( \DateTimeInterface $startDate, int $workingDays = 1 ): \DateTimeInterface { - // Setup start date, if it's an instance of \DateTime, clone to prevent modification to original - $date = $startDate instanceof \DateTime ? clone $startDate : $startDate; + // convert to immutable date to prevent modification of the original + $date = $startDate instanceof \DateTime ? \DateTimeImmutable::createFromMutable($startDate) : $startDate; $provider = null; while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); + if (!$date instanceof \DateTimeInterface) { + throw new \RuntimeException('unable to perform subtraction'); + } if (!$provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index 0a794f1b3..c4736e236 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -42,7 +42,7 @@ public function testNextWorkingDay(): void $startDate = new DateTime($date, new DateTimeZone($timezone)); $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTime::class, $nextWorkingDay); + self::assertInstanceOf(DateTimeImmutable::class, $nextWorkingDay); self::assertEquals($expectedDate, $nextWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance @@ -70,7 +70,7 @@ public function testPreviousWorkingDay(): void $startDate = new DateTime($date, new DateTimeZone($timezone)); $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTime::class, $previousWorkingDay); + self::assertInstanceOf(DateTimeImmutable::class, $previousWorkingDay); self::assertEquals($expectedDate, $previousWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance From 8fc03c4599e188ff5897ed18bb10e41b0e1f57f5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 14:09:14 +0900 Subject: [PATCH 376/687] Changed to use the 'strtotime' function as 'mktime' does not generate timestamps before 1970-01-01 (negative values), which is needed to determine winter/summer time before that. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/CommonHolidays.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 5f2648fe3..329c5435b 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -510,14 +510,14 @@ private function calculateSummerWinterTime( ): ?\DateTimeImmutable { $zone = DateTimeZoneFactory::getDateTimeZone($timezone); - $tsBegin = mktime(0, 0, 0, 1, 1, $year); - if (!$tsBegin) { - throw new \RuntimeException('unable to create a beginning timestamp'); + $tsBegin = strtotime(sprintf('%u-01-01 00:00:00', $year)); + if (false === $tsBegin) { + throw new \RuntimeException(sprintf('unable to create a beginning timestamp for the year `%u`', $year)); } - $tsEnd = mktime(23, 59, 59, 12, 31, $year); - if (!$tsEnd) { - throw new \RuntimeException('unable to create an ending timestamp'); + $tsEnd = strtotime(sprintf('%u-12-31 23:59:59', $year)); + if (false === $tsEnd) { + throw new \RuntimeException(sprintf('unable to create an ending timestamp for the year `%u`', $year)); } $transitions = $zone->getTransitions($tsBegin, $tsEnd); From bb9c8d2b865e95a03b1e7afb26225ec390a47bab Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 4 Sep 2022 14:11:54 +0900 Subject: [PATCH 377/687] Included an .editorconfig file to maintain a consistent style. Signed-off-by: Sacha Telgenhof --- .editorconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..d3ff85a66 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.php] +indent_size = 4 + +[*.json] +indent_size = 2 + +[*.{yml,yaml}] +indent_size = 2 + From 5a18b38dafd0a506366a537a2532e68090a63982 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 7 Sep 2022 00:30:00 +0900 Subject: [PATCH 378/687] Added all examples as shown on the documentation website as a convenience for developers who like to have all information in a single place. Signed-off-by: Sacha Telgenhof --- .phan/config.php | 3 ++- examples/basic.php | 47 ++++++++++++++++++++++++++++++++++++ examples/between_filter.php | 27 +++++++++++++++++++++ examples/custom_provider.php | 43 +++++++++++++++++++++++++++++++++ examples/filters.php | 20 +++++++++++++++ phpstan.neon.dist | 1 + 6 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 examples/basic.php create mode 100644 examples/between_filter.php create mode 100644 examples/custom_provider.php create mode 100644 examples/filters.php diff --git a/.phan/config.php b/.phan/config.php index 5ec6e6b5f..dceda84d5 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -349,7 +349,8 @@ // Thus, both first-party and third-party code being used by // your application should be included in this list. 'directory_list' => [ - 'src' + 'src', + 'examples' ], // A list of individual files to include in analysis diff --git a/examples/basic.php b/examples/basic.php new file mode 100644 index 000000000..4407f7351 --- /dev/null +++ b/examples/basic.php @@ -0,0 +1,47 @@ +count().PHP_EOL; +echo PHP_EOL; + +// Display a list all of the holiday names (short names) +echo 'List of all the holiday names: '.PHP_EOL; +foreach ($holidays->getHolidayNames() as $name) { + echo $name.PHP_EOL; +} +echo PHP_EOL; + +// Display a list all of the holiday dates +echo 'List of all the holiday dates:'.PHP_EOL; +foreach ($holidays->getHolidayDates() as $date) { + echo $date.PHP_EOL; +} +echo PHP_EOL; + +// Get a holiday instance for Independence Day +$independenceDay = $holidays->getHoliday('independenceDay'); + +// Show the localized name +echo 'Name of the holiday : '.$independenceDay->getName().PHP_EOL; + +// Show the date +echo 'Date of the holiday : '.$independenceDay.PHP_EOL; + +// Show the type of holiday +echo 'Type of holiday : '.$independenceDay->getType().PHP_EOL; +echo PHP_EOL; + +// Dump the holiday as a JSON object +echo 'Holiday as a JSON object:'.PHP_EOL; +echo json_encode($independenceDay, JSON_PRETTY_PRINT); + +echo PHP_EOL; diff --git a/examples/between_filter.php b/examples/between_filter.php new file mode 100644 index 000000000..4b1358c9a --- /dev/null +++ b/examples/between_filter.php @@ -0,0 +1,27 @@ +between( + new DateTime('12/01/'.$year), + new DateTime('12/31/'.$year) +); + +// Show all holidays in Italy for December +echo 'List of all the holidays in December: '.PHP_EOL; +foreach ($holidaysInDecember as $holiday) { + echo $holiday.' - '.$holiday->getName().PHP_EOL; +} +echo PHP_EOL; + +// Show the number of filtered holidays +echo 'Number of filtered holidays: '.$holidaysInDecember->count().PHP_EOL; diff --git a/examples/custom_provider.php b/examples/custom_provider.php new file mode 100644 index 000000000..1f893f474 --- /dev/null +++ b/examples/custom_provider.php @@ -0,0 +1,43 @@ +addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); + + // Remove Columbus Day and Veterans Day + $this->removeHoliday('columbusDay'); + $this->removeHoliday('veteransDay'); + } +} + +// Use the factory method to create a new holiday provider instance +$NYSEHolidays = Yasumi\Yasumi::create(NYSE::class, (int) date('Y')); + +// We then can retrieve the NYSE observed holidays in 2022 in the usual manner: +echo 'List of all the holiday names: '.PHP_EOL; +foreach ($NYSEHolidays->getHolidayNames() as $day) { + echo $day.PHP_EOL; +} +echo PHP_EOL; + +// Use the count() method to show how many holidays are returned +echo 'Number of defined holidays: '.$NYSEHolidays->count().PHP_EOL; diff --git a/examples/filters.php b/examples/filters.php new file mode 100644 index 000000000..3a82af460 --- /dev/null +++ b/examples/filters.php @@ -0,0 +1,20 @@ +getIterator()); + +echo 'List of all official holidays: '.PHP_EOL; +foreach ($official as $day) { + echo $day->getName().PHP_EOL; +} diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2faf82185..fad49a494 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,6 +2,7 @@ parameters: level: 6 paths: - src + - examples ignoreErrors: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' From 8e5666354982dcb564c0992f6ada2834eb5d06c3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 7 Sep 2022 08:31:12 +0900 Subject: [PATCH 379/687] Updated changelog noting the added examples. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 695f3ed1f..f3913001d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ to [Semantic Versioning](https://semver.org). ### Added +- Added all examples as shown on the documentation site as a convenience to developers who like to have all + information in a single place. + ### Changed - Included the unit tests directory for checking by PHPStan. From 156f0dc8cfc6fedff83ff314d5710ee40cfedaa8 Mon Sep 17 00:00:00 2001 From: Freshleaf Media <10062339+freshleafmedia@users.noreply.github.com> Date: Mon, 19 Sep 2022 10:11:42 +0100 Subject: [PATCH 380/687] =?UTF-8?q?Adds=20UK=20bank=20holiday=20for=20Quee?= =?UTF-8?q?n=20Elizabeth=20II=E2=80=99s=20funeral=20(#287)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds bank holiday for Queen Elizabeth II’s funeral --- CHANGELOG.md | 1 + src/Yasumi/Provider/UnitedKingdom.php | 28 +++++ .../QueenElizabethFuneralBankHolidayTest.php | 111 ++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ecfeb5b6..a2de483a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ to [Semantic Versioning](https://semver.org). - Added all examples as shown on the documentation site as a convenience to developers who like to have all information in a single place. +- Added bank holiday for Queen Elizabeth II’s State Funeral on 19 September 2022 to United Kingdom ### Changed diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 9d58ffc73..c5be0ac8b 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -62,6 +62,7 @@ public function initialize(): void // Add any other holidays $this->calculatePlatinumJubileeBankHoliday(); $this->calculateMotheringSunday(); + $this->calculateQueenElizabethFuneralBankHoliday(); } public function getSources(): array @@ -203,6 +204,33 @@ protected function calculatePlatinumJubileeBankHoliday(): void )); } + /** + * Queen Elizabeth II’s funeral is an extra bank holiday added on 10 September 2022 + * to mark the last day of the period of national mourning. + * + * @see https://www.timeanddate.com/holidays/uk/queen-elizabeth-funeral + * @see https://www.gov.uk/government/news/bank-holiday-announced-for-her-majesty-queen-elizabeth-iis-state-funeral-on-monday-19-september + * + * @throws InvalidDateException + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateQueenElizabethFuneralBankHoliday(): void + { + if (2022 !== $this->year) { + return; + } + + $this->addHoliday(new Holiday( + 'queenElizabethFuneralBankHoliday', + ['en' => 'Queen Elizabeth II’s State Funeral Bank Holiday'], + new DateTime("$this->year-9-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + } + /** * Christmas Day is celebrated in the United Kingdom on December 25. It traditionally celebrates Jesus Christ's * birth but many aspects of this holiday have pagan origins. Christmas is a time for many people to give and diff --git a/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php b/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php new file mode 100644 index 000000000..7feb30bad --- /dev/null +++ b/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php @@ -0,0 +1,111 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom; + +use DateTime; +use DateTimeZone; +use Exception; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing the Queen Elizabeth's Funeral Bank Holiday in the United Kingdom. + */ +class QueenElizabethFuneralBankHolidayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'queenElizabethFuneralBankHoliday'; + + /** + * The year in which the holiday occurred. + */ + public const ACTIVE_YEAR = 2022; + + /** + * The date on which the holiday occurred. + */ + public const ACTIVE_DATE = '2022-9-19'; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + */ + public function testHoliday(): void + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + self::ACTIVE_YEAR, + new DateTime(self::ACTIVE_DATE, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before the year in which it occurred. + * + * @throws Exception + */ + public function testHolidayBeforeActive(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + ); + } + + /** + * Tests the holiday defined in this test after the year in which it occurred. + * + * @throws Exception + */ + public function testHolidayAfterActive(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ACTIVE_YEAR + 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + self::ACTIVE_YEAR, + [self::LOCALE => 'Queen Elizabeth II’s State Funeral Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + self::ACTIVE_YEAR, + Holiday::TYPE_BANK + ); + } +} From dbe90efe04e503636b9da5eceb56da1a6605aa65 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Sep 2022 00:34:25 +0900 Subject: [PATCH 381/687] Have the United Kingdom and its related countries also assert that Queen Elizabeth II funeral is bank holiday. Signed-off-by: Sacha Telgenhof --- tests/UnitedKingdom/England/EnglandTest.php | 12 ++++++++++-- .../NorthernIreland/NorthernIrelandTest.php | 12 ++++++++++-- tests/UnitedKingdom/Scotland/ScotlandTest.php | 12 ++++++++++-- tests/UnitedKingdom/UnitedKingdomTest.php | 12 ++++++++++-- tests/UnitedKingdom/Wales/WalesTest.php | 12 ++++++++++-- 5 files changed, 50 insertions(+), 10 deletions(-) diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index 8ee8ca65a..f20eadf28 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -70,13 +70,21 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', 'secondChristmasDay', - ], self::REGION, $this->year, Holiday::TYPE_BANK); + ]; + + $year = $this->generateRandomYear(); + + if (2022 === $year) { + $holidays[] = 'queenElizabethFuneralBankHoliday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $year, Holiday::TYPE_BANK); } /** diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index 025f804a8..d2ac3d724 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -70,14 +70,22 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', 'battleOfTheBoyne', 'secondChristmasDay', - ], self::REGION, $this->year, Holiday::TYPE_BANK); + ]; + + $year = $this->generateRandomYear(); + + if (2022 === $year) { + $holidays[] = 'queenElizabethFuneralBankHoliday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $year, Holiday::TYPE_BANK); } /** diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 49d78a0c1..6eced9236 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -68,14 +68,22 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'goodFriday', 'mayDayBankHoliday', 'springBankHoliday', 'christmasDay', 'secondChristmasDay', 'newYearsDay', - ], self::REGION, $this->year, Holiday::TYPE_BANK); + ]; + + $year = $this->generateRandomYear(); + + if (2022 === $year) { + $holidays[] = 'queenElizabethFuneralBankHoliday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $year, Holiday::TYPE_BANK); } /** diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 4a4a049f3..01fab9e4c 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -70,13 +70,21 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', 'secondChristmasDay', - ], self::REGION, $this->year, Holiday::TYPE_BANK); + ]; + + $year = $this->generateRandomYear(); + + if (2022 === $year) { + $holidays[] = 'queenElizabethFuneralBankHoliday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $year, Holiday::TYPE_BANK); } /** diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index 3d7b0835e..f25f24872 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -70,13 +70,21 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', 'secondChristmasDay', - ], self::REGION, $this->year, Holiday::TYPE_BANK); + ]; + + $year = $this->generateRandomYear(); + + if (2022 === $year) { + $holidays[] = 'queenElizabethFuneralBankHoliday'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $year, Holiday::TYPE_BANK); } /** From 8ead422eacbd72adf80b5894b1d4f73104d77ee4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 23 Sep 2022 11:34:10 +0900 Subject: [PATCH 382/687] Fixed tests for New Years Day, Spring Bank Holiday, and May Day Holiday in the United Kingdom (England, Wales, Northern Ireland, and Scotland), as well as Battle of the Boyne in Northern Ireland as these are celebrated only since a particular calendar year. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + tests/UnitedKingdom/England/EnglandTest.php | 15 +++++++++++--- .../NorthernIreland/NorthernIrelandTest.php | 20 +++++++++++++++---- tests/UnitedKingdom/Scotland/ScotlandTest.php | 17 ++++++++++++---- tests/UnitedKingdom/UnitedKingdomTest.php | 15 +++++++++++--- tests/UnitedKingdom/Wales/WalesTest.php | 15 +++++++++++--- 6 files changed, 66 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2de483a8..5b32297a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ to [Semantic Versioning](https://semver.org). ### Fixed +- Tests for New Years Day, Spring Bank Holiday, and May Day Holiday in the United Kingdom (England, Wales, Northern Ireland, and Scotland), as well as Battle of the Boyne in Northern Ireland were considered for any calendar year; however, these are celebrated only since a particular calendar year. - Pentecost Monday in France was only until 2004 recognized as an official holiday. Since 2004 it is considered a special holiday, a so called 'working holiday'. Hence, it is therefore classified as an observed holiday in Yasumi from 2004 and forward. [\#281](https://github.com/azuyalabs/yasumi/issues/281). diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index f20eadf28..4c6a5794e 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -71,15 +71,24 @@ public function testSeasonalHolidays(): void public function testBankHolidays(): void { $holidays = [ - 'newYearsDay', 'easterMonday', - 'mayDayBankHoliday', - 'springBankHoliday', 'secondChristmasDay', ]; $year = $this->generateRandomYear(); + if (1965 >= $this->year) { + $holidays[] = 'springBankHoliday'; + } + + if (1974 > $this->year) { + $holidays[] = 'newYearsDay'; + } + + if (1978 >= $this->year) { + $holidays[] = 'mayDayBankHoliday'; + } + if (2022 === $year) { $holidays[] = 'queenElizabethFuneralBankHoliday'; } diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index d2ac3d724..44bb4fd1a 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -71,16 +71,28 @@ public function testSeasonalHolidays(): void public function testBankHolidays(): void { $holidays = [ - 'newYearsDay', 'easterMonday', - 'mayDayBankHoliday', - 'springBankHoliday', - 'battleOfTheBoyne', 'secondChristmasDay', ]; $year = $this->generateRandomYear(); + if (1926 >= $this->year) { + $holidays[] = 'battleOfTheBoyne'; + } + + if (1965 >= $this->year) { + $holidays[] = 'springBankHoliday'; + } + + if (1974 > $this->year) { + $holidays[] = 'newYearsDay'; + } + + if (1978 >= $this->year) { + $holidays[] = 'mayDayBankHoliday'; + } + if (2022 === $year) { $holidays[] = 'queenElizabethFuneralBankHoliday'; } diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 6eced9236..388c99661 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -69,16 +69,25 @@ public function testSeasonalHolidays(): void public function testBankHolidays(): void { $holidays = [ - 'goodFriday', - 'mayDayBankHoliday', - 'springBankHoliday', 'christmasDay', + 'goodFriday', 'secondChristmasDay', - 'newYearsDay', ]; $year = $this->generateRandomYear(); + if (1965 >= $this->year) { + $holidays[] = 'springBankHoliday'; + } + + if (1974 > $this->year) { + $holidays[] = 'newYearsDay'; + } + + if (1978 >= $this->year) { + $holidays[] = 'mayDayBankHoliday'; + } + if (2022 === $year) { $holidays[] = 'queenElizabethFuneralBankHoliday'; } diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 01fab9e4c..5fcd2168b 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -71,15 +71,24 @@ public function testSeasonalHolidays(): void public function testBankHolidays(): void { $holidays = [ - 'newYearsDay', 'easterMonday', - 'mayDayBankHoliday', - 'springBankHoliday', 'secondChristmasDay', ]; $year = $this->generateRandomYear(); + if (1965 >= $this->year) { + $holidays[] = 'springBankHoliday'; + } + + if (1974 > $this->year) { + $holidays[] = 'newYearsDay'; + } + + if (1978 >= $this->year) { + $holidays[] = 'mayDayBankHoliday'; + } + if (2022 === $year) { $holidays[] = 'queenElizabethFuneralBankHoliday'; } diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index f25f24872..8f76e419b 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -71,15 +71,24 @@ public function testSeasonalHolidays(): void public function testBankHolidays(): void { $holidays = [ - 'newYearsDay', 'easterMonday', - 'mayDayBankHoliday', - 'springBankHoliday', 'secondChristmasDay', ]; $year = $this->generateRandomYear(); + if (1965 >= $this->year) { + $holidays[] = 'springBankHoliday'; + } + + if (1974 > $this->year) { + $holidays[] = 'newYearsDay'; + } + + if (1978 >= $this->year) { + $holidays[] = 'mayDayBankHoliday'; + } + if (2022 === $year) { $holidays[] = 'queenElizabethFuneralBankHoliday'; } From a03db2e8d36df4578aa0e25307b7afaf5e568fe5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 24 Sep 2022 21:34:10 +0900 Subject: [PATCH 383/687] Split functions that generate random dates/years into its own trait to slim down the overgrown base trait. Updated inline documentation (syntax, making sentences more succinct). Signed-off-by: Sacha Telgenhof --- tests/Randomizer.php | 459 ++++++++++++++++++++++++++++++++++++++ tests/YasumiBase.php | 509 ++++--------------------------------------- 2 files changed, 500 insertions(+), 468 deletions(-) create mode 100644 tests/Randomizer.php diff --git a/tests/Randomizer.php b/tests/Randomizer.php new file mode 100644 index 000000000..2e58dbf9e --- /dev/null +++ b/tests/Randomizer.php @@ -0,0 +1,459 @@ + + */ + +namespace Yasumi\tests; + +use DateInterval; +use DateTime; +use DateTimeInterface; +use DateTimeZone; +use Exception; +use Yasumi\Holiday; + +/** + * Trait containing useful functions that generate random dates/years. + */ +trait Randomizer +{ + protected static string $defaultTimezone; + + /** + * 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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $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 + */ + public function generateRandomDates( + int $month, + int $day, + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + $data = []; + $range ??= 1000; + for ($y = 1; $y <= ($iterations ?? 10); ++$y) { + $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); + $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC'))]; + } + + return $data; + } + + /** + * Returns a list of random easter test dates used for assertion of holidays. + * + * @param string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $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 + */ + public function generateRandomEasterDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + $data = []; + $range ??= 1000; + + for ($i = 1; $i <= ($iterations ?? 10); ++$i) { + $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); + $date = $this->calculateEaster($year, $timezone ?? 'UTC'); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Returns a list of random Easter Monday test dates used for assertion of holidays. + * + * @param string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $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 + * + * @throws Exception + */ + public function generateRandomEasterMondayDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + $range ??= 1000; + + return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { + $date->add(new DateInterval('P1D')); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); + } + + /** + * 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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $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 + */ + public function generateRandomModifiedEasterDates( + callable $cb, + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + $data = []; + $range ??= 1000; + for ($i = 1; $i <= ($iterations ?? 10); ++$i) { + $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); + $date = $this->calculateEaster($year, $timezone ?? 'UTC'); + + $cb($date); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Returns a list of random Good Friday test dates used for assertion of holidays. + * + * @param string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $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 + * + * @throws Exception + */ + public function generateRandomGoodFridayDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + $range ??= 1000; + + return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { + $date->sub(new DateInterval('P2D')); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); + } + + /** + * Returns a list of random Pentecost test dates used for assertion of holidays. + * + * @param string|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $range year range from which dates will be generated (default: 1000) + * + * @return array list of random Pentecost test dates used for assertion of holidays + * + * @throws Exception + */ + public function generateRandomPentecostDates( + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + $range ??= 1000; + + return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { + $date->add(new DateInterval('P49D')); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); + } + + /** + * Returns a list of random test dates used for assertion of holidays. If the date falls in a weekend, the random + * holiday day moves 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|null $timezone name of the timezone for which the dates need to be generated + * @param int|null $iterations number of iterations (i.e., samples) that need to be generated (default: 10). + * @param int|null $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 + */ + public function generateRandomDatesWithHolidayMovedToMonday( + int $month, + int $day, + string $timezone = null, + int $iterations = null, + int $range = null + ): array { + return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date): void { + if ($this->isWeekend($date)) { + $date->modify('next monday'); + } + }, $iterations ?? 10, $range, $timezone ?? 'UTC'); + } + + /** + * Returns a list of random test dates used for assertion of holidays with an 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 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|null $timezone name of the timezone for which the dates need to be generated + * + * @return array list of random test dates used for assertion of holidays with an applied callback + * + * @throws Exception + */ + public function generateRandomDatesWithModifier( + int $month, + int $day, + callable $callback, + int $iterations, + int $range, + string $timezone = null + ): array { + $data = []; + + for ($i = 1; $i <= $iterations; ++$i) { + $year = $this->generateRandomYear($range); + $date = new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC')); + + $callback($year, $date); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Generates a random year (number). + * + * @param int|null $lowerLimit lower limit for generating a year number (default: 1000) + * @param int|null $upperLimit upper limit for generating a year number (default: 9999) + * + * @return int a year number + * + * @throws Exception + */ + public function generateRandomYear( + int $lowerLimit = null, + int $upperLimit = null + ): int { + return self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); + } + + /** + * 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. + * + * @return bool true if $dateTime is a weekend, false otherwise + */ + public function isWeekend( + DateTimeInterface $dateTime, + array $weekendDays = [0, 6] + ): bool { + return \in_array((int) $dateTime->format('w'), $weekendDays, true); + } + + /** + * Returns a random number between $int1 and $int2 (any order). + * + * @throws Exception + * + * @example 79907610 + */ + public static function numberBetween(int $int1 = 0, int $int2 = 2_147_483_647): int + { + $min = min($int1, $int2); + $max = max($int1, $int2); + + return random_int($min, $max); + } + + /** + * Get a DateTime object based on a random date between two given dates. + * Accepts date strings that can be recognized by `strtotime`. + * + * @param \DateTime|string $startDate Defaults to 30 years ago + * @param \DateTime|string $endDate Defaults to "now" + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` + * + * @throws Exception + * + * @see http://php.net/manual/en/timezones.php + * @see http://php.net/manual/en/function.date-default-timezone-get.php + * + * @example DateTime('1999-02-02 11:42:52') + */ + public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTimeInterface + { + $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); + + if (!$startTimestamp) { + throw new \RuntimeException('unable to get timestamp for the start date'); + } + + $endTimestamp = static::getMaxTimestamp($endDate); + + if (!$endTimestamp) { + throw new \RuntimeException('unable to get timestamp for the end date'); + } + + if ($startTimestamp > $endTimestamp) { + throw new \InvalidArgumentException('Start date must be anterior to end date.'); + } + + $timestamp = random_int($startTimestamp, $endTimestamp); + + return static::setTimezone( + new \DateTime('@'.$timestamp), + $timezone + ); + } + + public function randomYearFromArray(array $years): int + { + if ([] === $years) { + throw new \InvalidArgumentException(' years array must not be empty'); + } + + return $years[(int) array_rand($years)]; + } + + /** + * 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 year for which Easter needs to be calculated + * @param string $timezone timezone in which Easter is celebrated + * + * @return DateTime date of Easter + * + * @throws Exception + * + * @see easter_days + * @see https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c + * @see http://www.gmarts.org/index.php?go=415#EasterMallen + * @see http://www.tondering.dk/claus/cal/easter.php + */ + protected function calculateEaster(int $year, string $timezone): DateTimeInterface + { + 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; + } + + /** + * @param \DateTime|string|float|int $max + * + * @return int|false + */ + protected static function getMaxTimestamp($max = 'now') + { + if (is_numeric($max)) { + $ts = (int) $max; + } elseif ($max instanceof \DateTime) { + $ts = $max->getTimestamp(); + } else { + $ts = strtotime(empty($max) ? 'now' : $max); + } + + return $ts; + } + + private static function setTimezone(DateTimeInterface $dt, ?string $timezone): DateTimeInterface + { + return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); + } + + private static function resolveTimezone(?string $timezone): string + { + return $timezone ?? (static::$defaultTimezone ?? date_default_timezone_get()); + } +} diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index f186459b4..c1cac43fd 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -1,6 +1,7 @@ $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 string $provider 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 string $type type of holiday. Use the following constants: TYPE_OFFICIAL, * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. * * @throws InvalidArgumentException @@ -82,19 +79,19 @@ public function assertDefinedHolidays( break; } - // Loop through all known holidays and assert they are defined by the provider class + // Loop through all known holidays and assert they are defined by the provider class. foreach ($expectedHolidays as $holiday) { self::assertArrayHasKey($holiday, iterator_to_array($holidays)); } } /** - * Asserts that the expected date is indeed a holiday for that given year and name. + * Asserts expected date is a holiday for the given year and name. * - * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested - * @param string $key string the key of the holiday to be checked against + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key of the holiday to be checked against * @param int $year holiday calendar year - * @param DateTime $expected the date to be checked against + * @param DateTime $expected date to be checked against * * @throws UnknownLocaleException * @throws InvalidDateException @@ -117,12 +114,12 @@ public function assertHoliday( } /** - * Asserts that the expected date is indeed a substitute holiday for that given year and name. + * Asserts the expected date is a substitute 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 $key string the key of the substituted holiday to be checked against + * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key of the substituted holiday to be checked against * @param int $year holiday calendar year - * @param DateTime $expected the date to be checked against + * @param DateTime $expected date to be checked against * * @throws UnknownLocaleException * @throws InvalidDateException @@ -145,10 +142,10 @@ public function assertSubstituteHoliday( } /** - * Asserts that the given substitute holiday for that given year does not exist. + * Asserts the given substitute holiday for a 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 $key the key of the substituted holiday to be checked against + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key of the substituted holiday to be checked against * @param int $year holiday calendar year * * @throws InvalidArgumentException @@ -170,10 +167,10 @@ public function assertNotSubstituteHoliday( } /** - * Asserts that the given holiday for that given year does not exist. + * Asserts the given holiday for a 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 $key the key of the holiday to be checked against + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key of the holiday to be checked against * @param int $year holiday calendar year * * @throws InvalidArgumentException @@ -194,12 +191,12 @@ public function assertNotHoliday( } /** - * Asserts that the expected name is indeed provided as a translated holiday name for that given year and name. + * Asserts the expected name is 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 $key string the key of the holiday to be checked against + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key of the holiday to be checked against * @param int $year holiday calendar year - * @param array $translations the translations to be checked against + * @param array $translations translations to be checked against * * @throws InvalidArgumentException * @throws RuntimeException @@ -215,8 +212,8 @@ public function assertTranslatedHolidayName( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - self::assertInstanceOf(Holiday::class, $holiday); - self::assertTrue($holidays->isHoliday($holiday)); + self::assertInstanceOf(Holiday::class, $holiday, sprintf('No instance for the year `%u`', $year)); + self::assertTrue($holidays->isHoliday($holiday), sprintf('Holiday `%s` not defined for the year `%u`', $key, $year)); foreach ($translations as $locale => $name) { $locales = [$locale]; @@ -239,12 +236,12 @@ public function assertTranslatedHolidayName( } /** - * Asserts that the expected type is indeed the associated type of the given holiday. + * Asserts the expected type is the associated type for the given holiday. * - * @param string $provider the holiday provider (i.e. country/region) for which the holiday need to be tested - * @param string $key string the key of the holiday to be checked against + * @param string $provider holiday provider (i.e. country/region) for which the holiday need to be tested. + * @param string $key the key of the holiday to be checked against * @param int $year holiday calendar year - * @param string $type the type to be checked against + * @param string $type type to be checked against * * @throws InvalidArgumentException * @throws RuntimeException @@ -260,18 +257,17 @@ public function assertHolidayType( $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); - self::assertInstanceOf(Holiday::class, $holiday); - self::assertEquals($type, $holiday->getType()); + self::assertInstanceOf(Holiday::class, $holiday, sprintf('No instance for the year `%u`', $year)); + self::assertEquals($type, $holiday->getType(), sprintf('Expected type `%s`, got `%s` for the year `%u`', $type, $holiday->getType(), $year)); } /** - * Asserts that the expected week day is indeed the week day for the given holiday and year. + * Asserts the expected week day is 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 - * tested - * @param string $key string the key of the holiday to be checked against + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key 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.) + * @param string $expectedDayOfWeek expected week day (i.e. "Saturday", "Sunday", etc.). * * @throws AssertionFailedError * @throws InvalidArgumentException @@ -293,11 +289,10 @@ public function assertDayOfWeek( } /** - * Asserts that the holiday provider has the number of expected sources defined. + * Asserts the holiday provider has the expected sources number. * - * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be - * tested - * @param int $expectedSourceCount the expected number of sources + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param int $expectedSourceCount expected sources number * * @throws Exception */ @@ -307,426 +302,4 @@ public function assertSources(string $provider, int $expectedSourceCount): void self::assertCount($expectedSourceCount, $holidayProvider->getSources()); } - - /** - * 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|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $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 - */ - public function generateRandomDates( - int $month, - int $day, - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - $data = []; - $range ??= 1000; - for ($y = 1; $y <= ($iterations ?? 10); ++$y) { - $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); - $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC'))]; - } - - return $data; - } - - /** - * Returns a list of random easter test dates used for assertion of holidays. - * - * @param string|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $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 - */ - public function generateRandomEasterDates( - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - $data = []; - $range ??= 1000; - - for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); - $date = $this->calculateEaster($year, $timezone ?? 'UTC'); - - $data[] = [$year, $date->format('Y-m-d')]; - } - - return $data; - } - - /** - * Returns a list of random Easter Monday test dates used for assertion of holidays. - * - * @param string|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $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 - * - * @throws Exception - */ - public function generateRandomEasterMondayDates( - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - $range ??= 1000; - - return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { - $date->add(new DateInterval('P1D')); - }, $timezone ?? 'UTC', $iterations ?? 10, $range); - } - - /** - * 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|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $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 - */ - public function generateRandomModifiedEasterDates( - callable $cb, - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - $data = []; - $range ??= 1000; - for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); - $date = $this->calculateEaster($year, $timezone ?? 'UTC'); - - $cb($date); - - $data[] = [$year, $date->format('Y-m-d')]; - } - - return $data; - } - - /** - * Returns a list of random Good Friday test dates used for assertion of holidays. - * - * @param string|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $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 - * - * @throws Exception - */ - public function generateRandomGoodFridayDates( - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - $range ??= 1000; - - return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { - $date->sub(new DateInterval('P2D')); - }, $timezone ?? 'UTC', $iterations ?? 10, $range); - } - - /** - * Returns a list of random Pentecost test dates used for assertion of holidays. - * - * @param string|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $range year range from which dates will be generated (default: 1000) - * - * @return array list of random Pentecost test dates used for assertion of holidays - * - * @throws Exception - */ - public function generateRandomPentecostDates( - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - $range ??= 1000; - - return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { - $date->add(new DateInterval('P49D')); - }, $timezone ?? 'UTC', $iterations ?? 10, $range); - } - - /** - * 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|null $timezone name of the timezone for which the dates need to be generated - * @param int|null $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int|null $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 - */ - public function generateRandomDatesWithHolidayMovedToMonday( - int $month, - int $day, - string $timezone = null, - int $iterations = null, - int $range = null - ): array { - return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date): void { - if ($this->isWeekend($date)) { - $date->modify('next monday'); - } - }, $iterations ?? 10, $range, $timezone ?? 'UTC'); - } - - /** - * 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 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|null $timezone name of the timezone for which the dates need to be generated - * - * @return array list of random test dates used for assertion of holidays with applied callback - * - * @throws Exception - */ - public function generateRandomDatesWithModifier( - int $month, - int $day, - callable $callback, - int $iterations, - int $range, - string $timezone = null - ): array { - $data = []; - - for ($i = 1; $i <= $iterations; ++$i) { - $year = $this->generateRandomYear($range); - $date = new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC')); - - $callback($year, $date); - - $data[] = [$year, $date->format('Y-m-d')]; - } - - return $data; - } - - /** - * Generates a random year (number). - * - * @param int|null $lowerLimit the lower limit for generating a year number (default: 1000) - * @param int|null $upperLimit the upper limit for generating a year number (default: 9999) - * - * @return int a year number - * - * @throws Exception - */ - public function generateRandomYear( - int $lowerLimit = null, - int $upperLimit = null - ): int { - return self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); - } - - /** - * 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. - * - * @return bool true if $dateTime is a weekend, false otherwise - */ - public function isWeekend( - DateTimeInterface $dateTime, - array $weekendDays = [0, 6] - ): bool { - return \in_array((int) $dateTime->format('w'), $weekendDays, true); - } - - /** - * Returns a random number between $int1 and $int2 (any order). - * - * @throws Exception - * - * @example 79907610 - */ - public static function numberBetween(int $int1 = 0, int $int2 = 2_147_483_647): int - { - $min = $int1 < $int2 ? $int1 : $int2; - $max = $int1 < $int2 ? $int2 : $int1; - - return random_int($min, $max); - } - - /** - * Get a DateTime object based on a random date between two given dates. - * Accepts date strings that can be recognized by strtotime(). - * - * @param \DateTime|string $startDate Defaults to 30 years ago - * @param \DateTime|string $endDate Defaults to "now" - * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` - * - * @throws Exception - * - * @see http://php.net/manual/en/timezones.php - * @see http://php.net/manual/en/function.date-default-timezone-get.php - * - * @example DateTime('1999-02-02 11:42:52') - */ - public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTimeInterface - { - $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); - - if (!$startTimestamp) { - throw new \RuntimeException('unable to get timestamp for the start date'); - } - - $endTimestamp = static::getMaxTimestamp($endDate); - - if (!$endTimestamp) { - throw new \RuntimeException('unable to get timestamp for the end date'); - } - - if ($startTimestamp > $endTimestamp) { - throw new \InvalidArgumentException('Start date must be anterior to end date.'); - } - - $timestamp = random_int($startTimestamp, $endTimestamp); - - return static::setTimezone( - new \DateTime('@'.$timestamp), - $timezone - ); - } - - /** - * 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 - * @see https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c - * @see http://www.gmarts.org/index.php?go=415#EasterMallen - * @see http://www.tondering.dk/claus/cal/easter.php - */ - protected function calculateEaster(int $year, string $timezone): DateTimeInterface - { - 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; - } - - /** - * @param \DateTime|string|float|int $max - * - * @return int|false - */ - protected static function getMaxTimestamp($max = 'now') - { - if (is_numeric($max)) { - $ts = (int) $max; - } elseif ($max instanceof \DateTime) { - $ts = $max->getTimestamp(); - } else { - $ts = strtotime(empty($max) ? 'now' : $max); - } - - return $ts; - } - - /** - * Internal method to set the time zone on a DateTime. - */ - private static function setTimezone(DateTimeInterface $dt, ?string $timezone): DateTimeInterface - { - return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); - } - - private static function resolveTimezone(?string $timezone): string - { - return $timezone ?? (static::$defaultTimezone ?? date_default_timezone_get()); - } } From 2f750162c6a210a9b77d68d0d3e981afa9ca5713 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 24 Sep 2022 23:47:52 +0900 Subject: [PATCH 384/687] Refactored summer and winter time tests for Denmark and The Netherlands by introducing a base class holding the domain logic. Signed-off-by: Sacha Telgenhof --- tests/Denmark/DaylightSavingTime.php | 39 ++++++++++++++++++++ tests/Denmark/SummerTimeTest.php | 47 +++++++++++++++++++----- tests/Denmark/WinterTimeTest.php | 30 +++++++++++---- tests/Netherlands/DaylightSavingTime.php | 39 ++++++++++++++++++++ tests/Netherlands/SummertimeTest.php | 31 +++++++++++----- tests/Netherlands/WintertimeTest.php | 28 ++++++++++---- 6 files changed, 180 insertions(+), 34 deletions(-) create mode 100644 tests/Denmark/DaylightSavingTime.php create mode 100644 tests/Netherlands/DaylightSavingTime.php diff --git a/tests/Denmark/DaylightSavingTime.php b/tests/Denmark/DaylightSavingTime.php new file mode 100644 index 000000000..af2317281 --- /dev/null +++ b/tests/Denmark/DaylightSavingTime.php @@ -0,0 +1,39 @@ + + */ + +namespace Yasumi\tests\Denmark; + +use Yasumi\tests\HolidayTestCase; + +abstract class DaylightSavingTime extends DenmarkBaseTestCase implements HolidayTestCase +{ + /** @var int[] */ + public array $observedYears; + + /** @var int[] */ + public array $unobservedYears; + + public function __construct() + { + $observedYears = [1916, 1940]; + $observedYears = array_merge($observedYears, range(1942, 1948)); + $observedYears = array_merge($observedYears, range(1980, 2037)); // PHP caps future DST transitions + + $this->observedYears = $observedYears; + $this->unobservedYears = array_diff(range(reset($observedYears), end($observedYears)), $observedYears); + + parent::__construct(); + } +} diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index dbdb66c95..e15cd9ae5 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -1,6 +1,7 @@ '1916-05-14', + 1940 => '1940-05-14', + 1943 => '1943-03-29', + 1944 => '1944-04-03', + 1945 => '1945-04-02', + 1946 => '1946-05-01', + 1947 => '1947-05-04', + 1948 => '1948-05-09', + ]; + + public function __construct() + { + parent::__construct(); + + // no summertime defined for 1942 + if (false !== ($key = array_search(1942, $this->observedYears, true))) { + unset($this->observedYears[(int) $key]); + } + } + /** * Tests the holiday defined in this test. * @@ -37,11 +58,15 @@ class SummerTimeTest extends DenmarkBaseTestCase implements HolidayTestCase */ public function testSummerTime(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1949, 1979)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - $year = $this->generateRandomYear(1980, 2036); + $year = $this->randomYearFromArray($this->observedYears); $expectedDate = new DateTime("last sunday of march $year", new DateTimeZone(self::TIMEZONE)); + if (array_key_exists($year, $this->deviantTransitions)) { + $expectedDate = new DateTime($this->deviantTransitions[$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 (1980 === $year) { $expectedDate = new DateTime('1980-04-06', new DateTimeZone(self::TIMEZONE)); @@ -65,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1980, 2037), + $this->randomYearFromArray($this->observedYears), [self::LOCALE => 'sommertid starter'] ); } @@ -77,6 +102,10 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1980, 2037), Holiday::TYPE_SEASON); + $this->assertHolidayType( + self::REGION, self::HOLIDAY, + $this->randomYearFromArray($this->observedYears), + Holiday::TYPE_SEASON + ); } } diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 01fe35ad1..872efcf81 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -1,6 +1,7 @@ observedYears, true))) { + unset($this->observedYears[(int) $key]); + } + } + /** * Tests the holiday defined in this test. * @@ -37,7 +47,7 @@ class WinterTimeTest extends DenmarkBaseTestCase implements HolidayTestCase */ public function testWinterTime(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1949, 1979)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->generateRandomYear(1980, 1995); $this->assertHoliday( @@ -66,7 +76,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1980, 2037), + $this->randomYearFromArray($this->observedYears), [self::LOCALE => 'sommertid slutter'] ); } @@ -78,6 +88,10 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1980, 2037), Holiday::TYPE_SEASON); + $this->assertHolidayType( + self::REGION, self::HOLIDAY, + $this->randomYearFromArray($this->observedYears), + Holiday::TYPE_SEASON + ); } } diff --git a/tests/Netherlands/DaylightSavingTime.php b/tests/Netherlands/DaylightSavingTime.php new file mode 100644 index 000000000..a9f552509 --- /dev/null +++ b/tests/Netherlands/DaylightSavingTime.php @@ -0,0 +1,39 @@ + + */ + +namespace Yasumi\tests\Netherlands; + +use Yasumi\tests\HolidayTestCase; + +abstract class DaylightSavingTime extends NetherlandsBaseTestCase implements HolidayTestCase +{ + /** @var int[] */ + public array $observedYears; + + /** @var int[] */ + public array $unobservedYears; + + public function __construct() + { + $observedYears = range(1916, 1940); + $observedYears = array_merge($observedYears, range(1942, 1945)); + $observedYears = array_merge($observedYears, range(1977, 2037)); // PHP caps future DST transitions + + $this->observedYears = $observedYears; + $this->unobservedYears = array_diff(range(reset($observedYears), end($observedYears)), $observedYears); + + parent::__construct(); + } +} diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index e5707f104..4727ef608 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -1,6 +1,7 @@ observedYears, true))) { + unset($this->observedYears[(int) $key]); + } + } + /** * Tests Summertime. * @@ -37,7 +45,7 @@ class SummertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase */ public function testSummertime(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1946, 1976)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->generateRandomYear(1977, 1980); $this->assertHoliday( @@ -47,7 +55,7 @@ public function testSummertime(): void new DateTime("first sunday of april $year", new DateTimeZone(self::TIMEZONE)) ); - $year = $this->generateRandomYear(1981, 2036); + $year = $this->generateRandomYear(1981, 2037); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +74,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1978, 2037), + $this->randomYearFromArray($this->observedYears), [self::LOCALE => 'zomertijd'] ); } @@ -78,6 +86,11 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1978, 2037), Holiday::TYPE_SEASON); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->randomYearFromArray($this->observedYears), + Holiday::TYPE_SEASON + ); } } diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index d496ec237..6b29b5cbe 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -18,18 +18,25 @@ use DateTimeZone; use Exception; use Yasumi\Holiday; -use Yasumi\tests\HolidayTestCase; /** * Class for testing Wintertime in the Netherlands. */ -class WintertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase +final class WintertimeTest extends DaylightSavingTime { - /** - * The name of the holiday. - */ + /** The name of the holiday */ public const HOLIDAY = 'winterTime'; + public function __construct() + { + parent::__construct(); + + // no wintertime defined for 1940 + if (false !== ($key = array_search(1940, $this->observedYears, true))) { + unset($this->observedYears[(int) $key]); + } + } + /** * Tests Wintertime. * @@ -37,7 +44,7 @@ class WintertimeTest extends NetherlandsBaseTestCase implements HolidayTestCase */ public function testWintertime(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1946, 1976)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->generateRandomYear(1979, 1995); $this->assertHoliday( @@ -66,7 +73,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1978, 2037), + $this->randomYearFromArray($this->observedYears), [self::LOCALE => 'wintertijd'] ); } @@ -78,6 +85,11 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1978, 2037), Holiday::TYPE_SEASON); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->randomYearFromArray($this->observedYears), + Holiday::TYPE_SEASON + ); } } From a9f0d375055f75e689e1605b9a2837f5e7b02734 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 26 Sep 2022 23:53:39 +0900 Subject: [PATCH 385/687] Re-added 8.1 version as the timezone issues have been addressed. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index bb06be3b9..a05470b63 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4f157e7ac..7f611f124 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 945e33fff..a5b18897d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] - php-versions: [ '7.4', '8.0' ] + php-versions: [ '7.4', '8.0', '8.1' ] steps: - name: Set git to use LF From 3214f01bf6bad7a70ce4a39c0a7b2331fb88fd2c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Sep 2022 00:45:46 +0900 Subject: [PATCH 386/687] Removed the mutation testing as currently the outcome is not actively used. Running mutations tests locally should be sufficient. Signed-off-by: Sacha Telgenhof --- .github/workflows/mutation-tests.yml | 52 ---------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/mutation-tests.yml diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml deleted file mode 100644 index 65b72feaa..000000000 --- a/.github/workflows/mutation-tests.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: "Mutations testing" - -on: - - push - - pull_request - -jobs: - run: - name: "CI" - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-latest ] - php-versions: [ '7.4', '8.0' ] - - steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - - name: Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 1 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: pcov - - - name: Get Composer Cache Directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache Composer dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Check Composer configuration - run: composer validate --strict - - - name: Install dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader - - - name: Run Mutation tests - run: vendor/bin/infection run -j 2 From 89587fb3fe985c323a1e5187871cabbbafa300ff Mon Sep 17 00:00:00 2001 From: Jozef Grencik <20k121@gmail.com> Date: Thu, 22 Dec 2022 13:09:18 +0100 Subject: [PATCH 387/687] Add Slovak translations for a couple of popular holidays (#298) --- src/Yasumi/data/translations/ascensionDay.php | 1 + src/Yasumi/data/translations/ashWednesday.php | 1 + src/Yasumi/data/translations/corpusChristi.php | 1 + src/Yasumi/data/translations/immaculateConception.php | 1 + 4 files changed, 4 insertions(+) diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index 9d6413228..67ad29dfa 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -25,5 +25,6 @@ 'it' => 'Ascensione', 'nb' => 'Kristi himmelfartsdag', 'nl' => 'Hemelvaart', + 'sk' => 'Nanebovstúpenie Pána', 'sv' => 'Kristi himmelsfärdsdag', ]; diff --git a/src/Yasumi/data/translations/ashWednesday.php b/src/Yasumi/data/translations/ashWednesday.php index d145ae215..ea4c2173f 100644 --- a/src/Yasumi/data/translations/ashWednesday.php +++ b/src/Yasumi/data/translations/ashWednesday.php @@ -22,4 +22,5 @@ 'it' => 'Mercoledi delle Ceneri', 'nl' => 'Aswoensdag', 'pt' => 'Quarta-feira de Cinzas', + 'sk' => 'Popolcová streda', ]; diff --git a/src/Yasumi/data/translations/corpusChristi.php b/src/Yasumi/data/translations/corpusChristi.php index f46c60cb0..f27df151e 100644 --- a/src/Yasumi/data/translations/corpusChristi.php +++ b/src/Yasumi/data/translations/corpusChristi.php @@ -23,4 +23,5 @@ 'pl' => 'Boże Ciało', 'pt' => 'Corpus Christi', 'pt_PT' => 'Corpo de Deus', + 'sk' => 'Božie Telo', ]; diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index 0d75bdf66..2fcf9e966 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -23,4 +23,5 @@ 'fr' => 'Immaculée Conception', 'it' => 'Immacolata Concezione', 'pt' => 'Dia da Imaculada Conceição', + 'sk' => 'Nepoškvrnené počatie Panny Márie', ]; From 0dc9552bafe6e5201e5bccac97550cb57fb6eead Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 23 Dec 2022 21:32:06 +0900 Subject: [PATCH 388/687] Reordered translations alphabetically. Signed-off-by: Sacha Telgenhof --- src/Yasumi/data/translations/allSaintsDay.php | 2 +- src/Yasumi/data/translations/easterMonday.php | 2 +- src/Yasumi/data/translations/epiphany.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/plebisciteDay.php | 2 +- src/Yasumi/data/translations/queensBirthday.php | 2 +- src/Yasumi/data/translations/stFloriansDay.php | 2 +- src/Yasumi/data/translations/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 924da6dfb..d96022d8e 100644 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -21,8 +21,8 @@ 'en' => 'All Saints’ Day', 'es' => 'Día de todos los Santos', 'fi' => 'Pyhäinpäivä', - 'fr_BE' => 'La Toussaint', 'fr' => 'Toussaint', + 'fr_BE' => 'La Toussaint', 'hr' => 'Dan svih svetih', 'hu' => 'Mindenszentek', 'it' => 'Festa di Tutti i Santi', diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 868b05ef1..facf6c7e6 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -33,8 +33,8 @@ 'lt' => 'Antroji Velykų diena', 'lv' => 'Otrās Lieldienas', 'nb' => 'andre påskedag', - 'nl_BE' => 'paasmaandag', 'nl' => 'tweede paasdag', + 'nl_BE' => 'paasmaandag', 'pl' => 'Poniedziałek Wielkanocny', 'ro' => 'A doua zi de Paște', 'sk' => 'Veľkonočný pondelok', diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index c615e01ba..76e4b20f9 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -16,9 +16,9 @@ // Translations for Epiphany return [ 'ca' => 'Epifania', + 'de' => 'Heilige 3 Könige', 'de_AT' => 'Heilige Drei Könige', 'de_CH' => 'Heilige Drei Könige', - 'de' => 'Heilige 3 Könige', 'el' => 'Θεοφάνεια', 'en' => 'Epiphany', 'es' => 'Día de Reyes', diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 463d1d724..14b8a6077 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -17,10 +17,10 @@ return [ 'en' => 'Labour Day', 'en_US' => 'Labor Day', + 'fr' => 'Fête du travail', 'ja' => '労働の日', 'ko' => '노동절', 'nl' => 'Dag van de arbeid', 'sk' => 'Sviatok práce', - 'fr' => 'Fête du travail', 'tr' => 'Emek ve Dayanışma Günü', ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 06b8b01d1..4d2df4d4f 100644 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -26,9 +26,9 @@ 'es' => 'Año Nuevo', 'et' => 'Uusaasta', 'fi' => 'Uudenvuodenpäivä', + 'fr' => 'Jour de l’An', 'fr_BE' => 'Nouvel An', 'fr_CH' => 'Nouvel An', - 'fr' => 'Jour de l’An', 'ga' => 'Lá Caille', 'hr' => 'Nova godina', 'hu' => 'Újév', diff --git a/src/Yasumi/data/translations/plebisciteDay.php b/src/Yasumi/data/translations/plebisciteDay.php index d68854288..8589c1aa9 100644 --- a/src/Yasumi/data/translations/plebisciteDay.php +++ b/src/Yasumi/data/translations/plebisciteDay.php @@ -15,6 +15,6 @@ // Translations for Plebiscite Day. return [ - 'en' => 'Plebiscite Day', 'de_AT' => 'Tag der Volksabstimmung', + 'en' => 'Plebiscite Day', ]; diff --git a/src/Yasumi/data/translations/queensBirthday.php b/src/Yasumi/data/translations/queensBirthday.php index 6ebfea29e..8ae44d5da 100644 --- a/src/Yasumi/data/translations/queensBirthday.php +++ b/src/Yasumi/data/translations/queensBirthday.php @@ -17,7 +17,7 @@ return [ 'da' => 'Dronningens fødselsdag', 'en' => 'Queen’s Birthday', - 'pt' => 'Aniversário da Rainha', 'fr' => 'Anniversaire officiel de la reine', + 'pt' => 'Aniversário da Rainha', 'ru' => 'Официальный день рождения королевы', ]; diff --git a/src/Yasumi/data/translations/stFloriansDay.php b/src/Yasumi/data/translations/stFloriansDay.php index f9894e014..c0cad1376 100644 --- a/src/Yasumi/data/translations/stFloriansDay.php +++ b/src/Yasumi/data/translations/stFloriansDay.php @@ -15,6 +15,6 @@ // Translations for Saint Florian's Day. return [ - 'en' => 'Saint Florian’s Day', 'de_AT' => 'Florian', + 'en' => 'Saint Florian’s Day', ]; diff --git a/src/Yasumi/data/translations/stLeopoldsDay.php b/src/Yasumi/data/translations/stLeopoldsDay.php index aa7cfc990..cc05cf95f 100644 --- a/src/Yasumi/data/translations/stLeopoldsDay.php +++ b/src/Yasumi/data/translations/stLeopoldsDay.php @@ -15,6 +15,6 @@ // Translations for Saint Leopold's Day. return [ - 'en' => 'Saint Leopold’s Day', 'de_AT' => 'Leopold', + 'en' => 'Saint Leopold’s Day', ]; diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index 3113bf9ec..d0768d2b5 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -15,7 +15,7 @@ // Translations for St. Martin's Day return [ + 'de_AT' => 'Martin', 'en' => 'St. Martin’s Day', 'nl' => 'Sint Maarten', - 'de_AT' => 'Martin', ]; diff --git a/src/Yasumi/data/translations/stRupertsDay.php b/src/Yasumi/data/translations/stRupertsDay.php index 35ad9d318..dad66d815 100644 --- a/src/Yasumi/data/translations/stRupertsDay.php +++ b/src/Yasumi/data/translations/stRupertsDay.php @@ -15,6 +15,6 @@ // Translations for Saint Rupert's Day. return [ - 'en' => 'Saint Rupert’s Day', 'de_AT' => 'Rupert', + 'en' => 'Saint Rupert’s Day', ]; diff --git a/src/Yasumi/data/translations/substituteHoliday.php b/src/Yasumi/data/translations/substituteHoliday.php index 38a59906e..eece0501a 100644 --- a/src/Yasumi/data/translations/substituteHoliday.php +++ b/src/Yasumi/data/translations/substituteHoliday.php @@ -17,8 +17,8 @@ return [ 'da' => '{0} (erstatning)', 'en' => '{0} (substitute day)', - 'en_US' => '{0} observed', 'en_CA' => '{0} observed', + 'en_US' => '{0} observed', 'ja' => '振替休日 ({0})', 'ko' => '대체공휴일', ]; From 9d5cdb44e65a02769d263b3e28adf14ba7d62864 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Dec 2022 21:37:01 +0900 Subject: [PATCH 389/687] In version 2022f of the tz db, a correction for 1947 was made for the summertiime transition to april the 6th. Signed-off-by: Sacha Telgenhof --- tests/Denmark/SummerTimeTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index e15cd9ae5..626d009f0 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -45,10 +45,17 @@ public function __construct() { parent::__construct(); - // no summertime defined for 1942 + // no summertime defined prior to 1942 if (false !== ($key = array_search(1942, $this->observedYears, true))) { unset($this->observedYears[(int) $key]); } + + // In version 2022f of th tz db, a correction for 1947 was made for the summertiime + // transition to april the 6th. + // See: https://github.com/eggert/tz/blob/2022f/europe + if (1 === strcmp(intltz_get_tz_data_version(), '2022f')) { + $this->deviantTransitions[1947] = '1947-04-06'; + } } /** From ea9bd33e91459ae94d0d4ef022058b2084313744 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Dec 2022 21:44:39 +0900 Subject: [PATCH 390/687] Namespace correction. Function belongs to the global namespace. Signed-off-by: Sacha Telgenhof --- tests/Denmark/SummerTimeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 626d009f0..fa4b3b457 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -50,10 +50,10 @@ public function __construct() unset($this->observedYears[(int) $key]); } - // In version 2022f of th tz db, a correction for 1947 was made for the summertiime + // In version 2022f of the tz db, a correction for 1947 was made for the summertiime // transition to april the 6th. // See: https://github.com/eggert/tz/blob/2022f/europe - if (1 === strcmp(intltz_get_tz_data_version(), '2022f')) { + if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { $this->deviantTransitions[1947] = '1947-04-06'; } } From c123e91f08d8696132e12d32b4ba6493b853ff91 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Dec 2022 23:06:59 +0900 Subject: [PATCH 391/687] Added intl and calendar extension for testing purposes. Signed-off-by: Sacha Telgenhof --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a5b18897d..462424a64 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -30,6 +30,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} coverage: pcov + extensions: intl-72.1, calendar - name: Get Composer Cache Directory id: composer-cache From b2c2cbb851cb9e5e6cef5f562c9f51a2e8733533 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Dec 2022 23:18:37 +0900 Subject: [PATCH 392/687] Removed ICU version for the intl extension. Signed-off-by: Sacha Telgenhof --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 462424a64..723287daa 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -30,7 +30,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} coverage: pcov - extensions: intl-72.1, calendar + extensions: intl, calendar - name: Get Composer Cache Directory id: composer-cache From d94fdf8fd595f471208fde868e7e635d09879aec Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Dec 2022 23:25:06 +0900 Subject: [PATCH 393/687] Require intl extension for development as some tests make use of this extension. Signed-off-by: Sacha Telgenhof --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 21b99f450..f7b2b71e8 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ "ext-json": "*" }, "require-dev": { + "ext-intl": "*", "friendsofphp/php-cs-fixer": "v2.19 | v3.11", "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", From ff2d683ec2480f304b55f0ba9556c544926bf69d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Dec 2022 23:42:10 +0900 Subject: [PATCH 394/687] Fixed check for dates before the establishment of Republic Day. Erroneously the year before establishment may be calculated as a holiday. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Turkey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php index 19494bc19..a2886c581 100644 --- a/src/Yasumi/Provider/Turkey.php +++ b/src/Yasumi/Provider/Turkey.php @@ -176,7 +176,7 @@ private function addVictoryDay(): void */ private function addRepublicDay(): void { - if (1923 > $this->year) { + if (1924 > $this->year) { return; } From 5cec9083de19764aa1fc382d59d159e074c896d2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 26 Dec 2022 00:15:45 +0900 Subject: [PATCH 395/687] Remove again required intl extension. Signed-off-by: Sacha Telgenhof --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index f7b2b71e8..21b99f450 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,6 @@ "ext-json": "*" }, "require-dev": { - "ext-intl": "*", "friendsofphp/php-cs-fixer": "v2.19 | v3.11", "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", From 5b06149ee3465eb7182ee7aa3328a4bed482193f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 26 Dec 2022 00:28:50 +0900 Subject: [PATCH 396/687] Added type. Signed-off-by: Sacha Telgenhof --- tests/Japan/PublicBridgeDayTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index 261481d7a..c99e49c7b 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -29,10 +29,11 @@ class PublicBridgeDayTest extends JapanBaseTestCase implements HolidayTestCase * The name of the holiday. */ public const HOLIDAY = 'bridgeDay'; + /** * @var number representing the calendar year to be tested against */ - private $year; + private int $year; /** * Initial setup of this Test Case. From 4687d76f9efa39652abc5cf748034a1b5c71f6b3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 26 Dec 2022 00:29:22 +0900 Subject: [PATCH 397/687] Removed unnecessary check. --- src/Yasumi/Provider/Argentina.php | 44 ++++++++++++++----------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index cf4a0d27c..9f8a70e09 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -99,33 +99,29 @@ private function addCarnvalHolidays(): void $carnavalMonday = clone $easter; $carnavalMondayDate = $carnavalMonday->sub(new DateInterval('P48D')); - if (false !== $carnavalMondayDate) { - $this->addHoliday(new Holiday( - 'carnavalMonday', - [ - 'en' => 'Carnival Monday', - 'es' => 'Lunes de Carnaval', - ], - $carnavalMondayDate, - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - } + $this->addHoliday(new Holiday( + 'carnavalMonday', + [ + 'en' => 'Carnival Monday', + 'es' => 'Lunes de Carnaval', + ], + $carnavalMondayDate, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); $carnavalTuesday = clone $easter; $carnavalTuesdayDate = $carnavalTuesday->sub(new DateInterval('P47D')); - if (false !== $carnavalTuesdayDate) { - $this->addHoliday(new Holiday( - 'carnavalTuesday', - [ - 'en' => 'Carnival Tuesday', - 'es' => 'Martes de Carnaval', - ], - $carnavalTuesdayDate, - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - } + $this->addHoliday(new Holiday( + 'carnavalTuesday', + [ + 'en' => 'Carnival Tuesday', + 'es' => 'Martes de Carnaval', + ], + $carnavalTuesdayDate, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); } } From 3d888ab62421042d6dcd9936dc61d6c483ad3feb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 26 Dec 2022 21:20:22 +0900 Subject: [PATCH 398/687] Added additional years that have the transition changed in tz version 2022f. Signed-off-by: Sacha Telgenhof --- tests/Denmark/SummerTimeTest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index fa4b3b457..fe05f2752 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -45,16 +45,20 @@ public function __construct() { parent::__construct(); - // no summertime defined prior to 1942 + // no summertime defined in 1942 if (false !== ($key = array_search(1942, $this->observedYears, true))) { unset($this->observedYears[(int) $key]); } - // In version 2022f of the tz db, a correction for 1947 was made for the summertiime - // transition to april the 6th. + // In version 2022f of the tz db, a correction for some years weere made for the summertime + // transitions. // See: https://github.com/eggert/tz/blob/2022f/europe if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { + $this->deviantTransitions[1916] = '1916-04-30'; + $this->deviantTransitions[1940] = '1940-04-01'; + $this->deviantTransitions[1946] = '1946-04-14'; $this->deviantTransitions[1947] = '1947-04-06'; + $this->deviantTransitions[1948] = '1948-04-18'; } } From 73971681f09a9e4e349a9613b61d16397bc10a1a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 11:57:07 +0900 Subject: [PATCH 399/687] In version 2022f of the tz db, corrections for some years weere made for the wintertime transitions. Signed-off-by: Sacha Telgenhof --- tests/Denmark/WinterTimeTest.php | 59 +++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 9 deletions(-) diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 872efcf81..cd8bbb33a 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -30,6 +30,20 @@ final class WinterTimeTest extends DaylightSavingTime /** The name of the holiday */ public const HOLIDAY = 'winterTime'; + /* List of transition dates that deviate from the known/defined rules. + * PHP derives the transition dates from the tz database which appear to + * be different for some dates */ + private array $deviantTransitions = [ + 1916 => '1916-09-30', + 1942 => '1942-11-02', + 1943 => '1943-10-04', + 1944 => '1944-10-02', + 1945 => '1945-08-15', + 1946 => '1946-09-01', + 1947 => '1947-08-10', + 1948 => '1948-08-08', + ]; + public function __construct() { parent::__construct(); @@ -38,6 +52,20 @@ public function __construct() if (false !== ($key = array_search(1940, $this->observedYears, true))) { unset($this->observedYears[(int) $key]); } + + // In version 2022f of the tz db, a correction for some years weere made for the wintertime + // transitions. See: https://github.com/eggert/tz/blob/2022f/europe + if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { + $this->swapObservation([1918, 1917, 1945, 1946, 1948, 1949]); + + $this->deviantTransitions[1917] = '1917-09-17'; + $this->deviantTransitions[1918] = '1918-09-16'; + $this->deviantTransitions[1945] = '1945-11-18'; + $this->deviantTransitions[1946] = '1946-10-07'; + $this->deviantTransitions[1947] = '1947-10-05'; + $this->deviantTransitions[1948] = '1948-10-03'; + $this->deviantTransitions[1949] = '1949-10-02'; + } } /** @@ -49,20 +77,22 @@ public function testWinterTime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - $year = $this->generateRandomYear(1980, 1995); - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new DateTime("last sunday of september $year", new DateTimeZone(self::TIMEZONE)) - ); + $year = $this->randomYearFromArray($this->observedYears); + $expectedDate = new DateTime("last sunday of september $year", new DateTimeZone(self::TIMEZONE)); + + if ($year >= 1996) { + $expectedDate = new DateTime("last sunday of october $year", new DateTimeZone(self::TIMEZONE)); + } + + if (array_key_exists($year, $this->deviantTransitions)) { + $expectedDate = new DateTime($this->deviantTransitions[$year], new DateTimeZone(self::TIMEZONE)); + } - $year = $this->generateRandomYear(1996, 2036); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - new DateTime("last sunday of october $year", new DateTimeZone(self::TIMEZONE)) + $expectedDate ); } @@ -94,4 +124,15 @@ public function testHolidayType(): void Holiday::TYPE_SEASON ); } + + /* Swaps the observation from observed to unobserved for the given years */ + private function swapObservation(array $years): void + { + foreach ($years as $y) { + $this->observedYears[] = $y; + if (false !== ($key = array_search($y, $this->unobservedYears, true))) { + unset($this->unobservedYears[(int) $key]); + } + } + } } From c8fc46e5349d98f43864f361e067403e43d3ba63 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 11:59:06 +0900 Subject: [PATCH 400/687] Added note regarding the deviated transition. Signed-off-by: Sacha Telgenhof --- tests/Denmark/SummerTimeTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index fe05f2752..087a99535 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -30,6 +30,9 @@ final class SummerTimeTest extends DaylightSavingTime /** The name of the holiday */ public const HOLIDAY = 'summerTime'; + /* List of transition dates that deviate from the known/defined rules. + * PHP derives the transition dates from the tz database which appear to + * be different for some dates */ private array $deviantTransitions = [ 1916 => '1916-05-14', 1940 => '1940-05-14', @@ -51,8 +54,7 @@ public function __construct() } // In version 2022f of the tz db, a correction for some years weere made for the summertime - // transitions. - // See: https://github.com/eggert/tz/blob/2022f/europe + // transitions. See: https://github.com/eggert/tz/blob/2022f/europe if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { $this->deviantTransitions[1916] = '1916-04-30'; $this->deviantTransitions[1940] = '1940-04-01'; From b772b89c345fd15d71d4c2cd8c5efbe69dd658c8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 13:04:33 +0900 Subject: [PATCH 401/687] Updated actions/checkout to latest v2 version. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index a05470b63..0e4667e28 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.6.0 with: fetch-depth: 1 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 7f611f124..324c24c73 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.6.0 with: fetch-depth: 1 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 723287daa..23f97c63d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.6.0 with: fetch-depth: 1 From 8b374dbdfd01b3626ed45ffe7ae812af5793b90e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 13:25:06 +0900 Subject: [PATCH 402/687] Updated actions/checkout to latest v3 version. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 0e4667e28..0c074d404 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v2.6.0 + uses: actions/checkout@v3.2.0 with: fetch-depth: 1 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 324c24c73..89a47c80d 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v2.6.0 + uses: actions/checkout@v3.2.0 with: fetch-depth: 1 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 23f97c63d..204dec4d6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v2.6.0 + uses: actions/checkout@v3.2.0 with: fetch-depth: 1 From 72462dd0d24f678aedecdc66cdd041915837b661 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 14:38:29 +0900 Subject: [PATCH 403/687] Updated actions/cache to v3. Reformatted action steps. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 14 +++++++++----- .github/workflows/static-analysis.yml | 14 +++++++++----- .github/workflows/testing.yml | 14 +++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 0c074d404..0b2163ea2 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -33,14 +33,18 @@ jobs: - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache Composer dependencies - uses: actions/cache@v2 + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- - name: Check Composer configuration run: composer validate --strict diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 89a47c80d..7fa372f16 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -33,14 +33,18 @@ jobs: - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache Composer dependencies - uses: actions/cache@v2 + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- - name: Check Composer configuration run: composer validate --strict diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 204dec4d6..7ed63773b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,14 +34,18 @@ jobs: - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache Composer dependencies - uses: actions/cache@v2 + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- - name: Check Composer configuration run: composer validate --strict From fc51d382a7e66518eb832ce437f17c00ba62481e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 14:40:24 +0900 Subject: [PATCH 404/687] Removed duplicate steps. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 5 ----- .github/workflows/static-analysis.yml | 5 ----- .github/workflows/testing.yml | 5 ----- 3 files changed, 15 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 0b2163ea2..eff66be54 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -31,11 +31,6 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: pcov - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 7fa372f16..73e2eb10c 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -31,11 +31,6 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: pcov - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7ed63773b..714ce1dc5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -32,11 +32,6 @@ jobs: coverage: pcov extensions: intl, calendar - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" From 775fc7a4b4bda76d09049f21ffa5cd1d6252e15a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 15:05:25 +0900 Subject: [PATCH 405/687] Updated PHPCS Fixer to v3.13. This version includes the global namspace import ruleset which does not import functions and classes in the global namespace by default. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- src/Yasumi/Exception/InvalidDateException.php | 4 +- src/Yasumi/Exception/InvalidYearException.php | 4 +- .../Exception/ProviderNotFoundException.php | 4 +- .../Exception/UnknownLocaleException.php | 4 +- src/Yasumi/Filters/AbstractFilter.php | 4 +- src/Yasumi/Filters/BetweenFilter.php | 12 +-- src/Yasumi/Filters/OnFilter.php | 6 +- src/Yasumi/Holiday.php | 9 +-- src/Yasumi/Provider/AbstractProvider.php | 19 ++--- src/Yasumi/Provider/Argentina.php | 26 +++---- src/Yasumi/Provider/Australia.php | 30 ++++---- .../Australia/AustralianCapitalTerritory.php | 14 ++-- .../Provider/Australia/NewSouthWales.php | 10 +-- .../Provider/Australia/NorthernTerritory.php | 10 +-- src/Yasumi/Provider/Australia/Queensland.php | 7 +- .../Australia/Queensland/Brisbane.php | 8 +- .../Provider/Australia/SouthAustralia.php | 24 +++--- src/Yasumi/Provider/Australia/Tasmania.php | 7 +- .../Australia/Tasmania/CentralNorth.php | 3 +- .../Australia/Tasmania/FlindersIsland.php | 6 +- .../Australia/Tasmania/KingIsland.php | 3 +- .../Provider/Australia/Tasmania/Northeast.php | 6 +- .../Provider/Australia/Tasmania/Northwest.php | 6 +- .../Tasmania/Northwest/CircularHead.php | 6 +- .../Provider/Australia/Tasmania/South.php | 6 +- .../Australia/Tasmania/South/Southeast.php | 3 +- src/Yasumi/Provider/Australia/Victoria.php | 12 ++- .../Provider/Australia/WesternAustralia.php | 7 +- src/Yasumi/Provider/Austria.php | 5 +- src/Yasumi/Provider/Austria/Carinthia.php | 3 +- src/Yasumi/Provider/Austria/Salzburg.php | 3 +- src/Yasumi/Provider/Austria/UpperAustria.php | 3 +- src/Yasumi/Provider/Belgium.php | 3 +- src/Yasumi/Provider/Bosnia.php | 11 ++- src/Yasumi/Provider/Brazil.php | 16 ++-- src/Yasumi/Provider/Canada.php | 21 +++-- src/Yasumi/Provider/Canada/Alberta.php | 3 +- src/Yasumi/Provider/Canada/Manitoba.php | 5 +- .../Canada/NewfoundlandAndLabrador.php | 5 +- src/Yasumi/Provider/Canada/NovaScotia.php | 5 +- .../Provider/Canada/PrinceEdwardIsland.php | 5 +- src/Yasumi/Provider/Canada/Quebec.php | 5 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 3 +- src/Yasumi/Provider/Canada/Yukon.php | 5 +- src/Yasumi/Provider/ChristianHolidays.php | 50 ++++++------ src/Yasumi/Provider/CommonHolidays.php | 22 +++--- src/Yasumi/Provider/Croatia.php | 13 ++-- src/Yasumi/Provider/CzechRepublic.php | 13 ++-- src/Yasumi/Provider/Denmark.php | 5 +- src/Yasumi/Provider/Finland.php | 7 +- src/Yasumi/Provider/France.php | 3 +- src/Yasumi/Provider/Germany.php | 3 +- src/Yasumi/Provider/Germany/Berlin.php | 3 +- src/Yasumi/Provider/Germany/Saxony.php | 3 +- src/Yasumi/Provider/Greece.php | 12 ++- src/Yasumi/Provider/Hungary.php | 7 +- src/Yasumi/Provider/Ireland.php | 15 ++-- src/Yasumi/Provider/Italy.php | 5 +- src/Yasumi/Provider/Japan.php | 75 +++++++++--------- src/Yasumi/Provider/Luxembourg.php | 5 +- src/Yasumi/Provider/Netherlands.php | 28 ++++--- src/Yasumi/Provider/NewZealand.php | 36 ++++----- src/Yasumi/Provider/Norway.php | 3 +- src/Yasumi/Provider/Poland.php | 5 +- src/Yasumi/Provider/Portugal.php | 9 +-- src/Yasumi/Provider/Romania.php | 15 ++-- src/Yasumi/Provider/Slovakia.php | 13 ++-- src/Yasumi/Provider/SouthAfrica.php | 22 +++--- src/Yasumi/Provider/SouthKorea.php | 48 ++++++------ src/Yasumi/Provider/Spain.php | 5 +- src/Yasumi/Provider/Spain/Andalusia.php | 3 +- src/Yasumi/Provider/Spain/Asturias.php | 3 +- src/Yasumi/Provider/Spain/BalearicIslands.php | 3 +- src/Yasumi/Provider/Spain/BasqueCountry.php | 3 +- src/Yasumi/Provider/Spain/CanaryIslands.php | 3 +- src/Yasumi/Provider/Spain/Cantabria.php | 3 +- src/Yasumi/Provider/Spain/CastileAndLeon.php | 3 +- .../Provider/Spain/CastillaLaMancha.php | 3 +- src/Yasumi/Provider/Spain/Catalonia.php | 3 +- src/Yasumi/Provider/Spain/Ceuta.php | 3 +- .../Provider/Spain/CommunityOfMadrid.php | 3 +- src/Yasumi/Provider/Spain/Extremadura.php | 3 +- src/Yasumi/Provider/Spain/Galicia.php | 5 +- src/Yasumi/Provider/Spain/LaRioja.php | 3 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 3 +- .../Provider/Spain/ValencianCommunity.php | 3 +- src/Yasumi/Provider/Sweden.php | 16 ++-- src/Yasumi/Provider/Switzerland.php | 12 ++- src/Yasumi/Provider/Switzerland/Fribourg.php | 3 +- src/Yasumi/Provider/Switzerland/Geneva.php | 8 +- src/Yasumi/Provider/Switzerland/Glarus.php | 3 +- src/Yasumi/Provider/Switzerland/Jura.php | 3 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 7 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 5 +- src/Yasumi/Provider/Switzerland/Ticino.php | 3 +- src/Yasumi/Provider/USA.php | 30 ++++---- src/Yasumi/Provider/UnitedKingdom.php | 30 ++++---- .../UnitedKingdom/NorthernIreland.php | 5 +- .../Provider/UnitedKingdom/Scotland.php | 12 ++- src/Yasumi/ProviderInterface.php | 5 +- src/Yasumi/Translations.php | 8 +- src/Yasumi/Yasumi.php | 30 +++----- tests/Argentina/CarnavalMondayTest.php | 12 ++- tests/Argentina/CarnavalTuesdayTest.php | 12 ++- tests/Argentina/ChristmasDayTest.php | 11 +-- tests/Argentina/EasterTest.php | 7 +- tests/Argentina/FlagDayTest.php | 11 +-- .../Argentina/GeneralJoseSanMartinDayTest.php | 11 +-- .../GeneralMartinMigueldeGuemesDayTest.php | 11 +-- tests/Argentina/GoodFridayTest.php | 10 +-- .../Argentina/ImmaculateConceptionDayTest.php | 11 +-- tests/Argentina/IndependenceDayTest.php | 11 +-- .../Argentina/InternationalWorkersDayTest.php | 11 +-- tests/Argentina/MalvinasDayTest.php | 11 +-- tests/Argentina/MayRevolutionTest.php | 11 +-- .../Argentina/NationalSovereigntyDayTest.php | 11 +-- tests/Argentina/NewYearsDayTest.php | 11 +-- tests/Argentina/RaceDayTest.php | 11 +-- tests/Argentina/RemembranceDayTest.php | 13 ++-- tests/Australia/AnzacDayTest.php | 11 +-- tests/Australia/AustraliaDayTest.php | 17 ++-- tests/Australia/AustraliaTest.php | 3 +- .../AustralianCapitalTerritoryTest.php | 3 +- .../CanberraDayTest.php | 11 +-- .../EasterSaturdayTest.php | 16 ++-- .../EasterSundayTest.php | 13 ++-- .../LabourDayTest.php | 11 +-- .../QueensBirthdayTest.php | 11 +-- .../ReconciliationDayTest.php | 11 +-- tests/Australia/BoxingDayTest.php | 13 ++-- tests/Australia/ChristmasDayTest.php | 13 ++-- tests/Australia/EasterMondayTest.php | 20 ++--- tests/Australia/GoodFridayTest.php | 16 ++-- .../NewSouthWales/BankHolidayTest.php | 11 +-- .../NewSouthWales/EasterSaturdayTest.php | 16 ++-- .../NewSouthWales/EasterSundayTest.php | 13 ++-- .../Australia/NewSouthWales/LabourDayTest.php | 11 +-- .../NewSouthWales/NewSouthWalesTest.php | 3 +- .../NewSouthWales/QueensBirthdayTest.php | 11 +-- tests/Australia/NewYearsDayTest.php | 13 ++-- .../NorthernTerritory/EasterSaturdayTest.php | 16 ++-- .../NorthernTerritory/MayDayTest.php | 11 +-- .../NorthernTerritoryTest.php | 3 +- .../NorthernTerritory/PicnicDayTest.php | 11 +-- .../NorthernTerritory/QueensBirthdayTest.php | 11 +-- .../Queensland/Brisbane/BrisbaneTest.php | 3 +- .../Queensland/Brisbane/PeoplesDayTest.php | 11 +-- tests/Australia/Queensland/LabourDayTest.php | 11 +-- .../Queensland/QueensBirthdayTest.php | 11 +-- tests/Australia/Queensland/QueenslandTest.php | 3 +- .../SouthAustralia/AdelaideCupDayTest.php | 11 +-- .../SouthAustralia/ChristmasDayTest.php | 13 ++-- .../SouthAustralia/EasterSaturdayTest.php | 16 ++-- .../SouthAustralia/LabourDayTest.php | 11 +-- .../SouthAustralia/ProclamationDayTest.php | 11 +-- .../SouthAustralia/QueensBirthdayTest.php | 11 +-- .../SouthAustralia/SouthAustraliaTest.php | 3 +- .../CentralNorth/CentralNorthTest.php | 3 +- .../CentralNorth/DevonportShowTest.php | 11 +-- tests/Australia/Tasmania/EightHourDayTest.php | 11 +-- .../FlindersIsland/FlindersIslandShowTest.php | 11 +-- .../FlindersIsland/FlindersIslandTest.php | 3 +- .../KingIsland/KingIslandShowTest.php | 11 +-- .../Tasmania/KingIsland/KingIslandTest.php | 3 +- .../Tasmania/Northeast/LauncestonShowTest.php | 11 +-- .../Tasmania/Northeast/NortheastTest.php | 3 +- .../Tasmania/Northwest/BurnieShowTest.php | 11 +-- .../Northwest/CircularHead/AGFESTTest.php | 11 +-- .../Tasmania/Northwest/NorthwestTest.php | 3 +- .../Australia/Tasmania/QueensBirthdayTest.php | 11 +-- .../Australia/Tasmania/RecreationDayTest.php | 11 +-- .../Tasmania/South/HobartShowTest.php | 11 +-- tests/Australia/Tasmania/South/SouthTest.php | 3 +- .../South/Southeast/HobartRegattaTest.php | 11 +-- tests/Australia/Tasmania/TasmaniaTest.php | 3 +- .../Victoria/AFLGrandFinalFridayTest.php | 11 +-- .../Australia/Victoria/EasterSaturdayTest.php | 16 ++-- tests/Australia/Victoria/EasterSundayTest.php | 13 ++-- tests/Australia/Victoria/LabourDayTest.php | 11 +-- .../Victoria/MelbourneCupDayTest.php | 11 +-- .../Australia/Victoria/QueensBirthdayTest.php | 11 +-- tests/Australia/Victoria/VictoriaTest.php | 3 +- .../WesternAustralia/LabourDayTest.php | 11 +-- .../WesternAustralia/QueensBirthdayTest.php | 11 +-- .../WesternAustraliaDayTest.php | 11 +-- .../WesternAustralia/WesternAustraliaTest.php | 3 +- tests/Austria/AllSaintsDayTest.php | 12 ++- tests/Austria/AscensionDayTest.php | 11 +-- tests/Austria/AssumptionOfMaryTest.php | 12 ++- tests/Austria/AustriaTest.php | 3 +- tests/Austria/Burgenland/BurgenlandTest.php | 3 +- tests/Austria/Burgenland/stMartinsDayTest.php | 12 ++- tests/Austria/Carinthia/CarinthiaTest.php | 3 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 17 ++-- tests/Austria/Carinthia/StJosephsDayTest.php | 12 ++- tests/Austria/ChristmasTest.php | 12 ++- tests/Austria/CorpusChristiTest.php | 10 +-- tests/Austria/EasterMondayTest.php | 11 +-- tests/Austria/EasterTest.php | 11 +-- tests/Austria/EpiphanyTest.php | 12 ++- tests/Austria/ImmaculateConceptionTest.php | 12 ++- tests/Austria/InternationalWorkersDayTest.php | 12 ++- .../Austria/LowerAustria/LowerAustriaTest.php | 3 +- .../LowerAustria/StLeopoldsDayTest.php | 17 ++-- tests/Austria/NationalDayTest.php | 13 ++-- tests/Austria/NewYearsDayTest.php | 12 ++- tests/Austria/PentecostMondayTest.php | 11 +-- tests/Austria/PentecostTest.php | 11 +-- tests/Austria/Salzburg/SalzburgTest.php | 3 +- tests/Austria/Salzburg/StRupertsDayTest.php | 12 ++- tests/Austria/SecondChristmasDayTest.php | 12 ++- tests/Austria/Styria/StJosephsDayTest.php | 12 ++- tests/Austria/Styria/StyriaTest.php | 3 +- tests/Austria/Tyrol/StJosephsDayTest.php | 12 ++- tests/Austria/Tyrol/TyrolTest.php | 3 +- .../UpperAustria/StFloriansDayTest.php | 12 ++- .../Austria/UpperAustria/UpperAustriaTest.php | 3 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 17 ++-- tests/Austria/Vienna/ViennaTest.php | 3 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 12 ++- tests/Austria/Vorarlberg/VorarlbergTest.php | 3 +- tests/Base/HolidayBetweenFilterTest.php | 77 +++++++++---------- tests/Base/HolidayOnFilterTest.php | 27 +++---- tests/Base/HolidayTest.php | 66 ++++++++-------- tests/Base/SubstituteHolidayTest.php | 44 +++++------ tests/Base/TranslationsTest.php | 3 +- tests/Base/YasumiTest.php | 59 +++++++------- tests/Base/YasumiWorkdayTest.php | 40 +++++----- tests/Belgium/AllSaintsDayTest.php | 12 ++- tests/Belgium/ArmisticeDayTest.php | 12 ++- tests/Belgium/AscensionDayTest.php | 11 +-- tests/Belgium/AssumptionOfMaryTest.php | 12 ++- tests/Belgium/BelgiumTest.php | 3 +- tests/Belgium/ChristmasTest.php | 12 ++- tests/Belgium/EasterMondayTest.php | 11 +-- tests/Belgium/EasterTest.php | 11 +-- tests/Belgium/InternationalWorkersDayTest.php | 12 ++- tests/Belgium/NationalDayTest.php | 12 ++- tests/Belgium/NewYearsDayTest.php | 12 ++- tests/Belgium/PentecostTest.php | 11 +-- tests/Belgium/pentecostMondayTest.php | 11 +-- tests/Bosnia/BosniaTest.php | 3 +- tests/Bosnia/ChristmasDayTest.php | 12 ++- tests/Bosnia/DayAfterNewYearsDay.php | 12 ++- tests/Bosnia/EasterTest.php | 11 +-- tests/Bosnia/IndependenceDayTest.php | 13 ++-- tests/Bosnia/InternationalWorkersDayTest.php | 12 ++- tests/Bosnia/NewYearsDayTest.php | 12 ++- tests/Bosnia/OrthodoxChristmasDay.php | 7 +- tests/Bosnia/SecondLabourDay.php | 12 ++- tests/Bosnia/StatehoodDayTest.php | 13 ++-- tests/Brazil/AllSoulsDayTest.php | 13 ++-- tests/Brazil/AshWednesdayTest.php | 11 +-- tests/Brazil/BrazilTest.php | 3 +- tests/Brazil/CarnavalMondayTest.php | 12 ++- tests/Brazil/CarnavalTuesdayTest.php | 12 ++- tests/Brazil/ChristmasDayTest.php | 11 +-- tests/Brazil/CorpusChristiTest.php | 10 +-- tests/Brazil/EasterTest.php | 7 +- tests/Brazil/GoodFridayTest.php | 10 +-- tests/Brazil/IndependenceDayTest.php | 13 ++-- tests/Brazil/InternationalWorkersDayTest.php | 11 +-- tests/Brazil/NewYearsDayTest.php | 11 +-- tests/Brazil/OurLadyOfAparecidaDayTest.php | 13 ++-- .../Brazil/ProclamationOfRepublicDayTest.php | 13 ++-- tests/Brazil/TiradentesDayTest.php | 13 ++-- tests/Canada/Alberta/AlbertaTest.php | 3 +- .../BritishColumbia/BritishColumbiaTest.php | 3 +- tests/Canada/CanadaDayTest.php | 15 ++-- tests/Canada/CanadaTest.php | 3 +- tests/Canada/ChristmasDayTest.php | 11 +-- tests/Canada/LabourDayTest.php | 13 ++-- tests/Canada/Manitoba/ManitobaTest.php | 3 +- .../Canada/NewBrunswick/NewBrunswickTest.php | 3 +- tests/Canada/NewYearsDayTest.php | 11 +-- .../NewfoundlandAndLabradorTest.php | 3 +- .../NorthwestTerritoriesTest.php | 3 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 3 +- tests/Canada/Nunavut/NunavutTest.php | 3 +- tests/Canada/Ontario/OntarioTest.php | 3 +- .../PrinceEdwardIslandTest.php | 3 +- tests/Canada/Quebec/QuebecTest.php | 3 +- tests/Canada/RemembranceDayTest.php | 13 ++-- .../Canada/Saskatchewan/SaskatchewanTest.php | 3 +- tests/Canada/ThanksgivingDayTest.php | 13 ++-- .../Canada/TruthAndReconciliationDayTest.php | 13 ++-- tests/Canada/Yukon/YukonTest.php | 3 +- tests/Croatia/AllSaintsDayTest.php | 12 ++- tests/Croatia/AntifascistStruggleDayTest.php | 13 ++-- tests/Croatia/AssumptionOfMaryTest.php | 12 ++- tests/Croatia/ChristmasDayTest.php | 12 ++- tests/Croatia/CorpusChristiTest.php | 10 +-- tests/Croatia/CroatiaTest.php | 3 +- tests/Croatia/EasterMondayTest.php | 11 +-- tests/Croatia/EasterTest.php | 11 +-- tests/Croatia/EpiphanyTest.php | 12 ++- tests/Croatia/HomelandThanksgivingDayTest.php | 13 ++-- tests/Croatia/IndependenceDayTest.php | 15 ++-- tests/Croatia/InternationalWorkersDayTest.php | 12 ++- tests/Croatia/NewYearsDayTest.php | 12 ++- tests/Croatia/RemembranceDayTest.php | 13 ++-- tests/Croatia/StStephensDayTest.php | 12 ++- tests/Croatia/StatehoodDayTest.php | 15 ++-- tests/CzechRepublic/ChristmasDayTest.php | 12 ++- tests/CzechRepublic/ChristmasEveTest.php | 12 ++- tests/CzechRepublic/CzechRepublicTest.php | 3 +- tests/CzechRepublic/CzechStateHoodDayTest.php | 12 ++- tests/CzechRepublic/EasterMondayTest.php | 11 +-- tests/CzechRepublic/GoodFridayTest.php | 11 +-- .../IndependentCzechoslovakStateDayTest.php | 12 ++- .../InternationalWorkersDayTest.php | 12 ++- tests/CzechRepublic/JanHusDayTest.php | 12 ++- tests/CzechRepublic/NewYearsDayTest.php | 12 ++- .../RenewalOfIndependentCzechStateDayTest.php | 12 ++- .../SaintsCyrilAndMethodiusDayTest.php | 12 ++- .../CzechRepublic/SecondChristmasDayTest.php | 12 ++- .../StruggleForFreedomAndDemocracyDayTest.php | 12 ++- .../CzechRepublic/VictoryInEuropeDayTest.php | 12 ++- tests/Denmark/AscensionDayTest.php | 11 +-- tests/Denmark/ChristmasDayTest.php | 12 ++- tests/Denmark/ChristmasEveTest.php | 12 ++- tests/Denmark/ConstitutionDayTest.php | 13 ++-- tests/Denmark/DenmarkTest.php | 3 +- tests/Denmark/EasterMondayTest.php | 11 +-- tests/Denmark/EasterTest.php | 11 +-- tests/Denmark/GoodFridayTest.php | 11 +-- tests/Denmark/GreatPrayerDayTest.php | 13 ++-- tests/Denmark/InternationalWorkersDayTest.php | 12 ++- tests/Denmark/MaundyThursdayTest.php | 11 +-- tests/Denmark/NewYearsDayTest.php | 12 ++- tests/Denmark/NewYearsEveTest.php | 12 ++- tests/Denmark/PentecostMondayTest.php | 11 +-- tests/Denmark/PentecostTest.php | 11 +-- tests/Denmark/SecondChristmasDayTest.php | 12 ++- tests/Denmark/SummerTimeTest.php | 15 ++-- tests/Denmark/WinterTimeTest.php | 15 ++-- tests/Estonia/ChristmasDayTest.php | 7 +- tests/Estonia/ChristmasEveDayTest.php | 7 +- tests/Estonia/EasterDayTest.php | 13 ++-- tests/Estonia/EstoniaTest.php | 3 +- tests/Estonia/GoodFridayDayTest.php | 13 ++-- tests/Estonia/IndependenceDayTest.php | 13 ++-- tests/Estonia/InternationalWorkersDayTest.php | 7 +- tests/Estonia/NewYearsDayTest.php | 7 +- tests/Estonia/PentecostTest.php | 13 ++-- .../RestorationOfIndependenceDayTest.php | 13 ++-- tests/Estonia/SecondChristmasDayTest.php | 7 +- tests/Estonia/StJohnsDayTest.php | 7 +- tests/Estonia/VictoryDayTest.php | 13 ++-- tests/Finland/AllSaintsDayTest.php | 18 ++--- tests/Finland/AscensionDayTest.php | 11 +-- tests/Finland/ChristmasDayTest.php | 12 ++- tests/Finland/EasterMondayTest.php | 11 +-- tests/Finland/EasterTest.php | 11 +-- tests/Finland/EpiphanyTest.php | 12 ++- tests/Finland/FinlandTest.php | 3 +- tests/Finland/GoodFridayTest.php | 11 +-- tests/Finland/IndependenceDayTest.php | 13 ++-- tests/Finland/InternationalWorkersDayTest.php | 12 ++- tests/Finland/NewYearsDayTest.php | 12 ++- tests/Finland/PentecostTest.php | 11 +-- tests/Finland/SecondChristmasDayTest.php | 12 ++- tests/Finland/stJohnsDayTest.php | 13 ++-- tests/France/AllSaintsDayTest.php | 12 ++- tests/France/ArmisticeDayTest.php | 13 ++-- tests/France/AscensionDayTest.php | 11 +-- tests/France/AssumptionOfMaryTest.php | 12 ++- tests/France/BasRhin/BasRhinTest.php | 3 +- tests/France/BasRhin/GoodFridayTest.php | 11 +-- tests/France/BasRhin/stStephensDayTest.php | 12 ++- tests/France/BastilleDayTest.php | 13 ++-- tests/France/ChristmasDayTest.php | 12 ++- tests/France/EasterMondayTest.php | 11 +-- tests/France/FranceTest.php | 3 +- tests/France/HautRhin/GoodFridayTest.php | 11 +-- tests/France/HautRhin/HautRhinTest.php | 3 +- tests/France/HautRhin/stStephensDayTest.php | 12 ++- tests/France/InternationalWorkersDayTest.php | 12 ++- tests/France/Moselle/GoodFridayTest.php | 11 +-- tests/France/Moselle/MoselleTest.php | 3 +- tests/France/Moselle/stStephensDayTest.php | 12 ++- tests/France/NewYearsDayTest.php | 12 ++- tests/France/PentecostMondayTest.php | 11 +-- tests/France/VictoryInEuropeDayTest.php | 13 ++-- tests/Georgia/EasterTest.php | 11 +-- tests/Georgia/GeorgiaTest.php | 3 +- tests/Georgia/IndependenceDayTest.php | 7 +- tests/Georgia/InternationalWomensDayTest.php | 7 +- tests/Georgia/MtskhetobaDayTest.php | 7 +- tests/Georgia/NewYearsDayTest.php | 7 +- tests/Georgia/OrthodoxChristmasDayTest.php | 7 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 7 +- tests/Georgia/SecondNewYearDayTest.php | 7 +- tests/Georgia/StAndrewsDayTest.php | 7 +- tests/Georgia/StGeorgesDayTest.php | 7 +- tests/Georgia/StMarysDayTest.php | 7 +- tests/Georgia/UnityDayTest.php | 7 +- tests/Georgia/VictoryDayTest.php | 7 +- tests/Germany/AscensionDayTest.php | 11 +-- .../BadenWurttemberg/AllSaintsDayTest.php | 12 ++- .../BadenWurttemberg/BadenWurttembergTest.php | 3 +- .../BadenWurttemberg/CorpusChristiTest.php | 7 +- .../Germany/BadenWurttemberg/EpiphanyTest.php | 12 ++- tests/Germany/Bavaria/AllSaintsDayTest.php | 12 ++- tests/Germany/Bavaria/BavariaTest.php | 3 +- tests/Germany/Bavaria/CorpusChristiTest.php | 7 +- tests/Germany/Bavaria/EpiphanyTest.php | 12 ++- tests/Germany/Berlin/BerlinTest.php | 3 +- .../Berlin/DayOfLiberation2020Test.php | 11 +-- .../Berlin/InternationalWomensDay2019Test.php | 15 ++-- tests/Germany/Brandenburg/BrandenburgTest.php | 3 +- .../Brandenburg/ReformationDayTest.php | 17 ++-- tests/Germany/Bremen/BremenTest.php | 3 +- tests/Germany/Bremen/ReformationDayTest.php | 17 ++-- tests/Germany/ChristmasTest.php | 12 ++- tests/Germany/EasterMondayTest.php | 11 +-- tests/Germany/GermanUnityDayTest.php | 13 ++-- tests/Germany/GermanyTest.php | 3 +- tests/Germany/GoodFridayTest.php | 11 +-- .../Germany/Hamburg/DayOfReformationTest.php | 17 ++-- tests/Germany/Hamburg/HamburgTest.php | 3 +- tests/Germany/Hesse/CorpusChristiTest.php | 7 +- tests/Germany/Hesse/HesseTest.php | 3 +- tests/Germany/InternationalWorkersDayTest.php | 12 ++- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 3 +- .../LowerSaxony/ReformationDayTest.php | 17 ++-- .../MecklenburgWesternPomeraniaTest.php | 3 +- .../ReformationDayTest.php | 13 ++-- tests/Germany/NewYearsDayTest.php | 12 ++- tests/Germany/NewYearsEveTest.php | 12 ++- .../NorthRhineWestphalia/AllSaintsDayTest.php | 12 ++- .../CorpusChristiTest.php | 7 +- .../NorthRhineWestphaliaTest.php | 3 +- tests/Germany/PentecostMondayTest.php | 11 +-- tests/Germany/PentecostTest.php | 11 +-- tests/Germany/ReformationDay2017Test.php | 15 ++-- .../RhinelandPalatinate/AllSaintsDayTest.php | 12 ++- .../RhinelandPalatinate/CorpusChristiTest.php | 7 +- .../RhinelandPalatinateTest.php | 3 +- tests/Germany/Saarland/AllSaintsDayTest.php | 12 ++- .../Germany/Saarland/AssumptionOfMaryTest.php | 12 ++- tests/Germany/Saarland/CorpusChristiTest.php | 7 +- tests/Germany/Saarland/SaarlandTest.php | 3 +- tests/Germany/Saxony/ReformationDayTest.php | 17 ++-- .../Saxony/RepentanceAndPrayerDayTest.php | 13 ++-- tests/Germany/Saxony/SaxonyTest.php | 3 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 12 ++- .../SaxonyAnhalt/ReformationDayTest.php | 17 ++-- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 3 +- .../SchleswigHolstein/ReformationDayTest.php | 17 ++-- .../SchleswigHolsteinTest.php | 3 +- tests/Germany/SecondChristmasDayTest.php | 12 ++- .../Germany/Thuringia/ReformationDayTest.php | 17 ++-- tests/Germany/Thuringia/ThuringiaTest.php | 3 +- .../Thuringia/WorldChildrensDayTest.php | 17 ++-- tests/Greece/AnnunciationTest.php | 12 ++- tests/Greece/AscensionDayTest.php | 11 +-- tests/Greece/AssumptionOfMaryTest.php | 12 ++- tests/Greece/ChristmasDayTest.php | 12 ++- tests/Greece/CleanMondayTest.php | 11 +-- tests/Greece/EasterMondayTest.php | 11 +-- tests/Greece/EasterTest.php | 11 +-- tests/Greece/EpiphanyTest.php | 12 ++- tests/Greece/GreeceTest.php | 3 +- tests/Greece/IndepencenceDayTest.php | 13 ++-- tests/Greece/InternationalWorkersDayTest.php | 12 ++- tests/Greece/NewYearsDayTest.php | 12 ++- tests/Greece/OhiDayTest.php | 13 ++-- tests/Greece/PentecostMondayTest.php | 11 +-- tests/Greece/PentecostTest.php | 11 +-- tests/Greece/PolytechnioTest.php | 13 ++-- tests/Greece/ThreeHolyHierarchsTest.php | 12 ++- tests/Greece/goodFridayTest.php | 11 +-- tests/Hungary/AllSaintsDayTest.php | 12 ++- tests/Hungary/ChristmasTest.php | 12 ++- tests/Hungary/EasterMondayTest.php | 11 +-- tests/Hungary/EasterTest.php | 11 +-- tests/Hungary/HungaryTest.php | 3 +- tests/Hungary/InternationalWorkersDayTest.php | 12 ++- tests/Hungary/MemorialDay1848Test.php | 13 ++-- tests/Hungary/MemorialDay1956Test.php | 13 ++-- tests/Hungary/NewYearsDayTest.php | 12 ++- tests/Hungary/PentecostMondayTest.php | 11 +-- tests/Hungary/PentecostTest.php | 11 +-- tests/Hungary/SecondChristmasDayTest.php | 12 ++- tests/Hungary/StateFoundationDayTest.php | 13 ++-- tests/Ireland/AugustHolidayTest.php | 15 ++-- tests/Ireland/ChristmasDayTest.php | 15 ++-- tests/Ireland/EasterMondayTest.php | 16 ++-- tests/Ireland/EasterTest.php | 13 ++-- tests/Ireland/GoodFridayTest.php | 16 ++-- tests/Ireland/IrelandTest.php | 3 +- tests/Ireland/JuneHolidayTest.php | 17 ++-- tests/Ireland/MayDayTest.php | 17 ++-- tests/Ireland/NewYearsDayTest.php | 17 ++-- tests/Ireland/OctoberHolidayTest.php | 17 ++-- tests/Ireland/PentecostTest.php | 16 ++-- tests/Ireland/StPatricksDayTest.php | 17 ++-- tests/Ireland/StStephensDayTest.php | 15 ++-- tests/Ireland/pentecostMondayTest.php | 18 ++--- tests/Italy/AllSaintsDayTest.php | 12 ++- tests/Italy/AssumptionOfMaryTest.php | 12 ++- tests/Italy/ChristmasTest.php | 12 ++- tests/Italy/EasterMondayTest.php | 11 +-- tests/Italy/EasterTest.php | 11 +-- tests/Italy/EpiphanyTest.php | 12 ++- tests/Italy/ImmaculateConceptionTest.php | 12 ++- tests/Italy/InternationalWorkersDayTest.php | 12 ++- tests/Italy/ItalyTest.php | 3 +- tests/Italy/LiberationDayTest.php | 13 ++-- tests/Italy/NewYearsDayTest.php | 12 ++- tests/Italy/RepublicDayTest.php | 13 ++-- tests/Italy/stStephensDayTest.php | 12 ++- tests/Japan/AutumnalEquinoxDayTest.php | 15 ++-- tests/Japan/ChildrensDayTest.php | 17 ++-- tests/Japan/ComingOfAgeDayTest.php | 17 ++-- tests/Japan/ConstitutionMemorialDayTest.php | 17 ++-- tests/Japan/CoronationDayTest.php | 11 +-- tests/Japan/CultureDayTest.php | 17 ++-- tests/Japan/EmperorsBirthdayTest.php | 25 +++--- .../EnthronementProclamationCeremonyTest.php | 11 +-- tests/Japan/GreeneryDayTest.php | 25 +++--- tests/Japan/JapanTest.php | 3 +- tests/Japan/LabourThanksgivingDayTest.php | 17 ++-- tests/Japan/MarineDayTest.php | 25 +++--- tests/Japan/MountainDayTest.php | 25 +++--- tests/Japan/NationalFoundationDayTest.php | 17 ++-- tests/Japan/NewYearsDayTest.php | 17 ++-- tests/Japan/PublicBridgeDayTest.php | 9 +-- tests/Japan/RespectForTheAgedDayTest.php | 21 +++-- tests/Japan/ShowaDayTest.php | 17 ++-- tests/Japan/SportsDayTest.php | 31 ++++---- tests/Japan/VernalEquinoxDayTest.php | 15 ++-- tests/Latvia/ChristmasDayTest.php | 7 +- tests/Latvia/ChristmasEveDayTest.php | 7 +- tests/Latvia/EasterDayTest.php | 13 ++-- tests/Latvia/EasterMondayDayTest.php | 13 ++-- tests/Latvia/GoodFridayDayTest.php | 13 ++-- tests/Latvia/InternationalWorkersDayTest.php | 7 +- tests/Latvia/LatviaTest.php | 3 +- tests/Latvia/MidsummerEveDayTest.php | 7 +- tests/Latvia/NewYearsDayTest.php | 7 +- tests/Latvia/NewYearsEveDayTest.php | 7 +- ...oclamationOfTheRepublicOfLatviaDayTest.php | 15 ++-- .../RestorationOfIndependenceDayTest.php | 15 ++-- tests/Latvia/SecondChristmasDayTest.php | 7 +- tests/Latvia/StJohnsDayTest.php | 7 +- tests/Lithuania/AllSaintsDayTest.php | 7 +- tests/Lithuania/AllSoulsDayTest.php | 13 ++-- tests/Lithuania/AssumptionOfMaryDayTest.php | 7 +- tests/Lithuania/ChristmasDayTest.php | 7 +- tests/Lithuania/ChristmasEveDayTest.php | 7 +- tests/Lithuania/EasterDayTest.php | 13 ++-- tests/Lithuania/EasterMondayDayTest.php | 13 ++-- .../Lithuania/InternationalWorkersDayTest.php | 7 +- tests/Lithuania/LithuaniaTest.php | 3 +- tests/Lithuania/NewYearsDayTest.php | 7 +- ...rationOfIndependenceOfLithuaniaDayTest.php | 13 ++-- ...estorationOfTheStateOfLithuaniaDayTest.php | 13 ++-- tests/Lithuania/SecondChristmasDayTest.php | 7 +- tests/Lithuania/StJohnsDayTest.php | 7 +- tests/Lithuania/StatehoodDayTest.php | 13 ++-- tests/Luxembourg/AllSaintsDayTest.php | 12 ++- tests/Luxembourg/AscensionDayTest.php | 11 +-- tests/Luxembourg/AssumptionOfMaryTest.php | 12 ++- tests/Luxembourg/ChristmasDayTest.php | 12 ++- tests/Luxembourg/EasterMondayTest.php | 11 +-- tests/Luxembourg/EuropeDayTest.php | 13 ++-- .../InternationalWorkersDayTest.php | 12 ++- tests/Luxembourg/LuxembourgTest.php | 3 +- tests/Luxembourg/NationalDayTest.php | 12 ++- tests/Luxembourg/NewYearsDayTest.php | 12 ++- tests/Luxembourg/PentecostMondayTest.php | 11 +-- tests/Luxembourg/SecondChristmasDayTest.php | 12 ++- tests/Netherlands/AscensionDayTest.php | 11 +-- tests/Netherlands/AshWednesdayTest.php | 11 +-- tests/Netherlands/ChristmasDayTest.php | 12 ++- tests/Netherlands/CommemorationDayTest.php | 13 ++-- tests/Netherlands/EasterMondayTest.php | 11 +-- tests/Netherlands/EasterTest.php | 11 +-- tests/Netherlands/EpiphanyTest.php | 12 ++- tests/Netherlands/FathersDayTest.php | 11 +-- tests/Netherlands/GoodFridayTest.php | 11 +-- tests/Netherlands/HalloweenTest.php | 12 ++- .../InternationalWorkersDayTest.php | 12 ++- tests/Netherlands/KingsDayTest.php | 17 ++-- tests/Netherlands/LiberationDayTest.php | 13 ++-- tests/Netherlands/MothersDayTest.php | 11 +-- tests/Netherlands/NetherlandsTest.php | 3 +- tests/Netherlands/NewYearsDayTest.php | 12 ++- tests/Netherlands/PentecostTest.php | 11 +-- tests/Netherlands/QueensDayTest.php | 31 ++++---- tests/Netherlands/SummertimeTest.php | 13 ++-- tests/Netherlands/ValentinesDayTest.php | 12 ++- tests/Netherlands/WintertimeTest.php | 13 ++-- tests/Netherlands/WorldAnimalDayTest.php | 13 ++-- tests/Netherlands/carnivalDayTest.php | 11 +-- tests/Netherlands/pentecostMondayTest.php | 11 +-- tests/Netherlands/princesDayTest.php | 11 +-- tests/Netherlands/secondCarnivalDay.php | 25 +++--- tests/Netherlands/secondChristmasdayTest.php | 12 ++- tests/Netherlands/stMartinsDayTest.php | 12 ++- tests/Netherlands/stNicholasDayTest.php | 12 ++- tests/Netherlands/thirdCarnivalDay.php | 25 +++--- tests/NewZealand/AnzacDayTest.php | 15 ++-- tests/NewZealand/BoxingDayTest.php | 18 ++--- tests/NewZealand/ChristmasDayTest.php | 18 ++--- tests/NewZealand/DayAfterNewYearsDayTest.php | 20 ++--- tests/NewZealand/EasterMondayTest.php | 16 ++-- tests/NewZealand/GoodFridayTest.php | 16 ++-- tests/NewZealand/LabourDayTest.php | 17 ++-- tests/NewZealand/NewYearsDayTest.php | 20 ++--- tests/NewZealand/NewZealandTest.php | 3 +- tests/NewZealand/QueensBirthdayTest.php | 15 ++-- tests/NewZealand/WaitangiDayTest.php | 15 ++-- tests/Norway/AscensionDayTest.php | 11 +-- tests/Norway/ChristmasDayTest.php | 12 ++- tests/Norway/ConstitutionDayTest.php | 13 ++-- tests/Norway/EasterMondayTest.php | 11 +-- tests/Norway/EasterTest.php | 11 +-- tests/Norway/GoodFridayTest.php | 11 +-- tests/Norway/InternationalWorkersDayTest.php | 12 ++- tests/Norway/MaundyThursdayTest.php | 11 +-- tests/Norway/NewYearsDayTest.php | 12 ++- tests/Norway/NorwayTest.php | 3 +- tests/Norway/PentecostMondayTest.php | 11 +-- tests/Norway/PentecostTest.php | 11 +-- tests/Norway/SecondChristmasDayTest.php | 12 ++- tests/Poland/AllSaintsDayTest.php | 12 ++- tests/Poland/AssumptionOfMaryTest.php | 12 ++- tests/Poland/ChristmasTest.php | 12 ++- tests/Poland/ConstitutionDayTest.php | 13 ++-- tests/Poland/CorpusChristiTest.php | 11 +-- tests/Poland/EasterMondayTest.php | 11 +-- tests/Poland/EasterTest.php | 11 +-- tests/Poland/EpiphanyTest.php | 12 ++- tests/Poland/IndependenceDayTest.php | 13 ++-- tests/Poland/InternationalWorkersDayTest.php | 12 ++- tests/Poland/NewYearsDayTest.php | 12 ++- tests/Poland/PentecostTest.php | 11 +-- tests/Poland/PolandTest.php | 3 +- tests/Poland/SecondChristmasDayTest.php | 12 ++- tests/Portugal/AllSaintsDayTest.php | 15 ++-- tests/Portugal/AssumptionOfMaryTest.php | 12 ++- tests/Portugal/CarnationRevolutionDayTest.php | 13 ++-- tests/Portugal/ChristmasTest.php | 12 ++- tests/Portugal/CorpusChristiTest.php | 13 ++-- tests/Portugal/EasterTest.php | 11 +-- tests/Portugal/GoodFridayTest.php | 11 +-- tests/Portugal/ImmaculateConceptionTest.php | 12 ++- .../Portugal/InternationalWorkersDayTest.php | 12 ++- tests/Portugal/NewYearsDayTest.php | 12 ++- tests/Portugal/PortugalDayTest.php | 17 ++-- tests/Portugal/PortugalTest.php | 3 +- tests/Portugal/PortugueseRepublicDayTest.php | 27 +++---- .../RestorationOfIndependenceTest.php | 25 +++--- tests/Randomizer.php | 64 ++++++++------- tests/Romania/AssumptionOfMaryTest.php | 13 ++-- tests/Romania/ChildrensDayTest.php | 13 ++-- tests/Romania/ChristmasDayTest.php | 12 ++- tests/Romania/ConstantinBrancusiDayTest.php | 13 ++-- tests/Romania/DayAfterNewYearsDayTest.php | 12 ++- tests/Romania/EasterMondayTest.php | 11 +-- tests/Romania/EasterTest.php | 11 +-- tests/Romania/InternationalWorkersDayTest.php | 12 ++- tests/Romania/NationalDayTest.php | 21 +++-- tests/Romania/NewYearsDayTest.php | 12 ++- tests/Romania/PentecostMondayTest.php | 13 ++-- tests/Romania/PentecostTest.php | 13 ++-- tests/Romania/RomaniaTest.php | 3 +- tests/Romania/SecondChristmasDayTest.php | 12 ++- tests/Romania/StAndrewsDayTest.php | 13 ++-- tests/Romania/UnitedPrincipalitiesDayTest.php | 13 ++-- .../Russia/DefenceOfTheFatherlandDayTest.php | 13 ++-- tests/Russia/InternationalWomensDayTest.php | 7 +- tests/Russia/NewYearHolidaysDay2Test.php | 7 +- tests/Russia/NewYearHolidaysDay3Test.php | 7 +- tests/Russia/NewYearHolidaysDay4Test.php | 7 +- tests/Russia/NewYearHolidaysDay5Test.php | 7 +- tests/Russia/NewYearHolidaysDay6Test.php | 7 +- tests/Russia/NewYearHolidaysDay8Test.php | 7 +- tests/Russia/NewYearsDayTest.php | 7 +- tests/Russia/OrthodoxChristmasDayTest.php | 7 +- tests/Russia/RussiaDayTest.php | 13 ++-- tests/Russia/RussiaTest.php | 3 +- tests/Russia/SpringAndLabourDayTest.php | 7 +- tests/Russia/UnityDayTest.php | 13 ++-- tests/Russia/VictoryDayTest.php | 7 +- tests/Slovakia/AllSaintsDayTest.php | 12 ++- tests/Slovakia/ChristmasDayTest.php | 12 ++- tests/Slovakia/ChristmasEveTest.php | 12 ++- tests/Slovakia/EasterMondayTest.php | 29 ++++--- tests/Slovakia/EpiphanyTest.php | 12 ++- tests/Slovakia/GoodFridayTest.php | 29 ++++--- .../Slovakia/InternationalWorkersDayTest.php | 12 ++- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 12 ++- .../SaintsCyrilAndMethodiusDayTest.php | 12 ++- tests/Slovakia/SecondChristmasDayTest.php | 12 ++- tests/Slovakia/SlovakConstitutionDayTest.php | 12 ++- tests/Slovakia/SlovakIndependeceDayTest.php | 12 ++- .../SlovakNationalUprisingDayTest.php | 12 ++- tests/Slovakia/SlovakiaTest.php | 3 +- .../StruggleForFreedomAndDemocracyDayTest.php | 12 ++- tests/Slovakia/VictoryInEuropeDayTest.php | 12 ++- tests/SouthAfrica/ChristmasDayTest.php | 20 ++--- tests/SouthAfrica/FamilyDayTest.php | 18 ++--- tests/SouthAfrica/FreedomDayTest.php | 20 ++--- tests/SouthAfrica/GoodFridayTest.php | 18 ++--- tests/SouthAfrica/HeritageDayTest.php | 20 ++--- tests/SouthAfrica/HumanRightsDayTest.php | 20 ++--- .../MunicipalElections2016DayTest.php | 15 ++-- tests/SouthAfrica/NationalWomensDayTest.php | 20 ++--- tests/SouthAfrica/NewYearsDayTest.php | 20 ++--- tests/SouthAfrica/ReconciliationDayTest.php | 20 ++--- tests/SouthAfrica/SecondChristmasDayTest.php | 20 ++--- tests/SouthAfrica/SouthAfricaTest.php | 3 +- .../SubstituteDayOfGoodwillTest.php | 15 ++-- tests/SouthAfrica/WorkersDayTest.php | 20 ++--- tests/SouthAfrica/YouthDayTest.php | 20 ++--- tests/SouthKorea/ArborDayTest.php | 15 ++-- tests/SouthKorea/ArmedForcesDayTest.php | 15 ++-- tests/SouthKorea/BuddhasBirthdayTest.php | 13 ++-- tests/SouthKorea/ChildrensDayTest.php | 31 ++++---- tests/SouthKorea/ChristmasDayTest.php | 13 ++-- tests/SouthKorea/ChuseokTest.php | 44 +++++------ tests/SouthKorea/ConstitutionDayTest.php | 15 ++-- tests/SouthKorea/GaecheonjeolTest.php | 31 ++++---- tests/SouthKorea/HangulDayTest.php | 23 +++--- .../IndependenceMovementDayTest.php | 25 +++--- tests/SouthKorea/LiberationDayTest.php | 23 +++--- tests/SouthKorea/MemorialDayTest.php | 13 ++-- tests/SouthKorea/NewYearsDayTest.php | 20 ++--- tests/SouthKorea/SeollalTest.php | 30 ++++---- tests/SouthKorea/SouthKoreaTest.php | 3 +- tests/Spain/AllSaintsDayTest.php | 12 ++- tests/Spain/Andalusia/AndalusiaDayTest.php | 13 ++-- tests/Spain/Andalusia/AndalusiaTest.php | 3 +- tests/Spain/Aragon/AragonTest.php | 3 +- tests/Spain/Aragon/StGeorgesDayTest.php | 11 +-- tests/Spain/AssumptionOfMaryTest.php | 12 ++- tests/Spain/Asturias/AsturiasDayTest.php | 13 ++-- tests/Spain/Asturias/AsturiasTest.php | 3 +- .../BalearicIslandsDayTest.php | 13 ++-- .../BalearicIslands/BalearicIslandsTest.php | 3 +- .../BasqueCountry/BasqueCountryDayTest.php | 15 ++-- .../Spain/BasqueCountry/BasqueCountryTest.php | 3 +- .../CanaryIslands/CanaryIslandsDayTest.php | 13 ++-- .../Spain/CanaryIslands/CanaryIslandsTest.php | 3 +- tests/Spain/Cantabria/CantabriaDayTest.php | 13 ++-- tests/Spain/Cantabria/CantabriaTest.php | 3 +- .../CastileAndLeon/CastileAndLeonDayTest.php | 13 ++-- .../CastileAndLeon/CastileAndLeonTest.php | 3 +- .../CastillaLaManchaDayTest.php | 13 ++-- .../CastillaLaMancha/CastillaLaManchaTest.php | 3 +- tests/Spain/Catalonia/CataloniaTest.php | 3 +- .../Catalonia/nationalCataloniaDayTest.php | 13 ++-- tests/Spain/Catalonia/stJohnsDayTest.php | 12 ++- tests/Spain/Ceuta/CeutaTest.php | 3 +- tests/Spain/Ceuta/ceutaDayTest.php | 13 ++-- tests/Spain/ChristmasTest.php | 12 ++- .../CommunityOfMadridTest.php | 3 +- .../DosdeMayoUprisingDayTest.php | 11 +-- tests/Spain/ConstitutionDayTest.php | 13 ++-- tests/Spain/EasterMondayTest.php | 11 +-- tests/Spain/EpiphanyTest.php | 12 ++- .../Spain/Extremadura/ExtremaduraDayTest.php | 13 ++-- tests/Spain/Extremadura/ExtremaduraTest.php | 3 +- tests/Spain/Galicia/GaliciaTest.php | 3 +- .../Galicia/GalicianLiteratureDayTest.php | 13 ++-- tests/Spain/Galicia/stJamesDayTest.php | 13 ++-- tests/Spain/GoodFridayTest.php | 11 +-- tests/Spain/ImmaculateConceptionTest.php | 12 ++- tests/Spain/InternationalWorkersDayTest.php | 12 ++- tests/Spain/LaRioja/LaRiojaDayTest.php | 13 ++-- tests/Spain/LaRioja/LaRiojaTest.php | 3 +- tests/Spain/MaundyThursdayTest.php | 11 +-- tests/Spain/Melilla/MelillaTest.php | 3 +- tests/Spain/NationalDayTest.php | 13 ++-- tests/Spain/Navarre/NavarreTest.php | 3 +- tests/Spain/NewYearsDayTest.php | 12 ++- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 13 ++-- .../RegionOfMurcia/RegionOfMurciaTest.php | 3 +- tests/Spain/SpainTest.php | 3 +- .../ValencianCommunityDayTest.php | 13 ++-- .../ValencianCommunityTest.php | 3 +- tests/Spain/ValentinesDayTest.php | 12 ++- tests/Spain/stJosephsDayTest.php | 12 ++- tests/Sweden/AllSaintsDayTest.php | 18 ++--- tests/Sweden/AllSaintsEveTest.php | 18 ++--- tests/Sweden/AscensionDayTest.php | 11 +-- tests/Sweden/ChristmasDayTest.php | 12 ++- tests/Sweden/ChristmasEveTest.php | 12 ++- tests/Sweden/EasterMondayTest.php | 11 +-- tests/Sweden/EasterTest.php | 11 +-- tests/Sweden/EpiphanyEveTest.php | 12 ++- tests/Sweden/EpiphanyTest.php | 12 ++- tests/Sweden/GoodFridayTest.php | 11 +-- tests/Sweden/InternationalWorkersDayTest.php | 12 ++- tests/Sweden/NationalDayTest.php | 15 ++-- tests/Sweden/NewYearsDayTest.php | 12 ++- tests/Sweden/NewYearsEveTest.php | 12 ++- tests/Sweden/PentecostTest.php | 11 +-- tests/Sweden/SecondChristmasDayTest.php | 12 ++- tests/Sweden/SwedenTest.php | 3 +- tests/Sweden/WalpurgisEveTest.php | 12 ++- tests/Switzerland/Aargau/AargauTest.php | 3 +- tests/Switzerland/Aargau/AscensionDayTest.php | 11 +-- tests/Switzerland/Aargau/ChristmasDayTest.php | 12 ++- tests/Switzerland/Aargau/GoodFridayTest.php | 11 +-- tests/Switzerland/Aargau/NewYearsDayTest.php | 12 ++- .../AppenzellAusserrhodenTest.php | 3 +- .../AscensionDayTest.php | 11 +-- .../ChristmasDayTest.php | 12 ++- .../EasterMondayTest.php | 11 +-- .../AppenzellAusserrhoden/GoodFridayTest.php | 11 +-- .../AppenzellAusserrhoden/NewYearsDayTest.php | 12 ++- .../PentecostMondayTest.php | 11 +-- .../StStephensDayTest.php | 12 ++- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 12 ++- .../AppenzellInnerrhodenTest.php | 3 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 11 +-- .../AssumptionOfMaryTest.php | 12 ++- .../AppenzellInnerrhoden/ChristmasDayTest.php | 12 ++- .../CorpusChristiTest.php | 10 +-- .../AppenzellInnerrhoden/EasterMondayTest.php | 11 +-- .../AppenzellInnerrhoden/GoodFridayTest.php | 11 +-- .../ImmaculateConceptionTest.php | 12 ++- .../AppenzellInnerrhoden/NewYearsDayTest.php | 12 ++- .../PentecostMondayTest.php | 11 +-- .../StStephensDayTest.php | 12 ++- .../BaselLandschaft/AscensionDayTest.php | 11 +-- .../BaselLandschaft/BaselLandschaftTest.php | 3 +- .../BaselLandschaft/ChristmasDayTest.php | 12 ++- .../BaselLandschaft/EasterMondayTest.php | 11 +-- .../BaselLandschaft/GoodFridayTest.php | 11 +-- .../BaselLandschaft/NewYearsDayTest.php | 12 ++- .../BaselLandschaft/PentecostMondayTest.php | 11 +-- .../BaselLandschaft/StStephensDayTest.php | 12 ++- .../BaselLandschaft/WorkersDayTest.php | 15 ++-- .../BaselStadt/AscensionDayTest.php | 11 +-- .../Switzerland/BaselStadt/BaselStadtTest.php | 3 +- .../BaselStadt/ChristmasDayTest.php | 12 ++- .../BaselStadt/EasterMondayTest.php | 11 +-- .../Switzerland/BaselStadt/GoodFridayTest.php | 11 +-- .../BaselStadt/NewYearsDayTest.php | 12 ++- .../BaselStadt/PentecostMondayTest.php | 11 +-- .../BaselStadt/StStephensDayTest.php | 12 ++- .../Switzerland/BaselStadt/WorkersDayTest.php | 15 ++-- tests/Switzerland/Bern/AscensionDayTest.php | 11 +-- tests/Switzerland/Bern/BerchtoldsTagTest.php | 11 +-- tests/Switzerland/Bern/BernTest.php | 3 +- tests/Switzerland/Bern/ChristmasDayTest.php | 12 ++- tests/Switzerland/Bern/EasterMondayTest.php | 11 +-- tests/Switzerland/Bern/GoodFridayTest.php | 11 +-- tests/Switzerland/Bern/NewYearsDayTest.php | 12 ++- .../Switzerland/Bern/PentecostMondayTest.php | 11 +-- tests/Switzerland/Bern/StStephensDayTest.php | 12 ++- .../Switzerland/Fribourg/AllSaintsDayTest.php | 12 ++- .../Switzerland/Fribourg/AscensionDayTest.php | 11 +-- .../Fribourg/AssumptionOfMaryTest.php | 12 ++- .../Fribourg/BerchtoldsTagTest.php | 11 +-- .../Switzerland/Fribourg/ChristmasDayTest.php | 12 ++- .../Fribourg/CorpusChristiTest.php | 10 +-- .../Switzerland/Fribourg/December26thTest.php | 11 +-- .../Switzerland/Fribourg/EasterMondayTest.php | 11 +-- tests/Switzerland/Fribourg/FribourgTest.php | 3 +- tests/Switzerland/Fribourg/GoodFridayTest.php | 11 +-- .../Fribourg/ImmaculateConceptionTest.php | 12 ++- .../Switzerland/Fribourg/NewYearsDayTest.php | 12 ++- .../Fribourg/PentecostMondayTest.php | 11 +-- tests/Switzerland/Geneva/AscensionDayTest.php | 11 +-- tests/Switzerland/Geneva/ChristmasDayTest.php | 12 ++- tests/Switzerland/Geneva/EasterMondayTest.php | 11 +-- tests/Switzerland/Geneva/GenevaTest.php | 3 +- tests/Switzerland/Geneva/GoodFridayTest.php | 11 +-- .../Switzerland/Geneva/JeuneGenevoisTest.php | 22 +++--- tests/Switzerland/Geneva/NewYearsDayTest.php | 12 ++- .../Geneva/PentecostMondayTest.php | 11 +-- .../Geneva/RestaurationGenevoiseTest.php | 11 +-- tests/Switzerland/Glarus/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Glarus/AscensionDayTest.php | 11 +-- .../Switzerland/Glarus/BerchtoldsTagTest.php | 11 +-- tests/Switzerland/Glarus/ChristmasDayTest.php | 12 ++- tests/Switzerland/Glarus/EasterMondayTest.php | 11 +-- tests/Switzerland/Glarus/GlarusTest.php | 3 +- tests/Switzerland/Glarus/GoodFridayTest.php | 11 +-- .../Switzerland/Glarus/NafelserFahrtTest.php | 13 ++-- tests/Switzerland/Glarus/NewYearsDayTest.php | 12 ++- .../Glarus/PentecostMondayTest.php | 11 +-- .../Switzerland/Glarus/StStephensDayTest.php | 12 ++- .../Switzerland/Grisons/AscensionDayTest.php | 11 +-- .../Switzerland/Grisons/ChristmasDayTest.php | 12 ++- .../Switzerland/Grisons/EasterMondayTest.php | 11 +-- tests/Switzerland/Grisons/GoodFridayTest.php | 11 +-- tests/Switzerland/Grisons/GrisonsTest.php | 3 +- tests/Switzerland/Grisons/NewYearsDayTest.php | 12 ++- .../Grisons/PentecostMondayTest.php | 11 +-- .../Switzerland/Grisons/StStephensDayTest.php | 12 ++- tests/Switzerland/Jura/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Jura/AscensionDayTest.php | 11 +-- .../Switzerland/Jura/AssumptionOfMaryTest.php | 12 ++- tests/Switzerland/Jura/BerchtoldsTagTest.php | 11 +-- tests/Switzerland/Jura/BettagsMontagTest.php | 16 ++-- tests/Switzerland/Jura/ChristmasDayTest.php | 12 ++- tests/Switzerland/Jura/CorpusChristiTest.php | 10 +-- tests/Switzerland/Jura/EasterMondayTest.php | 11 +-- tests/Switzerland/Jura/EasterTest.php | 11 +-- tests/Switzerland/Jura/GoodFridayTest.php | 11 +-- tests/Switzerland/Jura/JuraTest.php | 3 +- tests/Switzerland/Jura/NewYearsDayTest.php | 12 ++- .../Switzerland/Jura/PentecostMondayTest.php | 11 +-- tests/Switzerland/Jura/PentecostTest.php | 11 +-- .../Jura/PlebisciteJurassienTest.php | 13 ++-- tests/Switzerland/Jura/WorkersDayTest.php | 15 ++-- .../Switzerland/Lucerne/AllSaintsDayTest.php | 12 ++- .../Switzerland/Lucerne/AscensionDayTest.php | 11 +-- .../Lucerne/AssumptionOfMaryTest.php | 12 ++- .../Switzerland/Lucerne/BerchtoldsTagTest.php | 11 +-- .../Switzerland/Lucerne/ChristmasDayTest.php | 12 ++- .../Switzerland/Lucerne/CorpusChristiTest.php | 10 +-- .../Switzerland/Lucerne/EasterMondayTest.php | 11 +-- tests/Switzerland/Lucerne/GoodFridayTest.php | 11 +-- .../Lucerne/ImmaculateConceptionTest.php | 12 ++- tests/Switzerland/Lucerne/LucerneTest.php | 3 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 12 ++- .../Lucerne/PentecostMondayTest.php | 11 +-- .../Switzerland/Lucerne/StStephensDayTest.php | 12 ++- .../Neuchatel/AscensionDayTest.php | 11 +-- .../Neuchatel/BettagsMontagTest.php | 16 ++-- .../Neuchatel/ChristmasDayTest.php | 12 ++- .../Neuchatel/December26thTest.php | 7 +- .../Neuchatel/EasterMondayTest.php | 11 +-- .../Switzerland/Neuchatel/GoodFridayTest.php | 11 +-- .../Neuchatel/InstaurationRepubliqueTest.php | 13 ++-- .../Switzerland/Neuchatel/January2ndTest.php | 7 +- tests/Switzerland/Neuchatel/NeuchatelTest.php | 3 +- .../Switzerland/Neuchatel/NewYearsDayTest.php | 12 ++- .../Neuchatel/PentecostMondayTest.php | 11 +-- .../Switzerland/Neuchatel/WorkersDayTest.php | 15 ++-- .../Nidwalden/AllSaintsDayTest.php | 12 ++- .../Nidwalden/AscensionDayTest.php | 11 +-- .../Nidwalden/AssumptionOfMaryTest.php | 12 ++- .../Nidwalden/ChristmasDayTest.php | 12 ++- .../Nidwalden/CorpusChristiTest.php | 10 +-- .../Nidwalden/EasterMondayTest.php | 11 +-- .../Switzerland/Nidwalden/GoodFridayTest.php | 11 +-- .../Nidwalden/ImmaculateConceptionTest.php | 12 ++- .../Switzerland/Nidwalden/NewYearsDayTest.php | 12 ++- tests/Switzerland/Nidwalden/NidwaldenTest.php | 3 +- .../Nidwalden/PentecostMondayTest.php | 11 +-- .../Switzerland/Nidwalden/StJosephDayTest.php | 12 ++- .../Nidwalden/StStephensDayTest.php | 12 ++- .../Switzerland/Obwalden/AllSaintsDayTest.php | 12 ++- .../Switzerland/Obwalden/AscensionDayTest.php | 11 +-- .../Obwalden/AssumptionOfMaryTest.php | 12 ++- .../Obwalden/BerchtoldsTagTest.php | 11 +-- .../Obwalden/BruderKlausenFestTest.php | 17 ++-- .../Switzerland/Obwalden/ChristmasDayTest.php | 12 ++- .../Obwalden/CorpusChristiTest.php | 10 +-- .../Switzerland/Obwalden/EasterMondayTest.php | 11 +-- tests/Switzerland/Obwalden/GoodFridayTest.php | 11 +-- .../Obwalden/ImmaculateConceptionTest.php | 12 ++- .../Switzerland/Obwalden/NewYearsDayTest.php | 12 ++- tests/Switzerland/Obwalden/ObwaldenTest.php | 3 +- .../Obwalden/PentecostMondayTest.php | 11 +-- .../Obwalden/StStephensDayTest.php | 12 ++- .../Schaffhausen/AscensionDayTest.php | 11 +-- .../Schaffhausen/BerchtoldsTagTest.php | 11 +-- .../Schaffhausen/ChristmasDayTest.php | 12 ++- .../Schaffhausen/EasterMondayTest.php | 11 +-- .../Schaffhausen/GoodFridayTest.php | 11 +-- .../Schaffhausen/NewYearsDayTest.php | 12 ++- .../Schaffhausen/PentecostMondayTest.php | 11 +-- .../Schaffhausen/SchaffhausenTest.php | 3 +- .../Schaffhausen/StStephensDayTest.php | 12 ++- .../Schaffhausen/WorkersDayTest.php | 15 ++-- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Schwyz/AscensionDayTest.php | 11 +-- .../Schwyz/AssumptionOfMaryTest.php | 12 ++- tests/Switzerland/Schwyz/ChristmasDayTest.php | 12 ++- .../Switzerland/Schwyz/CorpusChristiTest.php | 10 +-- tests/Switzerland/Schwyz/EasterMondayTest.php | 11 +-- tests/Switzerland/Schwyz/EpiphanyTest.php | 12 ++- tests/Switzerland/Schwyz/GoodFridayTest.php | 11 +-- .../Schwyz/ImmaculateConceptionTest.php | 12 ++- tests/Switzerland/Schwyz/NewYearsDayTest.php | 12 ++- .../Schwyz/PentecostMondayTest.php | 11 +-- tests/Switzerland/Schwyz/SchwyzTest.php | 3 +- tests/Switzerland/Schwyz/StJosephDayTest.php | 12 ++- .../Switzerland/Schwyz/StStephensDayTest.php | 12 ++- .../Solothurn/AscensionDayTest.php | 11 +-- .../Solothurn/BerchtoldsTagTest.php | 11 +-- .../Solothurn/ChristmasDayTest.php | 12 ++- .../Switzerland/Solothurn/GoodFridayTest.php | 11 +-- .../Switzerland/Solothurn/NewYearsDayTest.php | 12 ++- tests/Switzerland/Solothurn/SolothurnTest.php | 3 +- .../Switzerland/StGallen/AllSaintsDayTest.php | 12 ++- .../Switzerland/StGallen/AscensionDayTest.php | 11 +-- .../Switzerland/StGallen/ChristmasDayTest.php | 12 ++- .../Switzerland/StGallen/EasterMondayTest.php | 11 +-- tests/Switzerland/StGallen/GoodFridayTest.php | 11 +-- .../Switzerland/StGallen/NewYearsDayTest.php | 12 ++- .../StGallen/PentecostMondayTest.php | 11 +-- tests/Switzerland/StGallen/StGallenTest.php | 3 +- .../StGallen/StStephensDayTest.php | 12 ++- tests/Switzerland/SwissNationalDayTest.php | 23 +++--- tests/Switzerland/SwitzerlandTest.php | 3 +- .../Switzerland/Thurgau/AscensionDayTest.php | 11 +-- .../Switzerland/Thurgau/BerchtoldsTagTest.php | 11 +-- .../Switzerland/Thurgau/ChristmasDayTest.php | 12 ++- .../Switzerland/Thurgau/EasterMondayTest.php | 11 +-- tests/Switzerland/Thurgau/GoodFridayTest.php | 11 +-- tests/Switzerland/Thurgau/NewYearsDayTest.php | 12 ++- .../Thurgau/PentecostMondayTest.php | 11 +-- .../Switzerland/Thurgau/StStephensDayTest.php | 12 ++- tests/Switzerland/Thurgau/ThurgauTest.php | 3 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 15 ++-- tests/Switzerland/Ticino/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Ticino/AscensionDayTest.php | 11 +-- .../Ticino/AssumptionOfMaryTest.php | 12 ++- tests/Switzerland/Ticino/ChristmasDayTest.php | 12 ++- .../Switzerland/Ticino/CorpusChristiTest.php | 10 +-- tests/Switzerland/Ticino/EasterMondayTest.php | 11 +-- tests/Switzerland/Ticino/EpiphanyTest.php | 12 ++- .../Ticino/ImmaculateConceptionTest.php | 12 ++- tests/Switzerland/Ticino/NewYearsDayTest.php | 12 ++- .../Ticino/PentecostMondayTest.php | 11 +-- tests/Switzerland/Ticino/StJosephDayTest.php | 12 ++- tests/Switzerland/Ticino/StPeterPaulTest.php | 12 ++- .../Switzerland/Ticino/StStephensDayTest.php | 12 ++- tests/Switzerland/Ticino/TicinoTest.php | 3 +- tests/Switzerland/Ticino/WorkersDayTest.php | 15 ++-- tests/Switzerland/Uri/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Uri/AscensionDayTest.php | 11 +-- .../Switzerland/Uri/AssumptionOfMaryTest.php | 12 ++- tests/Switzerland/Uri/ChristmasDayTest.php | 12 ++- tests/Switzerland/Uri/CorpusChristiTest.php | 10 +-- tests/Switzerland/Uri/EasterMondayTest.php | 11 +-- tests/Switzerland/Uri/EpiphanyTest.php | 12 ++- tests/Switzerland/Uri/GoodFridayTest.php | 11 +-- .../Uri/ImmaculateConceptionTest.php | 12 ++- tests/Switzerland/Uri/NewYearsDayTest.php | 12 ++- tests/Switzerland/Uri/PentecostMondayTest.php | 11 +-- tests/Switzerland/Uri/StJosephDayTest.php | 12 ++- tests/Switzerland/Uri/StStephensDayTest.php | 12 ++- tests/Switzerland/Uri/UriTest.php | 3 +- tests/Switzerland/Valais/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Valais/AscensionDayTest.php | 11 +-- .../Valais/AssumptionOfMaryTest.php | 12 ++- tests/Switzerland/Valais/ChristmasDayTest.php | 12 ++- .../Switzerland/Valais/CorpusChristiTest.php | 10 +-- .../Valais/ImmaculateConceptionTest.php | 12 ++- tests/Switzerland/Valais/NewYearsDayTest.php | 12 ++- tests/Switzerland/Valais/StJosephDayTest.php | 12 ++- tests/Switzerland/Valais/ValaisTest.php | 3 +- tests/Switzerland/Vaud/AscensionDayTest.php | 11 +-- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 11 +-- tests/Switzerland/Vaud/BettagsMontagTest.php | 16 ++-- tests/Switzerland/Vaud/ChristmasDayTest.php | 12 ++- tests/Switzerland/Vaud/EasterMondayTest.php | 11 +-- tests/Switzerland/Vaud/GoodFridayTest.php | 11 +-- tests/Switzerland/Vaud/NewYearsDayTest.php | 12 ++- .../Switzerland/Vaud/PentecostMondayTest.php | 11 +-- tests/Switzerland/Vaud/VaudTest.php | 3 +- tests/Switzerland/Zug/AllSaintsDayTest.php | 12 ++- tests/Switzerland/Zug/AscensionDayTest.php | 11 +-- .../Switzerland/Zug/AssumptionOfMaryTest.php | 12 ++- tests/Switzerland/Zug/BerchtoldsTagTest.php | 11 +-- tests/Switzerland/Zug/ChristmasDayTest.php | 12 ++- tests/Switzerland/Zug/CorpusChristiTest.php | 10 +-- tests/Switzerland/Zug/EasterMondayTest.php | 11 +-- tests/Switzerland/Zug/GoodFridayTest.php | 11 +-- .../Zug/ImmaculateConceptionTest.php | 12 ++- tests/Switzerland/Zug/NewYearsDayTest.php | 12 ++- tests/Switzerland/Zug/PentecostMondayTest.php | 11 +-- tests/Switzerland/Zug/StStephensDayTest.php | 12 ++- tests/Switzerland/Zug/ZugTest.php | 3 +- tests/Switzerland/Zurich/AscensionDayTest.php | 11 +-- tests/Switzerland/Zurich/ChristmasDayTest.php | 12 ++- tests/Switzerland/Zurich/EasterMondayTest.php | 11 +-- tests/Switzerland/Zurich/GoodFridayTest.php | 11 +-- tests/Switzerland/Zurich/NewYearsDayTest.php | 12 ++- .../Zurich/PentecostMondayTest.php | 11 +-- .../Switzerland/Zurich/StStephensDayTest.php | 12 ++- tests/Switzerland/Zurich/WorkersDayTest.php | 15 ++-- tests/Switzerland/Zurich/ZurichTest.php | 3 +- tests/Turkey/LabourDayTest.php | 12 ++- tests/Turkey/NewYearsDayTest.php | 12 ++- tests/Turkey/TurkeyTest.php | 3 +- tests/USA/ChristmasDayTest.php | 19 ++--- tests/USA/ColumbusDayTest.php | 17 ++-- tests/USA/IndependenceDayTest.php | 21 +++-- tests/USA/JuneteenthTest.php | 21 +++-- tests/USA/LabourDayTest.php | 13 ++-- tests/USA/MartinLutherKingDayTest.php | 13 ++-- tests/USA/MemorialDayTest.php | 17 ++-- tests/USA/NewYearsDayTest.php | 19 ++--- tests/USA/ThanksgivingDayTest.php | 13 ++-- tests/USA/USATest.php | 3 +- tests/USA/VeteransDayTest.php | 25 +++--- tests/USA/WashingtonsBirthdayTest.php | 17 ++-- tests/Ukraine/CatholicChristmasDayTest.php | 14 ++-- tests/Ukraine/ChristmasDayTest.php | 12 ++- tests/Ukraine/ConstitutionDayTest.php | 7 +- tests/Ukraine/DefenderOfUkraineDayTest.php | 7 +- tests/Ukraine/EasterTest.php | 11 +-- tests/Ukraine/IndependenceDayTest.php | 7 +- tests/Ukraine/InternationalWomensDayTest.php | 7 +- tests/Ukraine/InternationalWorkersDayTest.php | 12 ++- tests/Ukraine/NewYearsDayTest.php | 12 ++- tests/Ukraine/PentecostTest.php | 11 +-- .../SecondInternationalWorkersDayTest.php | 5 +- tests/Ukraine/SubstitutedHolidayTest.php | 32 ++++---- tests/Ukraine/UkraineTest.php | 3 +- tests/Ukraine/VictoryDayTest.php | 7 +- tests/UnitedKingdom/BoxingDayTest.php | 18 ++--- tests/UnitedKingdom/ChristmasDayTest.php | 18 ++--- tests/UnitedKingdom/EasterMondayTest.php | 16 ++-- tests/UnitedKingdom/England/BoxingDayTest.php | 18 ++--- .../England/ChristmasDayTest.php | 18 ++--- .../England/EasterMondayTest.php | 16 ++-- tests/UnitedKingdom/England/EnglandTest.php | 3 +- .../UnitedKingdom/England/GoodFridayTest.php | 11 +-- .../England/MayDayBankHolidayTest.php | 18 ++--- .../UnitedKingdom/England/NewYearsDayTest.php | 17 ++-- .../England/SpringBankHolidayTest.php | 19 ++--- .../England/SummerBankHolidayTest.php | 18 ++--- tests/UnitedKingdom/GoodFridayTest.php | 11 +-- tests/UnitedKingdom/MayDayBankHolidayTest.php | 18 ++--- tests/UnitedKingdom/MotheringSundayTest.php | 16 ++-- tests/UnitedKingdom/NewYearsDayTest.php | 17 ++-- .../NorthernIreland/BattleOfTheBoyneTest.php | 17 ++-- .../NorthernIreland/BoxingDayTest.php | 18 ++--- .../NorthernIreland/ChristmasDayTest.php | 18 ++--- .../NorthernIreland/EasterMondayTest.php | 16 ++-- .../NorthernIreland/GoodFridayTest.php | 11 +-- .../NorthernIreland/MayDayBankHolidayTest.php | 18 ++--- .../NorthernIreland/NewYearsDayTest.php | 17 ++-- .../NorthernIreland/NorthernIrelandTest.php | 3 +- .../NorthernIreland/SpringBankHolidayTest.php | 13 ++-- .../NorthernIreland/StPatricksDayTest.php | 17 ++-- .../NorthernIreland/SummerBankHolidayTest.php | 32 ++++---- .../PlatinumJubileeBankHolidayTest.php | 11 +-- .../QueenElizabethFuneralBankHolidayTest.php | 11 +-- .../UnitedKingdom/Scotland/BoxingDayTest.php | 18 ++--- .../Scotland/ChristmasDayTest.php | 18 ++--- .../UnitedKingdom/Scotland/GoodFridayTest.php | 11 +-- .../Scotland/MayDayBankHolidayTest.php | 18 ++--- .../Scotland/NewYearsDayTest.php | 22 +++--- tests/UnitedKingdom/Scotland/ScotlandTest.php | 3 +- .../Scotland/SecondNewYearsDayTest.php | 22 +++--- .../Scotland/SpringBankHolidayTest.php | 13 ++-- .../Scotland/StAndrewsDayTest.php | 15 ++-- .../Scotland/SummerBankHolidayTest.php | 13 ++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 21 +++-- tests/UnitedKingdom/SummerBankHolidayTest.php | 32 ++++---- tests/UnitedKingdom/UnitedKingdomTest.php | 3 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 18 ++--- .../UnitedKingdom/Wales/ChristmasDayTest.php | 18 ++--- .../UnitedKingdom/Wales/EasterMondayTest.php | 16 ++-- tests/UnitedKingdom/Wales/GoodFridayTest.php | 11 +-- .../Wales/MayDayBankHolidayTest.php | 18 ++--- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 17 ++-- .../Wales/SpringBankHolidayTest.php | 19 ++--- .../Wales/SummerBankHolidayTest.php | 32 ++++---- tests/UnitedKingdom/Wales/WalesTest.php | 3 +- tests/YasumiBase.php | 59 +++++++------- 1168 files changed, 5391 insertions(+), 8073 deletions(-) diff --git a/composer.json b/composer.json index 21b99f450..a312116c8 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v2.19 | v3.11", + "friendsofphp/php-cs-fixer": "v2.19 | v3.13", "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", diff --git a/src/Yasumi/Exception/InvalidDateException.php b/src/Yasumi/Exception/InvalidDateException.php index ef0697d39..14931b576 100644 --- a/src/Yasumi/Exception/InvalidDateException.php +++ b/src/Yasumi/Exception/InvalidDateException.php @@ -14,12 +14,10 @@ namespace Yasumi\Exception; -use InvalidArgumentException; - /** * Class InvalidDateException. */ -class InvalidDateException extends InvalidArgumentException implements Exception +class InvalidDateException extends \InvalidArgumentException implements Exception { /** * Initializes the Exception instance. diff --git a/src/Yasumi/Exception/InvalidYearException.php b/src/Yasumi/Exception/InvalidYearException.php index a66ac1203..fcd01d0b5 100644 --- a/src/Yasumi/Exception/InvalidYearException.php +++ b/src/Yasumi/Exception/InvalidYearException.php @@ -15,13 +15,11 @@ namespace Yasumi\Exception; -use InvalidArgumentException; - /** * Class InvalidYearException. * * @author Quentin Neyrat */ -class InvalidYearException extends InvalidArgumentException implements Exception +class InvalidYearException extends \InvalidArgumentException implements Exception { } diff --git a/src/Yasumi/Exception/ProviderNotFoundException.php b/src/Yasumi/Exception/ProviderNotFoundException.php index 9eccf62f1..9ab0732aa 100644 --- a/src/Yasumi/Exception/ProviderNotFoundException.php +++ b/src/Yasumi/Exception/ProviderNotFoundException.php @@ -14,13 +14,11 @@ namespace Yasumi\Exception; -use InvalidArgumentException; - /** * Class ProviderNotFoundException. * * @author Quentin Neyrat */ -class ProviderNotFoundException extends InvalidArgumentException implements Exception +class ProviderNotFoundException extends \InvalidArgumentException implements Exception { } diff --git a/src/Yasumi/Exception/UnknownLocaleException.php b/src/Yasumi/Exception/UnknownLocaleException.php index 8cfa97f71..dfe95f345 100644 --- a/src/Yasumi/Exception/UnknownLocaleException.php +++ b/src/Yasumi/Exception/UnknownLocaleException.php @@ -14,11 +14,9 @@ namespace Yasumi\Exception; -use InvalidArgumentException; - /** * Class UnknownLocaleException. */ -class UnknownLocaleException extends InvalidArgumentException implements Exception +class UnknownLocaleException extends \InvalidArgumentException implements Exception { } diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 170749008..5f9f65c8b 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -15,14 +15,12 @@ namespace Yasumi\Filters; -use Countable; -use FilterIterator; use Yasumi\SubstituteHoliday; /** * AbstractFilter. */ -abstract class AbstractFilter extends FilterIterator implements Countable +abstract class AbstractFilter extends \FilterIterator implements \Countable { /** * Returns the number of holidays returned by this iterator. diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index b3fcd122c..d122d3c1f 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -40,14 +40,14 @@ class BetweenFilter extends AbstractFilter /** * Construct the Between FilterIterator Object. * - * @param Iterator $iterator Iterator object of the Holidays Provider - * @param \DateTimeInterface $startDate Start date of the time frame to check against - * @param \DateTimeInterface $endDate End date of the time frame to check against - * @param bool $equal Indicate whether the start and end dates should be included in the - * comparison + * @param \Iterator $iterator Iterator object of the Holidays Provider + * @param \DateTimeInterface $startDate Start date of the time frame to check against + * @param \DateTimeInterface $endDate End date of the time frame to check against + * @param bool $equal Indicate whether the start and end dates should be included in the + * comparison */ public function __construct( - Iterator $iterator, + \Iterator $iterator, \DateTimeInterface $startDate, \DateTimeInterface $endDate, bool $equal = true diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 22431c644..e83ce8633 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -33,11 +33,11 @@ class OnFilter extends AbstractFilter /** * Construct the On FilterIterator Object. * - * @param Iterator $iterator Iterator object of the Holidays Provider - * @param \DateTimeInterface $date Start date of the time frame to check against + * @param \Iterator $iterator Iterator object of the Holidays Provider + * @param \DateTimeInterface $date Start date of the time frame to check against */ public function __construct( - Iterator $iterator, + \Iterator $iterator, \DateTimeInterface $date ) { parent::__construct($iterator); diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 9dc4b5305..f65e705f9 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -15,9 +15,6 @@ namespace Yasumi; -use DateTime; -use InvalidArgumentException; -use JsonSerializable; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\MissingTranslationException; use Yasumi\Exception\UnknownLocaleException; @@ -25,7 +22,7 @@ /** * Class Holiday. */ -class Holiday extends DateTime implements JsonSerializable +class Holiday extends \DateTime implements \JsonSerializable { /** * Type definition for Official (i.e. National/Federal) holidays. @@ -102,7 +99,7 @@ class Holiday extends DateTime implements JsonSerializable * * @throws InvalidDateException * @throws UnknownLocaleException - * @throws InvalidArgumentException + * @throws \InvalidArgumentException * @throws \Exception */ public function __construct( @@ -114,7 +111,7 @@ public function __construct( ) { // Validate if key is not empty if (empty($key)) { - throw new InvalidArgumentException('Holiday name can not be blank.'); + throw new \InvalidArgumentException('Holiday name can not be blank.'); } // Load internal locales variable diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 82115ab11..538059e34 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -14,10 +14,7 @@ namespace Yasumi\Provider; -use ArrayIterator; -use Countable; use InvalidArgumentException; -use IteratorAggregate; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Filters\BetweenFilter; use Yasumi\Filters\OnFilter; @@ -30,7 +27,7 @@ /** * Class AbstractProvider. */ -abstract class AbstractProvider implements Countable, ProviderInterface, IteratorAggregate +abstract class AbstractProvider implements \Countable, ProviderInterface, \IteratorAggregate { /** * Code to identify the Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective @@ -235,16 +232,16 @@ public function between( ?bool $equals = null ): BetweenFilter { if ($startDate > $endDate) { - throw new InvalidArgumentException('Start date must be a date before the end date.'); + throw new \InvalidArgumentException('Start date must be a date before the end date.'); } return new BetweenFilter($this->getIterator(), $startDate, $endDate, $equals ?? true); } /** {@inheritdoc} */ - public function getIterator(): ArrayIterator + public function getIterator(): \ArrayIterator { - return new ArrayIterator($this->getHolidays()); + return new \ArrayIterator($this->getHolidays()); } /** {@inheritdoc} */ @@ -266,7 +263,7 @@ public function getHolidayDates(): array * * @return true upon success, otherwise an InvalidArgumentException is thrown * - * @throws InvalidArgumentException an InvalidArgumentException is thrown if the given holiday parameter is empty + * @throws \InvalidArgumentException an InvalidArgumentException is thrown if the given holiday parameter is empty * * @deprecated deprecated in favor of isHolidayKeyNotEmpty() * @deprecated see isHolidayKeyNotEmpty() @@ -291,12 +288,12 @@ private function clearHolidays(): void * * @return true upon success, otherwise an InvalidArgumentException is thrown * - * @throws InvalidArgumentException an InvalidArgumentException is thrown if the given holiday parameter is empty + * @throws \InvalidArgumentException an InvalidArgumentException is thrown if the given holiday parameter is empty */ private function isHolidayKeyNotEmpty(string $key): bool { if (empty($key)) { - throw new InvalidArgumentException('Holiday key can not be blank.'); + throw new \InvalidArgumentException('Holiday key can not be blank.'); } return true; @@ -324,7 +321,7 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa * * @return Holiday|null a Holiday instance for the given holiday and year * - * @throws InvalidArgumentException when the given name is blank or empty + * @throws \InvalidArgumentException when the given name is blank or empty * @throws UnknownLocaleException * @throws \RuntimeException */ diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 9f8a70e09..c55e81b3c 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -98,7 +96,7 @@ private function addCarnvalHolidays(): void $easter = $this->calculateEaster($this->year, $this->timezone); $carnavalMonday = clone $easter; - $carnavalMondayDate = $carnavalMonday->sub(new DateInterval('P48D')); + $carnavalMondayDate = $carnavalMonday->sub(new \DateInterval('P48D')); $this->addHoliday(new Holiday( 'carnavalMonday', [ @@ -111,7 +109,7 @@ private function addCarnvalHolidays(): void )); $carnavalTuesday = clone $easter; - $carnavalTuesdayDate = $carnavalTuesday->sub(new DateInterval('P47D')); + $carnavalTuesdayDate = $carnavalTuesday->sub(new \DateInterval('P47D')); $this->addHoliday(new Holiday( 'carnavalTuesday', [ @@ -145,7 +143,7 @@ private function addRemembranceDay(): void 'en' => 'Day of Remembrance for Truth and Justice', 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', ], - new DateTime("$this->year-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -171,7 +169,7 @@ private function addMalvinasDay(): void 'en' => 'Malvinas Day', 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', ], - new DateTime("$this->year-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -199,7 +197,7 @@ private function addMayRevolution(): void 'en' => 'May Revolution', 'es' => 'Día de la Revolución de Mayo', ], - new DateTime("$this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -220,7 +218,7 @@ private function addGeneralMartinMigueldeGuemesDay(): void 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', ], - new DateTime("$this->year-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -243,7 +241,7 @@ private function addFlagDay(): void 'en' => 'General Manuel Belgrano Memorial Day', 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', ], - new DateTime("$this->year-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -265,7 +263,7 @@ private function addIndependenceDay(): void 'en' => 'Independence Day', 'es' => 'Día de la Independencia', ], - new DateTime("$this->year-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -286,7 +284,7 @@ private function addGeneralJoseSanMartinDay(): void 'en' => 'General José de San Martín Memorial Day', 'es' => 'Paso a la Inmortalidad del General José de San Martín', ], - new DateTime("$this->year-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -309,7 +307,7 @@ private function addRaceDay(): void 'en' => 'Day of Respect for Cultural Diversity', 'es' => 'Día del Respeto a la Diversidad Cultural', ], - new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -332,7 +330,7 @@ private function addNationalSovereigntyDay(): void 'en' => 'National Sovereignty Day', 'es' => 'Día de la Soberanía Nacional', ], - new DateTime("$this->year-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -355,7 +353,7 @@ private function addImmaculateConceptionDay(): void 'en' => 'Immaculate Conception Day', 'es' => 'Día de la Inmaculada Concepción de María', ], - new DateTime("$this->year-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index d8cf32855..4494ae9ad 100644 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\SubstituteHoliday; @@ -79,7 +77,7 @@ public function getSources(): array */ private function calculateNewYearHolidays(): void { - $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $newYearsDay = new \DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'newYearsDay', [], @@ -89,7 +87,7 @@ private function calculateNewYearHolidays(): void )); switch ($newYearsDay->format('w')) { case 0: // sunday - $newYearsDay->add(new DateInterval('P1D')); + $newYearsDay->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'newYearsHoliday', ['en' => 'New Year’s Holiday'], @@ -99,7 +97,7 @@ private function calculateNewYearHolidays(): void )); break; case 6: // saturday - $newYearsDay->add(new DateInterval('P2D')); + $newYearsDay->add(new \DateInterval('P2D')); $this->addHoliday(new Holiday( 'newYearsHoliday', ['en' => 'New Year’s Holiday'], @@ -131,7 +129,7 @@ private function calculateNewYearHolidays(): void */ private function calculateAustraliaDay(): void { - $date = new DateTime("$this->year-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $holiday = new Holiday( 'australiaDay', @@ -144,7 +142,7 @@ private function calculateAustraliaDay(): void $day = (int) $date->format('w'); if (0 === $day || 6 === $day) { - $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P2D')); + $date = $date->add(0 === $day ? new \DateInterval('P1D') : new \DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( $holiday, @@ -178,7 +176,7 @@ private function calculateAnzacDay(): void return; } - $date = new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'anzacDay', [], @@ -189,11 +187,11 @@ private function calculateAnzacDay(): void $easter = $this->calculateEaster($this->year, $this->timezone); $easterMonday = $this->calculateEaster($this->year, $this->timezone); - $easterMonday->add(new DateInterval('P1D')); + $easterMonday->add(new \DateInterval('P1D')); $fDate = $date->format('Y-m-d'); if ($fDate === $easter->format('Y-m-d') || $fDate === $easterMonday->format('Y-m-d')) { - $easterMonday->add(new DateInterval('P1D')); + $easterMonday->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'easterTuesday', ['en' => 'Easter Tuesday'], @@ -218,8 +216,8 @@ private function calculateAnzacDay(): void */ private function calculateChristmasDay(): void { - $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $boxingDay = new DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $christmasDay = new \DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $boxingDay = new \DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'christmasDay', [], @@ -237,7 +235,7 @@ private function calculateChristmasDay(): void switch ($christmasDay->format('w')) { case 0: // sunday - $christmasDay->add(new DateInterval('P2D')); + $christmasDay->add(new \DateInterval('P2D')); $this->addHoliday(new Holiday( 'christmasHoliday', ['en' => 'Christmas Holiday'], @@ -247,7 +245,7 @@ private function calculateChristmasDay(): void )); break; case 5: // friday - $boxingDay->add(new DateInterval('P2D')); + $boxingDay->add(new \DateInterval('P2D')); $this->addHoliday(new Holiday( 'secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], @@ -257,8 +255,8 @@ private function calculateChristmasDay(): void )); break; case 6: // saturday - $christmasDay->add(new DateInterval('P2D')); - $boxingDay->add(new DateInterval('P2D')); + $christmasDay->add(new \DateInterval('P2D')); + $boxingDay->add(new \DateInterval('P2D')); $this->addHoliday(new Holiday( 'christmasHoliday', ['en' => 'Christmas Holiday'], diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 5936ccc50..a1eda4980 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -111,7 +109,7 @@ private function easterSaturday( return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL ); @@ -137,7 +135,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -150,7 +148,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -168,7 +166,7 @@ private function calculateCanberraDay(): void new Holiday( 'canberraDay', ['en' => 'Canberra Day'], - new DateTime($datePattern, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($datePattern, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ) ); @@ -185,10 +183,10 @@ private function calculateReconciliationDay(): void return; } - $date = new DateTime($this->year.'-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year.'-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $day = (int) $date->format('w'); if (1 !== $day) { - $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P'.(8 - $day).'D')); + $date = $date->add(0 === $day ? new \DateInterval('P1D') : new \DateInterval('P'.(8 - $day).'D')); } $this->addHoliday(new Holiday('reconciliationDay', ['en' => 'Reconciliation Day'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 87031bfea..c5fa16b6f 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -78,7 +76,7 @@ private function easterSaturday( return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL ); @@ -104,7 +102,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -117,7 +115,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -133,7 +131,7 @@ private function calculateBankHoliday(): void $this->addHoliday(new Holiday( 'bankHoliday', ['en' => 'Bank Holiday'], - new DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index 324b52711..950def16e 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -77,7 +75,7 @@ private function easterSaturday( return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL ); @@ -103,7 +101,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -116,7 +114,7 @@ private function calculateQueensBirthday(): void */ private function calculateMayDay(): void { - $date = new DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mayDay', ['en' => 'May Day'], $date, $this->locale)); } @@ -134,7 +132,7 @@ private function calculatePicnicDay(): void $this->addHoliday(new Holiday( 'picnicDay', ['en' => 'Picnic Day'], - new DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index cf451af89..9f2bd3946 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -74,7 +73,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -87,9 +86,9 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($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 3255f2fe7..e4ca04e9c 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia\Queensland; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Queensland; @@ -68,11 +66,11 @@ public function initialize(): void */ private function calculatePeoplesDay(): void { - $date = new DateTime('first friday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first friday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($date->format('d') < 5) { - $date = $date->add(new DateInterval('P7D')); + $date = $date->add(new \DateInterval('P7D')); } - $date = $date->add(new DateInterval('P5D')); + $date = $date->add(new \DateInterval('P5D')); $this->addHoliday(new Holiday('peoplesDay', ['en' => 'Ekka People’s Day'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 0b5540407..8f2dae735 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -85,7 +83,7 @@ private function easterSaturday( return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL ); @@ -111,7 +109,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -124,7 +122,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', ['en' => 'Labour Day'], $date, $this->locale)); } @@ -149,7 +147,7 @@ private function calculateAdelaideCupDay(): void $this->addHoliday(new Holiday( 'adelaideCup', ['en' => 'Adelaide Cup'], - new DateTime($cupDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($cupDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -163,7 +161,7 @@ private function calculateAdelaideCupDay(): void */ private function calculateProclamationDay(): void { - $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $christmasDay = new \DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'christmasDay', @@ -175,7 +173,7 @@ private function calculateProclamationDay(): void switch ($christmasDay->format('w')) { case 0: // sunday - $christmasDay->add(new DateInterval('P1D')); + $christmasDay->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'christmasHoliday', ['en' => 'Christmas Holiday'], @@ -183,13 +181,13 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); - $christmasDay->add(new DateInterval('P1D')); + $christmasDay->add(new \DateInterval('P1D')); break; case 5: // friday - $christmasDay->add(new DateInterval('P3D')); + $christmasDay->add(new \DateInterval('P3D')); break; case 6: // saturday - $christmasDay->add(new DateInterval('P2D')); + $christmasDay->add(new \DateInterval('P2D')); $this->addHoliday(new Holiday( 'christmasHoliday', ['en' => 'Christmas Holiday'], @@ -197,10 +195,10 @@ private function calculateProclamationDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); - $christmasDay->add(new DateInterval('P1D')); + $christmasDay->add(new \DateInterval('P1D')); break; default: // monday-thursday - $christmasDay->add(new DateInterval('P1D')); + $christmasDay->add(new \DateInterval('P1D')); break; } diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 72ebf4c46..7cdbe4795 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -56,7 +55,7 @@ public function initialize(): void */ private function calculateEightHoursDay(): void { - $date = new DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('eightHourDay', ['en' => 'Eight Hour Day'], $date, $this->locale)); } @@ -81,7 +80,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -100,7 +99,7 @@ private function calculateRecreationDay(): void $this->addHoliday(new Holiday( 'recreationDay', ['en' => 'Recreation Day'], - new DateTime('first monday of november '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of november '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index ef276de98..694c8de27 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -53,7 +52,7 @@ public function initialize(): void */ private function calculateDevonportShow(): void { - $date = new DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); $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 42c899567..1a34bde66 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -54,8 +52,8 @@ public function initialize(): void */ private function calculateFlindersIslandShow(): void { - $date = new DateTime('third saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $date = $date->sub(new DateInterval('P1D')); + $date = new \DateTime('third saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday('flindersIslandShow', ['en' => 'Flinders Island Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index 70edbbe94..5fcc8414c 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -56,7 +55,7 @@ private function calculateKingIslandShow(): void $this->addHoliday(new Holiday( 'kingIslandShow', ['en' => 'King Island Show'], - new DateTime('first tuesday of march '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first tuesday of march '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 2df8693f2..eaa4e8524 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -54,8 +52,8 @@ public function initialize(): void */ private function calculateLauncestonShow(): void { - $date = new DateTime('second saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $date = $date->sub(new DateInterval('P2D')); + $date = new \DateTime('second saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = $date->sub(new \DateInterval('P2D')); $this->addHoliday(new Holiday('launcestonShow', ['en' => 'Royal Launceston Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index 138b1934f..7f8bcebce 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -54,8 +52,8 @@ public function initialize(): void */ private function calculateBurnieShow(): void { - $date = new DateTime('first saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $date = $date->sub(new DateInterval('P1D')); + $date = new \DateTime('first saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday('burnieShow', ['en' => 'Burnie Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index d947cdba1..5e155514f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania\Northwest; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania\Northwest; @@ -54,8 +52,8 @@ public function initialize(): void */ private function calculateAGFEST(): void { - $date = new DateTime('first thursday of may '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $date = $date->add(new DateInterval('P1D')); + $date = new \DateTime('first thursday of may '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = $date->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday('agfest', ['en' => 'AGFEST'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index 891878777..11b805d43 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -54,8 +52,8 @@ public function initialize(): void */ private function calculateHobartShow(): void { - $date = new DateTime('fourth saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $date = $date->sub(new DateInterval('P2D')); + $date = new \DateTime('fourth saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = $date->sub(new \DateInterval('P2D')); $this->addHoliday(new Holiday('hobartShow', ['en' => 'Royal Hobart Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index 39454d5c7..836c71654 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Australia\Tasmania\South; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania\South; @@ -59,7 +58,7 @@ private function calculateHobartRegatta(): void $this->addHoliday(new Holiday( 'hobartRegatta', ['en' => 'Royal Hobart Regatta'], - new DateTime('second monday of february '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of february '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 09ec7684a..da0d30dc5 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateInterval; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -111,7 +109,7 @@ private function easterSaturday( return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL ); @@ -124,7 +122,7 @@ private function easterSaturday( */ private function calculateLabourDay(): void { - $date = new DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -149,7 +147,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -162,7 +160,7 @@ private function calculateQueensBirthday(): void */ private function calculateMelbourneCupDay(): void { - $date = new DateTime('first Tuesday of November'." $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first Tuesday of November'." $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } @@ -197,7 +195,7 @@ private function calculateAFLGrandFinalDay(): void return; } - $date = new DateTime($aflGrandFinalFriday, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($aflGrandFinalFriday, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'aflGrandFinalFriday', diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index 426531535..cd9ccc10a 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Australia; -use DateTime; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -78,7 +77,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($birthDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -91,7 +90,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new DateTime("first monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -109,7 +108,7 @@ private function calculateWesternAustraliaDay(): void $this->addHoliday(new Holiday( 'westernAustraliaDay', ['en' => 'Western Australia Day'], - new DateTime('first monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 6a96a7f7f..6485ec7ef 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -101,7 +100,7 @@ protected function calculateStLeopoldsDay(): void $this->addHoliday(new Holiday( 'stLeopoldsDay', [], - new DateTime($this->year.'-11-15', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-11-15', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -130,7 +129,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', ['de' => 'Nationalfeiertag'], - new DateTime($this->year.'-10-26', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-10-26', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php index 7fb449ed0..9804eaffb 100644 --- a/src/Yasumi/Provider/Austria/Carinthia.php +++ b/src/Yasumi/Provider/Austria/Carinthia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Austria; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -74,7 +73,7 @@ private function calculatePlebisciteDay(): void $this->addHoliday(new Holiday( 'plebisciteDay', [], - new DateTime($this->year.'-10-10', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-10-10', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php index b342bb338..d8218e4f6 100644 --- a/src/Yasumi/Provider/Austria/Salzburg.php +++ b/src/Yasumi/Provider/Austria/Salzburg.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Austria; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -75,7 +74,7 @@ private function calculateStRupertsDay(): void $this->addHoliday(new Holiday( 'stRupertsDay', [], - new DateTime($this->year.'-9-24', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-9-24', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php index 63c30ed2f..0849e924c 100644 --- a/src/Yasumi/Provider/Austria/UpperAustria.php +++ b/src/Yasumi/Provider/Austria/UpperAustria.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Austria; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -76,7 +75,7 @@ private function calculateStFloriansDay(): void $this->addHoliday(new Holiday( 'stFloriansDay', [], - new DateTime($this->year.'-5-4', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-5-4', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 84f879f50..9f20255db 100644 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -69,7 +68,7 @@ public function initialize(): void 'fr' => 'Fête nationale', 'en' => 'Belgian National Day', 'nl' => 'nationale feestdag', - ], new DateTime("$this->year-7-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-7-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } public function getSources(): array diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index 326a9c9c3..d3ea63469 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -61,7 +60,7 @@ public function initialize(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', 'bs_Latn' => 'Pravoslavni Božić', - ], new DateTime("$this->year-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); + ], new \DateTime("$this->year-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); /* * Independence Day @@ -70,7 +69,7 @@ public function initialize(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'bs_Latn' => 'Dan Nezavisnosti', - ], new DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -80,7 +79,7 @@ public function initialize(): void $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'bs_Latn' => 'Dan državnosti', - ], new DateTime("$this->year-11-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-11-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -89,7 +88,7 @@ public function initialize(): void $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ 'en' => 'Day after New Year’s Day', 'bs_Latn' => 'Nova godina - drugi dan', - ], new DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); /* * Second Labour day @@ -97,7 +96,7 @@ public function initialize(): void $this->addHoliday(new Holiday('secondLabourDay', [ 'en' => 'Second Labour Day', 'bs_Latn' => 'Praznik rada - drugi dan', - ], new DateTime("$this->year-05-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-05-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } public function getSources(): array diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 7a09d20c1..86ca66b8e 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -72,7 +70,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'carnavalMonday', ['pt' => 'Segunda-feira de Carnaval'], - $carnavalMonday->sub(new DateInterval('P48D')), + $carnavalMonday->sub(new \DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -81,7 +79,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'carnavalTuesday', ['pt' => 'Terça-feira de Carnaval'], - $carnavalTuesday->sub(new DateInterval('P47D')), + $carnavalTuesday->sub(new \DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -100,7 +98,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'tiradentesDay', ['pt' => 'Dia de Tiradentes'], - new DateTime("$this->year-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -117,7 +115,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'independenceDay', ['pt' => 'Dia da Independência do Brasil'], - new DateTime("$this->year-09-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-09-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -137,7 +135,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'ourLadyOfAparecidaDay', ['pt' => 'Dia de Nossa Senhora Aparecida'], - new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -153,7 +151,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'allSoulsDay', [], - new DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -171,7 +169,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'proclamationOfRepublicDay', ['pt' => 'Dia da Proclamação da República'], - new DateTime("$this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index 6fc52365e..57efa58f4 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -89,7 +88,7 @@ protected function calculateFamilyDay(): void $this->addHoliday(new Holiday( 'familyDay', [], - new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -113,7 +112,7 @@ protected function calculateVictoriaDay(): void $this->addHoliday(new Holiday( 'victoriaDay', [], - new DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -137,7 +136,7 @@ protected function calculateNationalIndigenousPeoplesDay(): void $this->addHoliday(new Holiday( 'nationalIndigenousPeoplesDay', [], - new DateTime("$this->year-06-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-06-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -161,7 +160,7 @@ protected function calculateCivicHoliday(): void $this->addHoliday(new Holiday( 'civicHoliday', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -185,9 +184,9 @@ private function calculateCanadaDay(): void if ($this->year < 1983) { return; } - $date = new DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (7 === (int) $date->format('N')) { - $date = new DateTime($this->year.'-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year.'-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday( 'canadaDay', @@ -216,7 +215,7 @@ private function calculateThanksgivingDay(): void $this->addHoliday(new Holiday( 'thanksgivingDay', [], - new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -240,7 +239,7 @@ private function calculateRemembranceDay(): void $this->addHoliday(new Holiday( 'remembranceDay', [], - new DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -264,7 +263,7 @@ private function calculateLabourDay(): void $this->addHoliday(new Holiday( 'labourDay', [], - new DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -288,7 +287,7 @@ private function calculateNationalDayForTruthAndReconciliation(): void $this->addHoliday(new Holiday( 'truthAndReconciliationDay', [], - new DateTime("last day of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last day of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index 21f387e7d..cc8ce0ac4 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -74,7 +73,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'heritageDay', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index 4aa9af92f..26a482db2 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -74,7 +73,7 @@ protected function calculateCivicHoliday(): void $this->addHoliday(new Holiday( 'terryFoxDay', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -98,7 +97,7 @@ private function calculateLouisRielDay(): void $this->addHoliday(new Holiday( 'louisRielDay', [], - new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index ebd4556a1..24f2a3e22 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -82,7 +81,7 @@ private function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day'], - new DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -128,7 +127,7 @@ private function calculateOrangemensDay(): void $holiday = new Holiday( 'orangemensDay', [], - new DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index c4141842e..ecadaca14 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -74,7 +73,7 @@ protected function calculateCivicHoliday(): void $this->addHoliday(new Holiday( 'natalHoliday', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -98,7 +97,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'novaScotiaHeritageDay', [], - new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index 68373252a..660c78549 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -74,7 +73,7 @@ private function calculateIslanderDay(): void $this->addHoliday(new Holiday( 'islanderDay', [], - new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -98,7 +97,7 @@ private function calculateGoldCupParadeDay(): void $this->addHoliday(new Holiday( 'goldCupParadeDay', [], - new DateTime("third friday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third friday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index 2275fc17b..7d79cad75 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -85,7 +84,7 @@ private function saintJeanBaptisteDay( return new Holiday( 'saintJeanBaptisteDay', [], - new DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -110,7 +109,7 @@ private function calculateNationalPatriotsDay(): void $this->addHoliday(new Holiday( 'nationalPatriotsDay', [], - new DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index 666ad56b8..7cce867da 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -74,7 +73,7 @@ private function calculateSaskatchewanDay(): void $this->addHoliday(new Holiday( 'saskatchewanDay', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index fdb4d981f..21ac970f2 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Canada; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -75,7 +74,7 @@ private function calculateDiscoveryDay(): void $this->addHoliday(new Holiday( 'discoveryDay', [], - new DateTime("third monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -99,7 +98,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'yukonHeritageDay', [], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 614b9fb25..ec4018016 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -56,7 +54,7 @@ protected function corpusChristi( return new Holiday( 'corpusChristi', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P60D')), + $this->calculateEaster($year, $timezone)->add(new \DateInterval('P60D')), $locale, $type ); @@ -89,7 +87,7 @@ protected function allSaintsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('allSaintsDay', [], new DateTime("$year-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('allSaintsDay', [], new \DateTime("$year-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -121,7 +119,7 @@ protected function assumptionOfMary( return new Holiday( 'assumptionOfMary', [], - new DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -154,7 +152,7 @@ protected function goodFriday( return new Holiday( 'goodFriday', [], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P2D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P2D')), $locale, $type ); @@ -188,7 +186,7 @@ protected function epiphany( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('epiphany', [], new DateTime("$year-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('epiphany', [], new \DateTime("$year-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -219,7 +217,7 @@ protected function stJosephsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stJosephsDay', [], new DateTime("$year-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('stJosephsDay', [], new \DateTime("$year-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -249,7 +247,7 @@ protected function stGeorgesDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stGeorgesDay', [], new DateTime("$year-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('stGeorgesDay', [], new \DateTime("$year-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -275,7 +273,7 @@ protected function calculateOrthodoxEaster(int $year, string $timezone): \DateTi $month = floor(($d + $e + 114) / 31); $day = (($d + $e + 114) % 31) + 1; - return (new DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new DateInterval('P13D')); + return (new \DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new \DateInterval('P13D')); } /** @@ -313,7 +311,7 @@ protected function reformationDay( return new Holiday( 'reformationDay', [], - new DateTime("$year-10-31", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-10-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -390,8 +388,8 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf $easterDays = $pfm + $tmp + 1; // Easter as the number of days after 21st March } - $easter = new DateTime("$year-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); - $easter->add(new DateInterval('P'.$easterDays.'D')); + $easter = new \DateTime("$year-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); + $easter->add(new \DateInterval('P'.$easterDays.'D')); return $easter; } @@ -451,7 +449,7 @@ protected function pentecost( return new Holiday( 'pentecost', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P49D')), + $this->calculateEaster($year, $timezone)->add(new \DateInterval('P49D')), $locale, $type ); @@ -486,7 +484,7 @@ protected function easterMonday( return new Holiday( 'easterMonday', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P1D')), + $this->calculateEaster($year, $timezone)->add(new \DateInterval('P1D')), $locale, $type ); @@ -521,7 +519,7 @@ protected function ascensionDay( return new Holiday( 'ascensionDay', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P39D')), + $this->calculateEaster($year, $timezone)->add(new \DateInterval('P39D')), $locale, $type ); @@ -553,7 +551,7 @@ protected function pentecostMonday( return new Holiday( 'pentecostMonday', [], - $this->calculateEaster($year, $timezone)->add(new DateInterval('P50D')), + $this->calculateEaster($year, $timezone)->add(new \DateInterval('P50D')), $locale, $type ); @@ -589,7 +587,7 @@ protected function christmasEve( return new Holiday( 'christmasEve', [], - new DateTime("$year-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -622,7 +620,7 @@ protected function christmasDay( return new Holiday( 'christmasDay', [], - new DateTime("$year-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -655,7 +653,7 @@ protected function secondChristmasDay( return new Holiday( 'secondChristmasDay', [], - new DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -690,7 +688,7 @@ protected function ashWednesday( return new Holiday( 'ashWednesday', [], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P46D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P46D')), $locale, $type ); @@ -726,7 +724,7 @@ protected function immaculateConception( return new Holiday( 'immaculateConception', [], - new DateTime("$year-12-8", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-12-8", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -763,7 +761,7 @@ protected function stStephensDay( return new Holiday( 'stStephensDay', [], - new DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -799,7 +797,7 @@ protected function maundyThursday( return new Holiday( 'maundyThursday', [], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P3D')), + $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P3D')), $locale, $type ); @@ -833,7 +831,7 @@ protected function stJohnsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stJohnsDay', [], new DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('stJohnsDay', [], new \DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -867,7 +865,7 @@ protected function annunciation( return new Holiday( 'annunciation', [], - new DateTime("$year-03-25", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-03-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 329c5435b..49a6fc11f 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -55,7 +55,7 @@ protected function newYearsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('newYearsDay', [], new DateTime("$year-1-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('newYearsDay', [], new \DateTime("$year-1-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -89,7 +89,7 @@ protected function internationalWorkersDay( return new Holiday( 'internationalWorkersDay', [], - new DateTime("$year-5-1", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-5-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -126,7 +126,7 @@ protected function stMartinsDay( return new Holiday( 'stMartinsDay', [], - new DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -159,7 +159,7 @@ protected function internationalWomensDay( return new Holiday( 'internationalWomensDay', [], - new DateTime("$year-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -192,7 +192,7 @@ protected function newYearsEve( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('newYearsEve', [], new DateTime("$year-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('newYearsEve', [], new \DateTime("$year-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -226,7 +226,7 @@ protected function valentinesDay( return new Holiday( 'valentinesDay', [], - new DateTime("$year-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -261,7 +261,7 @@ protected function worldAnimalDay( return new Holiday( 'worldAnimalDay', [], - new DateTime("$year-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -297,7 +297,7 @@ protected function fathersDay( return new Holiday( 'fathersDay', [], - new DateTime("third sunday of june $year", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("third sunday of june $year", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -333,7 +333,7 @@ protected function mothersDay( return new Holiday( 'mothersDay', [], - new DateTime("second sunday of may $year", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("second sunday of may $year", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -369,7 +369,7 @@ protected function victoryInEuropeDay( return new Holiday( 'victoryInEuropeDay', [], - new DateTime("$year-5-8", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-5-8", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -407,7 +407,7 @@ protected function armisticeDay( return new Holiday( 'armisticeDay', [], - new DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index e64bf30b6..64465d76b 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -68,7 +67,7 @@ public function initialize(): void $this->addHoliday(new Holiday('antifascistStruggleDay', [ 'en' => 'Day of Antifascist Struggle', 'hr' => 'Dan antifašističke borbe', - ], new DateTime("$this->year-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } $this->calculateStatehoodDay(); @@ -97,9 +96,9 @@ private function calculateStatehoodDay(): void $statehoodDayDate = null; if ($this->year >= 1991 && $this->year < 2020) { - $statehoodDayDate = new DateTime("$this->year-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $statehoodDayDate = new \DateTime("$this->year-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2020) { - $statehoodDayDate = new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $statehoodDayDate = new \DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if (null !== $statehoodDayDate) { @@ -131,7 +130,7 @@ private function calculateHomelandThanksgivingDay(): void $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, - new DateTime("$this->year-8-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-8-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -150,7 +149,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'hr' => 'Dan neovisnosti', - ], new DateTime("$this->year-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -166,7 +165,7 @@ private function calculateRemembranceDayForHomelandWarVictims(): void $this->addHoliday(new Holiday('remembranceDay', [ 'en' => 'Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja', 'hr' => 'Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje', - ], new DateTime("$this->year-11-18", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-11-18", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index fe7db41e3..e8a593f2d 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -91,7 +90,7 @@ private function calculateRenewalOfCzechIndependenceDay(): void '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)), + new \DateTime($this->year.'-01-01', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -125,7 +124,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new DateTime($this->year.'-07-5', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-07-5', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -150,7 +149,7 @@ private function calculateJanHusDay(): void $this->addHoliday(new Holiday( 'janHusDay', ['cs' => 'Den upálení mistra Jana Husa', 'en' => 'Jan Hus Day'], - new DateTime($this->year.'-07-6', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-07-6', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -181,7 +180,7 @@ private function calculateCzechStatehoodDay(): void 'cs' => 'Den české státnosti', 'en' => 'St. Wenceslas Day (Czech Statehood Day)', ], - new DateTime($this->year.'-09-28', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-09-28', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -201,7 +200,7 @@ private function calculateIndependentCzechoslovakStateDay(): void $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs' => 'Den vzniku samostatného československého státu', 'en' => 'Independent Czechoslovak State Day', - ], new DateTime($this->year.'-10-28', new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime($this->year.'-10-28', new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -222,7 +221,7 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new DateTime($this->year.'-11-17', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-11-17', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index deeef714c..72d54b23b 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -107,7 +106,7 @@ private function calculateGreatPrayerDay(): void $this->addHoliday(new Holiday( 'greatPrayerDay', ['da' => 'store bededag'], - new DateTime("fourth friday $easter", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("fourth friday $easter", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -135,7 +134,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['da' => 'grundlovsdag'], - new DateTime("$this->year-6-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 8370df710..c6e3170eb 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -100,7 +99,7 @@ private function calculateStJohnsDay(): void $this->addHoliday(new Holiday( 'stJohnsDay', [], - new DateTime($stJohnsDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($stJohnsDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -132,7 +131,7 @@ private function calculateAllSaintsDay(): void $this->addHoliday(new Holiday( 'allSaintsDay', [], - new DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -161,7 +160,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['fi' => 'Itsenäisyyspäivä'], - new DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 291e70753..110d0a951 100644 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -102,7 +101,7 @@ private function calculateBastilleDay(): void $this->addHoliday(new Holiday('bastilleDay', [ 'en' => 'Bastille Day', 'fr' => 'La Fête nationale', - ], new DateTime("$this->year-7-14", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-7-14", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 0d49459ef..f5439239a 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -100,7 +99,7 @@ private function calculateGermanUnityDay(): void $this->addHoliday(new Holiday( 'germanUnityDay', ['de' => 'Tag der Deutschen Einheit'], - new DateTime($this->year.'-10-3', new \DateTimeZone($this->timezone)), + new \DateTime($this->year.'-10-3', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 5d77e3420..701d7dc14 100644 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Germany; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function dayOfLiberation( return new Holiday( 'dayOfLiberation', [], - new DateTime('2020-05-08', DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime('2020-05-08', DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index 83b4579cd..7052a7def 100644 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Germany; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -96,7 +95,7 @@ private function calculateRepentanceAndPrayerDay(): void $this->addHoliday(new Holiday( 'repentanceAndPrayerDay', ['de' => 'Buß- und Bettag'], - new DateTime("next wednesday $this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next wednesday $this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 7cbdfe886..caf39f7fb 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -96,7 +94,7 @@ private function calculateThreeHolyHierarchs(): void $this->addHoliday(new Holiday( 'threeHolyHierarchs', ['el' => 'Τριών Ιεραρχών'], - new DateTime("$this->year-1-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-1-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -121,7 +119,7 @@ private function calculateCleanMonday(): void $this->addHoliday(new Holiday( 'cleanMonday', ['el' => 'Καθαρά Δευτέρα'], - $this->calculateEaster($this->year, $this->timezone)->sub(new DateInterval('P48D')), + $this->calculateEaster($this->year, $this->timezone)->sub(new \DateInterval('P48D')), $this->locale )); } @@ -156,7 +154,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['el' => 'Εικοστή Πέμπτη Μαρτίου'], - new DateTime("$this->year-3-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-3-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -180,7 +178,7 @@ private function calculateOhiDay(): void $this->addHoliday(new Holiday( 'ohiDay', ['el' => 'Επέτειος του Όχι'], - new DateTime("$this->year-10-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -204,7 +202,7 @@ private function calculatePolytechnio(): void $this->addHoliday(new Holiday( 'polytechnio', ['el' => 'Πολυτεχνείο'], - new DateTime("$this->year-11-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index a5f7c7bf5..47da42879 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -70,7 +69,7 @@ public function initialize(): void $this->addHoliday(new Holiday('memorialDay1848', [ 'en' => 'Memorial day of the 1848 Revolution', 'hu' => 'Az 1848-as forradalom ünnepe', - ], new DateTime("$this->year-3-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-3-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -80,7 +79,7 @@ public function initialize(): void $this->addHoliday(new Holiday('stateFoundation', [ 'en' => 'State Foundation Day', 'hu' => 'Az államalapítás ünnepe', - ], new DateTime("$this->year-8-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-8-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -90,7 +89,7 @@ public function initialize(): void $this->addHoliday(new Holiday('memorialDay1956', [ 'en' => 'Memorial day of the 1956 Revolution', 'hu' => 'Az 1956-os forradalom ünnepe', - ], new DateTime("$this->year-10-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-10-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 6a6f0e756..6dc2ff61d 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -71,7 +70,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'augustHoliday', ['en' => 'August Holiday', 'ga' => 'Lá Saoire i mí Lúnasa'], - new DateTime("next monday $this->year-7-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next monday $this->year-7-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); $this->calculateOctoberHoliday(); @@ -167,7 +166,7 @@ private function calculateChristmasDay(): void $holiday = new Holiday( 'christmasDay', ['en' => 'Christmas Day', 'ga' => 'Lá Nollag'], - new DateTime($this->year.'-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -207,7 +206,7 @@ private function calculateStStephensDay(): void $holiday = new Holiday( 'stStephensDay', [], - new DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -252,7 +251,7 @@ private function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day', 'ga' => 'Lá Fhéile Pádraig'], - new DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -298,7 +297,7 @@ private function calculateMayDay(): void $this->addHoliday(new Holiday( 'mayDay', ['en' => 'May Day', 'ga' => 'Lá Bealtaine'], - new DateTime("next monday $this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next monday $this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -326,7 +325,7 @@ private function calculateJuneHoliday(): void $this->addHoliday(new Holiday( 'juneHoliday', ['en' => 'June Holiday', 'ga' => 'Lá Saoire i mí an Mheithimh'], - new DateTime("next monday $this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next monday $this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -353,7 +352,7 @@ private function calculateOctoberHoliday(): void $this->addHoliday(new Holiday( 'octoberHoliday', ['en' => 'October Holiday', 'ga' => 'Lá Saoire i mí Dheireadh Fómhair'], - new DateTime("previous monday $this->year-11-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("previous monday $this->year-11-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 1308f959e..879506450 100644 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -95,7 +94,7 @@ private function calculateLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['it' => 'Festa della Liberazione'], - new DateTime("$this->year-4-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-4-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -123,7 +122,7 @@ private function calculateRepublicDay(): void $this->addHoliday(new Holiday( 'republicDay', ['it' => 'Festa della Repubblica'], - new DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 26cbc702d..1261a073f 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -15,9 +15,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; -use DateTimeInterface; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -132,7 +129,7 @@ private function calculateNationalFoundationDay(): void 'en' => 'National Foundation Day', 'ja' => '建国記念の日', ], - new DateTime("$this->year-2-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-2-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -152,7 +149,7 @@ private function calculateShowaDay(): void 'en' => 'Showa Day', 'ja' => '昭和の日', ], - new DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -172,7 +169,7 @@ private function calculateConstitutionMemorialDay(): void 'en' => 'Constitution Memorial Day', 'ja' => '憲法記念日', ], - new DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -192,7 +189,7 @@ private function calculateChildrensDay(): void 'en' => 'Children’s Day', 'ja' => 'こどもの日', ], - new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -209,7 +206,7 @@ private function calculateCultureDay(): void $this->addHoliday(new Holiday( 'cultureDay', ['en' => 'Culture Day', 'ja' => '文化の日'], - new DateTime("$this->year-11-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -226,7 +223,7 @@ private function calculateLaborThanksgivingDay(): void $this->addHoliday(new Holiday( 'laborThanksgivingDay', ['en' => 'Labor Thanksgiving Day', 'ja' => '勤労感謝の日'], - new DateTime("$this->year-11-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-11-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -255,7 +252,7 @@ private function calculateEmperorsBirthday(): void $this->addHoliday(new Holiday( 'emperorsBirthday', ['en' => 'Emperors Birthday', 'ja' => '天皇誕生日'], - new DateTime($emperorsBirthday, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($emperorsBirthday, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -294,7 +291,7 @@ private function calculateVernalEquinoxDay(): void $this->addHoliday(new Holiday( 'vernalEquinoxDay', ['en' => 'Vernal Equinox Day', 'ja' => '春分の日'], - new DateTime("$this->year-3-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-3-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -316,12 +313,12 @@ private function calculateComingOfAgeDay(): void { $date = null; if ($this->year >= 2000) { - $date = new DateTime("second monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1948) { - $date = new DateTime("$this->year-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if ($date instanceof DateTimeInterface) { + if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'comingOfAgeDay', ['en' => 'Coming of Age Day', 'ja' => '成人の日'], @@ -346,12 +343,12 @@ private function calculateGreeneryDay(): void { $date = null; if ($this->year >= 2007) { - $date = new DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1989) { - $date = new DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if ($date instanceof DateTimeInterface) { + if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'greeneryDay', ['en' => 'Greenery Day', 'ja' => 'みどりの日'], @@ -379,14 +376,14 @@ private function calculateMarineDay(): void $date = null; if (2021 === $this->year) { // For Olympic 2021 Tokyo (rescheduled due to the COVID-19 pandemic) - $date = new DateTime("$this->year-7-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-7-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2003) { - $date = new DateTime("third monday of july $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("third monday of july $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new DateTime("$this->year-7-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-7-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if ($date instanceof DateTimeInterface) { + if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'marineDay', ['en' => 'Marine Day', 'ja' => '海の日'], @@ -411,15 +408,15 @@ private function calculateMountainDay(): void $date = null; if (2021 === $this->year) { // For Olympic 2021 Tokyo (after COVID-19) - $date = new DateTime("$this->year-8-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-8-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif (2020 === $this->year) { // For Olympic 2020 Tokyo - $date = new DateTime("$this->year-8-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-8-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2016) { - $date = new DateTime("$this->year-8-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-8-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if ($date instanceof DateTimeInterface) { + if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'mountainDay', ['en' => 'Mountain Day', 'ja' => '山の日'], @@ -445,12 +442,12 @@ private function calculateRespectForTheAgeDay(): void { $date = null; if ($this->year >= 2003) { - $date = new DateTime("third monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("third monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new DateTime("$this->year-9-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-9-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } - if ($date instanceof DateTimeInterface) { + if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'respectfortheAgedDay', ['en' => 'Respect for the Aged Day', 'ja' => '敬老の日'], @@ -478,14 +475,14 @@ private function calculateSportsDay(): void $date = null; if (2021 === $this->year) { // For Olympic 2021 Tokyo (after COVID-19) - $date = new DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif (2020 === $this->year) { // For Olympic 2020 Tokyo - $date = new DateTime("$this->year-7-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-7-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2000) { - $date = new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new DateTime("$this->year-10-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-10-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $holidayName = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; @@ -493,7 +490,7 @@ private function calculateSportsDay(): void $holidayName = ['en' => 'Sports Day', 'ja' => 'スポーツの日']; } - if ($date instanceof DateTimeInterface) { + if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'sportsDay', $holidayName, @@ -536,7 +533,7 @@ private function calculateAutumnalEquinoxDay(): void $this->addHoliday(new Holiday( 'autumnalEquinoxDay', ['en' => 'Autumnal Equinox Day', 'ja' => '秋分の日'], - new DateTime("$this->year-9-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -567,10 +564,10 @@ private function calculateSubstituteHolidays(): void if ($this->year >= 2007) { // Find next week day (not being another holiday) while (\in_array($date, $dates, false)) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); } } elseif ($holiday >= '1973-04-12') { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); if (\in_array($date, $dates, false)) { continue; // @codeCoverageIgnore } @@ -603,7 +600,7 @@ private function calculateCoronationDay(): void $this->addHoliday(new Holiday( 'coronationDay', ['en' => 'Coronation Day', 'ja' => '即位の日'], - new DateTime("$this->year-5-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -621,7 +618,7 @@ private function calculateEnthronementProclamationCeremony(): void $this->addHoliday(new Holiday( 'enthronementProclamationCeremony', ['en' => 'Enthronement Proclamation Ceremony', 'ja' => '即位礼正殿の儀'], - new DateTime("$this->year-10-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -656,7 +653,7 @@ private function calculateBridgeHolidays(): void // Determine if gap between holidays is one day and create bridge holiday if (2 === (int) $previous->diff($datesIterator->current())->format('%a')) { $bridgeDate = clone $previous; - $bridgeDate->add(new DateInterval('P1D')); + $bridgeDate->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday('bridgeDay'.$counter, [ 'en' => 'Bridge Public holiday', diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 0783eb388..9b3faaee7 100644 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -91,7 +90,7 @@ private function calculateEuropeDay(): void $this->addHoliday(new Holiday('europeDay', [ 'en_US' => 'Europe day', 'fr' => 'La Journée de l’Europe', - ], new DateTime("$this->year-5-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-5-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -116,6 +115,6 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', 'fr' => 'La Fête nationale', - ], new DateTime("$this->year-6-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-6-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index ff95d4796..94026e978 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -113,7 +111,7 @@ private function calculateCarnival(): void $this->addHoliday(new Holiday( 'carnivalDay', ['en' => 'Carnival', 'nl' => 'Carnaval'], - $carnivalDay1->sub(new DateInterval('P49D')), + $carnivalDay1->sub(new \DateInterval('P49D')), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -125,7 +123,7 @@ private function calculateCarnival(): void $this->addHoliday(new Holiday( 'secondCarnivalDay', ['en' => 'Carnival', 'nl' => 'Carnaval'], - $carnivalDay2->sub(new DateInterval('P48D')), + $carnivalDay2->sub(new \DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -137,7 +135,7 @@ private function calculateCarnival(): void $this->addHoliday(new Holiday( 'thirdCarnivalDay', ['en' => 'Carnival', 'nl' => 'Carnaval'], - $carnivalDay3->sub(new DateInterval('P47D')), + $carnivalDay3->sub(new \DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -197,7 +195,7 @@ private function calculateStNicholasDay(): void $this->addHoliday(new Holiday( 'stNicholasDay', ['en' => 'St. Nicholas’ Day', 'nl' => 'Sinterklaas'], - new DateTime("$this->year-12-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-12-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -220,7 +218,7 @@ private function calculateHalloween(): void $this->addHoliday(new Holiday( 'halloween', ['en' => 'Halloween', 'nl' => 'Halloween'], - new DateTime("$this->year-10-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -239,7 +237,7 @@ private function calculatePrincesDay(): void $this->addHoliday(new Holiday( 'princesDay', ['en' => 'Prince’s Day', 'nl' => 'Prinsjesdag'], - new DateTime("third tuesday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third tuesday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -257,14 +255,14 @@ private function calculatePrincesDay(): void private function calculateQueensday(): void { if ($this->year >= 1891 && $this->year <= 2013) { - $date = new DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year <= 1948) { - $date = new DateTime("$this->year-8-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-8-31", DateTimeZoneFactory::getDateTimeZone($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->year < 1980 ? $date->add(new \DateInterval('P1D')) : $date->sub(new \DateInterval('P1D')); } $this->addHoliday(new Holiday( @@ -287,10 +285,10 @@ private function calculateQueensday(): void private function calculateKingsday(): void { if ($this->year >= 2014) { - $date = new DateTime("$this->year-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (0 === (int) $date->format('w')) { - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); } $this->addHoliday(new Holiday( @@ -315,7 +313,7 @@ private function calculateCommemorationLiberationDay(): void $this->addHoliday(new Holiday( 'commemorationDay', ['en' => 'Commemoration Day', 'nl' => 'dodenherdenking'], - new DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -324,7 +322,7 @@ private function calculateCommemorationLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], - new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, $holidayType )); diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index c8be986c8..837f49a98 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -84,20 +82,20 @@ public function getSources(): array */ private function calculateNewYearHolidays(): void { - $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $dayAfterNewYearsDay = new DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $newYearsDay = new \DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $dayAfterNewYearsDay = new \DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); switch ($newYearsDay->format('w')) { case 0: - $newYearsDay->add(new DateInterval('P1D')); - $dayAfterNewYearsDay->add(new DateInterval('P1D')); + $newYearsDay->add(new \DateInterval('P1D')); + $dayAfterNewYearsDay->add(new \DateInterval('P1D')); break; case 5: - $dayAfterNewYearsDay->add(new DateInterval('P2D')); + $dayAfterNewYearsDay->add(new \DateInterval('P2D')); break; case 6: - $newYearsDay->add(new DateInterval('P2D')); - $dayAfterNewYearsDay->add(new DateInterval('P2D')); + $newYearsDay->add(new \DateInterval('P2D')); + $dayAfterNewYearsDay->add(new \DateInterval('P2D')); break; } @@ -128,7 +126,7 @@ private function calculateWaitangiDay(): void return; } - $date = new DateTime("$this->year-02-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-02-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 2015 && !$this->isWorkingDay($date)) { $date->modify('next monday'); @@ -158,7 +156,7 @@ private function calculateAnzacDay(): void return; } - $date = new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 2015 && !$this->isWorkingDay($date)) { $date->modify('next monday'); @@ -194,7 +192,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new DateTime("first monday of june $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of june $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -224,7 +222,7 @@ private function calculateLabourDay(): void return; } - $date = new DateTime( + $date = new \DateTime( ($this->year < 1910 ? 'second wednesday of october' : 'fourth monday of october')." $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone) ); @@ -249,19 +247,19 @@ private function calculateLabourDay(): void */ private function calculateChristmasHolidays(): void { - $christmasDay = new DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $boxingDay = new DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $christmasDay = new \DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $boxingDay = new \DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); switch ($christmasDay->format('w')) { case 0: - $christmasDay->add(new DateInterval('P2D')); + $christmasDay->add(new \DateInterval('P2D')); break; case 5: - $boxingDay->add(new DateInterval('P2D')); + $boxingDay->add(new \DateInterval('P2D')); break; case 6: - $christmasDay->add(new DateInterval('P2D')); - $boxingDay->add(new DateInterval('P2D')); + $christmasDay->add(new \DateInterval('P2D')); + $boxingDay->add(new \DateInterval('P2D')); break; } diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index f9c9a1bca..d0adf205e 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -96,7 +95,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['nb' => 'grunnlovsdagen'], - new DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index b0fbdfa9e..d4872f81a 100644 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -97,7 +96,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'pl' => 'Narodowe Święto Niepodległości', - ], new DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -124,6 +123,6 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday('constitutionDay', [ 'en' => 'Constitution Day', 'pl' => 'Święto Narodowe Trzeciego Maja', - ], new DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 41e508e29..acff2e1a7 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -95,7 +94,7 @@ private function calculateCarnationRevolutionDay(): void $this->addHoliday(new Holiday( '25thApril', ['pt' => 'Dia da Liberdade'], - new DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -142,7 +141,7 @@ private function calculatePortugalDay(): void $this->addHoliday(new Holiday( 'portugalDay', ['pt' => 'Dia de Portugal'], - new DateTime("$this->year-06-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-06-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -176,7 +175,7 @@ private function calculatePortugueseRepublicDay(): void $this->addHoliday(new Holiday( 'portugueseRepublic', ['pt' => 'Implantação da República Portuguesa'], - new DateTime("$this->year-10-05", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-05", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -232,7 +231,7 @@ private function calculateRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday( 'restorationOfIndependence', ['pt' => 'Restauração da Independência'], - new DateTime("$this->year-12-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-12-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 9f4ebb2f4..d4e1ef0ac 100644 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -111,7 +110,7 @@ private function calculateDayAfterNewYearsDay(): void $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', [], - new DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -137,7 +136,7 @@ private function calculateUnitedPrincipalitiesDay(): void $this->addHoliday(new Holiday('unitedPrincipalitiesDay', [ 'en' => 'Union Day / Small Union', 'ro' => 'Unirea Principatelor Române / Mica Unire', - ], new DateTime("$this->year-01-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-01-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -159,7 +158,7 @@ private function calculateStAndrewDay(): void $this->addHoliday(new Holiday( 'stAndrewsDay', [], - new DateTime($this->year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -202,7 +201,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday('nationalDay', [ 'en' => 'National Day', 'ro' => 'Ziua Națională', - ], new DateTime($nationalDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime($nationalDay, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -227,7 +226,7 @@ private function calculateConstantinBrancusiDay(): void 'en' => 'Constantin Brâncuși day', 'ro' => 'Ziua Constantin Brâncuși', ], - new DateTime("$this->year-02-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-02-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -257,7 +256,7 @@ private function calculateChildrensDay(): void 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', ], - new DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -267,7 +266,7 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday('childrensDay', [ 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', - ], new DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 2c5bc2f0e..f0f2d58c6 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -133,7 +132,7 @@ private function calculateSlovakIndependenceDay(): void 'sk' => 'Deň vzniku Slovenskej republiky', 'en' => 'Day of the Establishment of the Slovak Republic', ], - new DateTime($this->year.'-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -159,7 +158,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new DateTime($this->year.'-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -183,7 +182,7 @@ private function calculateSlovakNationalUprisingDay(): void 'sk' => 'Výročie Slovenského národného povstania', 'en' => 'Slovak National Uprising Day', ], - new DateTime($this->year.'-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -207,7 +206,7 @@ private function calculateSlovakConstitutionDay(): void 'sk' => 'Deň Ústavy Slovenskej republiky', 'en' => 'Day of the Constitution of the Slovak Republic', ], - new DateTime($this->year.'-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -232,7 +231,7 @@ private function calculateOurLadyOfSorrowsDay(): void $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', 'en' => 'Our Lady of Sorrows Day', - ], new DateTime($this->year.'-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); + ], new \DateTime($this->year.'-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } /** @@ -254,7 +253,7 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new DateTime($this->year.'-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index d22b8ed48..516ba572b 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -15,8 +15,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -111,7 +109,7 @@ private function calculateHumanRightsDay(): void $this->addHoliday(new Holiday( 'humanRightsDay', ['en' => 'Human Rights Day'], - new DateTime($this->year.'-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -133,7 +131,7 @@ private function calculateFamilyDay(): void $this->addHoliday(new Holiday( 'familyDay', ['en' => 'Family Day'], - $this->calculateEaster($this->year, $this->timezone)->add(new DateInterval('P1D')), + $this->calculateEaster($this->year, $this->timezone)->add(new \DateInterval('P1D')), $this->locale )); } @@ -156,7 +154,7 @@ private function calculateFreedomDay(): void $this->addHoliday(new Holiday( 'freedomDay', ['en' => 'Freedom Day'], - new DateTime($this->year.'-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -183,7 +181,7 @@ private function calculateYouthDay(): void $this->addHoliday(new Holiday( 'youthDay', ['en' => 'Youth Day'], - new DateTime($this->year.'-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -210,7 +208,7 @@ private function calculate2016MunicipalElectionsDay(): void $this->addHoliday(new Holiday( '2016MunicipalElectionsDay', ['en' => '2016 Municipal Elections Day'], - new DateTime('2016-8-3', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('2016-8-3', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -235,7 +233,7 @@ private function calculateNationalWomensDay(): void $this->addHoliday(new Holiday( 'nationalWomensDay', ['en' => 'National Women’s Day'], - new DateTime($this->year.'-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -260,7 +258,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'heritageDay', ['en' => 'Heritage Day'], - new DateTime($this->year.'-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -287,7 +285,7 @@ private function calculateDayOfReconciliation(): void $this->addHoliday(new Holiday( 'reconciliationDay', ['en' => 'Day of Reconciliation'], - new DateTime($this->year.'-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -317,7 +315,7 @@ private function calculateSubstituteDayOfGoodwill(): void $this->addHoliday(new Holiday( 'substituteDayOfGoodwill', ['en' => 'Day of Goodwill observed'], - new DateTime('2016-12-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('2016-12-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -340,7 +338,7 @@ private function calculateSubstituteHolidays(): void // Substitute holiday is on a Monday in case the holiday falls on a Sunday if (0 === (int) $holiday->format('w')) { $date = clone $holiday; - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->addHoliday(new SubstituteHoliday( $holiday, diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 805d2e98e..7f8869763 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -15,8 +15,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -177,7 +175,7 @@ private function calculateNewYearsDay(): void $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', [], - new DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -185,7 +183,7 @@ private function calculateNewYearsDay(): void $this->addHoliday(new Holiday( 'twoDaysLaterNewYearsDay', ['en' => 'Two Days Later New Year’s Day', 'ko' => '새해 연휴'], - new DateTime("$this->year-1-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-1-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -203,7 +201,7 @@ private function calculateNewYearsDay(): void private function calculateSeollal(): void { if ($this->year >= 1985 && isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { - $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $seollal = new \DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'seollal', ['en' => 'Seollal', 'ko' => '설날'], @@ -212,7 +210,7 @@ private function calculateSeollal(): void )); if ($this->year > 1989) { $dayBeforeSeollal = clone $seollal; - $dayBeforeSeollal->sub(new DateInterval('P1D')); + $dayBeforeSeollal->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'dayBeforeSeollal', ['en' => 'Day before Seollal', 'ko' => '설날 연휴'], @@ -220,7 +218,7 @@ private function calculateSeollal(): void $this->locale )); $dayAfterSeollal = clone $seollal; - $dayAfterSeollal->add(new DateInterval('P1D')); + $dayAfterSeollal->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'dayAfterSeollal', ['en' => 'Day after Seollal', 'ko' => '설날 연휴'], @@ -244,7 +242,7 @@ private function calculateBuddhasBirthday(): void $this->addHoliday(new Holiday( 'buddhasBirthday', ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'], - new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -267,7 +265,7 @@ private function calculateChuseok(): void $chuseok = new Holiday( 'chuseok', ['en' => 'Chuseok', 'ko' => '추석'], - new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); $this->addHoliday($chuseok); @@ -277,7 +275,7 @@ private function calculateChuseok(): void $this->addHoliday(new Holiday( 'dayAfterChuseok', ['en' => 'Day after Chuseok', 'ko' => '추석 연휴'], - (clone $chuseok)->add(new DateInterval('P1D')), + (clone $chuseok)->add(new \DateInterval('P1D')), $this->locale )); } @@ -287,7 +285,7 @@ private function calculateChuseok(): void $this->addHoliday(new Holiday( 'dayBeforeChuseok', ['en' => 'Day before Chuseok', 'ko' => '추석 연휴'], - (clone $chuseok)->sub(new DateInterval('P1D')), + (clone $chuseok)->sub(new \DateInterval('P1D')), $this->locale )); } @@ -307,7 +305,7 @@ private function calculateIndependenceMovementDay(): void $this->addHoliday(new Holiday( 'independenceMovementDay', ['en' => 'Independence Movement Day', 'ko' => '삼일절'], - new DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -326,7 +324,7 @@ private function calculateArborDay(): void $this->addHoliday(new Holiday( 'arborDay', ['en' => 'Arbor Day', 'ko' => '식목일'], - new DateTime("$this->year-4-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-4-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -345,7 +343,7 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday( 'childrensDay', ['en' => 'Children’s Day', 'ko' => '어린이날'], - new DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -364,7 +362,7 @@ private function calculateMemorialDay(): void $this->addHoliday(new Holiday( 'memorialDay', ['en' => 'Memorial Day', 'ko' => '현충일'], - new DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -386,7 +384,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['en' => 'Constitution Day', 'ko' => '제헌절'], - new DateTime("$this->year-7-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-7-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -405,7 +403,7 @@ private function calculateLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'ko' => '광복절'], - new DateTime("$this->year-8-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-8-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -424,7 +422,7 @@ private function calculateArmedForcesDay(): void $this->addHoliday(new Holiday( 'armedForcesDay', ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], - new DateTime("$this->year-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -443,7 +441,7 @@ private function calculateNationalFoundationDay(): void $this->addHoliday(new Holiday( 'nationalFoundationDay', ['en' => 'National Foundation Day', 'ko' => '개천절'], - new DateTime("$this->year-10-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -462,7 +460,7 @@ private function calculateHangulDay(): void $this->addHoliday(new Holiday( 'hangulDay', ['en' => 'Hangul Day', 'ko' => '한글날'], - new DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -586,8 +584,8 @@ private function calculateSubstituteHolidays(): void // And weekends are keyed by string start with 'weekend:'. // For the substitute, we will use first item in queue. $origin = $this->getHoliday($names[0]); - $nextWorkingDay = DateTime::createFromFormat('Y-m-d', $day, $tz); - if ($nextWorkingDay instanceof DateTime) { + $nextWorkingDay = \DateTime::createFromFormat('Y-m-d', $day, $tz); + if ($nextWorkingDay instanceof \DateTime) { $workDay = $this->nextWorkingDay($nextWorkingDay); $this->addSubstituteHoliday($origin, $workDay->format('Y-m-d')); } @@ -597,9 +595,9 @@ private function calculateSubstituteHolidays(): void /** * Helper method to find a first working day after specific date. */ - private function nextWorkingDay(DateTime $date): DateTime + private function nextWorkingDay(\DateTime $date): \DateTime { - $interval = new DateInterval('P1D'); + $interval = new \DateInterval('P1D'); $next = clone $date; do { $next->add($interval); @@ -624,7 +622,7 @@ private function addSubstituteHoliday(?Holiday $origin, string $date_str): void $this->addHoliday(new SubstituteHoliday( $origin, [], - new DateTime($date_str, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($date_str, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index e48845242..bc66b729d 100644 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -96,7 +95,7 @@ private function calculateNationalDay(): void 'ca' => 'Festa Nacional d’Espanya', 'es' => 'Fiesta Nacional de España', ], - new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -125,7 +124,7 @@ private function calculateConstitutionDay(): void 'ca' => 'Dia de la Constitució', 'es' => 'Día de la Constitución', ], - new DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 0fc1361ca..1b6efbcad 100644 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -81,7 +80,7 @@ private function calculateAndalusiaDay(): void $this->addHoliday(new Holiday( 'andalusiaDay', ['es' => 'Día de Andalucía'], - new DateTime("$this->year-2-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-2-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 85beca4fd..b223f00c1 100644 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -83,7 +82,7 @@ private function calculateAsturiasDay(): void $this->addHoliday(new Holiday( 'asturiasDay', ['es' => 'Día de Asturias'], - new DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 1f3cc75d6..5bb74505c 100644 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function calculateBalearicIslandsDay(): void 'ca' => 'Diada de les Illes Balears', 'es' => 'Día de les Illes Balears', ], - new DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 519b74a3f..955811f7a 100644 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -83,7 +82,7 @@ private function calculateBasqueCountryDay(): void $this->addHoliday(new Holiday( 'basqueCountryDay', ['es' => 'Euskadi Eguna'], - new DateTime("$this->year-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index ef1c0bd3c..e21609916 100644 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -82,7 +81,7 @@ private function calculateCanaryIslandsDay(): void $this->addHoliday(new Holiday( 'canaryIslandsDay', ['es' => 'Día de las Canarias'], - new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 492d9f4c2..c09567736 100644 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function calculateCantabriaDay(): void $this->addHoliday(new Holiday( 'cantabriaDay', ['es' => 'Día de Cantabria'], - new DateTime("second sunday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("second sunday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 2ee3254ca..9a46064d1 100644 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -83,7 +82,7 @@ private function calculateCastileAndLeonDay(): void $this->addHoliday(new Holiday( 'castileAndLeonDay', ['es' => 'Día de Castilla y León'], - new DateTime("$this->year-4-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-4-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index 647ad8fd2..d1b71861f 100644 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -15,7 +15,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function calculateCastillaLaManchaDay(): void $this->addHoliday(new Holiday( 'castillaLaManchaDay', ['es' => 'Día de la Región Castilla-La Mancha'], - new DateTime("$this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index 8961f651c..4b76d3ca3 100644 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -89,7 +88,7 @@ private function calculateNationalDayOfCatalonia(): void 'ca' => 'Diada Nacional de Catalunya', 'es' => 'Diada Nacional de Cataluña', ], - new DateTime("$this->year-9-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 94270a405..9f4e86175 100644 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -80,7 +79,7 @@ private function calculateDayOfCeuta(): void $this->addHoliday(new Holiday( 'ceutaDay', ['es' => 'Día de Ceuta'], - new DateTime("$this->year-9-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 2417a8a2f..1b069bc1f 100644 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -86,7 +85,7 @@ private function calculateDosdeMayoUprisingDay(): void $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', ['es' => 'Fiesta de la Comunidad de Madrid'], - new DateTime("$this->year-5-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index fed1a1326..7f674f0ae 100644 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -83,7 +82,7 @@ private function calculateDayOfExtremadura(): void $this->addHoliday(new Holiday( 'extremaduraDay', ['es' => 'Día de Extremadura'], - new DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index b2127147e..8556633d3 100644 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -84,7 +83,7 @@ private function calculateGalicianLiteratureDay(): void $this->addHoliday(new Holiday('galicianLiteratureDay', [ 'es' => 'Día de las Letras Gallegas', 'gl' => 'Día das Letras Galegas', - ], new DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -111,7 +110,7 @@ private function calculateStJamesDay(): void if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ 'es' => 'Santiago Apostol', - ], new DateTime("$this->year-7-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-7-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index d4e9f88ea..95a9571f6 100644 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -79,7 +78,7 @@ private function calculateLaRiojaDay(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ 'es' => 'Día de La Rioja', - ], new DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index a9dd42559..8d176b4b8 100644 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -80,7 +79,7 @@ private function calculateDayOfMurcia(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ 'es' => 'Día de la Región de Murcia', - ], new DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 9981f605e..c4bb590e3 100644 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Spain; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -91,7 +90,7 @@ private function calculateValencianCommunityDay(): void 'ca' => 'Diada Nacional del País Valencià', 'es' => 'Día de la Comunidad Valenciana', ], - new DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 6474af36f..7498c574e 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -100,7 +98,7 @@ private function calculateEpiphanyEve(): void $this->addHoliday(new Holiday( 'epiphanyEve', [], - new DateTime("$this->year-1-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-1-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -127,7 +125,7 @@ private function calculateWalpurgisEve(): void $this->addHoliday(new Holiday( 'walpurgisEve', [], - new DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -154,7 +152,7 @@ private function calculateWalpurgisEve(): void */ private function calculateStJohnsHolidays(): void { - $date = new DateTime("$this->year-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'stJohnsDay', [], @@ -162,7 +160,7 @@ private function calculateStJohnsHolidays(): void $this->locale )); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'stJohnsEve', [], @@ -195,7 +193,7 @@ private function calculateStJohnsHolidays(): void */ private function calculateAllSaintsHolidays(): void { - $date = new DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'allSaintsDay', [], @@ -203,7 +201,7 @@ private function calculateAllSaintsHolidays(): void $this->locale )); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday( 'allSaintsEve', [], @@ -243,7 +241,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', ['sv' => $holidayName], - new DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index 0231035bb..0a1c7c353 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -81,7 +79,7 @@ protected function calculateBerchtoldsTag(): void 'fr' => 'Jour de la Saint-Berthold', 'en' => 'Berchtoldstag', ], - new DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -106,9 +104,9 @@ protected function calculateBettagsMontag(): void { if ($this->year >= 1832) { // Find third Sunday of September - $date = new DateTime('Third Sunday of '.$this->year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('Third Sunday of '.$this->year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday('bettagsMontag', [ 'fr' => 'Jeûne fédéral', @@ -145,7 +143,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -153,7 +151,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index 59d04311a..ab8e53c9a 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -85,7 +84,7 @@ private function calculateDecember26th(): void 'en' => 'December 26th', 'fr' => '26 décembre', ], - new DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 970f70167..4abfe171c 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -84,9 +82,9 @@ private function calculateJeuneGenevois(): void } // Find first Sunday of September - $date = new DateTime('First Sunday of '.$this->year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('First Sunday of '.$this->year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday - $date->add(new DateInterval('P4D')); + $date->add(new \DateInterval('P4D')); $type = Holiday::TYPE_OTHER; if ($this->year > 1869 && $this->year < 1966) { @@ -121,7 +119,7 @@ private function calculateRestaurationGenevoise(): void [ 'fr' => 'Restauration de la République', ], - new DateTime($this->year.'-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 16870ca30..a9fb1f4df 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -79,7 +78,7 @@ public function initialize(): void private function calculateNafelserFahrt(): void { if ($this->year >= 1389) { - $date = new DateTime('First Thursday of '.$this->year.'-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('First Thursday of '.$this->year.'-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ 'de' => 'Näfelser Fahrt', ], $date, $this->locale, Holiday::TYPE_OTHER)); diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index 50842acdb..7e8abb942 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -91,7 +90,7 @@ private function calculatePlebisciteJurassien(): void [ 'fr' => 'Commémoration du plébiscite jurassien', ], - new DateTime($this->year.'-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index f01e0786d..1e816a095 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -98,7 +97,7 @@ private function calculateInstaurationRepublique(): void [ 'fr' => 'Instauration de la République', ], - new DateTime($this->year.'-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -121,7 +120,7 @@ private function calculateJanuary2nd(): void 'en' => 'January 2nd', 'fr' => '2 janvier', ], - new DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -143,7 +142,7 @@ private function calculateDecember26th(): void 'en' => 'December 26th', 'fr' => '26 décembre', ], - new DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index a04ec8e97..036e9a6ae 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -89,7 +88,7 @@ private function calculateBruderKlausenFest(): void [ 'de' => 'Bruder-Klausen-Fest', ], - new DateTime($this->year.'-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -99,7 +98,7 @@ private function calculateBruderKlausenFest(): void [ 'de' => 'Bruder-Klausen-Fest', ], - new DateTime($this->year.'-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 7a3ae0265..dcc5b8cb1 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\Switzerland; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -96,7 +95,7 @@ private function calculateStPeterPaul(): void 'fr' => 'Solennité des saints Pierre et Paul', 'de' => 'St. Peter und Paul', ], - new DateTime($this->year.'-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 3153f62be..f291630ef 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -89,7 +87,7 @@ private function calculateMartinLutherKingday(): void if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ 'en' => 'Dr. Martin Luther King Jr’s Birthday', - ], new DateTime("third monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("third monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -111,9 +109,9 @@ private function calculateMartinLutherKingday(): void private function calculateWashingtonsBirthday(): void { if ($this->year >= 1879) { - $date = new DateTime("$this->year-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1968) { - $date = new DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ 'en' => 'Washington’s Birthday', @@ -136,9 +134,9 @@ private function calculateWashingtonsBirthday(): void private function calculateMemorialDay(): void { if ($this->year >= 1865) { - $date = new DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1968) { - $date = new DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ 'en' => 'Memorial Day', @@ -163,7 +161,7 @@ private function calculateJuneteenth(): void if ($this->year >= 2021) { $this->addHoliday(new Holiday('juneteenth', [ 'en' => 'Juneteenth', - ], new DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -184,7 +182,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - ], new DateTime("$this->year-7-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-7-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -206,7 +204,7 @@ private function calculateLabourDay(): void [ 'en' => 'Labour Day', ], - new DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -228,9 +226,9 @@ private function calculateLabourDay(): void private function calculateColumbusDay(): void { if ($this->year >= 1937) { - $date = new DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1970) { - $date = new DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ 'en' => 'Columbus Day', @@ -256,7 +254,7 @@ private function calculateVeteransDay(): void $this->addHoliday(new Holiday('veteransDay', [ 'en' => $name, - ], new DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -280,7 +278,7 @@ private function calculateThanksgivingDay(): void [ 'en' => 'Thanksgiving Day', ], - new DateTime("fourth thursday of november $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("fourth thursday of november $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -306,13 +304,13 @@ private function calculateSubstituteHolidays(): void // Substitute holiday is on a Monday in case the holiday falls on a Sunday if (0 === (int) $holiday->format('w')) { $date = clone $holiday; - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); } // Substitute holiday is on a Friday in case the holiday falls on a Saturday if (6 === (int) $holiday->format('w')) { $date = clone $holiday; - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); } // Add substitute holiday diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index c5be0ac8b..0e55355d4 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -101,7 +99,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en' => 'May Day Bank Holiday'], - new DateTime("$this->year-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -112,7 +110,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en' => 'May Day Bank Holiday'], - new DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -147,7 +145,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new DateTime("$this->year-6-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -160,7 +158,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -171,7 +169,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -198,7 +196,7 @@ protected function calculatePlatinumJubileeBankHoliday(): void $this->addHoliday(new Holiday( 'platinumJubileeBankHoliday', ['en' => 'Platinum Jubilee Bank Holiday'], - new DateTime("$this->year-6-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-6-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -225,7 +223,7 @@ protected function calculateQueenElizabethFuneralBankHoliday(): void $this->addHoliday(new Holiday( 'queenElizabethFuneralBankHoliday', ['en' => 'Queen Elizabeth II’s State Funeral Bank Holiday'], - new DateTime("$this->year-9-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -262,7 +260,7 @@ protected function calculateChristmasHolidays(?string $type = null): void if (\in_array((int) $christmasDay->format('w'), [0, 6], true)) { $date = clone $christmasDay; - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( $christmasDay, [], @@ -274,7 +272,7 @@ protected function calculateChristmasHolidays(?string $type = null): void if (\in_array((int) $secondChristmasDay->format('w'), [0, 6], true)) { $date = clone $secondChristmasDay; - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( $secondChristmasDay, [], @@ -314,7 +312,7 @@ private function calculateNewYearsDay(): void $type = Holiday::TYPE_OBSERVANCE; } - $newYearsDay = new DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $newYearsDay = new \DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); // If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { @@ -350,7 +348,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'August Bank Holiday'], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -365,7 +363,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'Summer Bank Holiday'], - new DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -376,7 +374,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'Summer Bank Holiday'], - new DateTime("last monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -394,7 +392,7 @@ private function calculateSummerBankHoliday(): void private function calculateMotheringSunday(): void { $date = $this->calculateEaster($this->year, $this->timezone); - $date->sub(new DateInterval('P3W')); + $date->sub(new \DateInterval('P3W')); $this->addHoliday(new Holiday( 'motheringSunday', diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index 93ad7bf95..a9cd6a6aa 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -14,7 +14,6 @@ namespace Yasumi\Provider\UnitedKingdom; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -81,7 +80,7 @@ private function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day'], - new DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -127,7 +126,7 @@ private function calculateBattleOfTheBoyne(): void $holiday = new Holiday( 'battleOfTheBoyne', ['en' => 'Battle of the Boyne'], - new DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index af5ee863d..4ffbc35e0 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -14,8 +14,6 @@ namespace Yasumi\Provider\UnitedKingdom; -use DateInterval; -use DateTime; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; @@ -94,7 +92,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'August Bank Holiday'], - new DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -131,7 +129,7 @@ private function calculateNewYearsHolidays(): void $secondNewYearsDay = new Holiday( 'secondNewYearsDay', [], - new DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, $type ); @@ -141,7 +139,7 @@ private function calculateNewYearsHolidays(): void if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { $date = clone $newYearsDay; - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( $newYearsDay, [], @@ -153,7 +151,7 @@ private function calculateNewYearsHolidays(): void if (\in_array((int) $secondNewYearsDay->format('w'), [0, 6], true)) { $date = clone $secondNewYearsDay; - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); $this->addHoliday(new SubstituteHoliday( $secondNewYearsDay, [], @@ -185,7 +183,7 @@ private function calculateStAndrewsDay(): void $holiday = new Holiday( 'stAndrewsDay', [], - new DateTime($this->year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 430ca4fdc..269dfadae 100644 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -14,7 +14,6 @@ namespace Yasumi; -use ArrayIterator; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Filters\BetweenFilter; @@ -95,9 +94,9 @@ public function isHoliday(\DateTimeInterface $date): bool; /** * Get an iterator for the holidays. * - * @return ArrayIterator iterator for the holidays of this calendar + * @return \ArrayIterator iterator for the holidays of this calendar */ - public function getIterator(): ArrayIterator; + public function getIterator(): \ArrayIterator; /** * Adds a holiday to the holidays providers (i.e. country/state) list of holidays. diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 5f3990e50..6230f199e 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -15,8 +15,6 @@ namespace Yasumi; -use DirectoryIterator; -use InvalidArgumentException; use Yasumi\Exception\UnknownLocaleException; /** @@ -50,18 +48,18 @@ public function __construct(array $availableLocales) * @param string $directoryPath directory path for translation files * * @throws UnknownLocaleException - * @throws InvalidArgumentException + * @throws \InvalidArgumentException */ public function loadTranslations(string $directoryPath): void { if (!file_exists($directoryPath)) { - throw new InvalidArgumentException('Directory with translations not found'); + throw new \InvalidArgumentException('Directory with translations not found'); } $directoryPath = rtrim($directoryPath, '/\\').DIRECTORY_SEPARATOR; $extension = 'php'; - foreach (new DirectoryIterator($directoryPath) as $file) { + foreach (new \DirectoryIterator($directoryPath) as $file) { if ($file->isDot() || $file->isDir()) { continue; } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index b876c8855..a68e30bea 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -14,12 +14,6 @@ namespace Yasumi; -use FilesystemIterator; -use InvalidArgumentException; -use RecursiveDirectoryIterator; -use RecursiveIteratorIterator; -use ReflectionClass; -use RuntimeException; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\InvalidYearException; use Yasumi\Exception\ProviderNotFoundException; @@ -68,8 +62,8 @@ class Yasumi * @param int $workingDays Number of days to look ahead for the (first) next working day * * @throws UnknownLocaleException - * @throws RuntimeException - * @throws InvalidArgumentException + * @throws \RuntimeException + * @throws \InvalidArgumentException * @throws \Exception * @throws InvalidDateException * @@ -119,7 +113,7 @@ public static function nextWorkingDay( * * @return ProviderInterface An instance of class $class is created and returned * - * @throws RuntimeException If no such holiday provider is found + * @throws \RuntimeException If no such holiday provider is found * @throws InvalidYearException if the year parameter is not between the defined lower and upper bounds * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given country does not exist @@ -129,7 +123,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, // Find and return holiday provider instance $providerClass = sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $class)); - if (class_exists($class) && (new ReflectionClass($class))->implementsInterface(ProviderInterface::class)) { + if (class_exists($class) && (new \ReflectionClass($class))->implementsInterface(ProviderInterface::class)) { $providerClass = $class; } @@ -185,8 +179,8 @@ public static function getAvailableLocales(): array * * @return ProviderInterface 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 the defined lower and upper bounds + * @throws \RuntimeException If no such holiday provider is found + * @throws \InvalidArgumentException if the year parameter is not between the defined lower and upper bounds * @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 @@ -221,10 +215,10 @@ public static function getProviders(): array } $providers = []; - $filesIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator( + $filesIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator( __DIR__.DIRECTORY_SEPARATOR.'Provider', - FilesystemIterator::SKIP_DOTS - ), RecursiveIteratorIterator::SELF_FIRST); + \FilesystemIterator::SKIP_DOTS + ), \RecursiveIteratorIterator::SELF_FIRST); foreach ($filesIterator as $file) { if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( @@ -238,7 +232,7 @@ public static function getProviders(): array $quotedDs = preg_quote(DIRECTORY_SEPARATOR, ''); $provider = preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); - $class = new ReflectionClass(sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $provider))); + $class = new \ReflectionClass(sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $provider))); $key = 'ID'; if ($class->isSubclassOf(AbstractProvider::class) && $class->hasConstant($key)) { @@ -261,8 +255,8 @@ public static function getProviders(): array * @param int $workingDays Number of days to look back for the (first) previous working day * * @throws UnknownLocaleException - * @throws RuntimeException - * @throws InvalidArgumentException + * @throws \RuntimeException + * @throws \InvalidArgumentException * @throws \Exception * @throws InvalidDateException * diff --git a/tests/Argentina/CarnavalMondayTest.php b/tests/Argentina/CarnavalMondayTest.php index 870ab79be..caa7752a1 100644 --- a/tests/Argentina/CarnavalMondayTest.php +++ b/tests/Argentina/CarnavalMondayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,7 +38,7 @@ class CarnavalMondayTest extends ArgentinaBaseTestCase implements HolidayTestCas /** * Tests Carnaval Monday on or after 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalMondayAfter1700(): void { @@ -49,14 +47,14 @@ public function testCarnavalMondayAfter1700(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P48D')) + $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P48D')) ); } /** * Tests Carnaval Monday on or before 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalMondayBefore1700(): void { @@ -67,7 +65,7 @@ public function testCarnavalMondayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/CarnavalTuesdayTest.php b/tests/Argentina/CarnavalTuesdayTest.php index 25b5b6493..554b34b5f 100644 --- a/tests/Argentina/CarnavalTuesdayTest.php +++ b/tests/Argentina/CarnavalTuesdayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,7 +38,7 @@ class CarnavalTuesdayTest extends ArgentinaBaseTestCase implements HolidayTestCa /** * Tests Carnaval Tuesday on or after 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalTuesdayAfter1700(): void { @@ -49,14 +47,14 @@ public function testCarnavalTuesdayAfter1700(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P47D')) + $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P47D')) ); } /** * Tests Carnaval Tuesday on or before 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalTuesdayBefore1700(): void { @@ -67,7 +65,7 @@ public function testCarnavalTuesdayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/ChristmasDayTest.php b/tests/Argentina/ChristmasDayTest.php index 52070ad1a..be2740f70 100644 --- a/tests/Argentina/ChristmasDayTest.php +++ b/tests/Argentina/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class ChristmasDayTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testChristmasDay(): void { @@ -42,14 +39,14 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/EasterTest.php b/tests/Argentina/EasterTest.php index e6527630a..c314da7d8 100644 --- a/tests/Argentina/EasterTest.php +++ b/tests/Argentina/EasterTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Argentina; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class EasterTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests Easter. * - * @throws Exception + * @throws \Exception */ public function testEaster(): void { @@ -45,7 +44,7 @@ public function testEaster(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php index 861654587..fcb328fa7 100644 --- a/tests/Argentina/FlagDayTest.php +++ b/tests/Argentina/FlagDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class FlagDayTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-20", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php index d36dfb288..fce46d832 100644 --- a/tests/Argentina/GeneralJoseSanMartinDayTest.php +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class GeneralJoseSanMartinDayTest extends ArgentinaBaseTestCase implements Holid /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-08-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-08-17", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php index 3202d4e65..bac28e7d8 100644 --- a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class GeneralMartinMigueldeGuemesDayTest extends ArgentinaBaseTestCase implement /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-17", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/GoodFridayTest.php b/tests/Argentina/GoodFridayTest.php index fbe4b4ea6..e56f86246 100644 --- a/tests/Argentina/GoodFridayTest.php +++ b/tests/Argentina/GoodFridayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class GoodFridayTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests Good Friday. * - * @throws Exception + * @throws \Exception */ public function testGoodFriday(): void { @@ -44,14 +42,14 @@ public function testGoodFriday(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P2D')) + $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P2D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php index b2693e0b3..dce134fc0 100644 --- a/tests/Argentina/ImmaculateConceptionDayTest.php +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ImmaculateConceptionDayTest extends ArgentinaBaseTestCase implements Holid /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-08", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-08", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php index 499f58689..da40191ef 100644 --- a/tests/Argentina/IndependenceDayTest.php +++ b/tests/Argentina/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndependenceDayTest extends ArgentinaBaseTestCase implements HolidayTestCa /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-07-09", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-07-09", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/InternationalWorkersDayTest.php b/tests/Argentina/InternationalWorkersDayTest.php index c2e7baf2e..51f2508e1 100644 --- a/tests/Argentina/InternationalWorkersDayTest.php +++ b/tests/Argentina/InternationalWorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class InternationalWorkersDayTest extends ArgentinaBaseTestCase implements Holid /** * Tests International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testInternationalWorkersDay(): void { @@ -42,14 +39,14 @@ public function testInternationalWorkersDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/MalvinasDayTest.php b/tests/Argentina/MalvinasDayTest.php index 14ff33536..7fbb8cdbd 100644 --- a/tests/Argentina/MalvinasDayTest.php +++ b/tests/Argentina/MalvinasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MalvinasDayTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-02", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-02", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of Malvinas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php index 5e36faad1..cd6609ce5 100644 --- a/tests/Argentina/MayRevolutionTest.php +++ b/tests/Argentina/MayRevolutionTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MayRevolutionTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-05-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-05-25", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of First National Government. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php index f82a04f92..71fa361ee 100644 --- a/tests/Argentina/NationalSovereigntyDayTest.php +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NationalSovereigntyDayTest extends ArgentinaBaseTestCase implements Holida /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-20", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/NewYearsDayTest.php b/tests/Argentina/NewYearsDayTest.php index 0342e37cf..2cf173413 100644 --- a/tests/Argentina/NewYearsDayTest.php +++ b/tests/Argentina/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class NewYearsDayTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @throws Exception + * @throws \Exception */ public function testNewYearsDay(): void { @@ -42,14 +39,14 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php index be28f4d75..a90775ecd 100644 --- a/tests/Argentina/RaceDayTest.php +++ b/tests/Argentina/RaceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class RaceDayTest extends ArgentinaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +59,7 @@ public function testNotHoliday(): void /** * Tests translated name of the holiday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Argentina/RemembranceDayTest.php b/tests/Argentina/RemembranceDayTest.php index e414dfaca..a51be27a6 100644 --- a/tests/Argentina/RemembranceDayTest.php +++ b/tests/Argentina/RemembranceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Argentina; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class RemembranceDayTest extends ArgentinaBaseTestCase implements HolidayTestCas /** * Tests Day of Remembrance for Truth and Justice on or after 2006. * - * @throws Exception + * @throws \Exception */ public function testRemembranceDayAfter2006(): void { @@ -47,14 +44,14 @@ public function testRemembranceDayAfter2006(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-03-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-03-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Day of Remembrance for Truth and Justice on or before 2006. * - * @throws Exception + * @throws \Exception */ public function testRemembranceDayBefore2006(): void { @@ -65,7 +62,7 @@ public function testRemembranceDayBefore2006(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 5df42057b..4aabf25c8 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class AnzacDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -89,7 +86,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -104,7 +101,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index e07497ee0..56196bc4f 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -35,8 +32,8 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * @param int $year the year for which the holiday defined in this test needs to be tested * @param ?string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(int $year, ?string $expected): void { @@ -60,7 +57,7 @@ public function testSubstituteHoliday(int $year, ?string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } else { $this->assertNotSubstituteHoliday( @@ -74,7 +71,7 @@ public function testSubstituteHoliday(int $year, ?string $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -101,7 +98,7 @@ public function testHolidayType(): void * * @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/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 18e86b074..6717418ef 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -87,7 +86,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index 472d01650..f892b3802 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -61,7 +60,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index 615b8e7e4..ef5e279dc 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index 27ab89783..3edcf4cf3 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implemen * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index 2dd6297a7..fa663bd4d 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -55,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -74,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index bc3c02249..73f62a89a 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements Ho * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index e8606351b..30633a46a 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implemen * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index 01e16ff53..104a46055 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\AustralianCapitalTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase imple * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -82,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -97,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 3757db122..04c2e7671 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class BoxingDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param string $expected the expected date * @param ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); if (null === $expectedExtra) { $this->assertNotHoliday( @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY2, $year, - new DateTime($expectedExtra, new DateTimeZone($this->timezone)) + new \DateTime($expectedExtra, new \DateTimeZone($this->timezone)) ); } } @@ -91,7 +88,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -112,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 2badfcd37..be22ddfe0 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class ChristmasDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param string $expected the expected date * @param ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); if (null === $expectedExtra) { $this->assertNotHoliday( @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY2, $year, - new DateTime($expectedExtra, new DateTimeZone($this->timezone)) + new \DateTime($expectedExtra, new \DateTimeZone($this->timezone)) ); } } @@ -91,7 +88,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -112,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index 18088f406..e0e220e47 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +36,7 @@ class EasterMondayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -48,7 +44,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -60,7 +56,7 @@ public function testHoliday(int $year, string $expected): void * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday2(int $year, string $expected): void { @@ -68,7 +64,7 @@ public function testHoliday2(int $year, string $expected): void $this->region, self::HOLIDAY2, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -77,7 +73,7 @@ public function testHoliday2(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -86,7 +82,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -112,7 +108,7 @@ public function HolidayDataProvider2(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -133,7 +129,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index f2ad138b6..ca05452b8 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class GoodFridayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->sub(new DateInterval('P2D')); + $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index 4fb19326d..e092439da 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NewSouthWales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class BankHolidayTest extends NewSouthWalesBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index cfb4040e8..ad6a09350 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia\NewSouthWales; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index 8bbc5d25a..42d2af2a7 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NewSouthWales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class EasterSundayTest extends NewSouthWalesBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -55,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -74,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index 0a678ee10..eecc817e1 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NewSouthWales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index 0249ebbf4..85b790a86 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\NewSouthWales; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -69,7 +68,7 @@ public function testBankHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index 81bee578b..99b01821d 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NewSouthWales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index f36800828..e210d9997 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class NewYearsDayTest extends AustraliaBaseTestCase implements HolidayTestCase * @param string $expected the expected date * @param ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); if (null === $expectedExtra) { $this->assertNotHoliday( @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY2, $year, - new DateTime($expectedExtra, new DateTimeZone($this->timezone)) + new \DateTime($expectedExtra, new \DateTimeZone($this->timezone)) ); } } @@ -91,7 +88,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -112,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 4c164251d..6aa3670c6 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia\NorthernTerritory; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index 8b5675c44..f08334f73 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NorthernTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MayDayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index cbe17acf8..86b91e69c 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\NorthernTerritory; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index fef8e3bb2..bebd59c26 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NorthernTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class PicnicDayTest extends NorthernTerritoryBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index f31e35f1a..d491d8c11 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\NorthernTerritory; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 1d0c17ad0..dcfc4088d 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Queensland\Brisbane; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -58,7 +57,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 89af7c121..33cdcac03 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Queensland\Brisbane; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class PeoplesDayTest extends BrisbaneBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index a9d0177f9..e26dd3440 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Queensland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends QueenslandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index 15d02035c..bce38d08b 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Queensland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends QueenslandBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 393a32b99..fd5a2a6ab 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Queensland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -57,7 +56,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index 3d4d768bd..98d37038c 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -90,7 +87,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 9514d2089..0d1cdbe70 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class ChristmasDayTest extends SouthAustraliaBaseTestCase implements HolidayTest * @param string $expected the expected date * @param ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { @@ -48,7 +45,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); if (null === $expectedExtra) { $this->assertNotHoliday( @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) $this->region, self::HOLIDAY2, $year, - new DateTime($expectedExtra, new DateTimeZone($this->timezone)) + new \DateTime($expectedExtra, new \DateTimeZone($this->timezone)) ); } } @@ -91,7 +88,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -112,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index d19049985..6770adb7e 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index daf8d88df..1b8fb2047 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index 6ca469fbd..d5ab00407 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ProclamationDayTest extends SouthAustraliaBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index e5a880014..eabba5f02 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index d35c0bad6..e42e8b046 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\SouthAustralia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 4c8a04c1d..533138c9c 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index c110d7469..e2ce5bdbd 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class DevonportShowTest extends CentralNorthBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index bda06f4b9..ea9f52a8e 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class EightHourDayTest extends TasmaniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index e4f293f71..f95136955 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements Holid * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 76bce01a5..78f438b26 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 3dae93000..f137847d8 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\KingIsland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class KingIslandShowTest extends KingIslandBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index fc5464e25..2e9175a67 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\KingIsland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 183f07977..523780635 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\Northeast; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LauncestonShowTest extends NortheastBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index fe9933f9a..50c96a6ca 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\Northeast; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index 99d7a2836..b3d699639 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\Northwest; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class BurnieShowTest extends NorthwestBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 2be1d89e9..5da92d8aa 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AGFESTTest extends CircularHeadBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index aee008564..d23c9e3b2 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\Northwest; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 5aa0b7fd3..88c2b1bf6 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends TasmaniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 207ee6ba7..e45d3d756 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class RecreationDayTest extends TasmaniaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 63f91ab22..137cd0897 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\South; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class HobartShowTest extends SouthBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 2d65b97dc..a113a66b0 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\South; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -59,7 +58,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index e4e609ab2..c367539f9 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class HobartRegattaTest extends SoutheastBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index a5157c60c..15eb83217 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Tasmania; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -58,7 +57,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 114c710e0..0380bf9c2 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +38,7 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -49,14 +46,14 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -71,7 +68,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index 9799c546e..826985004 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterSaturdayTest extends VictoriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, $this->timezone); - $date->sub(new DateInterval('P1D')); + $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index 194f19685..a4067d6e1 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class EasterSundayTest extends VictoriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -55,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -74,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 602b5728a..958826a2f 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends VictoriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index e106247f3..5816b5107 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class MelbourneCupDayTest extends VictoriaBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index d569ee816..4f5cfd549 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends VictoriaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 112827c25..bdc4a752f 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\Victoria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -61,7 +60,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index 583bb8070..16f8bea59 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\WesternAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends WesternAustraliaBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index 23dfedacb..6c3435d02 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\WesternAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements Holiday * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index ec55944ce..0edc72fb9 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia\WesternAustralia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements Ho * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void $this->region, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone($this->timezone)) + new \DateTime($expected, new \DateTimeZone($this->timezone)) ); } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index 42e2b05e7..7ccce6489 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Australia\WesternAustralia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -58,7 +57,7 @@ public function testOfficialHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 959a41a60..b17c2a48a 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index 2598db313..03694e5f2 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, 'ascensionDay', $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index f74fcdd31..5dc914040 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 76015bd23..c069994cd 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -93,7 +92,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Burgenland/BurgenlandTest.php b/tests/Austria/Burgenland/BurgenlandTest.php index 72c872459..fdadb33a1 100644 --- a/tests/Austria/Burgenland/BurgenlandTest.php +++ b/tests/Austria/Burgenland/BurgenlandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Burgenland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -99,7 +98,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index 1f311c859..22a07ff19 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\Burgenland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stMartinsDayTest extends BurgenlandBaseTestCase implements HolidayTestCase * * @dataProvider stMartinsDayDataProvider * - * @param int $year the year for which Saint Martins Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Saint Martins Day needs to be tested + * @param \DateTime $expected the expected date */ public function teststMartinsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function teststMartinsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Saint Martins Day * - * @throws Exception + * @throws \Exception */ public function stMartinsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function stMartinsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Carinthia/CarinthiaTest.php b/tests/Austria/Carinthia/CarinthiaTest.php index 7b58a548c..8f0295749 100644 --- a/tests/Austria/Carinthia/CarinthiaTest.php +++ b/tests/Austria/Carinthia/CarinthiaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Carinthia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -103,7 +102,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 0ac7d171e..72ec5dc6f 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria\Carinthia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class PlebisciteDayTest extends CarinthiaBaseTestCase implements HolidayTestCase * * @dataProvider PlebisciteDayDataProvider * - * @param int $year the year for which Plebiscite Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Plebiscite Day needs to be tested + * @param \DateTime $expected the expected date */ public function testPlebisciteDay(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testPlebisciteDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Plebiscite Day * - * @throws Exception + * @throws \Exception */ public function PlebisciteDayDataProvider(): array { @@ -61,7 +58,7 @@ public function PlebisciteDayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-10", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-10", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function PlebisciteDayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index 10ccad1d6..48fef8375 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\Carinthia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StJosephsDayTest extends CarinthiaBaseTestCase implements HolidayTestCase * * @dataProvider StJosephsDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested. - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param \DateTime $expected the expected date */ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day. * - * @throws Exception + * @throws \Exception */ public function StJosephsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 6a5922f59..b3b4bb4c2 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends AustriaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index 2eb327f0d..fd9ed3cba 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -44,14 +42,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index 3ac452316..63570888e 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index 3228a0365..2ae348904 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 1b63331d2..2bc592148 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends AustriaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index d298ab70e..66e505a62 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements HolidayTes * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index 5770f53f3..533fcafcb 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements Holiday * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/LowerAustria/LowerAustriaTest.php b/tests/Austria/LowerAustria/LowerAustriaTest.php index 7bced1f7f..b49441308 100644 --- a/tests/Austria/LowerAustria/LowerAustriaTest.php +++ b/tests/Austria/LowerAustria/LowerAustriaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\LowerAustria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index ab2b194c6..56acaf17f 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria\LowerAustria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements HolidayTestC * * @dataProvider StLeopoldsDayDataProvider * - * @param int $year the year for which Saint Leopold's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Saint Leopold's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Saint Leopold's Day * - * @throws Exception + * @throws \Exception */ public function StLeopoldsDayDataProvider(): array { @@ -61,7 +58,7 @@ public function StLeopoldsDayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-11-15", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-11-15", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function StLeopoldsDayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 8cba12015..a8281ecfa 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NationalDayTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-26", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-26", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 5f913882a..3c49ba50b 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends AustriaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index 779313ef1..d896a26a7 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index f7099bd0e..cacf284e1 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends AustriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Salzburg/SalzburgTest.php b/tests/Austria/Salzburg/SalzburgTest.php index 861598bff..097278bc9 100644 --- a/tests/Austria/Salzburg/SalzburgTest.php +++ b/tests/Austria/Salzburg/SalzburgTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Salzburg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index c199bee71..71741eaaa 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\Salzburg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StRupertsDayTest extends SalzburgBaseTestCase implements HolidayTestCase * * @dataProvider StRupertsDayDataProvider * - * @param int $year the year for which Saint Rupert's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Saint Rupert's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStRupertsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStRupertsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Saint Rupert's Day * - * @throws Exception + * @throws \Exception */ public function StRupertsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function StRupertsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index bb5376350..b43344930 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index e298986f1..a491c1923 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\Styria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StJosephsDayTest extends StyriaBaseTestCase implements HolidayTestCase * * @dataProvider StJosephsDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested. - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param \DateTime $expected the expected date */ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day. * - * @throws Exception + * @throws \Exception */ public function StJosephsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Styria/StyriaTest.php b/tests/Austria/Styria/StyriaTest.php index 9e777e8c0..a3fa0188d 100644 --- a/tests/Austria/Styria/StyriaTest.php +++ b/tests/Austria/Styria/StyriaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Styria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -99,7 +98,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index 66fffedc7..b12977c9a 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\Tyrol; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StJosephsDayTest extends TyrolBaseTestCase implements HolidayTestCase * * @dataProvider StJosephsDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested. - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param \DateTime $expected the expected date */ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day. * - * @throws Exception + * @throws \Exception */ public function StJosephsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Tyrol/TyrolTest.php b/tests/Austria/Tyrol/TyrolTest.php index 211b0e21e..adcf7a781 100644 --- a/tests/Austria/Tyrol/TyrolTest.php +++ b/tests/Austria/Tyrol/TyrolTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Tyrol; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -99,7 +98,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index 2183a031b..a2352b152 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\UpperAustria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StFloriansDayTest extends UpperAustriaBaseTestCase implements HolidayTestC * * @dataProvider StFloriansDayDataProvider * - * @param int $year the year for which Saint Florian's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Saint Florian's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStFloriansDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStFloriansDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Saint Florian's Day * - * @throws Exception + * @throws \Exception */ public function StFloriansDayDataProvider(): array { @@ -57,7 +55,7 @@ public function StFloriansDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/UpperAustria/UpperAustriaTest.php b/tests/Austria/UpperAustria/UpperAustriaTest.php index 36cbce30c..a8901a273 100644 --- a/tests/Austria/UpperAustria/UpperAustriaTest.php +++ b/tests/Austria/UpperAustria/UpperAustriaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\UpperAustria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index d045331ee..79efb10d1 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Austria\Vienna; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class StLeopoldsDayTest extends ViennaBaseTestCase implements HolidayTestCase * * @dataProvider StLeopoldsDayDataProvider * - * @param int $year the year for which Saint Leopold's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Saint Leopold's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Saint Leopold's Day * - * @throws Exception + * @throws \Exception */ public function StLeopoldsDayDataProvider(): array { @@ -61,7 +58,7 @@ public function StLeopoldsDayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-11-15", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-11-15", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function StLeopoldsDayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Vienna/ViennaTest.php b/tests/Austria/Vienna/ViennaTest.php index 6b2e56884..7fac55bbc 100644 --- a/tests/Austria/Vienna/ViennaTest.php +++ b/tests/Austria/Vienna/ViennaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Vienna; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index 83c7d622a..a595f8a58 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Austria\Vorarlberg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StJosephsDayTest extends VorarlbergBaseTestCase implements HolidayTestCase * * @dataProvider StJosephsDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested. - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested. + * @param \DateTime $expected the expected date */ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day. * - * @throws Exception + * @throws \Exception */ public function StJosephsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function StJosephsDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Austria/Vorarlberg/VorarlbergTest.php b/tests/Austria/Vorarlberg/VorarlbergTest.php index 5d9a1542c..c14cca5cf 100644 --- a/tests/Austria/Vorarlberg/VorarlbergTest.php +++ b/tests/Austria/Vorarlberg/VorarlbergTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Austria\Vorarlberg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -99,7 +98,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index e3f0efd8d..7921f19b0 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -14,11 +14,6 @@ namespace Yasumi\tests\Base; -use DateTime; -use DateTimeImmutable; -use DateTimeZone; -use Exception; -use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -27,15 +22,15 @@ class HolidayBetweenFilterTest extends TestCase { use YasumiBase; - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysBetweenDateRange(): void { $timezone = 'Europe/Amsterdam'; $holidays = Yasumi::create('Netherlands', 2016); $between = $holidays->between( - new DateTime('03/25/2016', new DateTimeZone($timezone)), - new DateTime('07/25/2016', new DateTimeZone($timezone)) + new \DateTime('03/25/2016', new \DateTimeZone($timezone)), + new \DateTime('07/25/2016', new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -77,15 +72,15 @@ public function testHolidaysBetweenDateRange(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void { $timezone = 'Europe/Amsterdam'; $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); @@ -127,7 +122,7 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysBetweenDateRangeDifferentTimezone(): void { $holidays = Yasumi::create('Netherlands', 2016); @@ -136,28 +131,28 @@ public function testHolidaysBetweenDateRangeDifferentTimezone(): void foreach ($timezones as $timezone) { $between = $holidays->between( - new DateTime('01/01/2016', new DateTimeZone($timezone)), - new DateTime('01/01/2016', new DateTimeZone($timezone)) + new \DateTime('01/01/2016', new \DateTimeZone($timezone)), + new \DateTime('01/01/2016', new \DateTimeZone($timezone)) ); self::assertCount(1, $between); $between = $holidays->between( - new DateTime('01/01/2016 23:59:59', new DateTimeZone($timezone)), - new DateTime('01/01/2016 23:59:59', new DateTimeZone($timezone)) + new \DateTime('01/01/2016 23:59:59', new \DateTimeZone($timezone)), + new \DateTime('01/01/2016 23:59:59', new \DateTimeZone($timezone)) ); self::assertCount(1, $between); } } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void { $timezone = 'Europe/Amsterdam'; $holidays = Yasumi::create('Netherlands', 2016); $between = $holidays->between( - new DateTime('01/01/2016', new DateTimeZone($timezone)), - new DateTime('07/25/2016', new DateTimeZone($timezone)), + new \DateTime('01/01/2016', new \DateTimeZone($timezone)), + new \DateTime('07/25/2016', new \DateTimeZone($timezone)), false ); @@ -200,7 +195,7 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void { $year = 2015; @@ -208,8 +203,8 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void $holidays = Yasumi::create('Norway', $year); $between = $holidays->between( - new DateTime('03/25/2011', new DateTimeZone($timezone)), - new DateTime('05/17/'.$year, new DateTimeZone($timezone)) + new \DateTime('03/25/2011', new \DateTimeZone($timezone)), + new \DateTime('05/17/'.$year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -235,7 +230,7 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void { $year = 2000; @@ -243,8 +238,8 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void $holidays = Yasumi::create('Italy', $year); $between = $holidays->between( - new DateTime('03/25/'.$year, new DateTimeZone($timezone)), - new DateTime('09/21/2021', new DateTimeZone($timezone)) + new \DateTime('03/25/'.$year, new \DateTimeZone($timezone)), + new \DateTime('09/21/2021', new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -270,18 +265,18 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void self::assertNotEquals(\count($holidays), $between->count()); } - /** @throws Exception */ + /** @throws \Exception */ public function testWrongDates(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $year = 2017; $timezone = 'America/New_York'; $holidays = Yasumi::create('USA', $year); $holidays->between( - new DateTime('12/31/'.$year, new DateTimeZone($timezone)), - new DateTime('01/01/'.$year, new DateTimeZone($timezone)) + new \DateTime('12/31/'.$year, new \DateTimeZone($timezone)), + new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)) ); } @@ -290,7 +285,7 @@ public function testWrongDates(): void * * This test covers the scenario that the requested date range covers all know holidays. * - * @throws Exception + * @throws \Exception */ public function testCountBetweenWithSubstitutes(): void { @@ -300,8 +295,8 @@ public function testCountBetweenWithSubstitutes(): void $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new DateTime('01/01/'.$year, new DateTimeZone($timezone)), - new DateTime('12/31/'.$year, new DateTimeZone($timezone)) + new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), + new \DateTime('12/31/'.$year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -330,7 +325,7 @@ public function testCountBetweenWithSubstitutes(): void * * This test covers the scenario that the requested date range excludes a substituted holiday. * - * @throws Exception + * @throws \Exception */ public function testCountBetweenExcludingSubstituteHoliday(): void { @@ -340,8 +335,8 @@ public function testCountBetweenExcludingSubstituteHoliday(): void $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new DateTime('01/01/'.$year, new DateTimeZone($timezone)), - new DateTime('03/20/'.$year, new DateTimeZone($timezone)) + new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), + new \DateTime('03/20/'.$year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -374,7 +369,7 @@ 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 \Exception */ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHoliday(): void { @@ -384,8 +379,8 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new DateTime('01/01/'.$year, new DateTimeZone($timezone)), - new DateTime('03/18/'.$year, new DateTimeZone($timezone)) + new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), + new \DateTime('03/18/'.$year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -419,7 +414,7 @@ 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 \Exception */ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): void { @@ -429,8 +424,8 @@ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new DateTime('01/01/'.$year, new DateTimeZone($timezone)), - new DateTime('03/16/'.$year, new DateTimeZone($timezone)) + new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), + new \DateTime('03/16/'.$year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 5bdeecbd7..2599202ed 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Base; -use DateTime; -use DateTimeZone; -use Exception; use PHPUnit\Framework\TestCase; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -25,16 +22,16 @@ class HolidayOnFilterTest extends TestCase { use YasumiBase; - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysOnDate(): void { $timezone = 'Europe/Amsterdam'; $holidays = Yasumi::create('Netherlands', 2016); $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)), + '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)), ]; foreach ($holidayDates as $name => $date) { @@ -46,16 +43,16 @@ public function testHolidaysOnDate(): void } } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidaysNotOnDate(): void { $timezone = 'Europe/Amsterdam'; $holidays = Yasumi::create('Netherlands', 2016); $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)), + '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)), ]; foreach ($holidayWrongDates as $name => $date) { @@ -67,22 +64,22 @@ public function testHolidaysNotOnDate(): void } } - /** @throws Exception */ + /** @throws \Exception */ public function testCorrectNumberOfHolidaysOnDate(): void { $timezone = 'Europe/Amsterdam'; $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))); self::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))); self::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))); self::assertGreaterThan(1, $holidaysOnDate->count()); } } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index eff824902..1ced57880 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -16,8 +16,6 @@ use DateTime; use DateTimeImmutable; -use Exception; -use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Yasumi\Exception\MissingTranslationException; use Yasumi\Exception\UnknownLocaleException; @@ -29,26 +27,26 @@ class HolidayTest extends TestCase { use YasumiBase; - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayBlankKeyInvalidArgumentException(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); - new Holiday('', [], new DateTime()); + new Holiday('', [], new \DateTime()); } - /** @throws Exception */ + /** @throws \Exception */ public function testCreateHolidayUnknownLocaleException(): void { $this->expectException(UnknownLocaleException::class); - new Holiday('testHoliday', [], new DateTime(), 'wx-YZ'); + new Holiday('testHoliday', [], new \DateTime(), 'wx-YZ'); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayIsJsonSerializable(): void { - $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); + $holiday = new Holiday('testHoliday', [], new \DateTime(), 'en_US'); $json = json_encode($holiday, JSON_THROW_ON_ERROR); $instance = json_decode($json, true, 512, JSON_THROW_ON_ERROR); @@ -57,24 +55,24 @@ public function testHolidayIsJsonSerializable(): void self::assertArrayHasKey('shortName', $instance); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayWithDateTimeInterface(): void { // Assert with DateTime instance - $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); + $holiday = new Holiday('testHoliday', [], new \DateTime(), 'en_US'); self::assertNotNull($holiday); self::assertInstanceOf(Holiday::class, $holiday); // Assert with DateTimeImmutable instance - $holiday = new Holiday('testHoliday', [], new DateTimeImmutable(), 'en_US'); + $holiday = new Holiday('testHoliday', [], new \DateTimeImmutable(), 'en_US'); self::assertNotNull($holiday); self::assertInstanceOf(Holiday::class, $holiday); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetLocales(): void { - $holiday = new Holiday('testHoliday', [], new DateTime(), 'ca_ES_VALENCIA'); + $holiday = new Holiday('testHoliday', [], new \DateTime(), 'ca_ES_VALENCIA'); $method = new \ReflectionMethod(Holiday::class, 'getLocales'); $method->setAccessible(true); @@ -83,7 +81,7 @@ public function testHolidayGetLocales(): void self::assertEquals(['de_DE', 'de', Holiday::LOCALE_KEY], $method->invoke($holiday, ['de_DE', Holiday::LOCALE_KEY])); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetNameWithoutArgument(): void { // 'en_US' fallback @@ -94,16 +92,16 @@ public function testHolidayGetNameWithoutArgument(): void 'en_US' => 'Holiday EN-US', ]; - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_AT'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'de_AT'); self::assertEquals('Holiday DE-AT', $holiday->getName()); - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'de'); self::assertEquals('Holiday DE', $holiday->getName()); - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'de_DE'); self::assertEquals('Holiday DE', $holiday->getName()); - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'ja'); self::assertEquals('Holiday EN-US', $holiday->getName()); // 'en' fallback @@ -112,10 +110,10 @@ public function testHolidayGetNameWithoutArgument(): void 'en' => 'Holiday EN', ]; - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'de_DE'); self::assertEquals('Holiday DE', $holiday->getName()); - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'ja'); self::assertEquals('Holiday EN', $holiday->getName()); // No 'en' or 'en_US' fallback @@ -123,14 +121,14 @@ public function testHolidayGetNameWithoutArgument(): void 'de' => 'Holiday DE', ]; - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'de_DE'); self::assertEquals('Holiday DE', $holiday->getName()); - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'ja'); self::assertEquals('testHoliday', $holiday->getName()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetNameWithArgument(): void { $translations = [ @@ -140,7 +138,7 @@ public function testHolidayGetNameWithArgument(): void 'it_IT' => 'Holiday IT-IT', 'en_US' => 'Holiday EN-US', ]; - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'de_DE'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'de_DE'); self::assertEquals('Holiday DE', $holiday->getName(['de'])); self::assertEquals('Holiday DE', $holiday->getName(['ja', 'de', 'nl', 'it_IT'])); @@ -155,14 +153,14 @@ public function testHolidayGetNameWithArgument(): void self::assertEquals('Holiday IT-IT', $holiday->getName(['it_IT', Holiday::LOCALE_KEY])); self::assertEquals('testHoliday', $holiday->getName([Holiday::LOCALE_KEY])); - $holiday = new Holiday('testHoliday', $translations, new DateTime(), 'ja'); + $holiday = new Holiday('testHoliday', $translations, new \DateTime(), 'ja'); self::assertEquals('Holiday EN-US', $holiday->getName()); $this->expectException(MissingTranslationException::class); $holiday->getName(['it']); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetNameWithGlobalTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -176,7 +174,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void $locale = 'pl_PL'; - $holiday = new Holiday('newYearsDay', [], new DateTime('2015-01-01'), $locale); + $holiday = new Holiday('newYearsDay', [], new \DateTime('2015-01-01'), $locale); $holiday->mergeGlobalTranslations($translationsStub); self::assertNotNull($holiday->getName()); @@ -184,7 +182,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void self::assertEquals($translations[$locale], $holiday->getName()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -198,7 +196,7 @@ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void $locale = 'pl_PL'; - $holiday = new Holiday('newYearsDay', [], new DateTime('2015-01-01'), $locale); + $holiday = new Holiday('newYearsDay', [], new \DateTime('2015-01-01'), $locale); $holiday->mergeGlobalTranslations($translationsStub); self::assertNotNull($holiday->getName()); @@ -206,7 +204,7 @@ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void self::assertEquals($translations['pl'], $holiday->getName()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -224,7 +222,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void $holiday = new Holiday( 'newYearsDay', [$customLocale => $customTranslation], - new DateTime('2015-01-01'), + new \DateTime('2015-01-01'), $customLocale ); $holiday->mergeGlobalTranslations($translationsStub); @@ -234,7 +232,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void self::assertEquals($customTranslation, $holiday->getName()); } - /** @throws Exception */ + /** @throws \Exception */ public function testHolidayGetNameWithOverridenGlobalTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); @@ -252,7 +250,7 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void $holiday = new Holiday( 'newYearsDay', [$customLocale => $customTranslation], - new DateTime('2014-01-01'), + new \DateTime('2014-01-01'), $customLocale ); $holiday->mergeGlobalTranslations($translationsStub); diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index a947adb1c..3e30e3af5 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -30,11 +30,11 @@ class SubstituteHolidayTest extends TestCase /** @throws \Exception */ public function testCreateSubstituteHolidayUnknownLocaleException(): void { - $holiday = new Holiday('testHoliday', [], new DateTime()); + $holiday = new Holiday('testHoliday', [], new \DateTime()); $this->expectException(UnknownLocaleException::class); - new SubstituteHoliday($holiday, [], new DateTime(), 'wx-YZ'); + new SubstituteHoliday($holiday, [], new \DateTime(), 'wx-YZ'); } /** @@ -44,30 +44,30 @@ public function testCreateSubstituteHolidayUnknownLocaleException(): void */ public function testCreateSubstituteHolidaySameDate(): void { - $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01')); + $holiday = new Holiday('testHoliday', [], new \DateTime('2019-01-01')); - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); - new SubstituteHoliday($holiday, [], new DateTime('2019-01-01')); + new SubstituteHoliday($holiday, [], new \DateTime('2019-01-01')); } /** @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); + $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); self::assertSame($holiday, $substitute->getSubstitutedHoliday()); self::assertEquals('substituteHoliday:testHoliday', $substitute->getKey()); self::assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); - self::assertEquals(new DateTime('2019-01-02'), $substitute); + self::assertEquals(new \DateTime('2019-01-02'), $substitute); } /** @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'); + $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, JSON_THROW_ON_ERROR); $instance = json_decode($json, true, 512, JSON_THROW_ON_ERROR); @@ -81,8 +81,8 @@ public function testSubstituteHolidayIsJsonSerializable(): void 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'); + $holiday = new Holiday('testHoliday', [], new \DateTime('2019-01-01'), 'en_US'); + $substitute = new SubstituteHoliday($holiday, [], new \DateTime('2019-01-02'), 'en_US'); self::assertNotNull($holiday); self::assertInstanceOf(SubstituteHoliday::class, $substitute); @@ -96,8 +96,8 @@ public function testSubstituteHolidayWithDateTimeInterface(): void 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'); + $holiday = new Holiday($name, [], new \DateTime('2019-01-01')); + $substitute = new SubstituteHoliday($holiday, [], new \DateTime('2019-01-02'), 'en_US'); self::assertIsString($substitute->getName()); self::assertEquals('substituteHoliday:'.$name, $substitute->getName()); @@ -109,8 +109,8 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v $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); + $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 @@ -135,8 +135,8 @@ public function testSubstituteHolidayGetNameWithPatternFallback(): void $name = 'testHoliday'; $translation = 'My Holiday'; $locale = 'en_US'; - $holiday = new Holiday($name, [], new DateTime('2019-01-01'), $locale); - $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), $locale); + $holiday = new Holiday($name, [], new \DateTime('2019-01-01'), $locale); + $substitute = new SubstituteHoliday($holiday, [], new \DateTime('2019-01-02'), $locale); $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); $translationsStub @@ -161,8 +161,8 @@ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): v $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); + $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 @@ -187,8 +187,8 @@ 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); + $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 diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index ad4a785ab..bfc6f07c5 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Base; -use InvalidArgumentException; use org\bovigo\vfs\vfsStream; use PHPUnit\Framework\TestCase; use Yasumi\Exception\UnknownLocaleException; @@ -212,7 +211,7 @@ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException() public function testLoadingTranslationsFromInexistentDirectory(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); vfsStream::setup(); diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 5bf8d1cd7..16bb248c1 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -16,10 +16,7 @@ use DateTime; use DateTimeImmutable; -use Exception; -use InvalidArgumentException; use PHPUnit\Framework\TestCase; -use ReflectionException; use Yasumi\Exception\InvalidYearException; use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; @@ -51,14 +48,14 @@ public function testCreateWithInvalidProvider(): void public function testCreateWithInvalidProviderBecauseItsATrait(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); Yasumi::create('CommonHolidays'); } public function testCreateWithAbstractClassProvider(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); Yasumi::create('AbstractProvider'); } @@ -114,7 +111,7 @@ public function testGetYear(): void /** * Tests that the next function returns the next upcoming date (i.e. next year) for the given holiday. * - * @throws Exception + * @throws \Exception */ public function testNext(): void { @@ -129,7 +126,7 @@ public function testNext(): void public function testNextWithBlankKey(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $holidays = Yasumi::create( 'Netherlands', @@ -141,7 +138,7 @@ public function testNextWithBlankKey(): void /** * Tests the previous function returns the previous date (i.e. previous year) for the given holiday. * - * @throws Exception + * @throws \Exception */ public function testPrevious(): void { @@ -162,7 +159,7 @@ public function testPrevious(): void public function testPreviousWithBlankKey(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $holidays = Yasumi::create( 'Netherlands', @@ -193,7 +190,7 @@ public function testWhenIs(): void public function testWhenIsWithBlankKey(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $holidays = Yasumi::create('Japan', 2010); $holidays->whenIs(''); @@ -201,7 +198,7 @@ public function testWhenIsWithBlankKey(): void public function testGetHolidayWithBlankKey(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $holidays = Yasumi::create('Netherlands', 1999); $holidays->getHoliday(''); @@ -218,7 +215,7 @@ public function testWhatWeekDayIs(): void public function testWhatWeekDayIsWithBlankKey(): void { - $this->expectException(InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $holidays = Yasumi::create('Netherlands', 2388); $holidays->whatWeekDayIs(''); @@ -227,7 +224,7 @@ public function testWhatWeekDayIsWithBlankKey(): void /** * Tests that the getProviders function returns an array containing all available holiday providers. * - * @throws ReflectionException + * @throws \ReflectionException */ public function testGetProviders(): void { @@ -243,7 +240,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 { @@ -268,7 +265,7 @@ public function testGetProvidersStaticCall(): void * Note that this function does *NOT* determine whether a date is a working or non-working day. It * only asserts that it is a date calculated by the Holiday Provider. * - * @throws Exception + * @throws \Exception */ public function testIsHoliday(): void { @@ -277,12 +274,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)); self::assertIsBool($isHoliday); self::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)); self::assertIsBool($isHoliday); self::assertTrue($isHoliday); @@ -295,7 +292,7 @@ public function testIsHoliday(): void * Note that this function does *NOT* determine whether a date is a working or non-working day. It * only asserts that it is a date calculated by the Holiday Provider. * - * @throws Exception + * @throws \Exception */ public function testIsNotHoliday(): void { @@ -304,12 +301,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)); self::assertIsBool($isHoliday); self::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)); self::assertIsBool($isHoliday); self::assertFalse($isHoliday); @@ -322,7 +319,7 @@ public function testIsNotHoliday(): void * * @TODO Add additional unit tests for those holiday providers that differ from the global definition * - * @throws Exception + * @throws \Exception */ public function testIsWorkingDay(): void { @@ -331,12 +328,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)); self::assertIsBool($isWorkingDay); self::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)); self::assertIsBool($isWorkingDay); self::assertTrue($isWorkingDay); @@ -349,7 +346,7 @@ public function testIsWorkingDay(): void * * @TODO Add additional unit tests for those holiday providers that differ from the global definition * - * @throws Exception + * @throws \Exception */ public function testIsNotWorkingDay(): void { @@ -358,12 +355,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)); self::assertIsBool($isNotWorkingDay); self::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)); self::assertIsBool($isNotWorkingDay); self::assertFalse($isNotWorkingDay); @@ -418,7 +415,7 @@ public function testRemoveHoliday(): void * 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 + * @throws \ReflectionException */ public function testCreateByISO31662(): void { @@ -439,7 +436,7 @@ public function testCreateByISO31662(): void * Tests that a ProviderNotFoundException is thrown when providing a invalid * ISO3166-2 code when using the Yasumi::createByISO3166_2 method. * - * @throws ReflectionException + * @throws \ReflectionException */ public function testCreateByISO31662WithInvalidCode(): void { @@ -452,15 +449,15 @@ public function testCreateByISO31662WithInvalidCode(): void * 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 + * @throws \ReflectionException + * @throws \Exception */ public function testAddExistingHoliday(): void { $provider = Yasumi::createByISO3166_2('NL', 2019); $holidayName = 'testHoliday'; - $holiday = new Holiday($holidayName, [], new DateTime()); + $holiday = new Holiday($holidayName, [], new \DateTime()); $originalHolidays = $provider->getHolidayNames(); // Add a new holiday diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index c4736e236..2dbd04169 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -16,8 +16,6 @@ use DateTime; use DateTimeImmutable; -use DateTimeZone; -use Exception; use PHPUnit\Framework\TestCase; use Yasumi\Yasumi; @@ -28,7 +26,7 @@ class YasumiWorkdayTest extends TestCase /** * Tests that the nextWorkingDay function returns an object that implements the DateTimeInterface (e.g. DateTime). * - * @throws Exception + * @throws \Exception */ public function testNextWorkingDay(): void { @@ -39,24 +37,24 @@ 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)); $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTimeImmutable::class, $nextWorkingDay); + self::assertInstanceOf(\DateTimeImmutable::class, $nextWorkingDay); self::assertEquals($expectedDate, $nextWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance - $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); + $startDate = new \DateTimeImmutable($date, new \DateTimeZone($timezone)); $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTimeImmutable::class, $nextWorkingDay); + self::assertInstanceOf(\DateTimeImmutable::class, $nextWorkingDay); self::assertEquals($expectedDate, $nextWorkingDay->format(self::FORMAT_DATE)); } /** * Tests that the prevWorkingDay function returns an object that implements the DateTimeInterface (e.g. DateTime). * - * @throws Exception + * @throws \Exception */ public function testPreviousWorkingDay(): void { @@ -67,17 +65,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)); $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTimeImmutable::class, $previousWorkingDay); + self::assertInstanceOf(\DateTimeImmutable::class, $previousWorkingDay); self::assertEquals($expectedDate, $previousWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance - $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); + $startDate = new \DateTimeImmutable($date, new \DateTimeZone($timezone)); $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate); - self::assertInstanceOf(DateTimeImmutable::class, $previousWorkingDay); + self::assertInstanceOf(\DateTimeImmutable::class, $previousWorkingDay); self::assertEquals($expectedDate, $previousWorkingDay->format(self::FORMAT_DATE)); } @@ -85,7 +83,7 @@ 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 \Exception */ public function testYearBoundary(): void { @@ -114,22 +112,22 @@ 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)); $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate, $interval); self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); - $startDate = new DateTime($expectedNext, new DateTimeZone($timezone)); + $startDate = new \DateTime($expectedNext, new \DateTimeZone($timezone)); $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate, $interval); self::assertEquals($expectedPrevious, $previousWorkingDay->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance - $startDate = new DateTimeImmutable($start, new DateTimeZone($timezone)); + $startDate = new \DateTimeImmutable($start, new \DateTimeZone($timezone)); $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate, $interval); self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); - $startDate = new DateTimeImmutable($expectedNext, new DateTimeZone($timezone)); + $startDate = new \DateTimeImmutable($expectedNext, new \DateTimeZone($timezone)); $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate, $interval); self::assertEquals($expectedPrevious, $previousWorkingDay->format(self::FORMAT_DATE)); } @@ -139,13 +137,13 @@ public function testYearBoundary(): void * * @dataProvider dataProviderWorkDayNextYear * - * @throws Exception + * @throws \Exception */ public function testWorkDayIsNextYear(string $start, int $workdays, string $expectedNext): void { $provider = 'USA'; $timezone = 'America/New_York'; - $startDate = new DateTime($start, new DateTimeZone($timezone)); + $startDate = new \DateTime($start, new \DateTimeZone($timezone)); $nextWorkingDay = Yasumi::nextWorkingDay($provider, $startDate, $workdays); self::assertEquals($expectedNext, $nextWorkingDay->format(self::FORMAT_DATE)); @@ -175,13 +173,13 @@ public function dataProviderWorkDayNextYear(): array * * @dataProvider dataProviderWorkDayPreviousYear * - * @throws Exception + * @throws \Exception */ public function testWorkDayIsPreviousYear(string $start, int $workdays, string $expectedNext): void { $provider = 'USA'; $timezone = 'America/New_York'; - $startDate = new DateTime($start, new DateTimeZone($timezone)); + $startDate = new \DateTime($start, new \DateTimeZone($timezone)); $previousWorkingDay = Yasumi::prevWorkingDay($provider, $startDate, $workdays); self::assertEquals($expectedNext, $previousWorkingDay->format(self::FORMAT_DATE)); diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 84170fec1..7b6177c08 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index 7293e01a6..c2c2291f5 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index 9a7c1c4a8..cbcbdcfa1 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index c76bc9b5c..515f75f08 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index 1cc601171..f747802d2 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Belgium; -use ReflectionException; use Yasumi\Holiday; /** @@ -91,7 +90,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 525096eda..48badfd79 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends BelgiumBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index 477d96e22..6f64b0bb2 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 1d5161837..6fd474c9c 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends BelgiumBaseTestCase implements HolidayTestCase /** * Tests Easter. * - * @throws Exception + * @throws \Exception */ public function testEaster(): void { @@ -42,14 +39,14 @@ public function testEaster(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index da29b5ba5..4cc6873b9 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements Holiday * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index 5021959b0..5f20b324a 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NationalDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index 926e7b4f2..bcac83a8c 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 0703498e5..0453ee6d9 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends BelgiumBaseTestCase implements HolidayTestCase /** * Tests Pentecost. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 5cc3b89d4..b142db3ab 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Belgium; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class pentecostMondayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, 'pentecostMonday', $year, - new DateTime("$year-6-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index 673532c57..d335fd1d2 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Bosnia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index e3cd0b347..1d2766cae 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends BosniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index 061987323..67e02462e 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index f81df105c..8a5df60a5 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends BosniaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index c3080cdba..aae10f9cc 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndependenceDayTest extends BosniaBaseTestCase implements HolidayTestCase /** * Tests Independence Day on or after 1992. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayOnAfter1992(): void { @@ -47,14 +44,14 @@ public function testIndependenceDayOnAfter1992(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Independence Day before 1992. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayBefore1992(): void { @@ -68,7 +65,7 @@ public function testIndependenceDayBefore1992(): void /** * Tests translated name of Independence Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 84a25f8be..22e23a584 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements HolidayT * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 5dc429897..4ba081733 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends BosniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index d94e12391..152c3cd6e 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Bosnia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class OrthodoxChristmasDay extends BosniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -49,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 52bb1968d..f430cfa61 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondLabourDay extends BosniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 0b2040a33..73385178f 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Bosnia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class StatehoodDayTest extends BosniaBaseTestCase implements HolidayTestCase /** * Tests Statehood Day on or after 1943. * - * @throws Exception + * @throws \Exception */ public function testStatehoodDayOnAfter1943(): void { @@ -47,14 +44,14 @@ public function testStatehoodDayOnAfter1943(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Statehood Day before 1943. * - * @throws Exception + * @throws \Exception */ public function testStatehoodDayBefore1943(): void { @@ -68,7 +65,7 @@ public function testStatehoodDayBefore1943(): void /** * Tests translated name of Statehood Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index cc6692835..15aec8f95 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AllSoulsDayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Dia dos Finados on or after 1300. * - * @throws Exception + * @throws \Exception */ public function testDiaDosFinadosAfter1300(): void { @@ -47,14 +44,14 @@ public function testDiaDosFinadosAfter1300(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-02", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-02", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Dia dos Finados on or before 1300. * - * @throws Exception + * @throws \Exception */ public function testDiaDosFinadosBefore1300(): void { @@ -65,7 +62,7 @@ public function testDiaDosFinadosBefore1300(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 2342686b1..5490d7f5e 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AshWednesdayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ash Wednesday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 01396d761..4ec2ce750 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Brazil; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index e4fad2483..ba98ac50b 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,7 +38,7 @@ class CarnavalMondayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Carnaval Monday on or after 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalMondayAfter1700(): void { @@ -49,14 +47,14 @@ public function testCarnavalMondayAfter1700(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P48D')) + $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P48D')) ); } /** * Tests Carnaval Monday on or before 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalMondayBefore1700(): void { @@ -67,7 +65,7 @@ public function testCarnavalMondayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index d39111db3..5157961e4 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -40,7 +38,7 @@ class CarnavalTuesdayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Carnaval Tuesday on or after 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalTuesdayAfter1700(): void { @@ -49,14 +47,14 @@ public function testCarnavalTuesdayAfter1700(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P47D')) + $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P47D')) ); } /** * Tests Carnaval Tuesday on or before 1700. * - * @throws Exception + * @throws \Exception */ public function testCarnavalTuesdayBefore1700(): void { @@ -67,7 +65,7 @@ public function testCarnavalTuesdayBefore1700(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index bc3217a38..d3aafd116 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class ChristmasDayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testChristmasDay(): void { @@ -42,14 +39,14 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index 0d61b003e..7be8d2ced 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index 765480f37..7eb523ac1 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Brazil; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class EasterTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Easter. * - * @throws Exception + * @throws \Exception */ public function testEaster(): void { @@ -45,7 +44,7 @@ public function testEaster(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 866574985..5109a0579 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class GoodFridayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Good Friday. * - * @throws Exception + * @throws \Exception */ public function testGoodFriday(): void { @@ -44,14 +42,14 @@ public function testGoodFriday(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new DateInterval('P2D')) + $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P2D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index 393e327ae..4f75f7d3e 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndependenceDayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Dia da independência do Brasil on or after 1822. * - * @throws Exception + * @throws \Exception */ public function testDiaDaIndependenciaDoBrasilAfter1822(): void { @@ -47,14 +44,14 @@ public function testDiaDaIndependenciaDoBrasilAfter1822(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-09-07", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-09-07", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Dia da independência do Brasil on or before 1822. * - * @throws Exception + * @throws \Exception */ public function testDiaDaIndependenciaDoBrasilBefore1822(): void { @@ -65,7 +62,7 @@ public function testDiaDaIndependenciaDoBrasilBefore1822(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index 06138c9b0..b9f44abf5 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class InternationalWorkersDayTest extends BrazilBaseTestCase implements HolidayT /** * Tests International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testInternationalWorkersDay(): void { @@ -42,14 +39,14 @@ public function testInternationalWorkersDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index 221a30422..b1c3495a2 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class NewYearsDayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @throws Exception + * @throws \Exception */ public function testNewYearsDay(): void { @@ -42,14 +39,14 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index 65b270fbe..a16da5a3d 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements HolidayTes /** * Tests Nossa Senhora Aparecida on or after 1980. * - * @throws Exception + * @throws \Exception */ public function testNossaSenhoraAparecidaAfter1980(): void { @@ -47,14 +44,14 @@ public function testNossaSenhoraAparecidaAfter1980(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Nossa Senhora Aparecida on or before 1980. * - * @throws Exception + * @throws \Exception */ public function testNossaSenhoraAparecidaBefore1980(): void { @@ -65,7 +62,7 @@ public function testNossaSenhoraAparecidaBefore1980(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index 6b7393eb6..f5fe4fbdf 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements Holida /** * Tests Proclamação da República on or after 1889. * - * @throws Exception + * @throws \Exception */ public function testProclamacaoDaRepublicaAfter1889(): void { @@ -47,14 +44,14 @@ public function testProclamacaoDaRepublicaAfter1889(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Proclamação da República on or before 1889. * - * @throws Exception + * @throws \Exception */ public function testProclamacaoDaRepublicaBefore1889(): void { @@ -65,7 +62,7 @@ public function testProclamacaoDaRepublicaBefore1889(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index f80d9f07a..760ba52f2 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Brazil; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class TiradentesDayTest extends BrazilBaseTestCase implements HolidayTestCase /** * Tests Dia de Tiradentes on or after 1792. * - * @throws Exception + * @throws \Exception */ public function testDiaDeTiradentesAfter1792(): void { @@ -47,14 +44,14 @@ public function testDiaDeTiradentesAfter1792(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Dia de Tiradentes on or before 1792. * - * @throws Exception + * @throws \Exception */ public function testDiaDeTiradentesBefore1792(): void { @@ -65,7 +62,7 @@ public function testDiaDeTiradentesBefore1792(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index 921d74da0..c9bf62bd5 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Alberta; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index 7eee55af8..c71ac9472 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\BritishColumbia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 3a1b10c38..a0e2ecbab 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CanadaDayTest extends CanadaBaseTestCase implements HolidayTestCase /** * Tests Canada Day on or after 1983. Canada Day was established in 1983 on July 1st. * - * @throws Exception + * @throws \Exception */ public function testCanadaDayOnAfter1983(): void { @@ -47,21 +44,21 @@ public function testCanadaDayOnAfter1983(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-07-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-07-01", new \DateTimeZone(self::TIMEZONE)) ); $year = 2018; // July 1 is Sunday $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - new DateTime("$year-07-02", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-07-02", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Canada Day before 1879. Canada Day was established as Dominion Day in 1879 on July 1st. * - * @throws Exception + * @throws \Exception */ public function testCanadaDayBefore1879(): void { @@ -75,7 +72,7 @@ public function testCanadaDayBefore1879(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php index 93c454dd6..5aefffc13 100644 --- a/tests/Canada/CanadaTest.php +++ b/tests/Canada/CanadaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index c5be59386..f658ed64f 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class ChristmasDayTest extends CanadaBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. Christmas Day is celebrated on December 25th. * - * @throws Exception + * @throws \Exception */ public function testChristmasDay(): void { @@ -42,14 +39,14 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index d73c4851b..c474157cf 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends CanadaBaseTestCase implements HolidayTestCase /** * Tests Labour Day on or after 1894. Labour Day was established since 1894 on the first Monday of September. * - * @throws Exception + * @throws \Exception */ public function testLabourDayOnAfter1894(): void { @@ -47,14 +44,14 @@ public function testLabourDayOnAfter1894(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of september $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of september $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Labour Day before 1894. Labour Day was established since 1894 on the first Monday of September. * - * @throws Exception + * @throws \Exception */ public function testLabourDayBefore1894(): void { @@ -68,7 +65,7 @@ public function testLabourDayBefore1894(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index d7569c982..eeaa0eef8 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Manitoba; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index 4e3b05eb0..28f7459c3 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\NewBrunswick; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 2413282e9..d273af6d1 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class NewYearsDayTest extends CanadaBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @throws Exception + * @throws \Exception */ public function testNewYearsDay(): void { @@ -42,14 +39,14 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php index cb6353994..3a1a1dc54 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\NewfoundlandAndLabrador; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -86,7 +85,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index 3885e7bb6..10fcb72cc 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\NorthwestTerritories; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index f8ffcddd5..995fa18e9 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\NovaScotia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php index 27913c836..2d22c23b1 100644 --- a/tests/Canada/Nunavut/NunavutTest.php +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Nunavut; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -84,7 +83,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index d6746141a..acc23f841 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Ontario; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index 4624b6251..6b4a7163f 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\PrinceEdwardIsland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index 254dcb8bf..3dc6e3049 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Quebec; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index 6d14b88e3..2cbfc0625 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class RemembranceDayTest extends CanadaBaseTestCase implements HolidayTestCase /** * Tests Remembrance Day on or after 1919. Remembrance Day was established in 1919 on November 11. * - * @throws Exception + * @throws \Exception */ public function testRemembranceDayOnAfter1919(): void { @@ -47,14 +44,14 @@ public function testRemembranceDayOnAfter1919(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Remembrance Day before 1919. Remembrance Day was established in 1919 on November 11. * - * @throws Exception + * @throws \Exception */ public function testVeteransDayBefore1919(): void { @@ -68,7 +65,7 @@ public function testVeteransDayBefore1919(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index 811750143..6b3da1351 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Saskatchewan; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index d57b1a54d..b6ee6a3ab 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class ThanksgivingDayTest extends CanadaBaseTestCase implements HolidayTestCase * Tests Thanksgiving Day on or after 1879. Thanksgiving Day is celebrated since 1879 on the second Monday * of October. * - * @throws Exception + * @throws \Exception */ public function testThanksgivingDayOnAfter1879(): void { @@ -48,7 +45,7 @@ public function testThanksgivingDayOnAfter1879(): void self::REGION, self::HOLIDAY, $year, - new DateTime("second monday of october $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of october $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testThanksgivingDayOnAfter1879(): void * Tests Thanksgiving Day before 1879. ThanksgivingDay Day is celebrated since 1879 on the second Monday * of October. * - * @throws Exception + * @throws \Exception */ public function testThanksgivingDayBefore1879(): void { @@ -70,7 +67,7 @@ public function testThanksgivingDayBefore1879(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -85,7 +82,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/TruthAndReconciliationDayTest.php b/tests/Canada/TruthAndReconciliationDayTest.php index 648e539b3..edd5fb68f 100644 --- a/tests/Canada/TruthAndReconciliationDayTest.php +++ b/tests/Canada/TruthAndReconciliationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Canada; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class TruthAndReconciliationDayTest extends CanadaBaseTestCase implements Holida * Tests TruthAndReconciliationDay on or after 2021. Thanksgiving Day is celebrated since 2021 on the last day * of September. * - * @throws Exception + * @throws \Exception */ public function testTruthAndReconciliationDayOnAfter2021(): void { @@ -48,7 +45,7 @@ public function testTruthAndReconciliationDayOnAfter2021(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last day of september $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last day of september $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testTruthAndReconciliationDayOnAfter2021(): void * Tests TruthAndReconciliationDay before 2021. TruthAndReconciliationDay is celebrated since 2021 on the last day * of September. * - * @throws Exception + * @throws \Exception */ public function testTruthAndReconciliationDayBefore2021(): void { @@ -70,7 +67,7 @@ public function testTruthAndReconciliationDayBefore2021(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -85,7 +82,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index 3f34cfe4a..a43247915 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Canada\Yukon; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -100,7 +99,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 5c5f61e89..5e3a4aebe 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index dd392b339..e06473f23 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements HolidayT /** * Tests Day of Antifascist Struggle on or after 1941. * - * @throws Exception + * @throws \Exception */ public function testAntifascistStruggleDayOnAfter1941(): void { @@ -47,14 +44,14 @@ public function testAntifascistStruggleDayOnAfter1941(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-22", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-22", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Day of Antifascist Struggle before 1941. * - * @throws Exception + * @throws \Exception */ public function testAntifascistStruggleDayBefore1941(): void { @@ -68,7 +65,7 @@ public function testAntifascistStruggleDayBefore1941(): void /** * Tests translated name of Day of Antifascist Struggle. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index c3ffcd3d1..2e771060b 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index a70edc9f1..c1732630f 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index ff9bf6847..982761c0c 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/CroatiaTest.php b/tests/Croatia/CroatiaTest.php index 50420f792..640287e95 100644 --- a/tests/Croatia/CroatiaTest.php +++ b/tests/Croatia/CroatiaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Croatia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -112,7 +111,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 4336eeec5..ef806e4d3 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index e75ae4918..21a35259c 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 90db244f4..2d5ced71b 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends CroatiaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 91fe5721a..0f0f97509 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements Holiday /** * Tests Homeland Thanksgiving Day on or after 1995. * - * @throws Exception + * @throws \Exception */ public function testHomelandThanksgivingDayOnAfter1995(): void { @@ -52,14 +49,14 @@ public function testHomelandThanksgivingDayOnAfter1995(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-5", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Homeland Thanksgiving Day before 1995. * - * @throws Exception + * @throws \Exception */ public function testHomelandThanksgivingDayBefore1995(): void { @@ -73,7 +70,7 @@ public function testHomelandThanksgivingDayBefore1995(): void /** * Tests translated name of Homeland Thanksgiving Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 63abb5f1b..18a5b738b 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests Independence Day on or after 1991. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayOnAfter1991(): void { @@ -52,14 +49,14 @@ public function testIndependenceDayOnAfter1991(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Independence Day before 1991. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayBefore1991(): void { @@ -73,7 +70,7 @@ public function testIndependenceDayBefore1991(): void /** * Tests Independence Day before 1991. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayAfterDisbandment(): void { @@ -87,7 +84,7 @@ public function testIndependenceDayAfterDisbandment(): void /** * Tests translated name of Independence Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index 565b3ef37..f83ff0803 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements Holiday * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 077ab71e2..e3e3dd5dd 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index 376354dc9..1199e87f6 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class RemembranceDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests Remembrance Day. * - * @throws Exception + * @throws \Exception */ public function testRemembranceDayAfterItWasEstablished(): void { @@ -47,14 +44,14 @@ public function testRemembranceDayAfterItWasEstablished(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-18", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-18", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Remembrance Day. * - * @throws Exception + * @throws \Exception */ public function testRemembranceDayBeforeItWasEstablished(): void { @@ -68,7 +65,7 @@ public function testRemembranceDayBeforeItWasEstablished(): void /** * Tests translated name of Remembrance Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index 93df24861..91e7b3304 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends CroatiaBaseTestCase implements HolidayTestCase * * @dataProvider stStephensDayDataProvider * - * @param int $year the year for which St. Stephen's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Stephen's Day needs to be tested + * @param \DateTime $expected the expected date */ public function teststStephensDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function teststStephensDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Stephen's Day * - * @throws Exception + * @throws \Exception */ public function stStephensDayDataProvider(): array { @@ -57,7 +55,7 @@ public function stStephensDayDataProvider(): array /** * Tests translated name of St. Stephen's Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 9b98d48c4..706b5d946 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Croatia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests Statehood Day. * - * @throws Exception + * @throws \Exception */ public function testStatehoodDay(): void { @@ -53,7 +50,7 @@ public function testStatehoodDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime($expectedDate, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expectedDate, new \DateTimeZone(self::TIMEZONE)) ); $year = $this->generateRandomYear(self::DATE_CHANGE_YEAR); @@ -62,14 +59,14 @@ public function testStatehoodDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime($expectedDate, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expectedDate, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Statehood Day before 1991. * - * @throws Exception + * @throws \Exception */ public function testStatehoodDayBefore1991(): void { @@ -83,7 +80,7 @@ public function testStatehoodDayBefore1991(): void /** * Tests translated name of Statehood Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -98,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 968017c27..695e09bc0 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements HolidayTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 130317e36..6912c220b 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements HolidayTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Eve needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Eve needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index f6170ed92..feec67d63 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -97,7 +96,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 1e5430395..306592c5b 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements Holiday * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index c0c190fc2..4df298b0b 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class EasterMondayTest extends CzechRepublicBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -46,14 +43,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 40500243e..07382e95c 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class GoodFridayTest extends CzechRepublicBaseTestCase implements HolidayTestCas /** * Tests Good Friday. * - * @throws Exception + * @throws \Exception */ public function testGoodFriday(): void { @@ -46,14 +43,14 @@ public function testGoodFriday(): void self::REGION, 'goodFriday', $year, - new DateTime("$year-4-14", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-14", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -68,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index a38e8a6cf..756962297 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ 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 DateTime $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index e6dc56f3f..fdf38bfd1 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements H * * @dataProvider HolidayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -49,7 +47,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests translated name of International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -76,7 +74,7 @@ public function testHolidayType(): void * * @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 a3c0ede63..560f77854 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 0b47a9b48..2ee7d00f8 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index 30bbddfdc..7e08a0a57 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ 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 DateTime $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index 1452b5e51..75e4aa7b4 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ 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 DateTime $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 31af974a9..13652b7dd 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Holida * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index fa0976c6e..c495da56e 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ 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 DateTime $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index 6ace79694..f325b82b3 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\CzechRepublic; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Holida * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index 0d517c15c..acf297729 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 3bc60f908..f0fcf4b01 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 87ada4ad5..b5d359ed7 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index a2787feb2..4e552227e 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ConstitutionDayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-5", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index d5a3a928d..b9a0d8dea 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Denmark; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -99,7 +98,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index 657a717aa..ef5712d4e 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index 1a154c98c..63ceb95ed 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-26", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-26", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 89a55047c..b946d6abf 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index 494ee5d17..560a1b88d 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class GreatPrayerDayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-13", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-13", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 217ec8f07..783f00487 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements Holiday * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec * * @return array list of test dates for International Workers' Day * - * @throws Exception + * @throws \Exception */ public function InternationalWorkersDayDataProvider(): array { @@ -57,7 +55,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index 6d77b3805..44b2ef66b 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class MaundyThursdayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-29", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index fdb9555f8..445cc3de4 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index 55508ce67..ddb27654b 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 1ee6251e5..a362c4345 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index 59fbdf37b..1ac499815 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends DenmarkBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index f6e5b4773..463d5f5fe 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 087a99535..6f814a14f 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; /** @@ -67,22 +64,22 @@ public function __construct() /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testSummerTime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->randomYearFromArray($this->observedYears); - $expectedDate = new DateTime("last sunday of march $year", new DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime("last sunday of march $year", new \DateTimeZone(self::TIMEZONE)); if (array_key_exists($year, $this->deviantTransitions)) { - $expectedDate = new DateTime($this->deviantTransitions[$year], new DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime($this->deviantTransitions[$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 (1980 === $year) { - $expectedDate = new DateTime('1980-04-06', new DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime('1980-04-06', new \DateTimeZone(self::TIMEZONE)); } $this->assertHoliday( @@ -96,7 +93,7 @@ public function testSummerTime(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -111,7 +108,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index cd8bbb33a..6ec3f8884 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Denmark; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; /** @@ -71,21 +68,21 @@ public function __construct() /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testWinterTime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->randomYearFromArray($this->observedYears); - $expectedDate = new DateTime("last sunday of september $year", new DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime("last sunday of september $year", new \DateTimeZone(self::TIMEZONE)); if ($year >= 1996) { - $expectedDate = new DateTime("last sunday of october $year", new DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime("last sunday of october $year", new \DateTimeZone(self::TIMEZONE)); } if (array_key_exists($year, $this->deviantTransitions)) { - $expectedDate = new DateTime($this->deviantTransitions[$year], new DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime($this->deviantTransitions[$year], new \DateTimeZone(self::TIMEZONE)); } $this->assertHoliday( @@ -99,7 +96,7 @@ public function testWinterTime(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index a55638381..94efecb3a 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class ChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index 3b6fd804e..138bfdfb6 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class ChristmasEveDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index 096583288..ac3cea273 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class EasterDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index 41c3e8b07..0bff75dce 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index 8aff83895..34561d7b5 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class GoodFridayDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index d518c6760..45e59a4e8 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class IndependenceDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore(): void { @@ -51,7 +48,7 @@ public function testHolidayBefore(): void /** * Test if holiday is defined after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfter(): void { @@ -61,14 +58,14 @@ public function testHolidayAfter(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index a55bfc4fc..9b94c6a6f 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class InternationalWorkersDayTest extends EstoniaBaseTestCase implements Holiday /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index fc8222463..1955b2394 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearsDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index b5ebdc056..ef6ab5f88 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class PentecostTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index bc0e1fa07..a5b3d26dd 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class RestorationOfIndependenceDayTest extends EstoniaBaseTestCase implements Ho /** * Test if holiday is not defined before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore(): void { @@ -51,7 +48,7 @@ public function testHolidayBefore(): void /** * Test if holiday is defined after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfter(): void { @@ -61,14 +58,14 @@ public function testHolidayAfter(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 46d134394..4deb34a30 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class SecondChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index f1bd2207d..c05c5b226 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Estonia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class StJohnsDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 853b7f329..8337096ab 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Estonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class VictoryDayTest extends EstoniaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore(): void { @@ -51,7 +48,7 @@ public function testHolidayBefore(): void /** * Test if holiday is defined after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfter(): void { @@ -61,14 +58,14 @@ public function testHolidayAfter(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 3deefeaa3..ecf9c3772 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Finland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,8 +32,8 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -49,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +53,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE)); // Check between 31 October and 6th of November the day that is a Saturday for ($d = 0; $d <= 7; ++$d) { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array $data[] = [$year, $date]; break; } - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); } } @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index d052f8fea..91c03c4d6 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index d5142fee6..6f81b663f 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends FinlandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index ed1e5e3a7..314812acd 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 10e0ffa1b..d09d2ba9b 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index ede0e1bc8..0841b7980 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends FinlandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 16a8dc1db..859a8ff3a 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Finland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -93,7 +92,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index 196ff2288..4d4359c19 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 4552495b2..215377dfb 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndependenceDayTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-6", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index eca26f759..7c650a6fc 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements Holiday * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 7d5da8c16..b9811060b 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends FinlandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index c3cb5edbd..ffc0b47c9 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index f5910b22d..4189931d1 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index ca7a7fe0b..5c513a1d9 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Finland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -42,7 +39,7 @@ class stJohnsDayTest extends FinlandBaseTestCase implements HolidayTestCase /** * Tests the holiday before it was adjusted. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeAdjustment(): void { @@ -51,14 +48,14 @@ public function testHolidayBeforeAdjustment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday before it was adjusted. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterAdjustment(): void { @@ -82,7 +79,7 @@ public function testHolidayAfterAdjustment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -97,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index 4801936cb..5f9499adf 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends FranceBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 b9a44cebd..4f94c5fa5 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ArmisticeDayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests Armistice Day on or after 1919. * - * @throws Exception + * @throws \Exception */ public function testArmisticeDayOnAfter1919(): void { @@ -47,14 +44,14 @@ public function testArmisticeDayOnAfter1919(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Armistice Day before 1919. * - * @throws Exception + * @throws \Exception */ public function testArmisticeDayBefore1919(): void { @@ -68,7 +65,7 @@ public function testArmisticeDayBefore1919(): void /** * Tests translated name of Armistice Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index 2d9b2d24a..71ecae3de 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index 64bdcfcb5..d83d0f7ba 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 f9989c4be..1234e41ba 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\France\BasRhin; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index 17b09c753..f1e1799fd 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France\BasRhin; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends BasRhinBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index ae97de54a..e6d0990ef 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France\BasRhin; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stStephensDayTest extends BasRhinBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index fda55e4e0..b5561d67c 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class BastilleDayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests Bastille Day on or after 1790. * - * @throws Exception + * @throws \Exception */ public function testBastilleDayOnAfter1790(): void { @@ -47,14 +44,14 @@ public function testBastilleDayOnAfter1790(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-14", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-14", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Bastille Day before 1790. * - * @throws Exception + * @throws \Exception */ public function testBastilleDayBefore1790(): void { @@ -68,7 +65,7 @@ public function testBastilleDayBefore1790(): void /** * Tests translated name of Bastille Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index b23b24a16..4f4292fee 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends FranceBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 63b506330..6a880df5a 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index d73298a89..9f444f421 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\France; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index 4e06aaeca..d7f599a10 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France\HautRhin; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends HautRhinBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 245177756..38d33c3b1 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\France\HautRhin; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 523cc1b04..b350a2470 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France\HautRhin; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stStephensDayTest extends HautRhinBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 3d8dbb63f..5a34513e0 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements HolidayT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 05c2cb6cd..80b6346fc 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France\Moselle; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends MoselleBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index 12ed17a99..d036632a7 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\France\Moselle; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\France; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 894b40288..692342ae3 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France\Moselle; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stStephensDayTest extends MoselleBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index 86ebe9251..75b8fc3e3 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends FranceBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 8b9060f06..379b7718d 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\France; use Yasumi\tests\HolidayTestCase; @@ -34,7 +31,7 @@ class PentecostMondayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -43,14 +40,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -65,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 3b1dc75b1..e6bf04ed9 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\France; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class VictoryInEuropeDayTest extends FranceBaseTestCase implements HolidayTestCa /** * Tests Victory In Europe Day on or after 1945. * - * @throws Exception + * @throws \Exception */ public function testVictoryInEuropeDayOnAfter1945(): void { @@ -47,14 +44,14 @@ public function testVictoryInEuropeDayOnAfter1945(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Victory In Europe Day before 1945. * - * @throws Exception + * @throws \Exception */ public function testVictoryInEuropeDayBefore1945(): void { @@ -68,7 +65,7 @@ public function testVictoryInEuropeDayBefore1945(): void /** * Tests translated name of Victory in Europe Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php index d2207f46c..4cfb47237 100644 --- a/tests/Georgia/EasterTest.php +++ b/tests/Georgia/EasterTest.php @@ -4,9 +4,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -20,7 +17,7 @@ class EasterTest extends GeorgiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -30,14 +27,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -52,7 +49,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php index c135e9b52..9319bd6ed 100644 --- a/tests/Georgia/GeorgiaTest.php +++ b/tests/Georgia/GeorgiaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Georgia; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index 90afd51f2..c00a43b40 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -29,7 +26,7 @@ class IndependenceDayTest extends GeorgiaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'independenceDay'; /** - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -38,7 +35,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-05-26", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-05-26", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index 83d9ddf47..7bda13839 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index 80724e2d5..be2f9ed62 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 03de05be4..531633ed0 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index 298514f29..dbf958bca 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index a16b21afb..b1833604e 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 778a41967..1f26b69c3 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index 6e4fe4fb8..cb565d1ba 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index 5a38a1a6b..7532d327b 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index a8789ef16..d11b77c6e 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index c0a9724de..7186bd68c 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Georgia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -29,7 +26,7 @@ class UnityDayTest extends GeorgiaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'unityDay'; /** - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -38,7 +35,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-09", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-09", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index 58ace6026..38126bb7a 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Georgia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +38,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -49,7 +48,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index 9b6fb6f42..1b0a5762e 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, 'ascensionDay', $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 7f5226326..31fd2bd8a 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index d3c13b388..9d66930c7 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index b82749505..f2a797eb9 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class CorpusChristiTest extends BadenWurttembergBaseTestCase implements HolidayT /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,7 +47,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -63,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index f91873b30..1793e204b 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index 9134ce1be..bab3fdf97 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\Bavaria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index 08e7069d6..de32705eb 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Bavaria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index bb41077a0..e6e31471c 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Bavaria; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class CorpusChristiTest extends BavariaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,7 +47,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -63,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index bdbecab0a..c3f909c0d 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\Bavaria; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends BavariaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index 63cfd5473..dce900f3d 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Berlin; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberation2020Test.php index ca001dccc..d409b1959 100644 --- a/tests/Germany/Berlin/DayOfLiberation2020Test.php +++ b/tests/Germany/Berlin/DayOfLiberation2020Test.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Berlin; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class DayOfLiberation2020Test extends BerlinBaseTestCase implements HolidayTestC /** * Test the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayInYear(): void { @@ -46,14 +43,14 @@ public function testHolidayInYear(): void self::REGION, self::HOLIDAY, self::YEAR, - new DateTime(self::YEAR.'-05-08', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::YEAR.'-05-08', new \DateTimeZone(self::TIMEZONE)) ); } /** * Test the holiday defined in this test in the years before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeYear(): void { @@ -67,7 +64,7 @@ public function testHolidayBeforeYear(): void /** * Test the holiday defined in this test in the years after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterYear(): void { diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index 7b90c41b0..c2d08f558 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Berlin; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class InternationalWomensDay2019Test extends BerlinBaseTestCase implements Holid /** * Test the holiday defined in this test upon establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnEstablishment(): void { @@ -46,14 +43,14 @@ public function testHolidayOnEstablishment(): void self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR, - new DateTime(self::ESTABLISHMENT_YEAR.'-03-08', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::ESTABLISHMENT_YEAR.'-03-08', new \DateTimeZone(self::TIMEZONE)) ); } /** * Test the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -67,7 +64,7 @@ public function testHolidayBeforeEstablishment(): void /** * Test the holiday defined in this test after completion. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterCompletion(): void { @@ -77,7 +74,7 @@ public function testHolidayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index 080281e13..de3408bf4 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Brandenburg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -100,7 +99,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index e1458c633..bdc380def 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Brandenburg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index e5f3472b9..f1c08a48a 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Bremen; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 5a3168940..9e719274f 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Bremen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends BremenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index 6ffcb2651..25310deef 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends GermanyBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 4bbe6c792..58d03d8e9 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index 1dcae3c36..4c1aafe9a 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class GermanUnityDayTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index ce8cc9c1c..f48bf2886 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index f4c2486ac..b3cf061fd 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests Good Friday. * - * @throws Exception + * @throws \Exception */ public function testGoodFriday(): void { @@ -42,14 +39,14 @@ public function testGoodFriday(): void self::REGION, 'goodFriday', $year, - new DateTime("$year-4-14", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-14", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 0dc54bd27..fd9b08c18 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Hamburg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class DayOfReformationTest extends HamburgBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index eceee6d43..eaabf9a83 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Hamburg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index c20838f8f..ed7105812 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Hesse; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class CorpusChristiTest extends HesseBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,7 +47,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -63,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index 5858f2de9..4fced9447 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Hesse; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index 40523162c..042825043 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements Holiday * * @dataProvider HolidayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests translated name of International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 3ec102887..3bdfd1551 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\LowerSaxony; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 9d10fffbc..991c552be 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\LowerSaxony; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 595910468..724635da2 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -98,7 +97,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index ee8de3318..902ac42fc 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class ReformationDayTest extends MecklenburgWesternPomeraniaBaseTestCase impleme * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -48,7 +45,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -57,7 +54,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -71,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -86,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index ba88d480a..83318f015 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends GermanyBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index 3e49390b3..dd5271fa3 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsEveTest extends GermanyBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index 0e3f54dd1..b024539f6 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Holid * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index dc116b24f..f71e106fc 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements Holi /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,7 +47,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -63,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index fee44f16a..4b87d0cc0 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -91,7 +90,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 09b48b042..443ac158c 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 1f87a4c02..2098498f6 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime($date, new DateTimeZone(self::TIMEZONE)) + new \DateTime($date, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -69,7 +66,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index 4c6b9f1cd..798af37d0 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ReformationDay2017Test extends GermanyBaseTestCase implements HolidayTestC /** * Test the holiday defined in this test upon establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnEstablishment(): void { @@ -46,14 +43,14 @@ public function testHolidayOnEstablishment(): void self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR, - new DateTime(self::ESTABLISHMENT_YEAR.'-10-31', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::ESTABLISHMENT_YEAR.'-10-31', new \DateTimeZone(self::TIMEZONE)) ); } /** * Test the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -67,7 +64,7 @@ public function testHolidayBeforeEstablishment(): void /** * Test the holiday defined in this test after completion. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterCompletion(): void { @@ -77,7 +74,7 @@ public function testHolidayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index a0ced8577..1ef668c13 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Holida * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index 1dc96c1d7..79e727b04 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements Holid /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,7 +47,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -63,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index cdc672098..599f91ba7 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -91,7 +90,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index 5f2d8af18..af659c8d9 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\Saarland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 572051290..473d5324e 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\Saarland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index 231347ab7..f8e0867a1 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Saarland; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +30,7 @@ class CorpusChristiTest extends SaarlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,7 +47,7 @@ public function testHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -63,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 988c317b5..984f263c7 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Saarland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -91,7 +90,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index c137d5a49..6144797f3 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Saxony; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends SaxonyBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index 100724347..1561aaa9f 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Saxony; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,13 +40,13 @@ class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements HolidayTe /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { // Check between the 16th and 22nd day the one that is a Wednesday $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $holiday = new DateTime("next wednesday $year-11-15", new DateTimeZone(self::TIMEZONE)); // Default date + $holiday = new \DateTime("next wednesday $year-11-15", new \DateTimeZone(self::TIMEZONE)); // Default date $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $holiday); @@ -62,7 +59,7 @@ public function testHolidayOnAfterEstablishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -76,7 +73,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index 53e3741a2..b1e40ee5e 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Saxony; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index adab06704..5af23f22a 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany\SaxonyAnhalt; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index f06249426..bb80a9373 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\SaxonyAnhalt; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index 1b3f5949e..0662f0272 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\SaxonyAnhalt; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -98,7 +97,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 16de48d67..3e8e644d0 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\SchleswigHolstein; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Holida * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index 9ccc65097..292ca71f0 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\SchleswigHolstein; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index a7cacc5f6..9648c59af 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Germany; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 80e017d60..852938824 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Thuringia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index 49b1b3921..439affa6b 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Germany\Thuringia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index d8b76dee9..b996792c2 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Germany\Thuringia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class WorldChildrensDayTest extends ThuringiaBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new DateTime("$year-09-20", new DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("$year-09-20", new \DateTimeZone(self::TIMEZONE))]; } return $data; @@ -70,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index cd28e0cb3..ae83ebaea 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AnnunciationTest extends GreeceBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index e4ff78766..527226aa5 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index e4cf358d7..db5bfcd45 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 612a2e0cc..ef33e36da 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends GreeceBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index c05a66a16..b2e7d32ca 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class CleanMondayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-14", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-14", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 51c8e28a7..031bef360 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 76d80df04..4e222961d 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index 517888148..f17a82fd5 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends GreeceBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Epiphany. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index 095a5bf6d..abf19075f 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Greece; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -100,7 +99,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index df94009f1..e1eb41cf2 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndepencenceDayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index d461dfb65..3a1b88b3e 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements HolidayT * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests translated name of International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 bb3a76cce..85153da4d 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends GreeceBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 091a8d40b..33de702af 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class OhiDayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index d74eb66b5..899c9a16b 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-20", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index 56081bf19..5e5470eca 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-19", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-19", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index 7c428218a..232ed724f 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class PolytechnioTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 1174055c1..610df0bb4 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index b9f912639..c72bd13d2 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Greece; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class goodFridayTest extends GreeceBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 4093e11c8..3fe138f6c 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index 8e399c930..f09b91777 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends HungaryBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index 526c2f208..a496fd2d4 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends HungaryBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index 45356ebff..041c3b4a6 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends HungaryBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index eb3d8b7fb..af7c03bb4 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Hungary; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -106,7 +105,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index 436868a31..34d5bcbcd 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements Holiday * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index bbac4e42e..2cd6cdeb8 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MemorialDay1848Test extends HungaryBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index 3e746ca28..d9e94645e 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MemorialDay1956Test extends HungaryBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 055a14d47..eff401764 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends HungaryBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index 772ef2b54..fe9ba4547 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends HungaryBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index eec9d311b..f156399a1 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends HungaryBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index ac0cd37ca..7d43334b2 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 8cc745393..c9e13cd4f 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Hungary; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class StateFoundationDayTest extends HungaryBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-20", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index bbbe28e77..29ea8b566 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AugustHolidayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); $this->assertDayOfWeek(self::REGION, self::HOLIDAY, $year, 'Monday'); } @@ -56,7 +53,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("next monday $year-7-31", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("next monday $year-7-31", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -75,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -96,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index fd577c0f9..ede04689f 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class ChristmasDayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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)) { @@ -56,7 +53,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -74,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index 235b699dd..a9a96b2fb 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterMondayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -97,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index c0c235a53..03b76c38d 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class EasterTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -46,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -55,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -74,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index 95e4adc4a..d769a4e41 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class GoodFridayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->sub(new DateInterval('P2D')); + $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -96,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index 0fe62a448..9e5762659 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Ireland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -101,7 +100,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 1e8e0d216..fadf5b364 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class JuneHolidayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); $this->assertDayOfWeek(self::REGION, self::HOLIDAY, $year, 'Monday'); } @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("next monday $year-5-31", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("next monday $year-5-31", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -94,7 +91,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 90b8cb541..f925473d6 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class MayDayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); $this->assertDayOfWeek(self::REGION, self::HOLIDAY, $year, 'Monday'); } @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("next monday $year-4-30", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("next monday $year-4-30", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -94,7 +91,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 7c33d94af..67683adad 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,11 +40,11 @@ class NewYearsDayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); if (0 === (int) $date->format('w')) { @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -79,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index a210e335c..d5d0ee79f 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class OctoberHolidayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); $this->assertDayOfWeek(self::REGION, self::HOLIDAY, $year, 'Monday'); } @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("previous monday $year-11-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("previous monday $year-11-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -80,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -94,7 +91,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 61bf739a3..bad0333ea 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class PentecostTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 2; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P49D')); + $date->add(new \DateInterval('P49D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -97,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 0ad3e91cb..cec99417a 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,11 +40,11 @@ class StPatricksDayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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)) { @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-3-17", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-3-17", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -79,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -93,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index b0f10b88f..fac07209b 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class StStephensDayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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)) { @@ -56,7 +53,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -64,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -74,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index f1028a971..af37e0a66 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Ireland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +40,7 @@ class pentecostMondayTest extends IrelandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -52,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -61,7 +57,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -70,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(1000, self::ABOLISHMENT_YEAR); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P50D')); + $date->add(new \DateInterval('P50D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -80,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test after abolishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayDayAfterAbolishment(): void { @@ -90,7 +86,7 @@ public function testHolidayDayAfterAbolishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -111,7 +107,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 73ae8a0c7..63d7bec75 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v * * @return array list of test dates for All Saints' Day * - * @throws Exception + * @throws \Exception */ public function AllSaintsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function AllSaintsDayDataProvider(): array /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index a8c0fd748..62ebf3d84 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v * * @return array list of test dates for the day of the Assumption of Mary * - * @throws Exception + * @throws \Exception */ public function AssumptionOfMaryDataProvider(): array { @@ -57,7 +55,7 @@ public function AssumptionOfMaryDataProvider(): array /** * Tests translated name of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 343c4de23..6047ac989 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends ItalyBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 8ccd7e6f5..b50c6e148 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 7a7e9887f..a29932547 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests Easter. * - * @throws Exception + * @throws \Exception */ public function testEaster(): void { @@ -42,14 +39,14 @@ public function testEaster(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index a11c21734..88e43b584 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends ItalyBaseTestCase implements HolidayTestCase * * @dataProvider EpiphanyDataProvider * - * @param int $year the year for which Epiphany needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Epiphany needs to be tested + * @param \DateTime $expected the expected date */ public function testEpiphany(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testEpiphany(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Epiphany * - * @throws Exception + * @throws \Exception */ public function EpiphanyDataProvider(): array { @@ -57,7 +55,7 @@ public function EpiphanyDataProvider(): array /** * Tests translated name of Epiphany. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index cc3507025..cba706a4c 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements HolidayTestC * * @dataProvider ImmaculateConceptionDataProvider * - * @param int $year the year for which the day of Immaculate Conception needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of Immaculate Conception needs to be tested + * @param \DateTime $expected the expected date */ public function testImmaculateConception(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testImmaculateConception(int $year, \DateTimeInterface $expected * * @return array list of test dates for the day of Immaculate Conception * - * @throws Exception + * @throws \Exception */ public function ImmaculateConceptionDataProvider(): array { @@ -57,7 +55,7 @@ public function ImmaculateConceptionDataProvider(): array /** * Tests translated name of the day of Immaculate Conception. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 55fbe57f0..d2eee45a9 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements HolidayTe * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec * * @return array list of test dates for International Workers' Day * - * @throws Exception + * @throws \Exception */ public function InternationalWorkersDayDataProvider(): array { @@ -57,7 +55,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests translated name of International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index 30d7a5632..9870a2249 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Italy; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -92,7 +91,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 626aedf22..c7b24ee68 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +42,7 @@ class LiberationDayTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests Liberation Day on or after 1949. * - * @throws Exception + * @throws \Exception */ public function testLiberationDayOnAfter1949(): void { @@ -54,14 +51,14 @@ public function testLiberationDayOnAfter1949(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Liberation Day before 1949. * - * @throws Exception + * @throws \Exception */ public function testLiberationDayBefore1949(): void { @@ -75,7 +72,7 @@ public function testLiberationDayBefore1949(): void /** * Tests translated name of Liberation Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index e8e3d2bf5..d5f2f21f0 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends ItalyBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for New Years Day * - * @throws Exception + * @throws \Exception */ public function NewYearsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function NewYearsDayDataProvider(): array /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 91fda23f2..702a667b9 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -45,7 +42,7 @@ class RepublicDayTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests Republic Day on or after 1946. * - * @throws Exception + * @throws \Exception */ public function testRepublicDayOnAfter1946(): void { @@ -54,14 +51,14 @@ public function testRepublicDayOnAfter1946(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Republic Day before 1946. * - * @throws Exception + * @throws \Exception */ public function testRepublicDayBefore1946(): void { @@ -75,7 +72,7 @@ public function testRepublicDayBefore1946(): void /** * Tests translated name of Republic Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 217782c29..e2a728cc7 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Italy; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stStephensDayTest extends ItalyBaseTestCase implements HolidayTestCase * * @dataProvider stStephensDayDataProvider * - * @param int $year the year for which St. Stephen's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Stephen's Day needs to be tested + * @param \DateTime $expected the expected date */ public function teststStephensDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function teststStephensDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Stephen's Day * - * @throws Exception + * @throws \Exception */ public function stStephensDayDataProvider(): array { @@ -57,7 +55,7 @@ public function stStephensDayDataProvider(): array /** * Tests translated name of St. Stephen's Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 29fca97ed..2d97f2d47 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +39,7 @@ class AutumnalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCas * * After 2150 no calculations are available yet. * - * @throws Exception + * @throws \Exception */ public function testAutumnalEquinoxDayOnAfter2150(): void { @@ -62,7 +59,7 @@ public function testAutumnalEquinoxDayOnAfter2150(): void * @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 Exception + * @throws \Exception */ public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, int $day): void { @@ -70,7 +67,7 @@ public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, self::REGION, self::HOLIDAY, $year, - new DateTime("$year-$month-$day", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-$month-$day", new \DateTimeZone(self::TIMEZONE)) ); } @@ -95,7 +92,7 @@ public function autumnalEquinoxHolidaysProvider(): array * 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 Exception + * @throws \Exception */ public function testAutumnalEquinoxDayBefore1948(): void { @@ -109,7 +106,7 @@ public function testAutumnalEquinoxDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -124,7 +121,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index b99c04bda..fdad4ed3a 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ChildrensDayTest extends JapanBaseTestCase implements HolidayTestCase /** * Tests Children's Day after 1948. Children's Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testChildrensDayOnAfter1948(): void { @@ -47,14 +44,14 @@ public function testChildrensDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Children's Day after 1948 substituted next working day (when Children's Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -63,14 +60,14 @@ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-6", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Children's Day before 1948. Children's Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testChildrensDayBefore1948(): void { @@ -84,7 +81,7 @@ public function testChildrensDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index 717a07c04..121345b90 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class ComingOfAgeDayTest extends JapanBaseTestCase implements HolidayTestCase * 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 \Exception */ public function testComingOfAgeDayOnAfter2000(): void { @@ -48,7 +45,7 @@ public function testComingOfAgeDayOnAfter2000(): void self::REGION, self::HOLIDAY, $year, - new DateTime("second monday of january $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of january $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testComingOfAgeDayOnAfter2000(): void * 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 \Exception */ public function testComingOfAgeDayBetween1948And2000(): void { @@ -65,7 +62,7 @@ public function testComingOfAgeDayBetween1948And2000(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-15", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +70,7 @@ public function testComingOfAgeDayBetween1948And2000(): void * 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 Exception + * @throws \Exception */ public function testConstitutionMemorialDayBefore1948(): void { @@ -87,7 +84,7 @@ public function testConstitutionMemorialDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index 7f8601adf..d2714b1bc 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ConstitutionMemorialDayTest extends JapanBaseTestCase implements HolidayTe /** * Tests Constitution Memorial Day after 1948. Constitution Memorial Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testConstitutionMemorialDayOnAfter1948(): void { @@ -47,7 +44,7 @@ public function testConstitutionMemorialDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-3", new \DateTimeZone(self::TIMEZONE)) ); } @@ -55,7 +52,7 @@ public function testConstitutionMemorialDayOnAfter1948(): void * Tests Constitution Memorial Day after 1948 substituted next working day (when Constitution Memorial Day falls on * a Sunday). * - * @throws Exception + * @throws \Exception */ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -64,14 +61,14 @@ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay( self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-6", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Constitution Memorial Day before 1948. Constitution Memorial Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testConstitutionMemorialDayBefore1948(): void { @@ -85,7 +82,7 @@ public function testConstitutionMemorialDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -100,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 4c007674d..7068a960e 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class CoronationDayTest extends JapanBaseTestCase implements HolidayTestCase public const ESTABLISHMENT_YEAR = 2019; /** - * @throws Exception + * @throws \Exception */ public function testEmperorsCoronationDay(): void { @@ -44,12 +41,12 @@ public function testEmperorsCoronationDay(): void self::REGION, self::HOLIDAY, 2019, - new DateTime('2019-5-1', new DateTimeZone(self::TIMEZONE)) + new \DateTime('2019-5-1', new \DateTimeZone(self::TIMEZONE)) ); } /** - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayBefore2019(): void { @@ -61,7 +58,7 @@ public function testEmperorsBirthdayBefore2019(): void } /** - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayAfter2020(): void { diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index 150c29e9f..50395cb92 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CultureDayTest extends JapanBaseTestCase implements HolidayTestCase /** * Tests Culture Day after 1948. Culture Day Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testCultureDayOnAfter1948(): void { @@ -47,14 +44,14 @@ public function testCultureDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Culture Day after 1948 substituted next working day (when Culture Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -63,14 +60,14 @@ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-11-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Culture Day before 1948. Culture Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testCultureDayBefore1948(): void { @@ -84,7 +81,7 @@ public function testCultureDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index da34dbad5..a6168a508 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements HolidayTestCase * Tests the Emperors Birthday after 1949 to 1988. The Emperors Birthday is on April 28rd and celebrated as such since * 1949. * - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayOnAfter1949(): void { @@ -49,7 +46,7 @@ public function testEmperorsBirthdayOnAfter1949(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) ); } @@ -58,7 +55,7 @@ public function testEmperorsBirthdayOnAfter1949(): void * 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 \Exception */ public function testEmperorsBirthdayOnAfter1989(): void { @@ -67,7 +64,7 @@ public function testEmperorsBirthdayOnAfter1989(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -75,7 +72,7 @@ public function testEmperorsBirthdayOnAfter1989(): void * Tests the Emperors Birthday after 2020. The Emperors Birthday is on February 23rd and celebrated as such since * 2020. * - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayOnAfter2020(): void { @@ -84,7 +81,7 @@ public function testEmperorsBirthdayOnAfter2020(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -92,7 +89,7 @@ public function testEmperorsBirthdayOnAfter2020(): void * Tests the Emperors Birthday after 1989 substituted next working day (when the Emperors Birthday falls on a * Sunday). * - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void { @@ -101,7 +98,7 @@ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-12-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-24", new \DateTimeZone(self::TIMEZONE)) ); } @@ -110,7 +107,7 @@ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void * 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 Exception + * @throws \Exception */ public function testEmperorsBirthdayBefore1989(): void { @@ -136,7 +133,7 @@ public function testEmperorsBirthdayAt2019(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -151,7 +148,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index 412ac45cb..17fe2a313 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements public const IMPLEMENT_YEAR = 2019; /** - * @throws Exception + * @throws \Exception */ public function testEmperorsCoronationDay(): void { @@ -44,12 +41,12 @@ public function testEmperorsCoronationDay(): void self::REGION, self::HOLIDAY, 2019, - new DateTime('2019-10-22', new DateTimeZone(self::TIMEZONE)) + new \DateTime('2019-10-22', new \DateTimeZone(self::TIMEZONE)) ); } /** - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayBefore2019(): void { @@ -61,7 +58,7 @@ public function testEmperorsBirthdayBefore2019(): void } /** - * @throws Exception + * @throws \Exception */ public function testEmperorsBirthdayAfter2020(): void { diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index 6ae952511..baa96d8a6 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class GreeneryDayTest extends JapanBaseTestCase implements HolidayTestCase * 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 \Exception */ public function testHolidayOnAfter2007(): void { @@ -48,14 +45,14 @@ public function testHolidayOnAfter2007(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Greenery Day after 2007 substituted next working day (when Greenery Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void { @@ -64,7 +61,7 @@ public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-6", new \DateTimeZone(self::TIMEZONE)) ); } @@ -72,7 +69,7 @@ public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void * 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 \Exception */ public function testHolidayBetween1989And2007(): void { @@ -81,14 +78,14 @@ public function testHolidayBetween1989And2007(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Greenery Day between 1989 and 2007 substituted next working day (when Greenery Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void { @@ -97,7 +94,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-4-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) ); } @@ -105,7 +102,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void * Tests Greenery Day before 1989. Greenery Day was established from 1989 on April 29th. After 2007 * it was changed to be May 4th. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore1989(): void { @@ -119,7 +116,7 @@ public function testHolidayBefore1989(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -134,7 +131,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index d10a1b223..4136d8f59 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Japan; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -122,7 +121,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 34f7dc716..b28903335 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class LabourThanksgivingDayTest extends JapanBaseTestCase implements HolidayTest * Tests Labor Thanksgiving Day after 1948. Labor Thanksgiving Day is held on November 23rd and established since * 1948. * - * @throws Exception + * @throws \Exception */ public function testLabourThanksgivingDayOnAfter1948(): void { @@ -48,7 +45,7 @@ public function testLabourThanksgivingDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testLabourThanksgivingDayOnAfter1948(): void * Tests Labor Thanksgiving Day after 1948 substituted next working day (when Labor Thanksgiving Day falls on a * Sunday). * - * @throws Exception + * @throws \Exception */ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -65,7 +62,7 @@ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay(): self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-11-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-24", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +70,7 @@ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay(): * Tests Labor Thanksgiving Day before 1948. Labor Thanksgiving Day is held on November 23rd and established since * 1948. * - * @throws Exception + * @throws \Exception */ public function testLabourThanksgivingDayBefore1948(): void { @@ -87,7 +84,7 @@ public function testLabourThanksgivingDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 1f22f8b82..e200b5e51 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MarineDayTest extends JapanBaseTestCase implements HolidayTestCase /** * Tests Marine Day in 2021. Marine Day in 2021 is July 22th for rescheduled Olympic Games after COVID-19. * - * @throws Exception + * @throws \Exception */ public function testMarineDayIn2021(): void { @@ -47,7 +44,7 @@ public function testMarineDayIn2021(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-22", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-22", new \DateTimeZone(self::TIMEZONE)) ); } @@ -55,7 +52,7 @@ public function testMarineDayIn2021(): void * 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 \Exception */ public function testMarineDayOnAfter2003(): void { @@ -69,7 +66,7 @@ public function testMarineDayOnAfter2003(): void self::REGION, self::HOLIDAY, $year, - new DateTime("third monday of july $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of july $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -77,7 +74,7 @@ public function testMarineDayOnAfter2003(): void * 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 \Exception */ public function testMarineDayBetween1996And2003(): void { @@ -86,14 +83,14 @@ public function testMarineDayBetween1996And2003(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-20", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Marine Day between 1996 and 2003 substituted next working day (when Marine Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void { @@ -102,7 +99,7 @@ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-7-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-21", new \DateTimeZone(self::TIMEZONE)) ); } @@ -110,7 +107,7 @@ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void * 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 Exception + * @throws \Exception */ public function testMarineDayBefore1996(): void { @@ -124,7 +121,7 @@ public function testMarineDayBefore1996(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -139,7 +136,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 4f29af8e5..b48b23aa2 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class MountainDayTest extends JapanBaseTestCase implements HolidayTestCase /** * Tests Mountain Day in 2021. Mountain Day in 2021 is August 8th for rescheduled Olympic Games after COVID-19. * - * @throws Exception + * @throws \Exception */ public function testMountainDayIn2021(): void { @@ -47,14 +44,14 @@ public function testMountainDayIn2021(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Mountain Day in 2020. Mountain Day in 2020 is August 10th for the Olympic Games. * - * @throws Exception + * @throws \Exception */ public function testMountainDayIn2020(): void { @@ -63,14 +60,14 @@ public function testMountainDayIn2020(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Mountain Day after 2016. Mountain Day was established in 2014 and is held from 2016 on August 11th. * - * @throws Exception + * @throws \Exception */ public function testMountainDayOnAfter2016(): void { @@ -79,14 +76,14 @@ public function testMountainDayOnAfter2016(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-11", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Mountain Day after 2016 substituted next working day (when Mountain Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay(): void { @@ -95,14 +92,14 @@ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-8-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Mountain Day before 2016. Mountain Day was established in 2014 and is held from 2016 on August 11th. * - * @throws Exception + * @throws \Exception */ public function testMountainDayBefore2016(): void { @@ -116,7 +113,7 @@ public function testMountainDayBefore2016(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -131,7 +128,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index d08e402b2..0ce1ab236 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NationalFoundationDayTest extends JapanBaseTestCase implements HolidayTest /** * Tests National Foundation Day after 1966. National Foundation day was established after 1966. * - * @throws Exception + * @throws \Exception */ public function testNationalFoundationDayOnAfter1966(): void { @@ -47,7 +44,7 @@ public function testNationalFoundationDayOnAfter1966(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-11", new \DateTimeZone(self::TIMEZONE)) ); } @@ -55,7 +52,7 @@ public function testNationalFoundationDayOnAfter1966(): void * Tests National Foundation Day after 1966. substituted next working day (when National Foundation Day falls on a * Sunday). * - * @throws Exception + * @throws \Exception */ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay(): void { @@ -64,14 +61,14 @@ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay(): self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-2-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests National Foundation Day before 1966. National Foundation day was established after 1966. * - * @throws Exception + * @throws \Exception */ public function testNationalFoundationDayBefore1966(): void { @@ -85,7 +82,7 @@ public function testNationalFoundationDayBefore1966(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -100,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index fbc815aff..5ecfc88bc 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NewYearsDayTest extends JapanBaseTestCase implements HolidayTestCase /** * Tests New Years Day after 1948. New Years Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testNewYearsDayOnAfter1948(): void { @@ -47,14 +44,14 @@ public function testNewYearsDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests New Years Day after 1948 substituted next working day (when New Years Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay(): void { @@ -63,14 +60,14 @@ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-1-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests New Years Day before 1948. New Years Day was established after 1948. * - * @throws Exception + * @throws \Exception */ public function testNewYearsDayBefore1948(): void { @@ -84,7 +81,7 @@ public function testNewYearsDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index c99e49c7b..e70d9c1cb 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -46,7 +43,7 @@ protected function setUp(): void /** * Tests public bridge days. * - * @throws Exception + * @throws \Exception */ public function testPublicBridgeDay(): void { @@ -54,13 +51,13 @@ public function testPublicBridgeDay(): void self::REGION, self::HOLIDAY.'1', $this->year, - new DateTime("$this->year-4-30", 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)) + new \DateTime("$this->year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 3c98b810e..cbac1b177 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class RespectForTheAgedDayTest extends JapanBaseTestCase implements HolidayTestC * 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 \Exception */ public function testRespectForTheAgedDayOnAfter2003(): void { @@ -48,7 +45,7 @@ public function testRespectForTheAgedDayOnAfter2003(): void self::REGION, self::HOLIDAY, $year, - new DateTime("third monday of september $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of september $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testRespectForTheAgedDayOnAfter2003(): void * 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 \Exception */ public function testRespectForTheAgedDayBetween1996And2003(): void { @@ -65,7 +62,7 @@ public function testRespectForTheAgedDayBetween1996And2003(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-9-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-15", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +70,7 @@ public function testRespectForTheAgedDayBetween1996And2003(): void * 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 \Exception */ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorkingDay(): void { @@ -82,7 +79,7 @@ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorking self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-9-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-16", new \DateTimeZone(self::TIMEZONE)) ); } @@ -90,7 +87,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 Exception + * @throws \Exception */ public function testRespectForTheAgedDayBefore1996(): void { @@ -104,7 +101,7 @@ public function testRespectForTheAgedDayBefore1996(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -119,7 +116,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index 2c131bc75..0d303b350 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ShowaDayTest extends JapanBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in the test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfter2007(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfter2007(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in the test on or after the establishment and substituted next working day. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay(): void { @@ -63,14 +60,14 @@ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-4-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in the test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -84,7 +81,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 1b0f4fb66..d9b678e20 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class SportsDayTest extends JapanBaseTestCase implements HolidayTestCase * Tests Health And Sports Day in 2021. Health And Sports Day in 2021 is July 23th for rescheduled Olympic Games * after COVID-19. * - * @throws Exception + * @throws \Exception */ public function testSportsDayIn2021(): void { @@ -48,14 +45,14 @@ public function testSportsDayIn2021(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Health And Sports Day in 2020. Health And Sports Day in 2020 is July 24th for the Olympic Games. * - * @throws Exception + * @throws \Exception */ public function testSportsDayIn2020(): void { @@ -64,7 +61,7 @@ public function testSportsDayIn2020(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-24", new \DateTimeZone(self::TIMEZONE)) ); } @@ -72,7 +69,7 @@ public function testSportsDayIn2020(): void * 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 \Exception */ public function testSportsDayOnAfter2000(): void { @@ -81,7 +78,7 @@ public function testSportsDayOnAfter2000(): void self::REGION, self::HOLIDAY, $year, - new DateTime("second monday of october $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of october $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -89,7 +86,7 @@ public function testSportsDayOnAfter2000(): void * 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 \Exception */ public function testSportsDayBetween1996And2000(): void { @@ -98,7 +95,7 @@ public function testSportsDayBetween1996And2000(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-10", new \DateTimeZone(self::TIMEZONE)) ); } @@ -106,7 +103,7 @@ public function testSportsDayBetween1996And2000(): void * 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 \Exception */ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void { @@ -115,7 +112,7 @@ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new DateTime("$year-10-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-11", new \DateTimeZone(self::TIMEZONE)) ); } @@ -123,7 +120,7 @@ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void * 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 Exception + * @throws \Exception */ public function testSportsDayBefore1996(): void { @@ -138,7 +135,7 @@ public function testSportsDayBefore1996(): void * Tests the translated name of the holiday defined in this test. * 1996-2019:Health And Sports Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -154,7 +151,7 @@ public function testTranslation(): void * Tests the translated name of the holiday defined in this test. * 2020 - :Sports Day. * - * @throws Exception + * @throws \Exception */ public function testTranslationFrom2020(): void { @@ -170,7 +167,7 @@ public function testTranslationFrom2020(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 19d90f7b0..0a968c8a3 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Japan; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +39,7 @@ class VernalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCase * * After 2150 no calculations are available yet. * - * @throws Exception + * @throws \Exception */ public function testVernalEquinoxDayOnAfter2150(): void { @@ -62,7 +59,7 @@ public function testVernalEquinoxDayOnAfter2150(): void * @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 Exception + * @throws \Exception */ public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, int $day): void { @@ -70,7 +67,7 @@ public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, in self::REGION, self::HOLIDAY, $year, - new DateTime("$year-$month-$day", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-$month-$day", new \DateTimeZone(self::TIMEZONE)) ); } @@ -95,7 +92,7 @@ public function vernalEquinoxHolidaysProvider(): array * 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 Exception + * @throws \Exception */ public function testVernalEquinoxDayBefore1948(): void { @@ -109,7 +106,7 @@ public function testVernalEquinoxDayBefore1948(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -124,7 +121,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 3aa83584e..2c4d76acb 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class ChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index 68778223c..45261b314 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class ChristmasEveDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index 76676758d..250b70774 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class EasterDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 7bf4b20ae..c723341bb 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class EasterMondayDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index cd67382cf..cf3ad5cbe 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class GoodFridayDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index 86841f009..37b9e3db2 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class InternationalWorkersDayTest extends LatviaBaseTestCase implements HolidayT /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index eb87dd5a5..63de017ff 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 127fac9f2..dfacfc99e 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class MidsummerEveDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index a035e2d8c..9e0d391e5 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearsDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index 855de4afd..5e6491e64 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearsEveDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index f53cd107b..779b3cb6a 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class ProclamationOfTheRepublicOfLatviaDayTest extends LatviaBaseTestCase implem /** * Test if holiday is not defined before proclamation. * - * @throws Exception + * @throws \Exception */ public function testNotHoliday(): void { @@ -51,7 +48,7 @@ public function testNotHoliday(): void /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -72,7 +69,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -80,14 +77,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index 769c5d342..c1352f652 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Latvia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class RestorationOfIndependenceDayTest extends LatviaBaseTestCase implements Hol /** * Test if holiday is not defined before restoration. * - * @throws Exception + * @throws \Exception */ public function testNotHoliday(): void { @@ -51,7 +48,7 @@ public function testNotHoliday(): void /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -72,7 +69,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -80,14 +77,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index cffb75249..ad2550dd1 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class SecondChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCa /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index 367145fa4..81ddc9259 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Latvia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class StJohnsDayTest extends LatviaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index 116f72c3f..18b253176 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class AllSaintsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index d8a008a9e..6a1e6d11b 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -35,7 +32,7 @@ class AllSoulsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase public const HOLIDAY = 'allSoulsDay'; /** - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeAnnounce(): void { @@ -49,7 +46,7 @@ public function testHolidayBeforeAnnounce(): void /** * Test if holiday is defined after restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterAnnounce(): void { @@ -59,14 +56,14 @@ public function testHolidayAfterAnnounce(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-02", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-02", new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index e97513224..ba55b4265 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class AssumptionOfMaryDayTest extends LithuaniaBaseTestCase implements HolidayTe /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index d2d5cee36..1a4e40e13 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class ChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 48f88b828..09a0fc5df 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class ChristmasEveDayTest extends LithuaniaBaseTestCase implements HolidayTestCa /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index b7dfce109..3aa21e574 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class EasterDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index 8a42568d3..fb0494df8 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class EasterMondayDayTest extends LithuaniaBaseTestCase implements HolidayTestCa /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +48,7 @@ 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 Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -59,14 +56,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index 6ce049ce7..24e5e077f 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class InternationalWorkersDayTest extends LithuaniaBaseTestCase implements Holid /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index 9213e832c..c0a5f1cb4 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index e3163cffa..01135a40b 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 7c7ce62b4..1603185af 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class RestorationOfIndependenceOfLithuaniaDayTest extends LithuaniaBaseTestCase /** * Test if holiday is not defined before restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeRestoration(): void { @@ -51,7 +48,7 @@ public function testHolidayBeforeRestoration(): void /** * Test if holiday is defined after restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRestoration(): void { @@ -61,14 +58,14 @@ public function testHolidayAfterRestoration(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 97b2d4f0b..7ddf7fbe7 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class RestorationOfTheStateOfLithuaniaDayTest extends LithuaniaBaseTestCase impl /** * Test if holiday is not defined before restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeRestoration(): void { @@ -51,7 +48,7 @@ public function testHolidayBeforeRestoration(): void /** * Test if holiday is defined after restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRestoration(): void { @@ -61,14 +58,14 @@ public function testHolidayAfterRestoration(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 6973f03de..3417d2d66 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class SecondChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTes /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index 898d65379..22ef52b58 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Lithuania; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class StJohnsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index 6fff94765..ecc1020c7 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Lithuania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class StatehoodDayTest extends LithuaniaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeRestoration(): void { @@ -51,7 +48,7 @@ public function testHolidayBeforeRestoration(): void /** * Test if holiday is defined after restoration. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRestoration(): void { @@ -61,14 +58,14 @@ public function testHolidayAfterRestoration(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index 2183d6c44..453916e37 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @return array list of test dates for All Saints' Day * - * @throws Exception + * @throws \Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index 192bd6276..0876b1bdd 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index 03498d83e..a66fe32e6 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index 2c186e27c..b10133790 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index b09e98b5c..38434ee7f 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index 95c35624d..74853c416 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class EuropeDayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * Tests Europe Day on or after 2019. * - * @throws Exception + * @throws \Exception */ public function testEuropeDayOnAfter2019(): void { @@ -47,14 +44,14 @@ public function testEuropeDayOnAfter2019(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Europe Day before 2019. * - * @throws Exception + * @throws \Exception */ public function testEuropeDayBefore2019(): void { @@ -68,7 +65,7 @@ public function testEuropeDayBefore2019(): void /** * Tests translated name of Europe Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index aafa0bcc5..09b86810e 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements Holi * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of International Workers' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @return array list of test dates for International Workers' Day * - * @throws Exception + * @throws \Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Luxembourg/LuxembourgTest.php b/tests/Luxembourg/LuxembourgTest.php index 8abe1b8da..e9b09c428 100644 --- a/tests/Luxembourg/LuxembourgTest.php +++ b/tests/Luxembourg/LuxembourgTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Luxembourg; use Yasumi\tests\ProviderTestCase; @@ -99,7 +98,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index 8c0261140..e9638f553 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NationalDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index 1e9f2a3ac..65fffb0b8 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @return array list of test dates for New Years Day * - * @throws Exception + * @throws \Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index 9af50c120..611a64ce3 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends LuxembourgBaseTestCase implements HolidayTestC /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index a64dfb3f8..da2b71bdd 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Luxembourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index f4fd68b63..c10794142 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends NetherlandsBaseTestCase implements HolidayTestCas /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index d757817c3..49f296cac 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AshWednesdayTest extends NetherlandsBaseTestCase implements HolidayTestCas /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ash Wednesday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 35af70baa..bb67b9267 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 993cfcc05..e3a1178ea 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CommemorationDayTest extends NetherlandsBaseTestCase implements HolidayTes /** * Tests Commemoration Day before 1947. Commemoration Day was established after WWII in 1947. * - * @throws Exception + * @throws \Exception */ public function testCommemorationDayBefore1947(): void { @@ -52,7 +49,7 @@ public function testCommemorationDayBefore1947(): void /** * Tests Commemoration Day after 1947. Commemoration Day was established after WWII in 1947. * - * @throws Exception + * @throws \Exception */ public function testCommemorationDayOnAfter1947(): void { @@ -61,14 +58,14 @@ public function testCommemorationDayOnAfter1947(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index fcc5f1d88..3a27c50b6 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends NetherlandsBaseTestCase implements HolidayTestCas /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index c62304672..a7f7f551d 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Easter. * - * @throws Exception + * @throws \Exception */ public function testEaster(): void { @@ -42,14 +39,14 @@ public function testEaster(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index 0ae287ac4..ca512b09b 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements HolidayTestCase * * @dataProvider EpiphanyDataProvider * - * @param int $year the year for which Epiphany needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Epiphany needs to be tested + * @param \DateTime $expected the expected date */ public function testEpiphany(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testEpiphany(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Epiphany * - * @throws Exception + * @throws \Exception */ public function EpiphanyDataProvider(): array { @@ -57,7 +55,7 @@ public function EpiphanyDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index 10f943eb3..ae327a90a 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class FathersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("third sunday of june $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("third sunday of june $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index c99d1048e..ad996d7cd 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Good Friday. * - * @throws Exception + * @throws \Exception */ public function testGoodFriday(): void { @@ -42,14 +39,14 @@ public function testGoodFriday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-14", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-14", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index d3857c14e..d366602a5 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class HalloweenTest extends NetherlandsBaseTestCase implements HolidayTestCase * * @dataProvider HalloweenDataProvider * - * @param int $year the year for which Halloween needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Halloween needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Halloween * - * @throws Exception + * @throws \Exception */ public function HalloweenDataProvider(): array { @@ -57,7 +55,7 @@ public function HalloweenDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index 259d62bb1..0cebb4c21 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Hol * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec * * @return array list of test dates for International Workers' Day * - * @throws Exception + * @throws \Exception */ public function InternationalWorkersDayDataProvider(): array { @@ -57,7 +55,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index 38139c985..53d61a66d 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class KingsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Kings Day on or after 2014. King's Day is celebrated from 2014 onwards on April 27th. * - * @throws Exception + * @throws \Exception */ public function testKingsDayOnAfter2014(): void { @@ -47,14 +44,14 @@ public function testKingsDayOnAfter2014(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-27", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-27", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Kings Day substituted on Saturday (when Kings Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testKingsDayOnAfter2014SubstitutedDay(): void { @@ -63,14 +60,14 @@ public function testKingsDayOnAfter2014SubstitutedDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-26", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-26", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Kings Day before 2014. King's Day is celebrated from 2014 onwards on April 27th. * - * @throws Exception + * @throws \Exception */ public function testKingsDayBefore2014(): void { @@ -84,7 +81,7 @@ public function testKingsDayBefore2014(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index b90be24e8..e84650aff 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LiberationDayTest extends NetherlandsBaseTestCase implements HolidayTestCa /** * Tests Liberation Day before 1947. Liberation Day was established after WWII in 1947. * - * @throws Exception + * @throws \Exception */ public function testLiberationDayBefore1947(): void { @@ -52,7 +49,7 @@ public function testLiberationDayBefore1947(): void /** * Tests Liberation Day after 1947. Liberation Day was established after WWII in 1947. * - * @throws Exception + * @throws \Exception */ public function testLiberationDayOnAfter1947(): void { @@ -61,14 +58,14 @@ public function testLiberationDayOnAfter1947(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests Liberation Day official holiday type every 5 years, observance type on other years. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index fccd58c64..b7ca1b493 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class MothersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Mother's Day. * - * @throws Exception + * @throws \Exception */ public function testMothersDay(): void { @@ -42,14 +39,14 @@ public function testMothersDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("second sunday of may $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("second sunday of may $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index d082935e0..ec7dd632b 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Netherlands; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -122,7 +121,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 5bcbe7845..714664cfd 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for New Years Day * - * @throws Exception + * @throws \Exception */ public function NewYearsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function NewYearsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index 136c7e4df..b0b210f40 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, 'pentecost', $year, - new DateTime("$year-5-31", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-31", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 3ab39c73f..04a5766f2 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class QueensDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Queens Day between 1891 and 1948. * - * @throws Exception + * @throws \Exception */ public function testQueensBetween1891and1948(): void { @@ -42,14 +39,14 @@ public function testQueensBetween1891and1948(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-31", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-31", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Queens Day between 1891 and 1948 substituted one day later (when Queens Day falls on a Sunday). * - * @throws Exception + * @throws \Exception */ public function testQueensBetween1891and1948SubstitutedLater(): void { @@ -58,14 +55,14 @@ public function testQueensBetween1891and1948SubstitutedLater(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-9-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Queens Day between 1949 and 2013. * - * @throws Exception + * @throws \Exception */ public function testQueensBetween1949and2013(): void { @@ -74,14 +71,14 @@ public function testQueensBetween1949and2013(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Queens Day between 1949 and 2013 substituted one day later. * - * @throws Exception + * @throws \Exception */ public function testQueensBetween1949and2013SubstitutedLater(): void { @@ -90,14 +87,14 @@ public function testQueensBetween1949and2013SubstitutedLater(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Queens Day between 1949 and 2013 substituted one day earlier. * - * @throws Exception + * @throws \Exception */ public function testQueensBetween1949and2013SubstitutedEarlier(): void { @@ -106,14 +103,14 @@ public function testQueensBetween1949and2013SubstitutedEarlier(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Queen's Day before 1891. * - * @throws Exception + * @throws \Exception */ public function testQueensDayBefore1891(): void { @@ -123,7 +120,7 @@ public function testQueensDayBefore1891(): void /** * Tests Queen's Day after 2013. * - * @throws Exception + * @throws \Exception */ public function testQueensDayAfter2013(): void { @@ -133,7 +130,7 @@ public function testQueensDayAfter2013(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -148,7 +145,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index 4727ef608..b1404af9f 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; /** @@ -41,7 +38,7 @@ public function __construct() /** * Tests Summertime. * - * @throws Exception + * @throws \Exception */ public function testSummertime(): void { @@ -52,7 +49,7 @@ public function testSummertime(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first sunday of april $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first sunday of april $year", new \DateTimeZone(self::TIMEZONE)) ); $year = $this->generateRandomYear(1981, 2037); @@ -60,14 +57,14 @@ public function testSummertime(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last sunday of march $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last sunday of march $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -82,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 1d4445749..9be48a4a5 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements HolidayTestCa * * @dataProvider ValentinesDayDataProvider * - * @param int $year the year for which Valentines Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Valentines Day needs to be tested + * @param \DateTime $expected the expected date */ public function testValentinesDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testValentinesDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Valentines Day * - * @throws Exception + * @throws \Exception */ public function ValentinesDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ValentinesDayDataProvider(): array /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -67,7 +65,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index 6b29b5cbe..f1704116f 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; /** @@ -40,7 +37,7 @@ public function __construct() /** * Tests Wintertime. * - * @throws Exception + * @throws \Exception */ public function testWintertime(): void { @@ -51,7 +48,7 @@ public function testWintertime(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last sunday of september $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last sunday of september $year", new \DateTimeZone(self::TIMEZONE)) ); $year = $this->generateRandomYear(1996, 2037); @@ -59,14 +56,14 @@ public function testWintertime(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last sunday of october $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last sunday of october $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index b589a8dc0..823e6251a 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class WorldAnimalDayTest extends NetherlandsBaseTestCase implements HolidayTestC /** * Tests World Animal Day on or after 1931. * - * @throws Exception + * @throws \Exception */ public function testWorldAnimalDayOnAfter1931(): void { @@ -47,14 +44,14 @@ public function testWorldAnimalDayOnAfter1931(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests World Animal Day before 1931. * - * @throws Exception + * @throws \Exception */ public function testWorldAnimalBefore1931(): void { @@ -68,7 +65,7 @@ public function testWorldAnimalBefore1931(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -83,7 +80,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index a6d134fc2..1fdc2db50 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class carnivalDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -59,7 +56,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 92fc4b66c..b01076964 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class pentecostMondayTest extends NetherlandsBaseTestCase implements HolidayTest /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, 'pentecostMonday', $year, - new DateTime("$year-6-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index 5610b2818..c6d552ae7 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class princesDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Prince's Day. * - * @throws Exception + * @throws \Exception */ public function testPrincesDay(): void { @@ -42,14 +39,14 @@ public function testPrincesDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("third tuesday of september $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("third tuesday of september $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index 98ea9f19f..28577cf11 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -14,11 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; -use InvalidArgumentException; -use RuntimeException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,9 +32,9 @@ class secondCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCa * Tests the holiday defined in this test. * * @throws UnknownLocaleException - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws Exception + * @throws \InvalidArgumentException + * @throws \RuntimeException + * @throws \Exception */ public function testHoliday(): void { @@ -48,17 +43,17 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests type of the holiday defined in this test. * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -68,10 +63,10 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index 8fed083af..1e7fff418 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements HolidayT * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index f3a1dbe5c..95a073890 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements HolidayTestCas * * @dataProvider stMartinsDayDataProvider * - * @param int $year the year for which Sint Martins Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Sint Martins Day needs to be tested + * @param \DateTime $expected the expected date */ public function teststMartinsDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function teststMartinsDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Sint Martins Day * - * @throws Exception + * @throws \Exception */ public function stMartinsDayDataProvider(): array { @@ -57,7 +55,7 @@ public function stMartinsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index 010ffa124..f42f80326 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements HolidayTestCa * * @dataProvider stNicholasDayDataProvider * - * @param int $year the year for which Sint Nicholas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Sint Nicholas Day needs to be tested + * @param \DateTime $expected the expected date */ public function teststNicholasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function teststNicholasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Sint Nicholas Day * - * @throws Exception + * @throws \Exception */ public function stNicholasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function stNicholasDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index 0943572af..2d9ce1fd5 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -14,11 +14,6 @@ namespace Yasumi\tests\Netherlands; -use DateTime; -use DateTimeZone; -use Exception; -use InvalidArgumentException; -use RuntimeException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,9 +32,9 @@ class thirdCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCas * Tests the holiday defined in this test. * * @throws UnknownLocaleException - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws Exception + * @throws \InvalidArgumentException + * @throws \RuntimeException + * @throws \Exception */ public function testHoliday(): void { @@ -48,17 +43,17 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests type of the holiday defined in this test. * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -68,10 +63,10 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index c5d58576f..d9cf97cf5 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class AnzacDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -68,11 +65,11 @@ public function testNotHoliday(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(4, 25, function ($year, DateTime $date): void { + return $this->generateRandomDatesWithModifier(4, 25, function ($year, \DateTime $date): void { // 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'); @@ -83,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -98,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 7957adddf..030c8480f 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class BoxingDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -64,10 +60,10 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); if (\in_array((int) $date->format('w'), [0, 6], true)) { - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); } $data[] = [$year, $date->format('Y-m-d')]; @@ -79,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -94,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 1cfbd4639..935819500 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class ChristmasDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -64,10 +60,10 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); if (\in_array((int) $date->format('w'), [0, 6], true)) { - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); } $data[] = [$year, $date->format('Y-m-d')]; @@ -79,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -94,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index 6924635cb..46e6dd5f7 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,14 +43,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -69,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -81,7 +77,7 @@ public function testHolidayType(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -89,15 +85,15 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-01-02", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-01-02", new \DateTimeZone(self::TIMEZONE)); switch ($date->format('w')) { case 0: case 6: - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); break; case 1: - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); } $data[] = [$year, $date->format('Y-m-d')]; diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index b3380d7ca..0750fe0eb 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterMondayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index 00a83a9f8..1024cbd1b 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class GoodFridayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->sub(new DateInterval('P2D')); + $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index 9bbdfa020..2a00648d3 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class LabourDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -68,7 +65,7 @@ public function testNotHoliday(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -76,9 +73,9 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 100; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $expected = new DateTime( + $expected = new \DateTime( (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october')." $year", - new DateTimeZone(self::TIMEZONE) + new \DateTimeZone(self::TIMEZONE) ); $data[] = [$year, $expected->format('Y-m-d')]; @@ -90,7 +87,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index d1cf7b913..01aac54cd 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class NewYearsDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -64,14 +60,14 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-01-01", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-01-01", new \DateTimeZone(self::TIMEZONE)); switch ($date->format('w')) { case 0: - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); break; case 6: - $date->add(new DateInterval('P2D')); + $date->add(new \DateInterval('P2D')); break; } @@ -84,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -99,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index e17ef47b8..9093e78d7 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\NewZealand; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -89,7 +88,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index e5189c918..a843f1af6 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +37,8 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -61,7 +58,7 @@ public function testNotHoliday(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 1; $y <= 100; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $expected = new DateTime("first monday of june $year", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("first monday of june $year", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $expected]; } @@ -79,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -94,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index c03902f14..4db3a70ac 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\NewZealand; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class WaitangiDayTest extends NewZealandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -66,7 +63,7 @@ public function testNotHoliday(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -81,7 +78,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -98,11 +95,11 @@ public function testHolidayType(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(2, 06, function ($year, DateTime $date): void { + return $this->generateRandomDatesWithModifier(2, 06, function ($year, \DateTime $date): void { // 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/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index 6fc44b880..f6011ca5b 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index a9d7daf00..57c905cd0 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index 03946d6ff..3c93657c2 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ConstitutionDayTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 333f8374b..b8e1a5060 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index 098b921cf..9b00771fb 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index 274d6ab66..715d1f726 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index b79334b04..7f3642436 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements HolidayT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 f2c0a03b8..fafe6b728 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class MaundyThursdayTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index 451096fd2..4b02ff9ce 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends NorwayBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index f2a8a0713..1886e26ef 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Norway; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -92,7 +91,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index a472d8f81..a2f798840 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index ee793c19c..b214f6ed8 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends NorwayBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index d068e09b6..e614bf9e6 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Norway; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index a04330ad6..66468fec2 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends PolandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 0f42bb4c0..11aeb9f62 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 90945d0d7..aa9d093f4 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends PolandBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index 1376c3995..acae432e1 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ConstitutionDayTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index c3b446cd6..9ef515829 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class CorpusChristiTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 3c9f29b08..37070cb6b 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index cf3a22d3c..5910008c4 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index abc4c72c1..39f93d80c 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends PolandBaseTestCase implements HolidayTestCase * * @dataProvider EpiphanyDataProvider * - * @param int $year the year for which Epiphany needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Epiphany needs to be tested + * @param \DateTime $expected the expected date */ public function testEpiphany(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testEpiphany(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Epiphany * - * @throws Exception + * @throws \Exception */ public function EpiphanyDataProvider(): array { @@ -57,7 +55,7 @@ public function EpiphanyDataProvider(): array /** * Tests translated name of Epiphany. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index 7f51f3f74..e5363ce42 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndependenceDayTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index ba0c0c14e..072b10ff2 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements HolidayT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 d0b28620a..955ef1682 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends PolandBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index 324862c4d..1f5a145d7 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index cb143e78a..3e173509f 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Poland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -93,7 +92,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index 83dfcf003..45900ebf8 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Poland; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 877d69f11..ca22bfd72 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,23 +40,23 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { $year = 2016; - $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-11-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); $year = 2012; - $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); + $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 2013-2015. * - * @throws Exception + * @throws \Exception */ public function testNotHoliday(): void { @@ -70,7 +67,7 @@ public function testNotHoliday(): void /** * Tests translated name of Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -86,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index f51f2fe57..d7dfe41ae 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index 38a464542..b452f7482 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,19 +35,19 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements Holiday /** * Test that the holiday is valid after the year of establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $expected = new DateTime("$year-04-25", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-04-25", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * Tests that the holiday is not a holiday before the year of establishment. * - * @throws Exception + * @throws \Exception */ public function testNotHolidayBeforeEstablishment(): void { @@ -61,7 +58,7 @@ public function testNotHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +69,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index f6a837e51..169e99c22 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends PortugalBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 07450e48c..9b9e9b30d 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,19 +40,19 @@ class CorpusChristiTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { $year = 2016; - $expected = new DateTime("$year-5-26", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-5-26", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * Test that the holiday did not happen in 2013-2015. * - * @throws Exception + * @throws \Exception */ public function testNotHoliday(): void { @@ -66,7 +63,7 @@ public function testNotHoliday(): void /** * Tests translated name of Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index f1d701ea2..87b09ccfc 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-03-27", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-03-27", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index 33d85bb58..c07351b7e 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index a169721de..c4b1dc36c 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 3a2c4fd75..720735db7 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Holida * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 9c64ede83..564a0bf31 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends PortugalBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 14802fef8..7b8945ca0 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Portugal; use Yasumi\tests\HolidayTestCase; @@ -44,35 +41,35 @@ class PortugalDayTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test before it was abolished. * - * @throws Exception + * @throws \Exception * * @see Portugal::calculatePortugalDay() */ public function testHolidayBeforeAbolishment(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); - $expected = new DateTime("$year-06-10", new DateTimeZone(self::TIMEZONE)); + $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. * - * @throws Exception + * @throws \Exception * * @see Portugal::calculatePortugalDay() */ public function testHolidayAfterRestoration(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); - $expected = new DateTime("$year-06-10", new DateTimeZone(self::TIMEZONE)); + $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 Exception + * @throws \Exception * * @see Portugal::calculatePortugalDay() */ @@ -88,7 +85,7 @@ public function testNotHolidayDuringAbolishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index 943cdd3fe..95ef29bd6 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Portugal; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -103,7 +102,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 78159720f..e8a4002f0 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +28,7 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements HolidayT public const HOLIDAY = 'portugueseRepublic'; /** - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterRestoration(): void { @@ -40,13 +37,13 @@ public function testHolidayOnAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-05", new \DateTimeZone(self::TIMEZONE)) ); } } /** - * @throws Exception + * @throws \Exception */ public function testNotHolidayDuringAbolishment(): void { @@ -58,7 +55,7 @@ public function testNotHolidayDuringAbolishment(): void } /** - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -67,7 +64,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-05", new \DateTimeZone(self::TIMEZONE)) ); } } @@ -78,7 +75,7 @@ public function testHolidayBeforeEstablishment(): void foreach ($this->randomYearsBeforeEstablishment() as $year) { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } - } catch (Exception $e) { + } catch (\Exception $e) { } } @@ -93,7 +90,7 @@ public function testTranslation(): void [self::LOCALE => 'Implantação da República Portuguesa'] ); } - } catch (Exception $e) { + } catch (\Exception $e) { } } @@ -108,12 +105,12 @@ public function testHolidayType(): void Holiday::TYPE_OFFICIAL ); } - } catch (Exception $e) { + } catch (\Exception $e) { } } /** @return \Generator - * @throws Exception + * @throws \Exception */ private function randomEstablishedYear(): \Generator { @@ -122,7 +119,7 @@ private function randomEstablishedYear(): \Generator } /** @return \Generator - * @throws Exception + * @throws \Exception */ private function randomYearsBeforeEstablishment(): \Generator { @@ -131,7 +128,7 @@ private function randomYearsBeforeEstablishment(): \Generator } /** @return \Generator - * @throws Exception + * @throws \Exception */ private function randomYearsOnAfterEstablishment(): \Generator { @@ -140,7 +137,7 @@ private function randomYearsOnAfterEstablishment(): \Generator } /** @return \Generator - * @throws Exception + * @throws \Exception */ private function randomYearsOnAfterRestoration(): \Generator { diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 87204ab9d..89df30275 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Portugal; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,43 +45,43 @@ class RestorationOfIndependenceTest extends PortugalBaseTestCase implements Holi /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); - $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); $year = self::ESTABLISHMENT_YEAR; - $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * Test that the holiday if in effect in 2016 and later dates. * - * @throws Exception - * @throws Exception + * @throws \Exception + * @throws \Exception */ public function testHolidayOnAfterRestoration(): void { $year = 2016; - $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); - $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * Test that the holiday did not happen in 2013-2015. * - * @throws Exception + * @throws \Exception */ public function testNotHolidayDuringAbolishment(): void { @@ -95,7 +92,7 @@ public function testNotHolidayDuringAbolishment(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -109,7 +106,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -133,7 +130,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Randomizer.php b/tests/Randomizer.php index 2e58dbf9e..8d70250a8 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -15,11 +15,7 @@ namespace Yasumi\tests; -use DateInterval; use DateTime; -use DateTimeInterface; -use DateTimeZone; -use Exception; use Yasumi\Holiday; /** @@ -40,7 +36,7 @@ trait Randomizer * * @return array list of random test dates used for assertion of holidays * - * @throws Exception + * @throws \Exception */ public function generateRandomDates( int $month, @@ -53,7 +49,7 @@ public function generateRandomDates( $range ??= 1000; for ($y = 1; $y <= ($iterations ?? 10); ++$y) { $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); - $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC'))]; + $data[] = [$year, new \DateTime("$year-$month-$day", new \DateTimeZone($timezone ?? 'UTC'))]; } return $data; @@ -68,7 +64,7 @@ public function generateRandomDates( * * @return array list of random easter test dates used for assertion of holidays * - * @throws Exception + * @throws \Exception */ public function generateRandomEasterDates( string $timezone = null, @@ -97,7 +93,7 @@ public function generateRandomEasterDates( * * @return array list of random Easter Monday test dates used for assertion of holidays * - * @throws Exception + * @throws \Exception */ public function generateRandomEasterMondayDates( string $timezone = null, @@ -106,8 +102,8 @@ public function generateRandomEasterMondayDates( ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { - $date->add(new DateInterval('P1D')); + return $this->generateRandomModifiedEasterDates(static function (\DateTime $date): void { + $date->add(new \DateInterval('P1D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -121,7 +117,7 @@ public function generateRandomEasterMondayDates( * * @return array list of random modified Easter day test dates for assertion of holidays * - * @throws Exception + * @throws \Exception */ public function generateRandomModifiedEasterDates( callable $cb, @@ -152,7 +148,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( string $timezone = null, @@ -161,8 +157,8 @@ public function generateRandomGoodFridayDates( ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { - $date->sub(new DateInterval('P2D')); + return $this->generateRandomModifiedEasterDates(static function (\DateTime $date): void { + $date->sub(new \DateInterval('P2D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -175,7 +171,7 @@ public function generateRandomGoodFridayDates( * * @return array list of random Pentecost test dates used for assertion of holidays * - * @throws Exception + * @throws \Exception */ public function generateRandomPentecostDates( string $timezone = null, @@ -184,8 +180,8 @@ public function generateRandomPentecostDates( ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (DateTime $date): void { - $date->add(new DateInterval('P49D')); + return $this->generateRandomModifiedEasterDates(static function (\DateTime $date): void { + $date->add(new \DateInterval('P49D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -201,7 +197,7 @@ public function generateRandomPentecostDates( * * @return array list of random test dates used for assertion of holidays * - * @throws Exception + * @throws \Exception */ public function generateRandomDatesWithHolidayMovedToMonday( int $month, @@ -210,7 +206,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( int $iterations = null, int $range = null ): array { - return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date): void { + return $this->generateRandomDatesWithModifier($month, $day, function ($range, \DateTime $date): void { if ($this->isWeekend($date)) { $date->modify('next monday'); } @@ -229,7 +225,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( * * @return array list of random test dates used for assertion of holidays with an applied callback * - * @throws Exception + * @throws \Exception */ public function generateRandomDatesWithModifier( int $month, @@ -243,7 +239,7 @@ public function generateRandomDatesWithModifier( for ($i = 1; $i <= $iterations; ++$i) { $year = $this->generateRandomYear($range); - $date = new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC')); + $date = new \DateTime("$year-$month-$day", new \DateTimeZone($timezone ?? 'UTC')); $callback($year, $date); @@ -261,7 +257,7 @@ public function generateRandomDatesWithModifier( * * @return int a year number * - * @throws Exception + * @throws \Exception */ public function generateRandomYear( int $lowerLimit = null, @@ -273,13 +269,13 @@ public function generateRandomYear( /** * 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 */ public function isWeekend( - DateTimeInterface $dateTime, + \DateTimeInterface $dateTime, array $weekendDays = [0, 6] ): bool { return \in_array((int) $dateTime->format('w'), $weekendDays, true); @@ -288,7 +284,7 @@ public function isWeekend( /** * Returns a random number between $int1 and $int2 (any order). * - * @throws Exception + * @throws \Exception * * @example 79907610 */ @@ -308,14 +304,14 @@ public static function numberBetween(int $int1 = 0, int $int2 = 2_147_483_647): * @param \DateTime|string $endDate Defaults to "now" * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * - * @throws Exception + * @throws \Exception * * @see http://php.net/manual/en/timezones.php * @see http://php.net/manual/en/function.date-default-timezone-get.php * * @example DateTime('1999-02-02 11:42:52') */ - public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): DateTimeInterface + public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): \DateTimeInterface { $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); @@ -365,16 +361,16 @@ public function randomYearFromArray(array $years): int * @param int $year year for which Easter needs to be calculated * @param string $timezone timezone in which Easter is celebrated * - * @return DateTime date of Easter + * @return \DateTime date of Easter * - * @throws Exception + * @throws \Exception * * @see easter_days * @see https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c * @see http://www.gmarts.org/index.php?go=415#EasterMallen * @see http://www.tondering.dk/claus/cal/easter.php */ - protected function calculateEaster(int $year, string $timezone): DateTimeInterface + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { if (\extension_loaded('calendar')) { $easter_days = easter_days($year); @@ -423,8 +419,8 @@ protected function calculateEaster(int $year, string $timezone): DateTimeInterfa $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')); + $easter = new \DateTime("$year-3-21", new \DateTimeZone($timezone)); + $easter->add(new \DateInterval('P'.$easter_days.'D')); return $easter; } @@ -447,7 +443,7 @@ protected static function getMaxTimestamp($max = 'now') return $ts; } - private static function setTimezone(DateTimeInterface $dt, ?string $timezone): DateTimeInterface + private static function setTimezone(\DateTimeInterface $dt, ?string $timezone): \DateTimeInterface { return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); } diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 22073f325..54d860dc9 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AssumptionOfMaryTest extends RomaniaBaseTestCase implements HolidayTestCas /** * Tests Assumption Of Mary Day on or after 2008. * - * @throws Exception + * @throws \Exception */ public function testAssumptionOfMaryDayOnAfter2008(): void { @@ -47,14 +44,14 @@ public function testAssumptionOfMaryDayOnAfter2008(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Assumption of Mary Day before 2008. * - * @throws Exception + * @throws \Exception */ public function testAssumptionOfMaryDayBefore2008(): void { @@ -68,7 +65,7 @@ public function testAssumptionOfMaryDayBefore2008(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index c4d676297..88d42c5dd 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ChildrensDayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests Children's Day on or after 1950. * - * @throws Exception + * @throws \Exception */ public function testChildrensDayOnAfter1950(): void { @@ -47,14 +44,14 @@ public function testChildrensDayOnAfter1950(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-01", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Children's Day before 1950. * - * @throws Exception + * @throws \Exception */ public function testChildrensDayBefore1950(): void { @@ -68,7 +65,7 @@ public function testChildrensDayBefore1950(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index ca6dea968..6ca7b0273 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index 761907f19..6132496c1 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements HolidayTe /** * Tests Constantin Brancusi Day on or after 2016. * - * @throws Exception + * @throws \Exception */ public function testConstantinBrancusiDayOnAfter2016(): void { @@ -47,14 +44,14 @@ public function testConstantinBrancusiDayOnAfter2016(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-02-19", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-02-19", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Constantin Brancusi Day before 2016. * - * @throws Exception + * @throws \Exception */ public function testConstantinBrancusiDayBefore2016(): void { @@ -68,7 +65,7 @@ public function testConstantinBrancusiDayBefore2016(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index 85e4c14e4..44a7cb856 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index a918af0a3..b2e637785 100644 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-20", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index ff87b3532..3ae92f6ae 100644 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-19", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-19", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 6db5dc108..050d9bef5 100644 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements Holiday * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 151a1d83d..95e20e3fb 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NationalDayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests National Day on or after 1990. * - * @throws Exception + * @throws \Exception */ public function testNationalDayOnAfter1990(): void { @@ -47,14 +44,14 @@ public function testNationalDayOnAfter1990(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests National Day between 1948 - 1989. * - * @throws Exception + * @throws \Exception */ public function testNationalDayBetween19481989(): void { @@ -63,14 +60,14 @@ public function testNationalDayBetween19481989(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-08-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-08-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests National Day between 1866 - 1947. * - * @throws Exception + * @throws \Exception */ public function testNationalDayBetween18661947(): void { @@ -79,14 +76,14 @@ public function testNationalDayBetween18661947(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-05-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-05-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests National Day before 1865. * - * @throws Exception + * @throws \Exception */ public function testNationalDayBefore1865(): void { @@ -100,7 +97,7 @@ public function testNationalDayBefore1865(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 7d7723dd7..bc22f3678 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index c9116adcd..53b9b2496 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class PentecostMondayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests the Pentecost Monday Day on and after 2008. * - * @throws Exception + * @throws \Exception */ public function testPentecostMondayOnAfter2008(): void { @@ -47,14 +44,14 @@ public function testPentecostMondayOnAfter2008(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-08", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-08", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the Pentecost Day before 2008. * - * @throws Exception + * @throws \Exception */ public function testPentecostMondayBefore2008(): void { @@ -68,7 +65,7 @@ public function testPentecostMondayBefore2008(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index a8eeff335..00501367e 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class PentecostTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests the Pentecost Day on and after 2008. * - * @throws Exception + * @throws \Exception */ public function testPentecostDayOnAfter2008(): void { @@ -47,14 +44,14 @@ public function testPentecostDayOnAfter2008(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-07", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-07", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the Pentecost Day before 2008. * - * @throws Exception + * @throws \Exception */ public function testPentecostDayBefore2008(): void { @@ -68,7 +65,7 @@ public function testPentecostDayBefore2008(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index 1d4d48a7e..259ce3a36 100644 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Romania; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -110,7 +109,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index 7f89cc0ef..d7d62d3fb 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index f1dfe979a..646f906b2 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class StAndrewsDayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * Tests Saint Andrew Day on or after 2012. * - * @throws Exception + * @throws \Exception */ public function testStAndrewDayOnAfter2012(): void { @@ -47,14 +44,14 @@ public function testStAndrewDayOnAfter2012(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Saint Andrew before 2012. * - * @throws Exception + * @throws \Exception */ public function testStAndrewDayBefore2012(): void { @@ -68,7 +65,7 @@ public function testStAndrewDayBefore2012(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index 9030e9f22..2d8b3284d 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Romania; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements Holiday /** * Tests united Principalities Day on or after 2015. * - * @throws Exception + * @throws \Exception */ public function testUnitedPrincipalitiesDayOnAfter2015(): void { @@ -47,14 +44,14 @@ public function testUnitedPrincipalitiesDayOnAfter2015(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests unitedPrincipalitiesDay before 2015. * - * @throws Exception + * @throws \Exception */ public function testUnitedPrincipalitiesDayBefore2015(): void { @@ -68,7 +65,7 @@ public function testUnitedPrincipalitiesDayBefore2015(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index a99f46505..203145ba2 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Russia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\HolidayTestCase; @@ -36,7 +33,7 @@ class DefenceOfTheFatherlandDayTest extends RussiaBaseTestCase implements Holida /** * Test if holiday is not defined before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore(): void { @@ -50,7 +47,7 @@ public function testHolidayBefore(): void /** * Test if holiday is defined after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfter(): void { @@ -60,14 +57,14 @@ public function testHolidayAfter(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -88,7 +85,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index 6450afd76..e2a80fd82 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class InternationalWomensDayTest extends RussiaBaseTestCase implements HolidayTe /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index 94b2a94b0..bdecb2ac2 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearHolidaysDay2Test extends RussiaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 40e414232..73b4f4681 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearHolidaysDay3Test extends RussiaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index d8ed91802..e921e50d8 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,7 @@ class NewYearHolidaysDay4Test extends RussiaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +65,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index 331b28071..f7720f1d1 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearHolidaysDay5Test extends RussiaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 4eab9c016..5503ac11a 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearHolidaysDay6Test extends RussiaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index d5073cbbb..32f85482c 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +32,7 @@ class NewYearHolidaysDay8Test extends RussiaBaseTestCase implements HolidayTestC /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -51,7 +50,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +65,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index d69155c9a..e060ed12c 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class NewYearsDayTest extends RussiaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 81d1a5d8e..8184ba218 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class OrthodoxChristmasDayTest extends RussiaBaseTestCase implements HolidayTest /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index ed068bed7..f1c9eee75 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class RussiaDayTest extends RussiaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore(): void { @@ -51,7 +48,7 @@ public function testHolidayBefore(): void /** * Test if holiday is defined after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfter(): void { @@ -61,14 +58,14 @@ public function testHolidayAfter(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index bb8fde6bf..e9602a4f2 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\ProviderTestCase; @@ -106,7 +105,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 99f330001..bd4f3346c 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class SpringAndLabourDayTest extends RussiaBaseTestCase implements HolidayTestCa /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index 2d071adab..09a9b999b 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Russia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\HolidayTestCase; @@ -37,7 +34,7 @@ class UnityDayTest extends RussiaBaseTestCase implements HolidayTestCase /** * Test if holiday is not defined before. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore(): void { @@ -51,7 +48,7 @@ public function testHolidayBefore(): void /** * Test if holiday is defined after. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfter(): void { @@ -61,14 +58,14 @@ public function testHolidayAfter(): void 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 Exception + * @throws \Exception */ public function testTranslation(): void { @@ -89,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index 4dea7d929..751d287f9 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Russia; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,7 +33,7 @@ class VictoryDayTest extends RussiaBaseTestCase implements HolidayTestCase /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function holidayDataProvider(): array { @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -67,7 +66,7 @@ public function testTranslation(): void /** * {@inheritdoc} * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index 26a546d3c..cae6be8d3 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index a7a04a7f8..5b2cb2b93 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index 9ef38715f..c9d2cc0b1 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasEve(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testChristmasEve(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Eve. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index c615c18e0..5f2eecac7 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +35,8 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,28 +48,28 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { $timezone = self::TIMEZONE; return [ - [1788, new DateTime('1788-3-24', new DateTimeZone($timezone))], - [1876, new DateTime('1876-4-17', new DateTimeZone($timezone))], - [2016, new DateTime('2016-3-28', new DateTimeZone($timezone))], - [2017, new DateTime('2017-4-17', new DateTimeZone($timezone))], - [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))], + [1788, new \DateTime('1788-3-24', new \DateTimeZone($timezone))], + [1876, new \DateTime('1876-4-17', new \DateTimeZone($timezone))], + [2016, new \DateTime('2016-3-28', new \DateTimeZone($timezone))], + [2017, new \DateTime('2017-4-17', new \DateTimeZone($timezone))], + [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))], ]; } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -87,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 024857486..ddd206123 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 19b22433c..e6142f6b2 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +35,8 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,28 +48,28 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { $timezone = self::TIMEZONE; return [ - [1788, new DateTime('1788-3-21', new DateTimeZone($timezone))], - [1876, new DateTime('1876-4-14', new DateTimeZone($timezone))], - [2016, new DateTime('2016-3-25', new DateTimeZone($timezone))], - [2017, new DateTime('2017-4-14', new DateTimeZone($timezone))], - [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))], + [1788, new \DateTime('1788-3-21', new \DateTimeZone($timezone))], + [1876, new \DateTime('1876-4-14', new \DateTimeZone($timezone))], + [2016, new \DateTime('2016-3-25', new \DateTimeZone($timezone))], + [2017, new \DateTime('2017-4-14', new \DateTimeZone($timezone))], + [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))], ]; } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -87,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index 1bdf0c46f..a78ec0d98 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Holida * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index fe1ad0554..36b480d27 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index d5fd7b164..e1a20eb77 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Hol * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index f758ad64c..6221a9c84 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Second Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index b991ef989..da519c868 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayT * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index 6a91fbddd..95dae3237 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,8 +36,8 @@ class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -51,7 +49,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -61,7 +59,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -76,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index dc9e872b7..800f694b8 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Holi * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 5cb85e7bf..0890ceeba 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Slovakia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -100,7 +99,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index f264fa3d9..94ab851ac 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ 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 DateTime $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 8c84b564a..93a75b88a 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Slovakia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements HolidayTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -60,7 +58,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 2cc97e540..a99b4b4cc 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class ChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 751a70a48..13742e622 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +44,7 @@ class FamilyDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +61,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -74,7 +70,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -84,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -98,7 +94,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -113,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 4b9184b95..c09cfb13b 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class FreedomDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-4-27", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-4-27", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 9bc753408..809b5f42c 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +44,7 @@ class GoodFridayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +61,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -74,7 +70,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->sub(new DateInterval('P2D')); + $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -84,7 +80,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -98,7 +94,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -113,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 06bb662f4..6ef81bcaa 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class HeritageDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-9-24", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-9-24", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index bfbd2d47e..4ae47bb2e 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class HumanRightsDayTest extends SouthAfricaBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 47c1ee4c9..131e2c6d8 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +39,7 @@ class MunicipalElections2016DayTest extends SouthAfricaBaseTestCase implements H /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -50,14 +47,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR, - new DateTime(self::ESTABLISHMENT_YEAR.'-8-3', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::ESTABLISHMENT_YEAR.'-8-3', new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -71,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the holiday defined in this test after completion. * - * @throws Exception + * @throws \Exception */ public function testHolidayDayAfterCompletion(): void { @@ -81,7 +78,7 @@ public function testHolidayDayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -96,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 6c5c7bbd3..ae0979495 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class NationalWomensDayTest extends SouthAfricaBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-8-9", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-8-9", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index d8735dfe5..fc614b3f7 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class NewYearsDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 010656e65..a259ca035 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class ReconciliationDayTest extends SouthAfricaBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-12-16", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-16", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index f4519ed06..fd5abe3e3 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayT * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index 66a882034..5d225a300 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\SouthAfrica; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index 26aaadb16..6091c3f02 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -42,7 +39,7 @@ class SubstituteDayOfGoodwillTest extends SouthAfricaBaseTestCase implements Hol /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -50,14 +47,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR, - new DateTime(self::ESTABLISHMENT_YEAR.'-12-27', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::ESTABLISHMENT_YEAR.'-12-27', new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -71,7 +68,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the holiday defined in this test after completion. * - * @throws Exception + * @throws \Exception */ public function testHolidayDayAfterCompletion(): void { @@ -81,7 +78,7 @@ public function testHolidayDayAfterCompletion(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -96,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index a0be0cf41..1823e929d 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class WorkersDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index 81ce3c8d7..ba877e07f 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\SouthAfrica; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,16 +44,16 @@ class YouthDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); // Whenever any public holiday falls on a Sunday, the Monday following on it shall be a public holiday. if (0 === (int) $date->format('w')) { - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -67,7 +63,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-6-16", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-6-16", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -85,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -99,7 +95,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -114,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 0e14aeea1..27b9604be 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +45,7 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -64,7 +61,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-5", new \DateTimeZone(self::TIMEZONE)) ); } } @@ -72,7 +69,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test after removal. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRemoval(): void { @@ -86,7 +83,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -100,7 +97,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -118,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index 2a1399755..004910257 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +41,7 @@ class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements HolidayTestCa /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -53,14 +50,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test after removal. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRemoval(): void { @@ -74,7 +71,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -88,7 +85,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -103,7 +100,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index 100e043f9..a4e8e9cde 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -50,7 +47,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new DateTimeZone(self::TIMEZONE)) + new \DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)) ); } } @@ -58,7 +55,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -72,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 151a09430..abdd12a1c 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,32 +45,32 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-5", new DateTimeZone(self::TIMEZONE)) + 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 \Exception */ public function testSubstituteHolidayByBuddhasBirthday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); foreach ([2025, 2044] as $year) { $this->assertHoliday( self::REGION, 'buddhasBirthday', $year, - new DateTime("$year-5-5", $tz) + new \DateTime("$year-5-5", $tz) ); $this->assertSubstituteHoliday( self::REGION, 'buddhasBirthday', $year, - new DateTime("$year-5-6", $tz) + new \DateTime("$year-5-6", $tz) ); } } @@ -81,11 +78,11 @@ public function testSubstituteHolidayByBuddhasBirthday(): void /** * Tests the substitute holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2013); @@ -93,7 +90,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2019, - new DateTime('2019-5-6', $tz) + new \DateTime('2019-5-6', $tz) ); // By saturday @@ -101,7 +98,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2029, - new DateTime('2029-5-7', $tz) + new \DateTime('2029-5-7', $tz) ); // By sunday @@ -109,14 +106,14 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2024, - new DateTime('2024-5-6', $tz) + new \DateTime('2024-5-6', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -130,7 +127,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -145,7 +142,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index 6ffa74eab..678ac790d 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class ChristmasDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -69,7 +66,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 18998348f..dac1b1fe5 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -15,10 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; @@ -41,13 +37,13 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { $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)); + $date = new \DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)); // Chuseok $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -58,7 +54,7 @@ public function testHoliday(): void self::REGION, 'dayAfterChuseok', $year, - (clone $date)->add(new DateInterval('P1D')) + (clone $date)->add(new \DateInterval('P1D')) ); } @@ -68,7 +64,7 @@ public function testHoliday(): void self::REGION, 'dayBeforeChuseok', $year, - (clone $date)->sub(new DateInterval('P1D')) + (clone $date)->sub(new \DateInterval('P1D')) ); } } @@ -77,18 +73,18 @@ public function testHoliday(): void /** * Tests the substitute holiday defined in this test (conflict with Gaecheonjeol). * - * @throws Exception + * @throws \Exception */ public function testSubstituteHolidayByGaecheonjeol(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); foreach ([2017, 2028, 2036, 2039] as $year) { $this->assertHoliday( self::REGION, 'nationalFoundationDay', $year, - new DateTime("$year-10-3", $tz) + new \DateTime("$year-10-3", $tz) ); } @@ -96,43 +92,43 @@ public function testSubstituteHolidayByGaecheonjeol(): void self::REGION, 'dayBeforeChuseok', 2017, - new DateTime('2017-10-6', $tz) + new \DateTime('2017-10-6', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'chuseok', 2028, - new DateTime('2028-10-5', $tz) + new \DateTime('2028-10-5', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'dayBeforeChuseok', 2036, - new DateTime('2036-10-6', $tz) + new \DateTime('2036-10-6', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'dayAfterChuseok', 2039, - new DateTime('2039-10-5', $tz) + new \DateTime('2039-10-5', $tz) ); } /** * Tests the substitute holiday defined in this test (conflict with Sunday). * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertSubstituteHoliday( self::REGION, 'dayBeforeChuseok', 2014, - new DateTime('2014-9-10', $tz) + new \DateTime('2014-9-10', $tz) ); // By sunday @@ -140,26 +136,26 @@ public function testSubstituteHoliday(): void self::REGION, 'dayBeforeChuseok', 2025, - new DateTime('2025-10-8', $tz) + new \DateTime('2025-10-8', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'chuseok', 2032, - new DateTime('2032-9-21', $tz) + new \DateTime('2032-9-21', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'dayAfterChuseok', 2036, - new DateTime('2036-10-7', $tz) + new \DateTime('2036-10-7', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -173,7 +169,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -207,7 +203,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 0933b6f1a..4793359be 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -44,7 +41,7 @@ class ConstitutionDayTest extends SouthKoreaBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -53,14 +50,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test after removal. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRemoval(): void { @@ -74,7 +71,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -88,7 +85,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -103,7 +100,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index eea712535..047e50859 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class GaecheonjeolTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,30 +45,30 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the substitute holiday defined in this test (conflict with Chuseok). * - * @throws Exception + * @throws \Exception */ public function testSubstituteByChuseok(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); $this->assertHoliday( self::REGION, 'chuseok', 2028, - new DateTime('2028-10-3', $tz) + new \DateTime('2028-10-3', $tz) ); $this->assertHoliday( self::REGION, 'dayBeforeChuseok', 2036, - new DateTime('2036-10-3', $tz) + new \DateTime('2036-10-3', $tz) ); // Chuseok will be substitute instead of Gaecheonjeol. $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2028); @@ -81,11 +78,11 @@ public function testSubstituteByChuseok(): void /** * Tests the substitute holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2015); @@ -94,7 +91,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2021, - new DateTime('2021-10-4', $tz) + new \DateTime('2021-10-4', $tz) ); // By saturday @@ -102,7 +99,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2026, - new DateTime('2026-10-5', $tz) + new \DateTime('2026-10-5', $tz) ); // By sunday @@ -110,14 +107,14 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2032, - new DateTime('2032-10-4', $tz) + new \DateTime('2032-10-4', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -131,7 +128,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -146,7 +143,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index dd540e8a4..bb370127e 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class HangulDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -55,7 +52,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-9", new \DateTimeZone(self::TIMEZONE)) ); } } @@ -63,11 +60,11 @@ public function testHoliday(): void /** * Tests the substitute holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2016); @@ -75,7 +72,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2021, - new DateTime('2021-10-11', $tz) + new \DateTime('2021-10-11', $tz) ); // By saturday @@ -83,7 +80,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2027, - new DateTime('2027-10-11', $tz) + new \DateTime('2027-10-11', $tz) ); // By sunday @@ -91,14 +88,14 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2022, - new DateTime('2022-10-10', $tz) + new \DateTime('2022-10-10', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -112,7 +109,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -130,7 +127,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 9bc657de6..80c7ddc1a 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements Holi /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,18 +45,18 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the substitute holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2020); @@ -69,13 +66,13 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2025, - new DateTime('2025-3-3', $tz) + new \DateTime('2025-3-3', $tz) ); $this->assertSubstituteHoliday( self::REGION, self::HOLIDAY, 2031, - new DateTime('2031-3-3', $tz) + new \DateTime('2031-3-3', $tz) ); // By sunday @@ -83,21 +80,21 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2026, - new DateTime('2026-3-2', $tz) + new \DateTime('2026-3-2', $tz) ); // By sunday $this->assertSubstituteHoliday( self::REGION, self::HOLIDAY, 2037, - new DateTime('2037-3-2', $tz) + new \DateTime('2037-3-2', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -111,7 +108,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -126,7 +123,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index 24ffec961..3a250f2fe 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class LiberationDayTest extends SouthKoreaBaseTestCase implements HolidayTestCas /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,18 +45,18 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-15", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-15", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the substitute holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertNotSubstituteHoliday(self::REGION, self::HOLIDAY, 2020); @@ -69,7 +66,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2021, - new DateTime('2021-8-16', $tz) + new \DateTime('2021-8-16', $tz) ); // By saturday @@ -77,7 +74,7 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2037, - new DateTime('2037-8-17', $tz) + new \DateTime('2037-8-17', $tz) ); // By sunday @@ -85,14 +82,14 @@ public function testSubstituteHoliday(): void self::REGION, self::HOLIDAY, 2027, - new DateTime('2027-8-16', $tz) + new \DateTime('2027-8-16', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -106,7 +103,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -121,7 +118,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 7e71fbdf2..43b882e33 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -15,9 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class MemorialDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-6", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -69,7 +66,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index 7954c4e7c..8d2b9e6dc 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -15,10 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,12 +36,12 @@ class NewYearsDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); // New Year's Day $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -56,7 +52,7 @@ public function testHoliday(): void self::REGION, 'dayAfterNewYearsDay', $year, - (clone $date)->add(new DateInterval('P1D')) + (clone $date)->add(new \DateInterval('P1D')) ); } @@ -66,7 +62,7 @@ public function testHoliday(): void self::REGION, 'twoDaysLaterNewYearsDay', $year, - (clone $date)->add(new DateInterval('P2D')) + (clone $date)->add(new \DateInterval('P2D')) ); } } @@ -74,7 +70,7 @@ public function testHoliday(): void /** * Tests the holiday defined in this test after removal. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterRemoval(): void { @@ -93,7 +89,7 @@ public function testHolidayAfterRemoval(): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -107,7 +103,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -134,7 +130,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 5da618126..3a86a5147 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -15,10 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; @@ -41,13 +37,13 @@ class SeollalTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { $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)); + $date = new \DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)); // Seollal $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -58,7 +54,7 @@ public function testHoliday(): void self::REGION, 'dayBeforeSeollal', $year, - (clone $date)->sub(new DateInterval('P1D')) + (clone $date)->sub(new \DateInterval('P1D')) ); // Day after Seollal @@ -66,7 +62,7 @@ public function testHoliday(): void self::REGION, 'dayAfterSeollal', $year, - (clone $date)->add(new DateInterval('P1D')) + (clone $date)->add(new \DateInterval('P1D')) ); } } @@ -75,18 +71,18 @@ public function testHoliday(): void /** * Tests the substitute holiday defined in this test (conflict with Sunday). * - * @throws Exception + * @throws \Exception */ public function testSubstituteHoliday(): void { - $tz = new DateTimeZone(self::TIMEZONE); + $tz = new \DateTimeZone(self::TIMEZONE); // Before 2022 $this->assertSubstituteHoliday( self::REGION, 'dayBeforeSeollal', 2016, - new DateTime('2016-2-10', $tz) + new \DateTime('2016-2-10', $tz) ); $this->assertNotSubstituteHoliday(self::REGION, 'dayAfterSeollal', 2021); @@ -95,26 +91,26 @@ public function testSubstituteHoliday(): void self::REGION, 'dayBeforeSeollal', 2033, - new DateTime('2033-2-2', $tz) + new \DateTime('2033-2-2', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'seollal', 2034, - new DateTime('2034-2-21', $tz) + new \DateTime('2034-2-21', $tz) ); $this->assertSubstituteHoliday( self::REGION, 'dayAfterSeollal', 2024, - new DateTime('2024-2-12', $tz) + new \DateTime('2024-2-12', $tz) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -128,7 +124,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -160,7 +156,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 00775c6f3..31a30330d 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\SouthKorea; -use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\ProviderTestCase; @@ -134,7 +133,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 7751c91f5..a5ca65df3 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index 41d42e714..d29b996f0 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Andalusia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AndalusiaDayTest extends AndalusiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 028ecb24d..503a60328 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Andalusia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 4e4ab5a19..419123298 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Aragon; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index bbf9c7167..18facfc03 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Aragon; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class StGeorgesDayTest extends AragonBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index cd67bf140..7b18abd7b 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index 09415ae02..24097f52a 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Asturias; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class AsturiasDayTest extends AsturiasBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-9-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index 2ad468457..80466d323 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Asturias; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index 586a07618..db581d24b 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\BalearicIslands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements Holi /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 62447a408..f1c3814c8 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\BalearicIslands; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -102,7 +101,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index 783c2acf0..e2d888ba2 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\BasqueCountry; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements HolidayT /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -52,14 +49,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -73,7 +70,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the holiday defined in this test after abolishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayDayAfterAbolishment(): void { @@ -83,7 +80,7 @@ public function testHolidayDayAfterAbolishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -98,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index f447b6d23..ffbc6b86f 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\BasqueCountry; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index a1e7f035f..bf4f829e8 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\CanaryIslands; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements HolidayT /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 97b996cb1..790864e5f 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\CanaryIslands; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index a8ca80019..69fbaa957 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Cantabria; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CantabriaDayTest extends CantabriaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("second sunday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("second sunday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index 276bfb00a..7b387cb1d 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Cantabria; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index b408bf96b..58240e25e 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\CastileAndLeon; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements Holida /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index 2a23d3a8c..ef6f77083 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\CastileAndLeon; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index 966de18e0..83326739c 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\CastillaLaMancha; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements Ho /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-31", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-31", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 6849f981f..9174f866d 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\CastillaLaMancha; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 4a4a9381c..719d05d14 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Catalonia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index 6f1a8ad55..df2a1dce0 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Catalonia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class nationalCataloniaDayTest extends CataloniaBaseTestCase implements HolidayT /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-9-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-11", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -86,7 +83,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 26109d08d..514e29a77 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain\Catalonia; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index db8fc7f67..ad2bd5d94 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Ceuta; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index f02c89d76..5d9a3517c 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Ceuta; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ceutaDayTest extends CeutaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-9-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 49f0bd685..e30d0cbac 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index f246a0fff..2bab62e5e 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\CommunityOfMadrid; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index 1fbb84d8f..03092bdf5 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\CommunityOfMadrid; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index 224a8073a..80e22a405 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ConstitutionDayTest extends SpainBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-6", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index bd6e8dc07..d7efe5f66 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class EasterMondayTest extends SpainBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -70,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index 6598de1fb..63154f4f9 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index 3bd8f3525..5a3d06923 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Extremadura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-9-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-9-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 494e93749..6959dc027 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Extremadura; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index 45113848e..c30df586d 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Galicia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index f35fe8364..dec2ec24b 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Galicia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements HolidayTe /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index 3b753e87d..f0a92d89a 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\Galicia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class stJamesDayTest extends GaliciaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index 061b6adb0..9586050f5 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends SpainBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 5c0d81a12..3c46aca72 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 4c7085a18..53b4fd038 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index aec5ff065..af5ce8268 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\LaRioja; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LaRiojaDayTest extends LaRiojaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index a58849595..67d5778a7 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\LaRioja; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index 50c17e007..dce2ad2b4 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class MaundyThursdayTest extends SpainBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -48,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-7", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-7", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -70,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index ff0b17475..bc067cc17 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Melilla; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -94,7 +93,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index a466e23a5..bdac3cc39 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NationalDayTest extends SpainBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index 980e7634b..f59a86785 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\Navarre; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index 8cd03eca2..9bf630264 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index a6e57311e..4758b384e 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\RegionOfMurcia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements Holida /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index 8e0d5a411..6d59af7b4 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\RegionOfMurcia; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index 891e184a2..8791f3667 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -90,7 +89,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index d5207e89c..3bf6c0f3d 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Spain\ValencianCommunity; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implement /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-9", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-9", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index d284ca657..4393c8d99 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Spain\ValencianCommunity; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -95,7 +94,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 4f70db12d..1e6270c8c 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ValentinesDayTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index dba1418ac..3acaf6c72 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Spain; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,8 +38,8 @@ class stJosephsDayTest extends SpainBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -53,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -63,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 6ade5fa87..b04419fa3 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,8 +32,8 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -49,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +53,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE)); // Check between 31 October and 6th of November the day that is a Saturday for ($d = 0; $d <= 7; ++$d) { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array $data[] = [$year, $date]; break; } - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); } } @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index 706451d14..36807a2d0 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -36,8 +32,8 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -49,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +53,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-10-30", new DateTimeZone(self::TIMEZONE)); + $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) { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array $data[] = [$year, $date]; break; } - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); } } @@ -75,7 +71,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -90,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 93a7bee3b..c753e0584 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 6e809a349..71765dca8 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index bda99a473..e6f1aa465 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index 01cf4fcd8..d612b5e8c 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-8", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-8", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index 4ac2ac7ce..7d6371786 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index b5b10fdd6..2739bc847 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index 4432af1ad..2bbf28d54 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 29bb6c651..1a10e080f 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index f890e6e20..6cf0ad6fd 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements HolidayT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 6be166472..797eb5f90 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class NationalDayTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(): void { @@ -47,14 +44,14 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-6", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-6", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -98,7 +95,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test on or after establishment. * - * @throws Exception + * @throws \Exception */ public function testTranslationOnAfterNameChange(): void { diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index adec93cfa..5bd8a8a9c 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index aad3ab15d..b2c231b7c 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index bd8f13281..470253d44 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends SwedenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-05-17", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-05-17", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 18560239c..d26cb7102 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCa * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index bc688edaa..8de942718 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Sweden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -100,7 +99,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index b29b4ec80..50e5cb528 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Sweden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index e0bfab4b9..bd9236722 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Aargau; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -101,7 +100,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index 552f92c76..5da94219f 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Aargau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends AargauBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index b985c8642..47bc27557 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Aargau; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends AargauBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index 405727beb..9d8b80ab7 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Aargau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends AargauBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index 3cb73a780..31f1d5bc2 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Aargau; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends AargauBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 f556be1d9..9527a342c 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index c18542a83..e8c029692 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends AppenzellAusserrhodenBaseTestCase implements Holi /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index d9eae80a0..bb3e29303 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Holi * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index 5e53dc321..3943ae77f 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends AppenzellAusserrhodenBaseTestCase implements Holi /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 46cecf959..54f12ada9 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends AppenzellAusserrhodenBaseTestCase implements Holida /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 0b522d6f0..c241a657f 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Holid * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 911f20286..4b9cf016e 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends AppenzellAusserrhodenBaseTestCase implements H /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index 2e71b6fc9..9f07b380d 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Hol * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index e32fa7979..6e0ef111a 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 b56fb97b3..9143e4893 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -108,7 +107,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index b092728ba..fc47c4f07 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index 681b213da..c32b13e85 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements H * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 913bed476..575524f85 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index 5e1f4290c..254cbef8c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends AppenzellInnerrhodenBaseTestCase implements Holi /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index 5abe0ba1b..560bfa676 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends AppenzellInnerrhodenBaseTestCase implements Holid /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index 97be1b50b..344cd451c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends AppenzellInnerrhodenBaseTestCase implements Holiday /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index 44e9d09f7..121cfe942 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ 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 DateTime $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index 41de674bc..8a49dba4a 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holida * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 823912e12..483fac591 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends AppenzellInnerrhodenBaseTestCase implements Ho /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 1607571e1..2d06b4ba8 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Holi * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 6ec32e6f3..548857e19 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends BaselLandschaftBaseTestCase implements HolidayTes /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index 096f286e4..6ad2b63b8 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 786a92ec1..302bea557 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements HolidayTes * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index ce78317cc..fb6f757d6 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends BaselLandschaftBaseTestCase implements HolidayTes /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index cd352aa16..0c9b40470 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends BaselLandschaftBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 65f689433..f75ec8723 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements HolidayTest * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 15cb63e86..b6bf74a2d 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends BaselLandschaftBaseTestCase implements Holiday /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index 945fc24e7..15d8cdb88 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index 46844b970..30901ddab 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends BaselLandschaftBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index 3c4e0dcba..1972c8caf 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends BaselStadtBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index 15db71787..b82f31126 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index f455d94f5..684e97445 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index c924c35bc..792643e83 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends BaselStadtBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index 01453c993..8bababc4d 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends BaselStadtBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index a658b1fdc..e7c15768f 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 a56c0c32e..f06b078bf 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends BaselStadtBaseTestCase implements HolidayTestC /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 8ea498c17..5b6f402e4 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index 0eb1d1ff0..f5f60fc80 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\BaselStadt; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends BaselStadtBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index cde186594..9c5e55155 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends BernBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index 4b302fbc4..e663c633c 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends BernBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index fb4ae83a2..b9943f75b 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index ba5d92019..e399c1e09 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends BernBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 4a080cdb7..0d3c5de1d 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends BernBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index 0d03e3e39..220aff80e 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends BernBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 59afad745..b6d14eddb 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends BernBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 3ee459695..2a8b74d4b 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends BernBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index f6260d5e8..bea86fe4f 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Bern; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends BernBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index 9afeff288..4476cbbb3 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends FribourgBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @return array list of test dates for All Saints' Day * - * @throws Exception + * @throws \Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index 3278a8e5d..0e24c7930 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 315c6c5dd..24c78586d 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends FribourgBaseTestCase implements HolidayTestCa * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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/Fribourg/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php index c19cb47b2..538b6e893 100644 --- a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 691634ffd..c4123be67 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends FribourgBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/CorpusChristiTest.php b/tests/Switzerland/Fribourg/CorpusChristiTest.php index 61e7fd979..981fb3600 100644 --- a/tests/Switzerland/Fribourg/CorpusChristiTest.php +++ b/tests/Switzerland/Fribourg/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index ec6ccca35..5f2dae89e 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class December26thTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests December 26th. * - * @throws Exception + * @throws \Exception */ public function testDecember26th(): void { @@ -42,14 +39,14 @@ public function testDecember26th(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of December 26th. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index b6c718054..037d75556 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index ff7095556..5d4eae8c6 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -109,7 +108,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index 922a6bc26..79e7b983e 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index 174ef6b9c..d2b5b8e6a 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends FribourgBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index 1c6bf751e..125d7e13d 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends FribourgBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 2e489fe6a..1d82ceb17 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Fribourg; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends FribourgBaseTestCase implements HolidayTestCas /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index 7e50d76d0..59d9dbfde 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 6e077687f..615f96f8d 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends GenevaBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index 98ec27e7d..f773d1028 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index 3e9c0e1af..8ac0cb53d 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -118,7 +117,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index 6463a4d51..e64f7a935 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 0ba45a649..c5361c126 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\Switzerland\Geneva; use Yasumi\tests\HolidayTestCase; @@ -35,15 +31,15 @@ class JeuneGenevoisTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests Jeune Genevois between 1870 and 1965. * - * @throws Exception + * @throws \Exception */ public function testJeuneGenevoisBetween1870And1965(): void { $year = $this->generateRandomYear(1870, 1965); // Find first Sunday of September - $date = new DateTime('First Sunday of '.$year.'-09', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday - $date->add(new DateInterval('P4D')); + $date->add(new \DateInterval('P4D')); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); @@ -52,15 +48,15 @@ public function testJeuneGenevoisBetween1870And1965(): void /** * Tests Jeune Genevois between 1840 and 1869. * - * @throws Exception + * @throws \Exception */ public function testJeuneGenevoisBetween1840And1869(): void { $year = $this->generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); // Find first Sunday of September - $date = new DateTime('First Sunday of '.$year.'-09', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday - $date->add(new DateInterval('P4D')); + $date->add(new \DateInterval('P4D')); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -69,7 +65,7 @@ public function testJeuneGenevoisBetween1840And1869(): void /** * Tests Jeune Genevois before 1840. * - * @throws Exception + * @throws \Exception */ public function testJeuneGenevoisBefore1840(): void { @@ -80,7 +76,7 @@ public function testJeuneGenevoisBefore1840(): void /** * Tests translated name of Jeune Genevois. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -95,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index e484d6dc9..fa8538e07 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends GenevaBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 6a547dcbd..70a7d8e56 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index 94a7c9950..57e13e19b 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Geneva; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class RestaurationGenevoiseTest extends GenevaBaseTestCase implements HolidayTes /** * Tests Restauration Genevoise. * - * @throws Exception + * @throws \Exception */ public function testRestaurationGenevoiseAfter1813(): void { @@ -43,14 +40,14 @@ public function testRestaurationGenevoiseAfter1813(): void self::REGION, self::HOLIDAY, $year, - new DateTime($year.'-12-31', new DateTimeZone(self::TIMEZONE)) + new \DateTime($year.'-12-31', new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Restauration Genevoise. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -65,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 6055f2dca..1ab6f5f5d 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 cb679fe65..258ebcc38 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index 65f547647..225f586f9 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index a44c1c8bd..87e710972 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index 01695bcad..1f38117e6 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index f545a7b83..f7459c134 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -107,7 +106,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index 46f25f2be..2e2bcc0f5 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index 27ce99a41..0da90fa92 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,12 +35,12 @@ class NafelserFahrtTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests Näfelser Fahrt on or after 1389. * - * @throws Exception + * @throws \Exception */ public function testNafelserFahrtOnAfter1389(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime('First Thursday of '.$year.'-04', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Thursday of '.$year.'-04', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testNafelserFahrtOnAfter1389(): void /** * Tests Näfelser Fahrt before 1389. * - * @throws Exception + * @throws \Exception */ public function testNafelserFahrtBefore1389(): void { @@ -62,7 +59,7 @@ public function testNafelserFahrtBefore1389(): void /** * Tests translated name of Näfelser Fahrt. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 6de323d91..e330973fa 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 65cedcd95..22c47b7b9 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 413349877..c791a0549 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Glarus; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends GlarusBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index ef6d8e7c2..0ff310a4f 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 2f03b5894..efc431f70 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index 457fcded1..9ddd06adf 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index f4e46e512..a6e5f456d 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index f9098036f..082153069 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index eecb9310b..653e299a1 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 61e3a33b2..44cfc77a3 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index e2dddfaf8..8f955b6e8 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Grisons; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends GrisonsBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index 8c678ff60..77e6b84be 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends JuraBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 dc6a7e892..2bfbfbf14 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index efe5931e2..a111053ef 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 2d3c7c6a7..8e2fb57d4 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index b5d47655a..b87d850c5 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,16 +30,16 @@ class BettagsMontagTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Bettags Montag on or after 1832. * - * @throws Exception + * @throws \Exception */ public function testBettagsMontagOnAfter1832(): void { $year = $this->generateRandomYear(1832); // Find third Sunday of September - $date = new DateTime('Third Sunday of '.$year.'-09', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +47,7 @@ public function testBettagsMontagOnAfter1832(): void /** * Tests Bettags Montag before 1832. * - * @throws Exception + * @throws \Exception */ public function testBettagsMontagBefore1832(): void { @@ -62,7 +58,7 @@ public function testBettagsMontagBefore1832(): void /** * Tests translated name of Bettags Montag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index f81de2386..a52f14cad 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends JuraBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index 2275752de..014d1255e 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index 6e227c418..66376f108 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php index 99b5eef91..006c6835a 100644 --- a/tests/Switzerland/Jura/EasterTest.php +++ b/tests/Switzerland/Jura/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-4-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index 007849631..943256070 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index 92c329d10..ddb8e185a 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -112,7 +111,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 3d22a0acb..79b79212a 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends JuraBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 790dcf51b..cbb75b646 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php index 82b49296d..f39a1bba5 100644 --- a/tests/Switzerland/Jura/PentecostTest.php +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index 1da9b798b..a75c4c921 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class PlebisciteJurassienTest extends JuraBaseTestCase implements HolidayTestCas /** * Tests Plébiscite jurassien on or after 1975. * - * @throws Exception + * @throws \Exception */ public function testInstaurationRepubliqueOnAfter1975(): void { @@ -47,14 +44,14 @@ public function testInstaurationRepubliqueOnAfter1975(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-23", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-23", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Plébiscite jurassien before 1975. * - * @throws Exception + * @throws \Exception */ public function testInstaurationRepubliqueBefore1975(): void { @@ -68,7 +65,7 @@ public function testInstaurationRepubliqueBefore1975(): void /** * Tests translated name of Plébiscite jurassien. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index ac2991b8b..8a3d6407e 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Jura; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends JuraBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index d3f23ade5..2cf38b814 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 6ab3eea6b..5b7572a82 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index b94a4ed2f..28b98f0a8 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements HolidayTestCas * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 d92c078a5..ae32179f4 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 8bef33955..560adad8a 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index 9abf07f8c..e092b5c07 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index 3eba31f36..8322a4392 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index 9b23bfda8..721a8ca14 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 6f17a77e8..18b2d49ce 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements HolidayTes * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index f9b78d4cb..4dff39c80 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -109,7 +108,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index 55e8fd612..7b69cc6cc 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 14d3c2d78..71ab69c22 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index a331953a0..153e352b3 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Lucerne; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends LucerneBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index 08d5d9364..5dfda0cae 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index d0ab6cc20..3c4435cd3 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,16 +30,16 @@ class BettagsMontagTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests Bettags Montag on or after 1832. * - * @throws Exception + * @throws \Exception */ public function testBettagsMontagOnAfter1832(): void { $year = $this->generateRandomYear(1832); // Find third Sunday of September - $date = new DateTime('Third Sunday of '.$year.'-09', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +47,7 @@ public function testBettagsMontagOnAfter1832(): void /** * Tests Bettags Montag before 1832. * - * @throws Exception + * @throws \Exception */ public function testBettagsMontagBefore1832(): void { @@ -62,7 +58,7 @@ public function testBettagsMontagBefore1832(): void /** * Tests translated name of Bettags Montag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 8af9393d3..23a0944a3 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/December26thTest.php b/tests/Switzerland/Neuchatel/December26thTest.php index 6fe797816..fbe193be4 100644 --- a/tests/Switzerland/Neuchatel/December26thTest.php +++ b/tests/Switzerland/Neuchatel/December26thTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class December26thTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests December 26th. * - * @throws Exception + * @throws \Exception */ public function testDecember26th(): void { @@ -46,7 +43,7 @@ public function testDecember26th(): void self::REGION, self::HOLIDAY, self::OBSERVANCE_YEAR, - new DateTime(self::OBSERVANCE_YEAR.'-12-26', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::OBSERVANCE_YEAR.'-12-26', new \DateTimeZone(self::TIMEZONE)) ); $this->assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 8ad62dffc..81ca4ff84 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 80d39fad8..381772d22 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 95e94fd3b..c9251640e 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements Holida /** * Tests Instauration de la République on or after 1849. * - * @throws Exception + * @throws \Exception */ public function testInstaurationRepubliqueOnAfter1849(): void { @@ -47,14 +44,14 @@ public function testInstaurationRepubliqueOnAfter1849(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-03-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-03-01", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Instauration de la République before 1849. * - * @throws Exception + * @throws \Exception */ public function testInstaurationRepubliqueBefore1849(): void { @@ -68,7 +65,7 @@ public function testInstaurationRepubliqueBefore1849(): void /** * Tests translated name of Instauration de la République. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/January2ndTest.php b/tests/Switzerland/Neuchatel/January2ndTest.php index 2c5ce1253..c77d1997f 100644 --- a/tests/Switzerland/Neuchatel/January2ndTest.php +++ b/tests/Switzerland/Neuchatel/January2ndTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class January2ndTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests January 2nd. * - * @throws Exception + * @throws \Exception */ public function testJanuary2nd(): void { @@ -46,7 +43,7 @@ public function testJanuary2nd(): void self::REGION, self::HOLIDAY, self::OBSERVANCE_YEAR, - new DateTime(self::OBSERVANCE_YEAR.'-1-02', new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::OBSERVANCE_YEAR.'-1-02', new \DateTimeZone(self::TIMEZONE)) ); $this->assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index b01b82c46..b0e7ab9eb 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -106,7 +105,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index c68dc509d..49b22e791 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 ed7b7f8de..8ad88ddcb 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends NeuchatelBaseTestCase implements HolidayTestCa /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index 55cd66f90..dfb01faec 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Neuchatel; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends NeuchatelBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index edc49a934..a08f3f61e 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 ab23f23a0..398ba70f2 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index ec3950fb7..4806e1943 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements HolidayTestC * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 af9b9cca8..8981cad61 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index 77c6fa2f9..790e754b1 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index d11aa845d..de72de15e 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index b655dff09..eb585f89c 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index 7fe1ca63c..ce5257a4c 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements HolidayT * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 4eab06436..2702bda1d 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 303f06f77..549c511a8 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -109,7 +108,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index adc57673e..c77bb85cf 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends NidwaldenBaseTestCase implements HolidayTestCa /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 5eebb4a9f..61288b685 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStJosephDay(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day * - * @throws Exception + * @throws \Exception */ public function StJosephDayDataProvider(): array { @@ -60,7 +58,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 1aef71904..5626f398f 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Nidwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index 63cb9a530..7a9d2e2e5 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 b4ba96c35..6993c65a4 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index 149a8e4f2..c2f850c8b 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements HolidayTestCa * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 c29fa8f09..84b2a3841 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index bdb19f111..320d2d030 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BruderKlausenFestTest extends ObwaldenBaseTestCase implements HolidayTestC /** * Tests Bruder-Klausen-Fest on or after 1947. * - * @throws Exception + * @throws \Exception */ public function testBruderKlausenFestOnAfter1947(): void { $year = $this->generateRandomYear(1947); - $date = new DateTime($year.'-09-25', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-09-25', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,12 +44,12 @@ public function testBruderKlausenFestOnAfter1947(): void /** * Tests Bruder-Klausen-Fest between 1649 and 1946. * - * @throws Exception + * @throws \Exception */ public function testBruderKlausenFestBetween1649And1946(): void { $year = $this->generateRandomYear(1649, 1946); - $date = new DateTime($year.'-09-21', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-09-21', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -61,7 +58,7 @@ public function testBruderKlausenFestBetween1649And1946(): void /** * Tests Bruder-Klausen-Fest before 1648. * - * @throws Exception + * @throws \Exception */ public function testBruderKlausenFestBefore1648(): void { @@ -72,7 +69,7 @@ public function testBruderKlausenFestBefore1648(): void /** * Tests translated name of Bruder-Klausen-Fest. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -87,7 +84,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 55dacca6d..eaa5042bb 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index 261ccac23..28052977a 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index d4798722e..51b4f7253 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index 7c9759c43..10db1930f 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 64e551ada..9500e8bc2 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements HolidayTe * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index 940d834db..004426c85 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 764f41412..f52f0d31a 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -110,7 +109,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index f5a8af66d..24f50f4bb 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends ObwaldenBaseTestCase implements HolidayTestCas /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 3f8259ed2..7228cbd7b 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Obwalden; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index eee06a1bd..381be092b 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends SchaffhausenBaseTestCase implements HolidayTestCa /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index 5b07a942c..7f2f229fe 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements HolidayTestC /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index 39e6cb156..16771273f 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements HolidayTestCa * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 5e85be451..84b4bbd2d 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends SchaffhausenBaseTestCase implements HolidayTestCa /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index c46dc49a4..f58ebf913 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends SchaffhausenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index a252328ce..5ae46d1aa 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements HolidayTestCas * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 b3cce3e22..13bc35e35 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends SchaffhausenBaseTestCase implements HolidayTes /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index b46aac95e..cb56c67b0 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -106,7 +105,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index bc6130368..1fdbf4e91 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements HolidayTestC * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index af78bacd2..b24d3e120 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index a6b4225f4..f1e7f4897 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 1735a4960..ea6b8554b 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index 9e54a3d39..1e9a05a91 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 fd3e33d95..5d7da3fa9 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index 65fa94b84..09e0b6ecf 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index fef0231ff..9f58e3c22 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index c47c66b30..fb51d29ec 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends SchwyzBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index c869a1793..ee3162f07 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index 9c040d94b..c95a3e048 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index 471689821..f15b8bd3e 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 d7ffd26ca..b6d8253ef 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index d1f9650ed..e4427d9de 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -110,7 +109,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index 81227c2fa..598a64aca 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class StJosephDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStJosephDay(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day * - * @throws Exception + * @throws \Exception */ public function StJosephDayDataProvider(): array { @@ -60,7 +58,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index a84c13c76..57ce5b5c6 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Schwyz; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends SchwyzBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index 2b4253fa5..1202c03f4 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Solothurn; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends SolothurnBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index 9b51471a4..3b69426aa 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Solothurn; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends SolothurnBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 4918274fe..268c49de7 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Solothurn; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 8b1361c31..a9c31fb7a 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Solothurn; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends SolothurnBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 3989e7799..47e4d754f 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Solothurn; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 ce2c28dfc..20aa5454d 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Solothurn; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -103,7 +102,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index 2c6f3a22b..77fa3ef56 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 ac22c2588..3702e5912 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends StGallenBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 30f10cdb9..ba508e053 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index 682cc2633..b6c44c132 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends StGallenBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index dea1c7c96..8c5c4d5b6 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends StGallenBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index 4f204d789..4de3ca4e4 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 972cc621c..f4172572e 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends StGallenBaseTestCase implements HolidayTestCas /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index 23046de5c..b5fcb12f2 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index e8486d5aa..c56a87765 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\StGallen; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends StGallenBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index 579b38228..05b25d75b 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +45,7 @@ class SwissNationalDayTest extends SwitzerlandBaseTestCase implements HolidayTes /** * Tests National Day on or after 1994. * - * @throws Exception + * @throws \Exception */ public function testNationalDayOnAfter1994(): void { @@ -57,14 +54,14 @@ public function testNationalDayOnAfter1994(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-01", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests National Day on or after 1899 and before 1994. * - * @throws Exception + * @throws \Exception */ public function testNationalDayOnAfter1899(): void { @@ -73,7 +70,7 @@ public function testNationalDayOnAfter1899(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-01", new \DateTimeZone(self::TIMEZONE)) ); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } @@ -81,7 +78,7 @@ public function testNationalDayOnAfter1899(): void /** * Tests National Day on 1891. * - * @throws Exception + * @throws \Exception */ public function testNationalDayOn1891(): void { @@ -90,7 +87,7 @@ public function testNationalDayOn1891(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-8-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-8-01", new \DateTimeZone(self::TIMEZONE)) ); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } @@ -98,7 +95,7 @@ public function testNationalDayOn1891(): void /** * Tests National Day before 1891. * - * @throws Exception + * @throws \Exception */ public function testNationalDayBefore1891(): void { @@ -112,7 +109,7 @@ public function testNationalDayBefore1891(): void /** * Tests National Day between 1891 and 1899. * - * @throws Exception + * @throws \Exception */ public function testNationalDayBetween1891And1899(): void { @@ -123,7 +120,7 @@ public function testNationalDayBetween1891And1899(): void /** * Tests translated name of National Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -138,7 +135,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index 28bded230..c8cbc8ca9 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -88,7 +87,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index a0a90bb72..31b7bb9ea 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index 23a138dcf..9c734b387 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index b8cab2e5a..04da2721c 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index bbfea0fcf..44cff9928 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index 9729446c6..cc873291b 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index bf9879738..569a24b84 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 344c9e7c1..20b04efc4 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index 287baed36..70dcba747 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends ThurgauBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 494a1999d..48539152f 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -106,7 +105,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index f65c71514..219d77b1a 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Thurgau; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends ThurgauBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 87977ce56..8e8dcef90 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 1867ea58d..1d78be1f6 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 81dacfa4e..265025b4e 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 ef945d09f..cbd631065 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index d345a7a0d..a5a9f781d 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index 9db726d3a..b224fbaba 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 3dcd58409..7c2b5e26b 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends TicinoBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index ad2cf3483..0a7ea8960 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index 427b76e03..63a33d7e8 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 90fd7b218..bb54703b8 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 437637c4f..ce2f71190 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class StJosephDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStJosephDay(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day * - * @throws Exception + * @throws \Exception */ public function StJosephDayDataProvider(): array { @@ -60,7 +58,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index 3bbf91e79..5ad38982c 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StPeterPaulTest extends TicinoBaseTestCase implements HolidayTestCase * * @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 int $year the year for which Feast of Saints Peter and Paul needs to be tested + * @param \DateTime $expected the expected date */ public function testStPeterPaul(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testStPeterPaul(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Feast of Saints Peter and Paul * - * @throws Exception + * @throws \Exception */ public function StPeterPaulDataProvider(): array { @@ -57,7 +55,7 @@ public function StPeterPaulDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index cf0a1208e..3568672bd 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends TicinoBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index 18f22380b..8efb46733 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -111,7 +110,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index bba2bf48a..97dc71bdc 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Ticino; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends TicinoBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index d16b2f67a..b9ed20d58 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends UriBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 f9daafea8..645ef3a97 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 48c6c6d1d..e2c32be69 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 8620d24c6..d3e3a7e9a 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends UriBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index 95fba1201..97bdfb634 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends UriBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index 24e14025f..3e699ea5a 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 281897933..e2695c4d7 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class EpiphanyTest extends UriBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index f27e9418b..a8650befd 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 8f4a6997a..0dad169fd 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index c4025783a..311a593cf 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends UriBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 6203a26c4..14991ccbc 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 9709013ee..598dc3f6c 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class StJosephDayTest extends UriBaseTestCase implements HolidayTestCase * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStJosephDay(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day * - * @throws Exception + * @throws \Exception */ public function StJosephDayDataProvider(): array { @@ -60,7 +58,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 5383310c3..2be6fb295 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends UriBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index b6b9882f0..e8ad5678e 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Uri; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -110,7 +109,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index ff38ba76c..3cf5678b4 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 247a38047..14780a854 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index b576c673d..1c5dadb3f 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 7311165e0..e3a28d195 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index 84f2c7bdd..72a8b5010 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index e89881d83..6bc0dc16d 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements HolidayTest * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 4f79ba136..9c29308ea 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 e995d181e..f3db4e19d 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -37,8 +35,8 @@ class StJosephDayTest extends ValaisBaseTestCase implements HolidayTestCase * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which St. Joseph's Day needs to be tested + * @param \DateTime $expected the expected date */ public function testStJosephDay(int $year, \DateTimeInterface $expected): void { @@ -50,7 +48,7 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for St. Joseph's Day * - * @throws Exception + * @throws \Exception */ public function StJosephDayDataProvider(): array { @@ -60,7 +58,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -75,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index ff3f3bac8..1573a37c4 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Valais; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index 7a5d17893..8fb697909 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index d579d136a..cfa5744b0 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 191983a7b..e22522168 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,16 +30,16 @@ class BettagsMontagTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests Bettags Montag on or after 1832. * - * @throws Exception + * @throws \Exception */ public function testBettagsMontagOnAfter1832(): void { $year = $this->generateRandomYear(1832); // Find third Sunday of September - $date = new DateTime('Third Sunday of '.$year.'-09', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +47,7 @@ public function testBettagsMontagOnAfter1832(): void /** * Tests Bettags Montag before 1832. * - * @throws Exception + * @throws \Exception */ public function testBettagsMontagBefore1832(): void { @@ -62,7 +58,7 @@ public function testBettagsMontagBefore1832(): void /** * Tests translated name of Bettags Montag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -77,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 60ab6252e..df3d93470 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends VaudBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index 1c8296a26..1ab429fb2 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index a50740efd..c948afb3b 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 36bed24a8..3937d1db8 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends VaudBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 ab5f4fbc6..27428422d 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index c6a1f36bc..baae3f4d2 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Vaud; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index aa45782a0..c32706c95 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AllSaintsDayTest extends ZugBaseTestCase implements HolidayTestCase * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which All Saints' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of All Saints' Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 b302d214a..445ef4364 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 43607bdab..d68e0a2b0 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements HolidayTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param \DateTime $expected the expected date */ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v /** * Tests translated name of the day of the Assumption of Mary. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 6aa48e330..8faa53aa2 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,12 +30,12 @@ class BerchtoldsTagTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testBerchtoldsTag(): void { $year = $this->generateRandomYear(); - $date = new DateTime($year.'-01-02', new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -47,7 +44,7 @@ public function testBerchtoldsTag(): void /** * Tests translated name of BerchtoldsTag. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -62,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index cea2de8e5..9f42d94c9 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends ZugBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index d1d83cb20..431ca5ee7 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateInterval; -use Exception; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\HolidayTestCase; @@ -35,7 +33,7 @@ class CorpusChristiTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests Corpus Christi. * - * @throws Exception + * @throws \Exception */ public function testCorpusChristi(): void { @@ -44,14 +42,14 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new DateInterval('P60D')) + $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 54dec7651..c54dbc134 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index 908868ac9..c3c926831 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 2002c2ce4..a276721c9 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements HolidayTestCas * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index 93d535b59..b18dcbcac 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends ZugBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 c096f9cc0..7339d610d 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 6764c861d..5aa412a59 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends ZugBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index a5c3822c9..d8bb99199 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Zug; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -109,7 +108,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index 482052bb8..77346251a 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class AscensionDayTest extends ZurichBaseTestCase implements HolidayTestCase /** * Tests Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testAscensionDay(): void { @@ -42,14 +39,14 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-16", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Ascension Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 32959b252..866663cb2 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends ZurichBaseTestCase implements HolidayTestCase * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for Christmas Day * - * @throws Exception + * @throws \Exception */ public function ChristmasDayDataProvider(): array { @@ -57,7 +55,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index ef2d00989..98c9c7be5 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterMondayTest extends ZurichBaseTestCase implements HolidayTestCase /** * Tests Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testEasterMonday(): void { @@ -42,14 +39,14 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Easter Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index a599f9b93..c6accc4f4 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends ZurichBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 326b88c49..cf52b2513 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends ZurichBaseTestCase implements HolidayTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which New Years Day needs to be tested + * @param \DateTime $expected the expected date */ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void /** * Tests translated name of New Years Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 94c642bde..92794027c 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostMondayTest extends ZurichBaseTestCase implements HolidayTestCase /** * Tests Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testPentecostMonday(): void { @@ -42,14 +39,14 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of Pentecost Monday. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index f4182f665..b4ad729eb 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class StStephensDayTest extends ZurichBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index e858ad7b2..f79c56641 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,11 +35,11 @@ class WorkersDayTest extends ZurichBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } @@ -51,7 +48,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -59,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -84,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index d0524262a..ea86d21d2 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Switzerland\Zurich; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php index 10ec0fe34..3930e1097 100644 --- a/tests/Turkey/LabourDayTest.php +++ b/tests/Turkey/LabourDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Turkey; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -26,8 +24,8 @@ class LabourDayTest extends TurkeyBaseTestCase implements HolidayTestCase /** * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -35,7 +33,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void } /** - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -48,7 +46,7 @@ public function testTranslation(): void } /** - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -63,7 +61,7 @@ public function testHolidayType(): void /** * @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/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php index 48424d29b..16c7b9b27 100644 --- a/tests/Turkey/NewYearsDayTest.php +++ b/tests/Turkey/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Turkey; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -26,8 +24,8 @@ class NewYearsDayTest extends TurkeyBaseTestCase implements HolidayTestCase /** * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -37,7 +35,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -45,7 +43,7 @@ public function HolidayDataProvider(): array } /** - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -58,7 +56,7 @@ public function testTranslation(): void } /** - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php index 390b3a65f..1eabf8623 100644 --- a/tests/Turkey/TurkeyTest.php +++ b/tests/Turkey/TurkeyTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Turkey; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index e3e00ee09..6fb2ced6e 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class ChristmasDayTest extends USABaseTestCase implements HolidayTestCase /** * Tests Christmas Day. Christmas Day is celebrated on December 25th. * - * @throws Exception + * @throws \Exception */ public function testChristmasDay(): void { @@ -42,14 +39,14 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Christmas Day substituted on Monday (when Christmas Day falls on Sunday). * - * @throws Exception + * @throws \Exception */ public function testChristmasDaySubstitutedMonday(): void { @@ -59,14 +56,14 @@ public function testChristmasDaySubstitutedMonday(): void self::REGION, 'substituteHoliday:christmasDay', $year, - new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Christmas Day substituted on Monday (when Christmas Day falls on Saturday). * - * @throws Exception + * @throws \Exception */ public function testChristmasDaySubstitutedFriday(): void { @@ -76,14 +73,14 @@ public function testChristmasDaySubstitutedFriday(): void self::REGION, 'substituteHoliday:christmasDay', $year, - new DateTime("$year-12-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-24", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -98,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index 3ce5c3b11..983f12ef9 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class ColumbusDayTest extends USABaseTestCase implements HolidayTestCase * 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 \Exception */ public function testColumbusDayOnAfter1970(): void { @@ -48,7 +45,7 @@ public function testColumbusDayOnAfter1970(): void self::REGION, self::HOLIDAY, $year, - new DateTime("second monday of october $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of october $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testColumbusDayOnAfter1970(): void * 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 \Exception */ public function testColumbusBetween1937And1969(): void { @@ -65,7 +62,7 @@ public function testColumbusBetween1937And1969(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-12", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +70,7 @@ public function testColumbusBetween1937And1969(): void * 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 Exception + * @throws \Exception */ public function testColumbusDayBefore1937(): void { @@ -87,7 +84,7 @@ public function testColumbusDayBefore1937(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index 6b6dad10b..2bed9ae6b 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class IndependenceDayTest extends USABaseTestCase implements HolidayTestCase /** * Tests Independence Day on or after 1776. Independence Day is celebrated since 1776 on July 4th. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayOnAfter1776(): void { @@ -47,14 +44,14 @@ public function testIndependenceDayOnAfter1776(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-7-4", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-4", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Independence Day on or after 1776 when substituted on Monday (when Independence Day falls on Sunday). * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayOnAfter1776SubstitutedMonday(): void { @@ -63,14 +60,14 @@ public function testIndependenceDayOnAfter1776SubstitutedMonday(): void self::REGION, 'substituteHoliday:independenceDay', $year, - new DateTime("$year-7-5", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-5", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Independence Day on or after 1776 when substituted on Friday (when Independence Day falls on Saturday). * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayOnAfter1776SubstitutedFriday(): void { @@ -79,14 +76,14 @@ public function testIndependenceDayOnAfter1776SubstitutedFriday(): void self::REGION, 'substituteHoliday:independenceDay', $year, - new DateTime("$year-7-3", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-7-3", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Independence Day before 1776. Independence Day is celebrated since 1776 on July 4th. * - * @throws Exception + * @throws \Exception */ public function testIndependenceDayBefore1776(): void { @@ -100,7 +97,7 @@ public function testIndependenceDayBefore1776(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index 7df2d81cd..740278dbc 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class JuneteenthTest extends USABaseTestCase implements HolidayTestCase /** * Tests Juneteenth on or after 2021. Juneteenth is celebrated since 2021 on June 19th. * - * @throws Exception + * @throws \Exception */ public function testJuneteenthOnAfter2021(): void { @@ -47,14 +44,14 @@ public function testJuneteenthOnAfter2021(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-6-19", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-19", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Juneteenth on or after 2021 when substituted on Monday (when Juneteenth falls on Sunday). * - * @throws Exception + * @throws \Exception */ public function testJuneteenthOnAfter2021SubstitutedMonday(): void { @@ -63,14 +60,14 @@ public function testJuneteenthOnAfter2021SubstitutedMonday(): void self::REGION, 'substituteHoliday:juneteenth', $year, - new DateTime("$year-6-20", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-20", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Juneteenth on or after 2021 when substituted on Friday (when Juneteenth falls on Saturday). * - * @throws Exception + * @throws \Exception */ public function testJuneteenthOnAfter2021SubstitutedFriday(): void { @@ -79,14 +76,14 @@ public function testJuneteenthOnAfter2021SubstitutedFriday(): void self::REGION, 'substituteHoliday:juneteenth', $year, - new DateTime("$year-6-18", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-6-18", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Juneteenth before 2021. Juneteenth is celebrated since 2021 on June 19th. * - * @throws Exception + * @throws \Exception */ public function testJuneteenthBefore2021(): void { @@ -100,7 +97,7 @@ public function testJuneteenthBefore2021(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -115,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 5b4dad368..adf03c135 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class LabourDayTest extends USABaseTestCase implements HolidayTestCase /** * Tests Labour Day on or after 1887. Labour Day was established since 1887 on the first Monday of September. * - * @throws Exception + * @throws \Exception */ public function testLabourDayOnAfter1887(): void { @@ -47,14 +44,14 @@ public function testLabourDayOnAfter1887(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of september $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of september $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Labour Day before 1887. Labour Day was established since 1887 on the first Monday of September. * - * @throws Exception + * @throws \Exception */ public function testLabourDayBefore1887(): void { @@ -68,7 +65,7 @@ public function testLabourDayBefore1887(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index fc9c4c18c..e19194c52 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class MartinLutherKingDayTest extends USABaseTestCase implements HolidayTestCase * 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 \Exception */ public function testMartinLutherKingDayOnAfter1986(): void { @@ -48,7 +45,7 @@ public function testMartinLutherKingDayOnAfter1986(): void self::REGION, self::HOLIDAY, $year, - new DateTime("third monday of january $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of january $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testMartinLutherKingDayOnAfter1986(): void * Tests Dr. Martin Luther King Day before 1986. Dr. Martin Luther King Day was established since 1996 on the third * Monday of January. * - * @throws Exception + * @throws \Exception */ public function testMartinLutherKingDayBefore1986(): void { @@ -70,7 +67,7 @@ public function testMartinLutherKingDayBefore1986(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -85,7 +82,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index 4d2011b51..a975eb64e 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class MemorialDayTest extends USABaseTestCase implements HolidayTestCase * 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 \Exception */ public function testMemorialDayOnAfter1968(): void { @@ -48,7 +45,7 @@ public function testMemorialDayOnAfter1968(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last monday of may $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of may $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testMemorialDayOnAfter1968(): void * 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 \Exception */ public function testMemorialDayBetween1865And1967(): void { @@ -65,7 +62,7 @@ public function testMemorialDayBetween1865And1967(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +70,7 @@ public function testMemorialDayBetween1865And1967(): void * 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 Exception + * @throws \Exception */ public function testMemorialDayBefore1865(): void { @@ -87,7 +84,7 @@ public function testMemorialDayBefore1865(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 456a9b084..7ee398e13 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class NewYearsDayTest extends USABaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @throws Exception + * @throws \Exception */ public function testNewYearsDay(): void { @@ -42,14 +39,14 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests New Years Day when substituted on Monday (when New Years Day falls on Sunday). * - * @throws Exception + * @throws \Exception */ public function testNewYearsDaySubstitutedMonday(): void { @@ -58,14 +55,14 @@ public function testNewYearsDaySubstitutedMonday(): void self::REGION, 'substituteHoliday:newYearsDay', $year, - new DateTime("$year-1-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-1-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests New Years Day when substituted on Friday (when New Years Day falls on Saturday). * - * @throws Exception + * @throws \Exception */ public function testNewYearsDaySubstitutedFriday(): void { @@ -75,14 +72,14 @@ public function testNewYearsDaySubstitutedFriday(): void self::REGION, 'substituteHoliday:newYearsDay', $year, - new DateTime("$subYear-12-31", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$subYear-12-31", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -97,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index 47c7e8e60..14cac9c00 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class ThanksgivingDayTest extends USABaseTestCase implements HolidayTestCase * Tests Thanksgiving Day on or after 1863. Thanksgiving Day is celebrated since 1863 on the fourth Thursday * of November. * - * @throws Exception + * @throws \Exception */ public function testThanksgivingDayOnAfter1863(): void { @@ -48,7 +45,7 @@ public function testThanksgivingDayOnAfter1863(): void self::REGION, self::HOLIDAY, $year, - new DateTime("fourth thursday of november $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("fourth thursday of november $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testThanksgivingDayOnAfter1863(): void * Tests Thanksgiving Day before 1863. ThanksgivingDay Day is celebrated since 1863 on the fourth Thursday * of November. * - * @throws Exception + * @throws \Exception */ public function testThanksgivingDayBefore1863(): void { @@ -70,7 +67,7 @@ public function testThanksgivingDayBefore1863(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -85,7 +82,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index df8e01d9e..32bdfb943 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\USA; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -96,7 +95,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index b7a4bdb89..5b47270d6 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Exception\MissingTranslationException; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -40,7 +37,7 @@ class VeteransDayTest extends USABaseTestCase implements HolidayTestCase /** * Tests Veterans Day on or after 1919. Veterans Day was established in 1919 on November 11. * - * @throws Exception + * @throws \Exception */ public function testVeteransDayOnAfter1919(): void { @@ -49,14 +46,14 @@ public function testVeteransDayOnAfter1919(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-11-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Veterans Day on or after 1919 when substituted on Monday (when Veterans Day falls on Sunday). * - * @throws Exception + * @throws \Exception */ public function testVeteransDayOnAfter1919SubstitutedMonday(): void { @@ -65,14 +62,14 @@ public function testVeteransDayOnAfter1919SubstitutedMonday(): void self::REGION, 'substituteHoliday:veteransDay', $year, - new DateTime("$year-11-12", new DateTimeZone(self::TIMEZONE)) + 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 \Exception */ public function testVeteransDayOnAfter1919SubstitutedFriday(): void { @@ -81,14 +78,14 @@ public function testVeteransDayOnAfter1919SubstitutedFriday(): void self::REGION, 'substituteHoliday:veteransDay', $year, - new DateTime("$year-11-10", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-11-10", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests Veterans Day before 1919. Veterans Day was established in 1919 on November 11. * - * @throws Exception + * @throws \Exception */ public function testVeteransDayBefore1919(): void { @@ -108,7 +105,7 @@ public function testVeteransDayNameBefore1954(): void { try { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); - } catch (Exception $e) { + } catch (\Exception $e) { } $holidays = Yasumi::create(self::REGION, $year); @@ -125,7 +122,7 @@ public function testVeteransDayNameAfter1954(): void { try { $year = $this->generateRandomYear(1954); - } catch (Exception $e) { + } catch (\Exception $e) { } $holidays = Yasumi::create(self::REGION, $year); @@ -136,7 +133,7 @@ public function testVeteransDayNameAfter1954(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -151,7 +148,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index be5778f85..f2579e949 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\USA; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +36,7 @@ class WashingtonsBirthdayTest extends USABaseTestCase implements HolidayTestCase * 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 \Exception */ public function testWashingtonsBirthdayOnAfter1968(): void { @@ -48,7 +45,7 @@ public function testWashingtonsBirthdayOnAfter1968(): void self::REGION, self::HOLIDAY, $year, - new DateTime("third monday of february $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of february $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +53,7 @@ public function testWashingtonsBirthdayOnAfter1968(): void * 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 \Exception */ public function testWashingtonsBirthdayBetween1879And1967(): void { @@ -65,7 +62,7 @@ public function testWashingtonsBirthdayBetween1879And1967(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-2-22", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-2-22", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +70,7 @@ public function testWashingtonsBirthdayBetween1879And1967(): void * 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 Exception + * @throws \Exception */ public function testWashingtonsBirthdayBefore1879(): void { @@ -87,7 +84,7 @@ public function testWashingtonsBirthdayBefore1879(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -102,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index b507a7b6f..7cf496149 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -15,8 +15,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -36,8 +34,8 @@ class CatholicChristmasDayTest extends UkraineBaseTestCase implements HolidayTes * * @dataProvider CatholicChristmasDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testCatholicChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testCatholicChristmasDay(int $year, \DateTimeInterface $expected /** * Tests Catholic Christmas Day before 2017. * - * @throws Exception + * @throws \Exception */ public function testNoCatholicChristmasDayBefore2017(): void { @@ -63,7 +61,7 @@ public function testNoCatholicChristmasDayBefore2017(): void /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -78,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -90,7 +88,7 @@ public function testHolidayType(): void * * @return array list of test dates for Catholic Christmas Day * - * @throws Exception + * @throws \Exception */ public function CatholicChristmasDayDataProvider(): array { diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 6dcc53276..6e83ed060 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class ChristmasDayTest extends UkraineBaseTestCase implements HolidayTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which Christmas Day needs to be tested + * @param \DateTime $expected the expected date */ public function testChristmasDay(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index 471bd9f53..c0289abe3 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +28,7 @@ class ConstitutionDayTest extends UkraineBaseTestCase implements HolidayTestCase public const HOLIDAY = 'constitutionDay'; /** - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -40,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-28", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index bb3725ddb..171e83500 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +28,7 @@ class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements HolidayTes public const HOLIDAY = 'defenderOfUkraineDay'; /** - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -40,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-10-14", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-10-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index b5eefe709..1d0ea4980 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class EasterTest extends UkraineBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-04-19", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-04-19", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index 55bacedea..2f7eabe8f 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -31,7 +28,7 @@ class IndependenceDayTest extends UkraineBaseTestCase implements HolidayTestCase public const HOLIDAY = 'independenceDay'; /** - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -40,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-08-24", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-08-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index fbca0d04d..309be897c 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Ukraine; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -51,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 4ba8bfe19..e08954031 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements Holiday * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { @@ -45,7 +43,7 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec /** * Tests translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -60,7 +58,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { @@ -72,7 +70,7 @@ public function testHolidayType(): void * * @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 20fb1b25c..b601e3a74 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -34,8 +32,8 @@ class NewYearsDayTest extends UkraineBaseTestCase implements HolidayTestCase * * @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 int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date */ public function testHoliday(int $year, \DateTimeInterface $expected): void { @@ -47,7 +45,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -57,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -72,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 5a00d538c..97d6ae64f 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class PentecostTest extends UkraineBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-06-07", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-07", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 1cc683821..b09e02037 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\Yasumi; @@ -35,8 +34,8 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements H * * @dataProvider SecondInternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested - * @param DateTime $expected the expected date + * @param int $year the year for which International Workers' Day needs to be tested + * @param \DateTime $expected the expected date */ public function testSecondInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index eb2ae3c57..c6c705ba4 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -15,10 +15,6 @@ namespace Yasumi\tests\Ukraine; -use DateTime; -use DateTimeZone; -use Exception; -use ReflectionException; use Yasumi\Holiday; use Yasumi\SubstituteHoliday; use Yasumi\tests\HolidayTestCase; @@ -32,8 +28,8 @@ class SubstitutedHolidayTest extends UkraineBaseTestCase implements HolidayTestC /** * Tests the substitution of holidays on saturday (weekend). * - * @throws Exception - * @throws ReflectionException + * @throws \Exception + * @throws \ReflectionException */ public function testSaturdaySubstitution(): void { @@ -45,8 +41,8 @@ public function testSaturdaySubstitution(): void self::REGION, $holiday, $year, - new DateTime("$year-05-09", new DateTimeZone(self::TIMEZONE)), - new DateTime("$year-05-11", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-05-09", new \DateTimeZone(self::TIMEZONE)), + new \DateTime("$year-05-11", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); @@ -96,8 +92,8 @@ public function assertHolidayWithSubstitution( /** * Tests the substitution of holidays on sunday (weekend). * - * @throws Exception - * @throws ReflectionException + * @throws \Exception + * @throws \ReflectionException */ public function testSundaySubstitution(): void { @@ -109,8 +105,8 @@ public function testSundaySubstitution(): void self::REGION, $holiday, $year, - new DateTime("$year-06-28", new DateTimeZone(self::TIMEZONE)), - new DateTime("$year-06-29", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-06-28", new \DateTimeZone(self::TIMEZONE)), + new \DateTime("$year-06-29", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); @@ -120,8 +116,8 @@ public function testSundaySubstitution(): void * Tests the substitution of new year (1. January) on a weekend. * Special: no substitution at new year (1. January) on a weekend. * - * @throws Exception - * @throws ReflectionException + * @throws \Exception + * @throws \ReflectionException */ public function testNewYearNoSubstitution(): void { @@ -133,7 +129,7 @@ public function testNewYearNoSubstitution(): void self::REGION, $holiday, $year, - new DateTime("$year-01-01", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-01-01", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); @@ -143,8 +139,8 @@ public function testNewYearNoSubstitution(): void * Tests the substitution of Catholic Christmas Day (25. December) on a weekend. * Special: no substitution at Catholic Christmas Day (25. December) on a weekend. * - * @throws Exception - * @throws ReflectionException + * @throws \Exception + * @throws \ReflectionException */ public function testCatholicChristmasDayNoSubstitution(): void { @@ -156,7 +152,7 @@ public function testCatholicChristmasDayNoSubstitution(): void self::REGION, $holiday, $year, - new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 6df25c7f9..6574a485f 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -15,7 +15,6 @@ namespace Yasumi\tests\Ukraine; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -115,7 +114,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index 942530533..d7c1a0d28 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\Ukraine; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -41,7 +40,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -51,7 +50,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -66,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 1c2015824..e7c9b4bd8 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class BoxingDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 9c46a7d30..8de2b4509 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class ChristmasDayTest extends UnitedKingdomBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 3d8b181fd..75971f1e3 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterMondayTest extends UnitedKingdomBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index 7b5216a22..59bc9c78d 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class BoxingDayTest extends EnglandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index e292d6c70..d9b0a4a99 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class ChristmasDayTest extends EnglandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 44621dea9..10b342df7 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterMondayTest extends EnglandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index 4c6a5794e..ab5ba6842 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index dbefe0c33..01ce23772 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends EnglandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index 8844c7daf..0da30b7b0 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +36,7 @@ class MayDayBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCa /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 1995 and 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayExceptions(): void { @@ -62,21 +60,21 @@ public function testHolidayExceptions(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index c62264820..9fc456998 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +45,7 @@ class NewYearsDayTest extends EnglandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(int $year, string $expected): void { @@ -56,14 +53,14 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -77,7 +74,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws Exception + * @throws \Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -94,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -104,7 +101,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -119,7 +116,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index 5bb5d6744..683802213 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class SpringBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCa /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exceptions in 2002 and 2012. * - * @throws Exception + * @throws \Exception */ public function testHolidayException(): void { @@ -62,21 +59,21 @@ public function testHolidayException(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +87,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index f292efbd1..35fe626b1 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\England; -use DateTime; -use DateTimeZone; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -51,7 +49,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -67,7 +65,7 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } @@ -82,37 +80,37 @@ public function testHolidayTrialPeriod(): void 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/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index e1b6c2d66..52d9f9ec7 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends UnitedKingdomBaseTestCase implements HolidayTestCas /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index dd444a56d..7d6daf580 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +36,7 @@ class MayDayBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 1995 and 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayExceptions(): void { @@ -62,21 +60,21 @@ public function testHolidayExceptions(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/MotheringSundayTest.php b/tests/UnitedKingdom/MotheringSundayTest.php index 75db801ba..4accacac8 100644 --- a/tests/UnitedKingdom/MotheringSundayTest.php +++ b/tests/UnitedKingdom/MotheringSundayTest.php @@ -15,10 +15,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; use Yasumi\tests\UnitedKingdom\England\EnglandBaseTestCase; @@ -30,7 +26,7 @@ class MotheringSundayTest extends EnglandBaseTestCase implements HolidayTestCase /** * @dataProvider HolidayDataProvider * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -38,14 +34,14 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -54,7 +50,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->sub(new DateInterval('P3W')); + $date->sub(new \DateInterval('P3W')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -67,7 +63,7 @@ public function HolidayDataProvider(): array } /** - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -80,7 +76,7 @@ public function testTranslation(): void } /** - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 322de63bd..c7ae78b7a 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +45,7 @@ class NewYearsDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(int $year, string $expected): void { @@ -56,14 +53,14 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -77,7 +74,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws Exception + * @throws \Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -94,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -104,7 +101,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -119,7 +116,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index 6e7ebb871..38cd5db52 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,11 +40,11 @@ class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements Holida * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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)) { @@ -59,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -75,7 +72,7 @@ public function testHolidayBeforeEstablishment(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -83,7 +80,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-7-12", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-7-12", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -93,7 +90,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index c878a95c9..ff9076939 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class BoxingDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index d850fdff8..3556f1697 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class ChristmasDayTest extends NorthernIrelandBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index 6b507e5b7..8ada41f3c 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterMondayTest extends NorthernIrelandBaseTestCase implements HolidayTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index 48a9a20d2..26c707b3c 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends NorthernIrelandBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index d8005ad3d..bea891732 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +36,7 @@ class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 1995 and 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayExceptions(): void { @@ -62,21 +60,21 @@ public function testHolidayExceptions(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index 3e2bae4c5..ec5e44341 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +45,7 @@ class NewYearsDayTest extends NorthernIrelandBaseTestCase implements HolidayTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(int $year, string $expected): void { @@ -56,14 +53,14 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -77,7 +74,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws Exception + * @throws \Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -94,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -104,7 +101,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -119,7 +116,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index 44bb4fd1a..9a95c8bec 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -109,7 +108,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index 1e52e9d81..e2c6487e3 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index c104f7a83..7e2bc5f4a 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,11 +40,11 @@ class StPatricksDayTest extends NorthernIrelandBaseTestCase implements HolidayTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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)) { @@ -59,7 +56,7 @@ public function testHoliday(int $year, string $expected): void /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -75,7 +72,7 @@ public function testHolidayBeforeEstablishment(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -83,7 +80,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-3-17", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-3-17", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -93,7 +90,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -108,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index 7528be410..0f7dbf747 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +41,7 @@ class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -52,14 +50,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore1965(): void { @@ -68,14 +66,14 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday during trial period in 1965-1970. * - * @throws Exception + * @throws \Exception */ public function testHolidayTrialPeriod(): void { @@ -83,44 +81,44 @@ public function testHolidayTrialPeriod(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -134,7 +132,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -149,7 +147,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslationBeforeRename(): void { @@ -164,7 +162,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php index 2dd9bbbb7..9d744e46c 100644 --- a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php +++ b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class PlatinumJubileeBankHolidayTest extends UnitedKingdomBaseTestCase implement /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -51,14 +48,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, self::ACTIVE_YEAR, - new DateTime(self::ACTIVE_DATE, new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::ACTIVE_DATE, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before the year in which it occurred. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeActive(): void { @@ -72,7 +69,7 @@ public function testHolidayBeforeActive(): void /** * Tests the holiday defined in this test after the year in which it occurred. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterActive(): void { diff --git a/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php b/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php index 7feb30bad..ebfcc8248 100644 --- a/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php +++ b/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class QueenElizabethFuneralBankHolidayTest extends UnitedKingdomBaseTestCase imp /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -51,14 +48,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, self::ACTIVE_YEAR, - new DateTime(self::ACTIVE_DATE, new DateTimeZone(self::TIMEZONE)) + new \DateTime(self::ACTIVE_DATE, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before the year in which it occurred. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeActive(): void { @@ -72,7 +69,7 @@ public function testHolidayBeforeActive(): void /** * Tests the holiday defined in this test after the year in which it occurred. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterActive(): void { diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index bc70ff8f2..44061c7e8 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class BoxingDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 2b74cac48..c40282f28 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class ChristmasDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index af9c34112..08b7f4a6e 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends ScotlandBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index 6b58ed22d..69f2e5b94 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +36,7 @@ class MayDayBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 1995 and 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayExceptions(): void { @@ -62,21 +60,21 @@ public function testHolidayExceptions(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index 275e382f1..fe3c07370 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,15 +45,15 @@ class NewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $date->add(new \DateInterval('P2D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -65,7 +61,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -79,7 +75,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws Exception + * @throws \Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -96,7 +92,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -104,7 +100,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -114,7 +110,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -129,7 +125,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 388c99661..71216ec38 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -104,7 +103,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index 9abfc0a8d..4597e6cad 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -49,15 +45,15 @@ class SecondNewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $date->add(new \DateInterval('P2D')); $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); } } @@ -65,7 +61,7 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -79,7 +75,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws Exception + * @throws \Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -96,7 +92,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -104,7 +100,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-2", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-1-2", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -114,7 +110,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -129,7 +125,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 4c3a26747..2891cf972 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class SpringBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index a5d5980b8..effd4702b 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,11 +40,11 @@ class StAndrewsDayTest extends ScotlandBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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)) { @@ -61,7 +58,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -69,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-11-30", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-11-30", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -79,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -94,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index dc5823834..83de20654 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class SummerBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -68,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -83,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index c969a4d37..77eca1bb7 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class SpringBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exceptions in 2002, 2012 and 2022. * - * @throws Exception + * @throws \Exception */ public function testHolidayException(): void { @@ -62,28 +59,28 @@ public function testHolidayException(): void 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)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 2022, - new DateTime('2022-6-2', new DateTimeZone(self::TIMEZONE)) + new \DateTime('2022-6-2', new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -97,7 +94,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -112,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index 7a5d6856b..6039fbc11 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +41,7 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -52,14 +50,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore1965(): void { @@ -68,14 +66,14 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday during trial period in 1965-1970. * - * @throws Exception + * @throws \Exception */ public function testHolidayTrialPeriod(): void { @@ -83,44 +81,44 @@ public function testHolidayTrialPeriod(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -134,7 +132,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -149,7 +147,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslationBeforeRename(): void { @@ -164,7 +162,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 5fcd2168b..23ac15862 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\UnitedKingdom; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index b16cebac0..405e26c97 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class BoxingDayTest extends WalesBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 27ab6f961..58743176f 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,15 +35,15 @@ class ChristmasDayTest extends WalesBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { - $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $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')); + $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); } @@ -58,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -66,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -77,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -92,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index a7c6fc014..b6becfe3c 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -14,10 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateInterval; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -39,7 +35,7 @@ class EasterMondayTest extends WalesBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHoliday(int $year, string $expected): void { @@ -47,7 +43,7 @@ public function testHoliday(int $year, string $expected): void self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +52,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -65,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); $date = $this->calculateEaster($year, self::TIMEZONE); - $date->add(new DateInterval('P1D')); + $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -91,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index 6883ffc44..19cf75cee 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -33,7 +30,7 @@ class GoodFridayTest extends WalesBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -42,14 +39,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -64,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index 7a4429788..da07f7616 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +36,7 @@ class MayDayBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +45,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 1995 and 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayExceptions(): void { @@ -62,21 +60,21 @@ public function testHolidayExceptions(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index a845eadbd..4a6eb1b6c 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -48,7 +45,7 @@ class NewYearsDayTest extends WalesBaseTestCase implements HolidayTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws Exception + * @throws \Exception */ public function testHolidayOnAfterEstablishment(int $year, string $expected): void { @@ -56,14 +53,14 @@ public function testHolidayOnAfterEstablishment(int $year, string $expected): vo self::REGION, self::HOLIDAY, $year, - new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -77,7 +74,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. * - * @throws Exception + * @throws \Exception */ public function testHolidayIsObservedTypeBeforeChange(): void { @@ -94,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @return array list of test dates for the holiday defined in this test * - * @throws Exception + * @throws \Exception */ public function HolidayDataProvider(): array { @@ -104,7 +101,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -119,7 +116,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 0aebb0e3c..7c99ea73e 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -38,7 +35,7 @@ class SpringBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -47,14 +44,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exceptions in 2002 and 2012. * - * @throws Exception + * @throws \Exception */ public function testHolidayException(): void { @@ -62,21 +59,21 @@ public function testHolidayException(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -90,7 +87,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -105,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index f874b675c..8fe174aa7 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -14,8 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use DateTime; -use DateTimeZone; use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +41,7 @@ class SummerBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -52,14 +50,14 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday exception in 2020. * - * @throws Exception + * @throws \Exception */ public function testHolidayBefore1965(): void { @@ -68,14 +66,14 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) ); } /** * Tests the holiday during trial period in 1965-1970. * - * @throws Exception + * @throws \Exception */ public function testHolidayTrialPeriod(): void { @@ -83,44 +81,44 @@ public function testHolidayTrialPeriod(): void 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)) ); } /** * Tests the holiday defined in this test before establishment. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeEstablishment(): void { @@ -134,7 +132,7 @@ public function testHolidayBeforeEstablishment(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslation(): void { @@ -149,7 +147,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testTranslationBeforeRename(): void { @@ -164,7 +162,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index 8f76e419b..d4e7b731c 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -14,7 +14,6 @@ namespace Yasumi\tests\UnitedKingdom\Wales; -use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\ProviderTestCase; @@ -105,7 +104,7 @@ public function testOtherHolidays(): void } /** - * @throws ReflectionException + * @throws \ReflectionException * @throws \Exception */ public function testSources(): void diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index c1cac43fd..de9f68094 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -15,12 +15,7 @@ namespace Yasumi\tests; -use DateTime; -use DateTimeInterface; -use Exception; -use InvalidArgumentException; use PHPUnit\Framework\AssertionFailedError; -use RuntimeException; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Filters\BankHolidaysFilter; @@ -49,8 +44,8 @@ trait YasumiBase * @param string $type type of holiday. Use the following constants: TYPE_OFFICIAL, * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException */ public function assertDefinedHolidays( @@ -88,22 +83,22 @@ public function assertDefinedHolidays( /** * Asserts expected date is a holiday for the given year and name. * - * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. - * @param string $key key of the holiday to be checked against - * @param int $year holiday calendar year - * @param DateTime $expected date to be checked against + * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. + * @param string $key key of the holiday to be checked against + * @param int $year holiday calendar year + * @param \DateTime $expected date to be checked against * * @throws UnknownLocaleException * @throws InvalidDateException - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws AssertionFailedError */ public function assertHoliday( string $provider, string $key, int $year, - DateTimeInterface $expected + \DateTimeInterface $expected ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); @@ -116,22 +111,22 @@ public function assertHoliday( /** * Asserts the expected date is a substitute 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 $key key of the substituted holiday to be checked against - * @param int $year holiday calendar year - * @param DateTime $expected 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 $key key of the substituted holiday to be checked against + * @param int $year holiday calendar year + * @param \DateTime $expected date to be checked against * * @throws UnknownLocaleException * @throws InvalidDateException - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws AssertionFailedError */ public function assertSubstituteHoliday( string $provider, string $key, int $year, - DateTimeInterface $expected + \DateTimeInterface $expected ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday('substituteHoliday:'.$key); @@ -148,8 +143,8 @@ public function assertSubstituteHoliday( * @param string $key key of the substituted holiday to be checked against * @param int $year holiday calendar year * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException * @throws InvalidDateException * @throws AssertionFailedError @@ -173,8 +168,8 @@ public function assertNotSubstituteHoliday( * @param string $key key of the holiday to be checked against * @param int $year holiday calendar year * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException * @throws InvalidDateException * @throws AssertionFailedError @@ -198,8 +193,8 @@ public function assertNotHoliday( * @param int $year holiday calendar year * @param array $translations translations to be checked against * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException * @throws AssertionFailedError */ @@ -243,8 +238,8 @@ public function assertTranslatedHolidayName( * @param int $year holiday calendar year * @param string $type type to be checked against * - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws AssertionFailedError * @throws UnknownLocaleException */ @@ -270,8 +265,8 @@ public function assertHolidayType( * @param string $expectedDayOfWeek expected week day (i.e. "Saturday", "Sunday", etc.). * * @throws AssertionFailedError - * @throws InvalidArgumentException - * @throws RuntimeException + * @throws \InvalidArgumentException + * @throws \RuntimeException * @throws UnknownLocaleException */ public function assertDayOfWeek( @@ -294,7 +289,7 @@ public function assertDayOfWeek( * @param string $provider holiday provider (i.e. country/state) for which the holiday need to be tested. * @param int $expectedSourceCount expected sources number * - * @throws Exception + * @throws \Exception */ public function assertSources(string $provider, int $expectedSourceCount): void { From e644874ce2872da1e0a21c7fa01028118715f445 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 15:12:46 +0900 Subject: [PATCH 406/687] Altered version constraints so composer will update the appropriate version instead of a fixed one. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a312116c8..613e55ec8 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "ext-json": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v2.19 | v3.13", + "friendsofphp/php-cs-fixer": "^2.19 | ^3.13", "infection/infection": "^0.17 | ^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.2", From 59aa2a785f1e2dab679de468fc8e208285529ab9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 15:51:59 +0900 Subject: [PATCH 407/687] Updated psalm to latest v4 release. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 613e55ec8..4797e4277 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "phan/phan": "^5.2", "phpstan/phpstan": "^1.4", "phpunit/phpunit": "^8.5 | ^9.5", - "vimeo/psalm": "^4.9" + "vimeo/psalm": "^4.30" }, "config": { "sort-packages": true, From d449a827d35ac41e1f7a030074ba8cbd945d3ee0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 17:17:13 +0900 Subject: [PATCH 408/687] Relocated swap function to base Daylight Saving Time class. Added additional years that aren't observed or deviated. Signed-off-by: Sacha Telgenhof --- tests/Denmark/DaylightSavingTime.php | 11 +++++++++++ tests/Denmark/SummerTimeTest.php | 5 +++++ tests/Denmark/WinterTimeTest.php | 11 ----------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/Denmark/DaylightSavingTime.php b/tests/Denmark/DaylightSavingTime.php index af2317281..b774fdc81 100644 --- a/tests/Denmark/DaylightSavingTime.php +++ b/tests/Denmark/DaylightSavingTime.php @@ -36,4 +36,15 @@ public function __construct() parent::__construct(); } + + /* Swaps the observation from observed to unobserved for the given years */ + protected function swapObservation(array $years): void + { + foreach ($years as $y) { + $this->observedYears[] = $y; + if (false !== ($key = array_search($y, $this->unobservedYears, true))) { + unset($this->unobservedYears[(int) $key]); + } + } + } } diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 6f814a14f..c0122df6d 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -53,11 +53,16 @@ public function __construct() // In version 2022f of the tz db, a correction for some years weere made for the summertime // transitions. See: https://github.com/eggert/tz/blob/2022f/europe if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { + $this->swapObservation([1917, 1918, 1949]); + $this->deviantTransitions[1916] = '1916-04-30'; + $this->deviantTransitions[1917] = '1917-04-16'; + $this->deviantTransitions[1918] = '1918-04-15'; $this->deviantTransitions[1940] = '1940-04-01'; $this->deviantTransitions[1946] = '1946-04-14'; $this->deviantTransitions[1947] = '1947-04-06'; $this->deviantTransitions[1948] = '1948-04-18'; + $this->deviantTransitions[1949] = '1949-04-10'; } } diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 6ec3f8884..654de6c70 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -121,15 +121,4 @@ public function testHolidayType(): void Holiday::TYPE_SEASON ); } - - /* Swaps the observation from observed to unobserved for the given years */ - private function swapObservation(array $years): void - { - foreach ($years as $y) { - $this->observedYears[] = $y; - if (false !== ($key = array_search($y, $this->unobservedYears, true))) { - unset($this->unobservedYears[(int) $key]); - } - } - } } From 1e26e5c2c71c2d8a4255137da7a35f9e75e92a7e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 18:23:15 +0900 Subject: [PATCH 409/687] Changed links to GitHub workflow badges as the route pattern has been changed (See: https://github.com/badges/shields/issues/8671). Signed-off-by: Sacha Telgenhof --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 66ab67363..b0a5f41c3 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![GitHub Release](https://img.shields.io/github/release/azuyalabs/yasumi.svg?style=flat-square)](https://github.com/azuyalabs/yasumi/releases) [![Total Downloads](https://img.shields.io/packagist/dt/azuyalabs/yasumi.svg?style=flat-square)](https://packagist.org/packages/azuyalabs/yasumi) -![Coding Standard](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Coding%20Standard?label=Coding%20Standard&style=flat-square) -![Static analysis](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Static%20analysis?label=Static%20analysis&style=flat-square) -![Testing](https://img.shields.io/github/workflow/status/azuyalabs/yasumi/Testing?label=Testing&style=flat-square) +![Coding Standard](https://img.shields.io/github/actions/workflow/status/azuyalabs/yasumi/coding-standard.yml?label=Coding%20Standard&style=flat-square) +![Static analysis](https://img.shields.io/github/actions/workflow/status/azuyalabs/yasumi/static-analysis.yml?label=Static%20analysis&style=flat-square) +![Testing](https://img.shields.io/github/actions/workflow/status/azuyalabs/yasumi/testing.yml?label=Testing&style=flat-square) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) # Introduction From ca61eb105c7052ea3c52edca8166edd1750dd020 Mon Sep 17 00:00:00 2001 From: Anna Damm Date: Tue, 27 Dec 2022 10:29:11 +0100 Subject: [PATCH 410/687] [fix-296] make epiphany an official holiday in German states, fixes #296 (#297) Co-authored-by: Anna Damm --- src/Yasumi/Provider/Germany/BadenWurttemberg.php | 2 +- src/Yasumi/Provider/Germany/Bavaria.php | 2 +- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 3 +-- tests/Germany/BadenWurttemberg/BadenWurttembergTest.php | 3 ++- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/Bavaria/BavariaTest.php | 3 ++- tests/Germany/Bavaria/EpiphanyTest.php | 2 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 3 ++- 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 4f84b2897..1469ff882 100644 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -49,7 +49,7 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index d043b918a..60e704bc2 100644 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -48,7 +48,7 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php index b79334166..0ed166df6 100644 --- a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php +++ b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php @@ -16,7 +16,6 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; -use Yasumi\Holiday; use Yasumi\Provider\Germany; /** @@ -49,7 +48,7 @@ public function initialize(): void parent::initialize(); // Add custom Christian holidays - $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); + $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); $this->calculateReformationDay(); } diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 9d66930c7..c59dc3749 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -44,6 +44,7 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'newYearsDay', + 'epiphany', 'goodFriday', 'easterMonday', 'internationalWorkersDay', @@ -87,7 +88,7 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - ['epiphany'], + [], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 1793e204b..ed3a94610 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -74,6 +74,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/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index de32705eb..213ad5025 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -44,6 +44,7 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'newYearsDay', + 'epiphany', 'goodFriday', 'easterMonday', 'internationalWorkersDay', @@ -87,7 +88,7 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - ['epiphany'], + [], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index c3f909c0d..d9085e38c 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -74,6 +74,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/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index 5af23f22a..a1ae96a95 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -74,6 +74,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/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index 0662f0272..71c95be57 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -44,6 +44,7 @@ public function testOfficialHolidays(): void { $holidays = [ 'newYearsDay', + 'epiphany', 'goodFriday', 'easterMonday', 'internationalWorkersDay', @@ -93,7 +94,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays(['epiphany'], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** From 5c39dde098a817b22d3d331550c24e439562967a Mon Sep 17 00:00:00 2001 From: FuzzyWuzzyFraggle <113988045+FuzzyWuzzyFraggle@users.noreply.github.com> Date: Tue, 27 Dec 2022 21:57:22 +1100 Subject: [PATCH 411/687] Add National Day of Mourning for Australia (#288) * Add national Day of Mourning for Australia Co-authored-by: Kurt Ravn --- CHANGELOG.md | 1 + src/Yasumi/Provider/Australia.php | 29 +++++ tests/Australia/AustraliaTest.php | 10 +- .../AustralianCapitalTerritoryTest.php | 10 +- .../NationalDayOfMourningTest.php | 22 ++++ tests/Australia/NationalDayOfMourningTest.php | 111 ++++++++++++++++++ .../NationalDayOfMourningTest.php | 22 ++++ .../NewSouthWales/NewSouthWalesTest.php | 10 +- .../NationalDayOfMourningTest.php | 22 ++++ .../NorthernTerritoryTest.php | 10 +- .../Queensland/Brisbane/BrisbaneTest.php | 8 +- .../Brisbane/NationalDayOfMourningTest.php | 22 ++++ .../Queensland/NationalDayOfMourningTest.php | 22 ++++ tests/Australia/Queensland/QueenslandTest.php | 8 +- .../NationalDayOfMourningTest.php | 22 ++++ .../SouthAustralia/SouthAustraliaTest.php | 8 +- .../CentralNorth/CentralNorthTest.php | 8 +- .../NationalDayOfMourningTest.php | 22 ++++ .../FlindersIsland/FlindersIslandTest.php | 8 +- .../NationalDayOfMourningTest.php | 22 ++++ .../Tasmania/KingIsland/KingIslandTest.php | 8 +- .../KingIsland/NationalDayOfMourningTest.php | 22 ++++ .../Tasmania/NationalDayOfMourningTest.php | 22 ++++ .../Northeast/NationalDayOfMourningTest.php | 22 ++++ .../Tasmania/Northeast/NortheastTest.php | 8 +- .../CircularHead/CircularHeadTest.php | 8 +- .../NationalDayOfMourningTest.php | 22 ++++ .../Northwest/NationalDayOfMourningTest.php | 22 ++++ .../Tasmania/Northwest/NorthwestTest.php | 8 +- .../South/NationalDayOfMourningTest.php | 22 ++++ tests/Australia/Tasmania/South/SouthTest.php | 8 +- .../Southeast/NationalDayOfMourningTest.php | 22 ++++ .../South/Southeast/SoutheastTest.php | 8 +- tests/Australia/Tasmania/TasmaniaTest.php | 8 +- .../Victoria/NationalDayOfMourningTest.php | 22 ++++ tests/Australia/Victoria/VictoriaTest.php | 8 +- .../NationalDayOfMourningTest.php | 22 ++++ .../WesternAustralia/WesternAustraliaTest.php | 8 +- 38 files changed, 631 insertions(+), 36 deletions(-) create mode 100644 tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php create mode 100644 tests/Australia/NationalDayOfMourningTest.php create mode 100644 tests/Australia/NewSouthWales/NationalDayOfMourningTest.php create mode 100644 tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Queensland/NationalDayOfMourningTest.php create mode 100644 tests/Australia/SouthAustralia/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/South/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php create mode 100644 tests/Australia/Victoria/NationalDayOfMourningTest.php create mode 100644 tests/Australia/WesternAustralia/NationalDayOfMourningTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b32297a8..f22c5b9dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ to [Semantic Versioning](https://semver.org). - Added all examples as shown on the documentation site as a convenience to developers who like to have all information in a single place. - Added bank holiday for Queen Elizabeth II’s State Funeral on 19 September 2022 to United Kingdom +- Added Public Holiday National Day of Mourning (for Queen Elizabeth II) on 22 September 2022 to Australia ### Changed diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 4494ae9ad..f717f2d21 100644 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -47,6 +47,7 @@ public function initialize(): void $this->calculateNewYearHolidays(); $this->calculateAustraliaDay(); $this->calculateAnzacDay(); + $this->calculateNationalDayOfMourning(); // Add Christian holidays $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); @@ -202,6 +203,34 @@ private function calculateAnzacDay(): void } } + /** + * National Day of Mourning. + * + * An additional, once off, national public holiday was proclaimed on the 10th of September 2022, to be observed on the 22nd of September 2022, as a + * National day of mourning for the passing of Queen Elizabeth II + * + * @see https://www.pm.gov.au/media/commemorating-her-majesty-queen-elizabeth-ii + * @see https://www.timeanddate.com/holidays/australia/national-day-of-mourning + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + private function calculateNationalDayOfMourning(): void + { + if (2022 !== $this->year) { + return; + } + + $this->addHoliday(new Holiday( + 'nationalDayOfMourning', + ['en' => 'National Day of Mourning'], + new DateTime("$this->year-9-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } + /** * Christmas Day / Boxing Day. * diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 6717418ef..fd8edf95c 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -50,7 +50,13 @@ public function testOfficialHolidays(): void 'secondChristmasDay', 'australiaDay', 'anzacDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index f892b3802..db5cff015 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -56,7 +56,13 @@ public function testOfficialHolidays(): void 'labourDay', 'canberraDay', 'reconciliationDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php b/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php new file mode 100644 index 000000000..68d57b5b5 --- /dev/null +++ b/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\AustralianCapitalTerritory; + +/** + * Class for testing National Day of Mourning in Australian Capital Territory (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/NationalDayOfMourningTest.php b/tests/Australia/NationalDayOfMourningTest.php new file mode 100644 index 000000000..1bbffce4b --- /dev/null +++ b/tests/Australia/NationalDayOfMourningTest.php @@ -0,0 +1,111 @@ + + */ + +namespace Yasumi\tests\Australia; + +use DateTime; +use DateTimeZone; +use Exception; +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing National Day of Mourning in Australia. + */ +class NationalDayOfMourningTest extends AustraliaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'nationalDayOfMourning'; + + /** + * The year in which the holiday was first established. + */ + public const ACTIVE_YEAR = 2022; + + /** + * The date on which the holiday occurred. + */ + public const ACTIVE_DATE = '2022-9-22'; + + /** + * Tests the holiday defined in this test. + * + * @throws Exception + */ + public function testHoliday(): void + { + $this->assertHoliday( + $this->region, + self::HOLIDAY, + self::ACTIVE_YEAR, + new DateTime(self::ACTIVE_DATE, new DateTimeZone($this->timezone)) + ); + } + + /** + * Tests the holiday defined in this test before the year in which it occurred. + * + * @throws Exception + */ + public function testHolidayBeforeActive(): void + { + $this->assertNotHoliday( + $this->region, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + ); + } + + /** + * Tests the holiday defined in this test after the year in which it occurred. + * + * @throws Exception + */ + public function testHolidayAfterActive(): void + { + $this->assertNotHoliday( + $this->region, + self::HOLIDAY, + $this->generateRandomYear(self::ACTIVE_YEAR + 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + $this->region, + self::HOLIDAY, + self::ACTIVE_YEAR, + [self::LOCALE => 'National Day of Mourning'] + ); + } + + /** + * Tests type of the holiday defined in this test. + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + $this->region, + self::HOLIDAY, + self::ACTIVE_YEAR, + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php b/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php new file mode 100644 index 000000000..3e657b683 --- /dev/null +++ b/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\NewSouthWales; + +/** + * Class for testing National Day of Mourning in New South Wales (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index 85b790a86..132381933 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $holidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,13 @@ public function testOfficialHolidays(): void 'easterSaturday', 'queensBirthday', 'labourDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2022 == $this->year) { + $holidays[] = 'nationalDayOfMourning'; + } + + $this->assertDefinedHolidays($holidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php b/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php new file mode 100644 index 000000000..3b5026b43 --- /dev/null +++ b/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\NorthernTerritory; + +/** + * Class for testing National Day of Mourning in Northern Territory (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index 86b91e69c..ffdcd9e57 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,13 @@ public function testOfficialHolidays(): void 'queensBirthday', 'mayDay', 'picnicDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index dcfc4088d..3ae9abf1b 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -53,7 +53,11 @@ public function testOfficialHolidays(): void 'queensBirthday', 'labourDay', 'peoplesDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php b/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php new file mode 100644 index 000000000..92994c361 --- /dev/null +++ b/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Queensland\Brisbane; + +/** + * Class for testing National Day of Mourning in Brisbane (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Queensland\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Queensland/NationalDayOfMourningTest.php b/tests/Australia/Queensland/NationalDayOfMourningTest.php new file mode 100644 index 000000000..8e0c98e57 --- /dev/null +++ b/tests/Australia/Queensland/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Queensland; + +/** + * Class for testing National Day of Mourning in Queensland (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index fd5a2a6ab..fd4df7f22 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -52,7 +52,11 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'labourDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php b/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php new file mode 100644 index 000000000..2a5ca8ce5 --- /dev/null +++ b/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\SouthAustralia; + +/** + * Class for testing National Day of Mourning in South Australia (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index e42e8b046..ef94641ac 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'queensBirthday', 'labourDay', 'adelaideCup', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 533138c9c..342f54a73 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'devonportShow', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php new file mode 100644 index 000000000..96c6e4455 --- /dev/null +++ b/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\CentralNorth; + +/** + * Class for testing National Day of Mourning in central north Tasmania (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 78f438b26..d2ef9122b 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'flindersIslandShow', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php new file mode 100644 index 000000000..b3be192b0 --- /dev/null +++ b/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; + +/** + * Class for testing National Day of Mourning in Flinders Island (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index 2e9175a67..b5d8fcd72 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'kingIslandShow', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php new file mode 100644 index 000000000..8f68e4ae9 --- /dev/null +++ b/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\KingIsland; + +/** + * Class for testing National Day of Mourning in King Island (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/NationalDayOfMourningTest.php new file mode 100644 index 000000000..f2a4892ab --- /dev/null +++ b/tests/Australia/Tasmania/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania; + +/** + * Class for testing National Day of Mourning in Tasmania (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php new file mode 100644 index 000000000..c0536189c --- /dev/null +++ b/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\Northeast; + +/** + * Class for testing National Day of Mourning in northeastern Tasmania (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index 50c96a6ca..acd2fe776 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'launcestonShow', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 4c2d1d13d..713b544ea 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -41,7 +41,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,6 +54,10 @@ public function testOfficialHolidays(): void 'recreationDay', 'burnieShow', 'agfest', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php new file mode 100644 index 000000000..6f7f919bb --- /dev/null +++ b/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; + +/** + * Class for testing National Day of Mourning in Circular Head (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php new file mode 100644 index 000000000..4f29fe33c --- /dev/null +++ b/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\Northwest; + +/** + * Class for testing National Day of Mourning in northwestern Tasmania (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index d23c9e3b2..6e78273f5 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'burnieShow', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php new file mode 100644 index 000000000..d967d135e --- /dev/null +++ b/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\South; + +/** + * Class for testing National Day of Mourning in southern Tasmania (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index a113a66b0..5c52b9880 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -54,7 +54,11 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'hobartShow', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php new file mode 100644 index 000000000..1ccfaac0e --- /dev/null +++ b/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Tasmania\South\Southeast; + +/** + * Class for testing National Day of Mourning in southeastern Tasmania (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\South\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index abc999e9a..430dfdac9 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -41,7 +41,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -53,6 +53,10 @@ public function testOfficialHolidays(): void 'eightHourDay', 'hobartShow', 'hobartRegatta', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 15eb83217..9699a3843 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -53,7 +53,11 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/Victoria/NationalDayOfMourningTest.php b/tests/Australia/Victoria/NationalDayOfMourningTest.php new file mode 100644 index 000000000..f41ddd1d3 --- /dev/null +++ b/tests/Australia/Victoria/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\Victoria; + +/** + * Class for testing National Day of Mourning in Victoria (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index bdc4a752f..0f2290f0e 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -56,7 +56,11 @@ public function testOfficialHolidays(): void 'labourDay', 'aflGrandFinalFriday', 'melbourneCup', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php b/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php new file mode 100644 index 000000000..38fdba9d6 --- /dev/null +++ b/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\tests\Australia\WesternAustralia; + +/** + * Class for testing National Day of Mourning in Western Australia (Australia).. + */ +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index 7ccce6489..853a3b594 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { - $this->assertDefinedHolidays([ + $expectedHolidays = [ 'newYearsDay', 'goodFriday', 'easterMonday', @@ -53,7 +53,11 @@ public function testOfficialHolidays(): void 'queensBirthday', 'labourDay', 'westernAustraliaDay', - ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); + ]; + if (2022 == $this->year) { + $expectedHolidays[] = 'nationalDayOfMourning'; + } + $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); } /** From 766676d74d8e5e4d43387a99f6979e92a5308744 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 20:06:20 +0900 Subject: [PATCH 412/687] Fixed DateTime classes to be called from the global namespace. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia.php | 2 +- tests/Australia/NationalDayOfMourningTest.php | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index f717f2d21..6035e20ce 100644 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -225,7 +225,7 @@ private function calculateNationalDayOfMourning(): void $this->addHoliday(new Holiday( 'nationalDayOfMourning', ['en' => 'National Day of Mourning'], - new DateTime("$this->year-9-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("$this->year-9-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/tests/Australia/NationalDayOfMourningTest.php b/tests/Australia/NationalDayOfMourningTest.php index 1bbffce4b..594f71ba9 100644 --- a/tests/Australia/NationalDayOfMourningTest.php +++ b/tests/Australia/NationalDayOfMourningTest.php @@ -14,9 +14,6 @@ namespace Yasumi\tests\Australia; -use DateTime; -use DateTimeZone; -use Exception; use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; @@ -43,7 +40,7 @@ class NationalDayOfMourningTest extends AustraliaBaseTestCase implements Holiday /** * Tests the holiday defined in this test. * - * @throws Exception + * @throws \Exception */ public function testHoliday(): void { @@ -51,14 +48,14 @@ public function testHoliday(): void $this->region, self::HOLIDAY, self::ACTIVE_YEAR, - new DateTime(self::ACTIVE_DATE, new DateTimeZone($this->timezone)) + new \DateTime(self::ACTIVE_DATE, new \DateTimeZone($this->timezone)) ); } /** * Tests the holiday defined in this test before the year in which it occurred. * - * @throws Exception + * @throws \Exception */ public function testHolidayBeforeActive(): void { @@ -72,7 +69,7 @@ public function testHolidayBeforeActive(): void /** * Tests the holiday defined in this test after the year in which it occurred. * - * @throws Exception + * @throws \Exception */ public function testHolidayAfterActive(): void { From 0d8d0613eb7acb8c7e1d27837932cf7006920f98 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 27 Dec 2022 12:41:21 +0100 Subject: [PATCH 413/687] Switched from getShortName to getName for reflection class (#292) Co-authored-by: Alexander Bachmann --- CHANGELOG.md | 3 +++ src/Yasumi/Provider/AbstractProvider.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f22c5b9dc..870c0561b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,9 @@ to [Semantic Versioning](https://semver.org). statistic analysers. - Included the data type for test methods that return an array. - Liberation day for the Netherlands is only an official holiday every 5 years [\#280](https://github.com/azuyalabs/yasumi/pull/280). +- Switched from `getShortName()` to `getName()` for the ReflectionClass created by the method `anotherTime()` in the `AbstractProvider`.\ + Using `getShortName` could result in a `ProviderNotFoundException` for some custom holiday providers, since the namespace is not fully qualified.\ + This happened, if you would create a custom holiday provider in your own project's namespace implementing the `next()` or `previous()` method from the `AbstractProvider`. ### Deprecated diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 538059e34..741596d47 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -332,6 +332,6 @@ private function anotherTime(int $year, string $key): ?Holiday // Get calling class name $hReflectionClass = new \ReflectionClass(\get_class($this)); - return Yasumi::create($hReflectionClass->getShortName(), $year, $this->locale)->getHoliday($key); + return Yasumi::create($hReflectionClass->getName(), $year, $this->locale)->getHoliday($key); } } From 0a81bb484bb6d413de16519177e5478f668ec04c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 27 Dec 2022 21:40:31 +0900 Subject: [PATCH 414/687] Renamed SummerTime test to be consistent with the same of Denmark. Simplified the tests for summertime. Signed-off-by: Sacha Telgenhof --- .../{SummertimeTest.php => SummerTimeTest.php} | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) rename tests/Netherlands/{SummertimeTest.php => SummerTimeTest.php} (80%) diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummerTimeTest.php similarity index 80% rename from tests/Netherlands/SummertimeTest.php rename to tests/Netherlands/SummerTimeTest.php index b1404af9f..8f52ceb49 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummerTimeTest.php @@ -20,7 +20,7 @@ /** * Class for testing Summertime in the Netherlands. */ -final class SummertimeTest extends DaylightSavingTime +final class SummerTimeTest extends DaylightSavingTime { /** The name of the holiday */ public const HOLIDAY = 'summerTime'; @@ -44,20 +44,18 @@ public function testSummertime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - $year = $this->generateRandomYear(1977, 1980); - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new \DateTime("first sunday of april $year", new \DateTimeZone(self::TIMEZONE)) - ); + $year = $this->randomYearFromArray($this->observedYears); + $expected = "first sunday of april $year"; + + if ($year >= 1981) { + $expected = "last sunday of march $year"; + } - $year = $this->generateRandomYear(1981, 2037); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - new \DateTime("last sunday of march $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } From a81952d35030f2675543236d85e4db60c5f655d0 Mon Sep 17 00:00:00 2001 From: Tyler Shuster Date: Tue, 27 Dec 2022 16:12:41 -0800 Subject: [PATCH 415/687] Update Juneteenth with observed dates (#282) Co-authored-by: Sacha Telgenhof --- src/Yasumi/Provider/USA.php | 29 ++++++++++++++++++++++++++--- tests/USA/JuneteenthTest.php | 8 ++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index f291630ef..10d1c511e 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -159,9 +159,32 @@ private function calculateMemorialDay(): void private function calculateJuneteenth(): void { if ($this->year >= 2021) { - $this->addHoliday(new Holiday('juneteenth', [ - 'en' => 'Juneteenth', - ], new \DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + $date = new DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $label = 'Juneteenth'; + + $holiday = new Holiday('juneteenth', [ + 'en' => $label, + ], $date, $this->locale); + $this->addHoliday($holiday); + + $day_of_week = (int) $date->format('w'); + + if (0 === $day_of_week || 6 === $day_of_week) { + $date = clone $holiday; + if (0 === $day_of_week) { + $date->modify('next monday'); + } elseif (6 === $day_of_week) { + $date->modify('previous friday'); + } + $this->addHoliday(new SubstituteHoliday( + $holiday, + [ + 'en' => $label.' (observed)', + ], + $date, + $this->locale + )); + } } } diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index 740278dbc..fde4c0df3 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -56,9 +56,9 @@ public function testJuneteenthOnAfter2021(): void public function testJuneteenthOnAfter2021SubstitutedMonday(): void { $year = 2022; - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:juneteenth', + self::HOLIDAY, $year, new \DateTime("$year-6-20", new \DateTimeZone(self::TIMEZONE)) ); @@ -72,9 +72,9 @@ public function testJuneteenthOnAfter2021SubstitutedMonday(): void public function testJuneteenthOnAfter2021SubstitutedFriday(): void { $year = 2021; - $this->assertHoliday( + $this->assertSubstituteHoliday( self::REGION, - 'substituteHoliday:juneteenth', + self::HOLIDAY, $year, new \DateTime("$year-6-18", new \DateTimeZone(self::TIMEZONE)) ); From 0c65c1ac171d2f5e23de391777308c2d5c0ebeb2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 09:21:46 +0900 Subject: [PATCH 416/687] Fixed DateTime class use to be called from the global namespace. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/USA.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 10d1c511e..c3dd9d080 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -159,7 +159,7 @@ private function calculateMemorialDay(): void private function calculateJuneteenth(): void { if ($this->year >= 2021) { - $date = new DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $label = 'Juneteenth'; $holiday = new Holiday('juneteenth', [ From eae2c0e93cb955dd67d4f80be0fcabf666854592 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 09:40:01 +0900 Subject: [PATCH 417/687] Removed redundant condition. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/USA.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index c3dd9d080..470e7c21e 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -171,11 +171,12 @@ private function calculateJuneteenth(): void if (0 === $day_of_week || 6 === $day_of_week) { $date = clone $holiday; + $date->modify('previous friday'); + if (0 === $day_of_week) { $date->modify('next monday'); - } elseif (6 === $day_of_week) { - $date->modify('previous friday'); } + $this->addHoliday(new SubstituteHoliday( $holiday, [ From 111c2e6931b50d758923ca883aebbc15d83d29f4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 11:37:50 +0900 Subject: [PATCH 418/687] Added additional years that have the transition changed in tz version 2022f. In version 2022f of the tz db, corrections for some years were made for the summertime transitions. Signed-off-by: Sacha Telgenhof --- tests/Netherlands/DaylightSavingTime.php | 11 ++++ tests/Netherlands/SummerTimeTest.php | 66 +++++++++++++++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/tests/Netherlands/DaylightSavingTime.php b/tests/Netherlands/DaylightSavingTime.php index a9f552509..b194382d5 100644 --- a/tests/Netherlands/DaylightSavingTime.php +++ b/tests/Netherlands/DaylightSavingTime.php @@ -36,4 +36,15 @@ public function __construct() parent::__construct(); } + + /* Swaps the observation from observed to unobserved for the given years */ + protected function swapObservation(array $years): void + { + foreach ($years as $y) { + $this->observedYears[] = $y; + if (false !== ($key = array_search($y, $this->unobservedYears, true))) { + unset($this->unobservedYears[(int) $key]); + } + } + } } diff --git a/tests/Netherlands/SummerTimeTest.php b/tests/Netherlands/SummerTimeTest.php index 8f52ceb49..18cec4954 100644 --- a/tests/Netherlands/SummerTimeTest.php +++ b/tests/Netherlands/SummerTimeTest.php @@ -25,14 +25,66 @@ final class SummerTimeTest extends DaylightSavingTime /** The name of the holiday */ public const HOLIDAY = 'summerTime'; + /* List of transition dates that deviate from the known/defined rules. + * PHP derives the transition dates from the tz database which are + * different for some years */ + private array $deviantTransitions = [ + 1916 => '1916-04-30', + 1917 => '1917-04-16', + 1919 => '1919-04-07', + 1918 => '1918-04-01', + 1920 => '1920-04-05', + 1921 => '1921-04-04', + 1922 => '1922-03-26', + 1923 => '1923-06-01', + 1924 => '1924-03-30', + 1925 => '1925-06-05', + 1932 => '1932-05-22', + 1937 => '1937-05-22', + 1943 => '1943-03-29', + 1944 => '1944-04-03', + 1945 => '1945-04-02', + ]; + public function __construct() { parent::__construct(); - // no summertime defined for 1942 + // No summertime defined for 1942 if (false !== ($key = array_search(1942, $this->observedYears, true))) { unset($this->observedYears[(int) $key]); } + + // In version 2022f of the tz db, a correction for some years weere made for the summertime + // transitions. See: https://github.com/eggert/tz/blob/2022f/europe + if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { + $this->swapObservation([1946]); + + $this->deviantTransitions[1918] = '1918-04-15'; + $this->deviantTransitions[1919] = '1919-03-01'; + $this->deviantTransitions[1920] = '1920-02-14'; + $this->deviantTransitions[1921] = '1921-03-14'; + $this->deviantTransitions[1922] = '1922-03-25'; + $this->deviantTransitions[1923] = '1923-04-21'; + $this->deviantTransitions[1924] = '1924-03-29'; + $this->deviantTransitions[1925] = '1925-04-04'; + $this->deviantTransitions[1926] = '1926-04-17'; + $this->deviantTransitions[1927] = '1927-04-09'; + $this->deviantTransitions[1928] = '1928-04-14'; + $this->deviantTransitions[1929] = '1929-04-21'; + $this->deviantTransitions[1931] = '1931-04-19'; + $this->deviantTransitions[1930] = '1930-04-13'; + $this->deviantTransitions[1932] = '1932-04-03'; + $this->deviantTransitions[1933] = '1933-03-26'; + $this->deviantTransitions[1934] = '1934-04-08'; + $this->deviantTransitions[1935] = '1935-03-31'; + $this->deviantTransitions[1936] = '1936-04-19'; + $this->deviantTransitions[1937] = '1937-04-04'; + $this->deviantTransitions[1938] = '1938-03-27'; + $this->deviantTransitions[1939] = '1939-04-16'; + $this->deviantTransitions[1940] = '1940-02-25'; + $this->deviantTransitions[1946] = '1946-05-19'; + } } /** @@ -47,10 +99,22 @@ public function testSummertime(): void $year = $this->randomYearFromArray($this->observedYears); $expected = "first sunday of april $year"; + if ($year >= 1923) { + $expected = "may 15th $year"; + } + + if ($year >= 1943) { + $expected = "first sunday of april $year"; + } + if ($year >= 1981) { $expected = "last sunday of march $year"; } + if (array_key_exists($year, $this->deviantTransitions)) { + $expected = $this->deviantTransitions[$year]; + } + $this->assertHoliday( self::REGION, self::HOLIDAY, From 790f320b3264836767bb85e130ab762e02043156 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 11:48:50 +0900 Subject: [PATCH 419/687] Renamed WinterTime test to be consistent with the same tests of Denmark. Simplified some of the tests for wintertime. Signed-off-by: Sacha Telgenhof --- ...{WintertimeTest.php => WinterTimeTest.php} | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) rename tests/Netherlands/{WintertimeTest.php => WinterTimeTest.php} (69%) diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WinterTimeTest.php similarity index 69% rename from tests/Netherlands/WintertimeTest.php rename to tests/Netherlands/WinterTimeTest.php index f1704116f..5920727cd 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WinterTimeTest.php @@ -1,6 +1,7 @@ observedYears, true))) { unset($this->observedYears[(int) $key]); } + + // In version 2022f of the tz db, a correction for some years weere made for the wintertime + // transitions. See: https://github.com/eggert/tz/blob/2022f/europe + if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { + $this->swapObservation([1946]); + } } /** @@ -42,21 +49,26 @@ public function __construct() public function testWintertime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); + $year = $this->randomYearFromArray($this->observedYears); + $expected = "last sunday of september $year"; - $year = $this->generateRandomYear(1979, 1995); - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new \DateTime("last sunday of september $year", new \DateTimeZone(self::TIMEZONE)) - ); + if ($year >= 1922) { + $expected = "first sunday of october $year"; + } + + if ($year >= 1977) { + $expected = "last sunday of september $year"; + } + + if ($year >= 1996) { + $expected = "last sunday of october $year"; + } - $year = $this->generateRandomYear(1996, 2037); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - new \DateTime("last sunday of october $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) ); } From 1e18c59202a93b120834530eefcca7064775b311 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 12:20:53 +0900 Subject: [PATCH 420/687] Added additional years that have the transition changed in tz version 2022f. In version 2022f of the tz db, corrections for some years were made for the wintertime transitions. Signed-off-by: Sacha Telgenhof --- tests/Netherlands/WinterTimeTest.php | 39 ++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/tests/Netherlands/WinterTimeTest.php b/tests/Netherlands/WinterTimeTest.php index 5920727cd..bc838d1b2 100644 --- a/tests/Netherlands/WinterTimeTest.php +++ b/tests/Netherlands/WinterTimeTest.php @@ -25,11 +25,27 @@ final class WinterTimeTest extends DaylightSavingTime /** The name of the holiday */ public const HOLIDAY = 'winterTime'; + /* List of transition dates that deviate from the known/defined rules. + * PHP derives the transition dates from the tz database which are + * different for some years */ + private array $deviantTransitions = [ + 1916 => '1916-09-30', + 1917 => '1917-09-17', + 1922 => '1922-10-08', + 1933 => '1933-10-08', + 1939 => '1939-10-08', + 1942 => '1942-11-02', + 1943 => '1943-10-04', + 1944 => '1944-10-02', + 1945 => '1945-09-16', + 1978 => '1978-10-01', + ]; + public function __construct() { parent::__construct(); - // no wintertime defined for 1940 + // No wintertime defined for 1940 if (false !== ($key = array_search(1940, $this->observedYears, true))) { unset($this->observedYears[(int) $key]); } @@ -38,6 +54,20 @@ public function __construct() // transitions. See: https://github.com/eggert/tz/blob/2022f/europe if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { $this->swapObservation([1946]); + + $this->deviantTransitions[1918] = '1918-09-16'; + $this->deviantTransitions[1919] = '1919-10-04'; + $this->deviantTransitions[1920] = '1920-10-23'; + $this->deviantTransitions[1921] = '1921-10-25'; + $this->deviantTransitions[1922] = '1922-10-07'; + $this->deviantTransitions[1923] = '1923-10-06'; + $this->deviantTransitions[1924] = '1924-10-04'; + $this->deviantTransitions[1925] = '1925-10-03'; + $this->deviantTransitions[1926] = '1926-10-02'; + $this->deviantTransitions[1927] = '1927-10-01'; + $this->deviantTransitions[1939] = '1939-11-19'; + $this->deviantTransitions[1944] = '1944-09-17'; + $this->deviantTransitions[1946] = '1946-10-07'; } } @@ -49,8 +79,9 @@ public function __construct() public function testWintertime(): void { $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); + $year = $this->randomYearFromArray($this->observedYears); - $expected = "last sunday of september $year"; + $expected = "last monday of september $year"; if ($year >= 1922) { $expected = "first sunday of october $year"; @@ -64,6 +95,10 @@ public function testWintertime(): void $expected = "last sunday of october $year"; } + if (array_key_exists($year, $this->deviantTransitions)) { + $expected = $this->deviantTransitions[$year]; + } + $this->assertHoliday( self::REGION, self::HOLIDAY, From d57cc01bdda56a72497d615fbffb03595379d5e3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 12:24:17 +0900 Subject: [PATCH 421/687] Adjusted transition year check to be inline with the Wintertime conditions. Signed-off-by: Sacha Telgenhof --- tests/Netherlands/SummerTimeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Netherlands/SummerTimeTest.php b/tests/Netherlands/SummerTimeTest.php index 18cec4954..250ae1d4a 100644 --- a/tests/Netherlands/SummerTimeTest.php +++ b/tests/Netherlands/SummerTimeTest.php @@ -99,7 +99,7 @@ public function testSummertime(): void $year = $this->randomYearFromArray($this->observedYears); $expected = "first sunday of april $year"; - if ($year >= 1923) { + if ($year >= 1922) { $expected = "may 15th $year"; } From 0c49a1612fe541debeb9effa39ef7f9cd814b558 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 14:05:41 +0900 Subject: [PATCH 422/687] Added rector rule to refactor code to use early returns (replacing compound conditions). Made code changes follow this new rule. Signed-off-by: Sacha Telgenhof --- rector.php | 1 + src/Yasumi/Provider/AbstractProvider.php | 6 ++- src/Yasumi/Provider/Croatia.php | 16 ++++-- src/Yasumi/Provider/SouthKorea.php | 60 +++++++++++++-------- src/Yasumi/Provider/Spain/BasqueCountry.php | 20 ++++--- src/Yasumi/Translations.php | 13 +++-- src/Yasumi/Yasumi.php | 11 +++- tests/NewZealand/AnzacDayTest.php | 10 +++- tests/NewZealand/WaitangiDayTest.php | 10 +++- 9 files changed, 104 insertions(+), 43 deletions(-) diff --git a/rector.php b/rector.php index b445a189c..0d94d4b15 100644 --- a/rector.php +++ b/rector.php @@ -20,6 +20,7 @@ SetList::PHP_74, SetList::CODE_QUALITY, SetList::TYPE_DECLARATION_STRICT, + SetList::EARLY_RETURN, SetList::DEAD_CODE, ]); }; diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 741596d47..c596166aa 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -129,7 +129,11 @@ public function removeHoliday(string $key): void /** {@inheritdoc} */ public function isWorkingDay(\DateTimeInterface $date): bool { - return !$this->isHoliday($date) && !$this->isWeekendDay($date); + if ($this->isHoliday($date)) { + return false; + } + + return !$this->isWeekendDay($date); } /** {@inheritdoc} */ diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 64465d76b..d1716239b 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -145,12 +145,18 @@ private function calculateHomelandThanksgivingDay(): void */ private function calculateIndependenceDay(): void { - if ($this->year >= 1991 && $this->year < 2020) { - $this->addHoliday(new Holiday('independenceDay', [ - 'en' => 'Independence Day', - 'hr' => 'Dan neovisnosti', - ], new \DateTime("$this->year-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + if ($this->year < 1991) { + return; } + + if ($this->year >= 2020) { + return; + } + + $this->addHoliday(new Holiday('independenceDay', [ + 'en' => 'Independence Day', + 'hr' => 'Dan neovisnosti', + ], new \DateTime("$this->year-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 7f8869763..51ea4f257 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -238,14 +238,20 @@ private function calculateSeollal(): void */ private function calculateBuddhasBirthday(): void { - if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { - $this->addHoliday(new Holiday( - 'buddhasBirthday', - ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'], - new \DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + if ($this->year < 1975) { + return; } + + if (!isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { + return; + } + + $this->addHoliday(new Holiday( + 'buddhasBirthday', + ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'], + new \DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); } /** @@ -380,14 +386,20 @@ private function calculateMemorialDay(): void */ private function calculateConstitutionDay(): void { - if ($this->year >= 1949 && $this->year < 2008) { - $this->addHoliday(new Holiday( - 'constitutionDay', - ['en' => 'Constitution Day', 'ko' => '제헌절'], - new \DateTime("$this->year-7-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + if ($this->year < 1949) { + return; + } + + if ($this->year >= 2008) { + return; } + + $this->addHoliday(new Holiday( + 'constitutionDay', + ['en' => 'Constitution Day', 'ko' => '제헌절'], + new \DateTime("$this->year-7-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); } /** @@ -418,14 +430,20 @@ private function calculateLiberationDay(): void */ private function calculateArmedForcesDay(): void { - if ($this->year >= 1956 && $this->year <= 1990) { - $this->addHoliday(new Holiday( - 'armedForcesDay', - ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], - new \DateTime("$this->year-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + if ($this->year < 1956) { + return; + } + + if ($this->year > 1990) { + return; } + + $this->addHoliday(new Holiday( + 'armedForcesDay', + ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], + new \DateTime("$this->year-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); } /** diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 955811f7a..7870d866e 100644 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -78,13 +78,19 @@ public function initialize(): void */ private function calculateBasqueCountryDay(): void { - if ($this->year >= 2011 && $this->year <= 2013) { - $this->addHoliday(new Holiday( - 'basqueCountryDay', - ['es' => 'Euskadi Eguna'], - new \DateTime("$this->year-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + if ($this->year < 2011) { + return; } + + if ($this->year > 2013) { + return; + } + + $this->addHoliday(new Holiday( + 'basqueCountryDay', + ['es' => 'Euskadi Eguna'], + new \DateTime("$this->year-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); } } diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 6230f199e..d03eb546d 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -60,7 +60,11 @@ public function loadTranslations(string $directoryPath): void $extension = 'php'; foreach (new \DirectoryIterator($directoryPath) as $file) { - if ($file->isDot() || $file->isDir()) { + if ($file->isDot()) { + continue; + } + + if ($file->isDir()) { continue; } @@ -113,8 +117,11 @@ public function addTranslation(string $key, string $locale, string $translation) */ public function getTranslation(string $key, string $locale): ?string { - if (!\array_key_exists($key, $this->translations) - || !\array_key_exists($locale, $this->translations[$key])) { + if (!\array_key_exists($key, $this->translations)) { + return null; + } + + if (!\array_key_exists($locale, $this->translations[$key])) { return null; } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index a68e30bea..e3778d8d6 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -221,14 +221,21 @@ public static function getProviders(): array ), \RecursiveIteratorIterator::SELF_FIRST); foreach ($filesIterator as $file) { - if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( + if ($file->isDir()) { + continue; + } + + if ('php' !== $file->getExtension()) { + continue; + } + + if (\in_array( $file->getBasename('.php'), self::$ignoredProvider, true )) { continue; } - $quotedDs = preg_quote(DIRECTORY_SEPARATOR, ''); $provider = preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index d9cf97cf5..6ff2d0be8 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -71,9 +71,15 @@ public function HolidayDataProvider(): array { return $this->generateRandomDatesWithModifier(4, 25, function ($year, \DateTime $date): void { // 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'); + if ($year < 2015) { + return; } + + if (!$this->isWeekend($date)) { + return; + } + + $date->modify('next monday'); }, 100, self::ESTABLISHMENT_YEAR, self::TIMEZONE); } diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 4db3a70ac..08f87682a 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -101,9 +101,15 @@ public function HolidayDataProvider(): array { return $this->generateRandomDatesWithModifier(2, 06, function ($year, \DateTime $date): void { // 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'); + if ($year < 2015) { + return; } + + if (!$this->isWeekend($date)) { + return; + } + + $date->modify('next monday'); }, 100, self::ESTABLISHMENT_YEAR, self::TIMEZONE); } } From 50f4eefc372c923b74e175d4ba616df28cf83644 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 14:20:46 +0900 Subject: [PATCH 423/687] Simplified some checks on empty arrays. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 2 +- src/Yasumi/Yasumi.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index f65e705f9..f7d9fda44 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -115,7 +115,7 @@ public function __construct( } // Load internal locales variable - if (empty(self::$locales)) { + if ([] === self::$locales) { self::$locales = Yasumi::getAvailableLocales(); } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index e3778d8d6..6dbc6ff42 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -137,7 +137,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, } // Load internal locales variable - if (empty(self::$locales)) { + if ([] === self::$locales) { self::$locales = self::getAvailableLocales(); } From b2c178f58b586e0bc349d941d1dc87f2f628a955 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 18:15:11 +0900 Subject: [PATCH 424/687] Replaced deprecated strict type rule. Updated annotations with missing possible null value. Signed-off-by: Sacha Telgenhof --- rector.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rector.php b/rector.php index 0d94d4b15..45f0106d5 100644 --- a/rector.php +++ b/rector.php @@ -17,10 +17,10 @@ // sets of rules $rectorConfig->sets([ - SetList::PHP_74, SetList::CODE_QUALITY, - SetList::TYPE_DECLARATION_STRICT, - SetList::EARLY_RETURN, SetList::DEAD_CODE, + SetList::EARLY_RETURN, + SetList::PHP_74, + SetList::TYPE_DECLARATION, ]); }; From 5cf555c8eb06a4bcf3618e75191847026a6ecd12 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 18:17:39 +0900 Subject: [PATCH 425/687] Updated annotations with missing possible null value. Code style formatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php index 9aead9d21..823b1309f 100644 --- a/src/Yasumi/Provider/DateTimeZoneFactory.php +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -21,7 +21,7 @@ */ final class DateTimeZoneFactory { - /** @var array */ + /** @var array|null */ private static ?array $dateTimeZones = null; public static function getDateTimeZone(string $timezone): \DateTimeZone diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index c6c705ba4..6ba9c6846 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -51,11 +51,11 @@ public function testSaturdaySubstitution(): void /** * 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 $key string the key of the holiday to be checked against - * @param int $year holiday calendar year - * @param \DateTimeInterface $expectedOfficial the official date to be checked against - * @param \DateTimeImmutable $expectedSubstitution the substituted 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 $key string the key of the holiday to be checked against + * @param int $year holiday calendar year + * @param \DateTimeInterface $expectedOfficial the official date to be checked against + * @param \DateTimeImmutable|null $expectedSubstitution the substituted date to be checked against */ public function assertHolidayWithSubstitution( string $provider, From f1c8855a9373e8137a5840dcc48a7eb7f6aca2e8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 28 Dec 2022 21:09:18 +0900 Subject: [PATCH 426/687] In Japan, Marine Day was rescheduled to July 23 as the 2020 Tokyo Olypmics took place. The rescheduled Marine Day for 2021 was included, but not the original rescheduled day for 2020. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 2 ++ src/Yasumi/Provider/Japan.php | 38 +++++++++++++++++++++-------------- tests/Japan/MarineDayTest.php | 34 +++++++++++++++++++++---------- 3 files changed, 48 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870c0561b..f0b762462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ to [Semantic Versioning](https://semver.org). information in a single place. - Added bank holiday for Queen Elizabeth II’s State Funeral on 19 September 2022 to United Kingdom - Added Public Holiday National Day of Mourning (for Queen Elizabeth II) on 22 September 2022 to Australia +- In Japan, Marine Day was rescheduled to July 23 as the 2020 Tokyo Olypmics took place. The rescheduled Marine + Day for 2021 was included, but not the original rescheduled day for 2020. ### Changed diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 1261a073f..e23d3f6fe 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -373,24 +373,32 @@ private function calculateGreeneryDay(): void */ private function calculateMarineDay(): void { - $date = null; - if (2021 === $this->year) { - // For Olympic 2021 Tokyo (rescheduled due to the COVID-19 pandemic) - $date = new \DateTime("$this->year-7-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } elseif ($this->year >= 2003) { - $date = new \DateTime("third monday of july $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } elseif ($this->year >= 1996) { - $date = new \DateTime("$this->year-7-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + if (1996 > $this->year) { + return; } - if ($date instanceof \DateTimeInterface) { - $this->addHoliday(new Holiday( - 'marineDay', - ['en' => 'Marine Day', 'ja' => '海の日'], - $date, - $this->locale - )); + $date = "$this->year-7-20"; + + if ($this->year >= 2003) { + $date = "third monday of july $this->year"; + } + + if (2020 === $this->year) { + // For the 2020 Tokyo Olympics, Marine Day was rescheduled. + $date = "$this->year-7-23"; } + + if (2021 === $this->year) { + // Due to the COVID-19 pandemic, the 2020 Tokyo Olympics were rescheduled and hence Marine Day as well. + $date = "$this->year-7-22"; + } + + $this->addHoliday(new Holiday( + 'marineDay', + ['en' => 'Marine Day', 'ja' => '海の日'], + new \DateTime($date, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); } /** diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index e200b5e51..d6617b8e3 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -17,24 +17,36 @@ use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; -/** - * Class for testing Marine Day in Japan. - */ -class MarineDayTest extends JapanBaseTestCase implements HolidayTestCase +final class MarineDayTest extends JapanBaseTestCase implements HolidayTestCase { - /** - * The name of the holiday. - */ public const HOLIDAY = 'marineDay'; + // The year in which the holiday was first established. + public const ESTABLISHMENT_YEAR = 1996; + /** - * The year in which the holiday was first established. + * Tests Marine Day in 2020. Marine Day in 2020 is July 23th for rescheduled Olympic Games after COVID-19. + * + * @see https://en.wikipedia.org/wiki/Marine_Day + * + * @throws \Exception */ - public const ESTABLISHMENT_YEAR = 1996; + public function testMarineDayIn2020(): void + { + $year = 2020; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-7-23", new \DateTimeZone(self::TIMEZONE)) + ); + } /** * Tests Marine Day in 2021. Marine Day in 2021 is July 22th for rescheduled Olympic Games after COVID-19. * + * @see https://en.wikipedia.org/wiki/Marine_Day + * * @throws \Exception */ public function testMarineDayIn2021(): void @@ -58,8 +70,8 @@ public function testMarineDayOnAfter2003(): void { $year = $this->generateRandomYear(2004); - if (2021 === $year) { - $this->testMarineDayIn2021(); + if (in_array($year, [2020, 2021])) { + return; } $this->assertHoliday( From d13248c449bdaf983af24e67af3ebfcd3f821e36 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 29 Dec 2022 16:57:31 +0900 Subject: [PATCH 427/687] Removed redundant type check as the date parameter is type-hinted. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 6dbc6ff42..710b4d915 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -81,9 +81,6 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$date instanceof \DateTimeInterface) { - throw new \RuntimeException('unable to perform addition'); - } if (!$provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); @@ -281,9 +278,6 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$date instanceof \DateTimeInterface) { - throw new \RuntimeException('unable to perform subtraction'); - } if (!$provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); From 737b53f533598b366e5786ed59404450985ee604 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 29 Dec 2022 22:00:38 +0900 Subject: [PATCH 428/687] Exclude the examples from analysis. Signed-off-by: Sacha Telgenhof --- .phan/config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.phan/config.php b/.phan/config.php index dceda84d5..242a55d5c 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -291,7 +291,8 @@ // should be added to the `directory_list` as well as // to `exclude_analysis_directory_list`. 'exclude_analysis_directory_list' => [ - 'vendor/', + 'vendor/', + 'examples/' ], // Enable this to enable checks of require/include statements referring to valid paths. From 670f6ae073360fa07753887909325c46467ab28d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 1 Jan 2023 13:59:30 +0900 Subject: [PATCH 429/687] Updated copyright year. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 2 +- LICENSE | 2 +- phpunit.xml.dist | 2 +- psalm.xml.dist | 2 +- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidDateException.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- src/Yasumi/Exception/MissingTranslationException.php | 2 +- src/Yasumi/Exception/ProviderNotFoundException.php | 2 +- src/Yasumi/Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 2 +- 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/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Argentina.php | 2 +- src/Yasumi/Provider/Australia.php | 2 +- src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php | 2 +- src/Yasumi/Provider/Australia/NewSouthWales.php | 2 +- src/Yasumi/Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/KingIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northeast.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northwest.php | 2 +- .../Provider/Australia/Tasmania/Northwest/CircularHead.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 2 +- src/Yasumi/Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Canada.php | 2 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/BritishColumbia.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NewBrunswick.php | 2 +- src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php | 2 +- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Ontario.php | 2 +- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/CommonHolidays.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 2 +- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Provider/Denmark.php | 2 +- src/Yasumi/Provider/Estonia.php | 2 +- src/Yasumi/Provider/Finland.php | 2 +- 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/Georgia.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 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 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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/Turkey.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.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/allSoulsDay.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 +- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- src/Yasumi/data/translations/canadaDay.php | 2 +- src/Yasumi/data/translations/carnationRevolutionDay.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 2 +- src/Yasumi/data/translations/christmasEve.php | 2 +- src/Yasumi/data/translations/civicHoliday.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- src/Yasumi/data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/data/translations/dayOfLiberation.php | 2 +- src/Yasumi/data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/discoveryDay.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/familyDay.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goldCupParadeDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- src/Yasumi/data/translations/heritageDay.php | 2 +- src/Yasumi/data/translations/immaculateConception.php | 2 +- src/Yasumi/data/translations/internationalWomensDay.php | 2 +- src/Yasumi/data/translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/islanderDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/louisRielDay.php | 2 +- src/Yasumi/data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/natalHoliday.php | 2 +- src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php | 2 +- src/Yasumi/data/translations/nationalPatriotsDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/novaScotiaHeritageDay.php | 2 +- src/Yasumi/data/translations/orangemensDay.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/plebisciteDay.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- src/Yasumi/data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/queensBirthday.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- src/Yasumi/data/translations/remembranceDay.php | 2 +- src/Yasumi/data/translations/restorationOfIndepence.php | 2 +- src/Yasumi/data/translations/saintJeanBaptisteDay.php | 2 +- src/Yasumi/data/translations/saskatchewanDay.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stFloriansDay.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/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/terryFoxDay.php | 2 +- src/Yasumi/data/translations/thanksgivingDay.php | 2 +- src/Yasumi/data/translations/truthAndReconciliationDay.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- src/Yasumi/data/translations/victoriaDay.php | 2 +- src/Yasumi/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 +- src/Yasumi/data/translations/yukonHeritageDay.php | 2 +- tests/Argentina/ArgentinaBaseTestCase.php | 2 +- tests/Argentina/ArgentinaTest.php | 2 +- tests/Argentina/CarnavalMondayTest.php | 2 +- tests/Argentina/CarnavalTuesdayTest.php | 2 +- tests/Argentina/ChristmasDayTest.php | 2 +- tests/Argentina/EasterTest.php | 2 +- tests/Argentina/FlagDayTest.php | 2 +- tests/Argentina/GeneralJoseSanMartinDayTest.php | 2 +- tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php | 2 +- tests/Argentina/GoodFridayTest.php | 2 +- tests/Argentina/ImmaculateConceptionDayTest.php | 2 +- tests/Argentina/IndependenceDayTest.php | 2 +- tests/Argentina/InternationalWorkersDayTest.php | 2 +- tests/Argentina/MalvinasDayTest.php | 2 +- tests/Argentina/MayRevolutionTest.php | 2 +- tests/Argentina/NationalSovereigntyDayTest.php | 2 +- tests/Argentina/NewYearsDayTest.php | 2 +- tests/Argentina/RaceDayTest.php | 2 +- tests/Argentina/RemembranceDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php | 2 +- .../AustralianCapitalTerritoryBaseTestCase.php | 2 +- .../AustralianCapitalTerritoryTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php | 2 +- .../Australia/AustralianCapitalTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/LabourDayTest.php | 2 +- .../AustralianCapitalTerritory/NationalDayOfMourningTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php | 2 +- .../Australia/AustralianCapitalTerritory/QueensBirthdayTest.php | 2 +- .../AustralianCapitalTerritory/ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NationalDayOfMourningTest.php | 2 +- tests/Australia/NewSouthWales/AnzacDayTest.php | 2 +- tests/Australia/NewSouthWales/AustraliaDayTest.php | 2 +- tests/Australia/NewSouthWales/BankHolidayTest.php | 2 +- tests/Australia/NewSouthWales/BoxingDayTest.php | 2 +- tests/Australia/NewSouthWales/ChristmasDayTest.php | 2 +- tests/Australia/NewSouthWales/EasterMondayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSaturdayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSundayTest.php | 2 +- tests/Australia/NewSouthWales/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/LabourDayTest.php | 2 +- tests/Australia/NewSouthWales/NationalDayOfMourningTest.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 2 +- tests/Australia/NewSouthWales/NewYearsDayTest.php | 2 +- tests/Australia/NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/NorthernTerritory/AnzacDayTest.php | 2 +- tests/Australia/NorthernTerritory/AustraliaDayTest.php | 2 +- tests/Australia/NorthernTerritory/BoxingDayTest.php | 2 +- tests/Australia/NorthernTerritory/ChristmasDayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterMondayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/NorthernTerritory/GoodFridayTest.php | 2 +- tests/Australia/NorthernTerritory/MayDayTest.php | 2 +- tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php | 2 +- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 2 +- .../NorthernTerritory/NorthernTerritoryBaseTestCase.php | 2 +- tests/Australia/NorthernTerritory/NorthernTerritoryTest.php | 2 +- tests/Australia/NorthernTerritory/PicnicDayTest.php | 2 +- tests/Australia/NorthernTerritory/QueensBirthdayTest.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 +- tests/Australia/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 +- .../Australia/Queensland/Brisbane/NationalDayOfMourningTest.php | 2 +- tests/Australia/Queensland/Brisbane/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/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/NationalDayOfMourningTest.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/SouthAustralia/AdelaideCupDayTest.php | 2 +- tests/Australia/SouthAustralia/AnzacDayTest.php | 2 +- tests/Australia/SouthAustralia/AustraliaDayTest.php | 2 +- tests/Australia/SouthAustralia/ChristmasDayTest.php | 2 +- tests/Australia/SouthAustralia/EasterMondayTest.php | 2 +- tests/Australia/SouthAustralia/EasterSaturdayTest.php | 2 +- tests/Australia/SouthAustralia/GoodFridayTest.php | 2 +- tests/Australia/SouthAustralia/LabourDayTest.php | 2 +- tests/Australia/SouthAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/SouthAustralia/NewYearsDayTest.php | 2 +- tests/Australia/SouthAustralia/ProclamationDayTest.php | 2 +- tests/Australia/SouthAustralia/QueensBirthdayTest.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaTest.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 +- tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthBaseTestCase.php | 2 +- tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php | 2 +- .../Tasmania/CentralNorth/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php | 2 +- tests/Australia/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 +- tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandShowTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php | 2 +- .../Tasmania/FlindersIsland/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php | 2 +- tests/Australia/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 +- tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/NationalDayOfMourningTest.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 +- tests/Australia/Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Australia/Tasmania/Northeast/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- tests/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 +- tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Australia/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 +- .../Northwest/CircularHead/NationalDayOfMourningTest.php | 2 +- .../Tasmania/Northwest/CircularHead/NewYearsDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Tasmania/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 +- .../Australia/Tasmania/Northwest/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/Northwest/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- tests/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/NationalDayOfMourningTest.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 +- tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/HobartShowTest.php | 2 +- .../Tasmania/South/Southeast/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastBaseTestCase.php | 2 +- tests/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/NationalDayOfMourningTest.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/WesternAustralia/AnzacDayTest.php | 2 +- tests/Australia/WesternAustralia/AustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/BoxingDayTest.php | 2 +- tests/Australia/WesternAustralia/ChristmasDayTest.php | 2 +- tests/Australia/WesternAustralia/EasterMondayTest.php | 2 +- tests/Australia/WesternAustralia/GoodFridayTest.php | 2 +- tests/Australia/WesternAustralia/LabourDayTest.php | 2 +- tests/Australia/WesternAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/WesternAustralia/NewYearsDayTest.php | 2 +- tests/Australia/WesternAustralia/QueensBirthdayTest.php | 2 +- .../Australia/WesternAustralia/WesternAustraliaBaseTestCase.php | 2 +- tests/Australia/WesternAustralia/WesternAustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/WesternAustraliaTest.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/Burgenland/BurgenlandBaseTestCase.php | 2 +- tests/Austria/Burgenland/BurgenlandTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 2 +- tests/Austria/Carinthia/CarinthiaTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.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/LowerAustria/LowerAustriaBaseTestCase.php | 2 +- tests/Austria/LowerAustria/LowerAustriaTest.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 2 +- tests/Austria/Salzburg/SalzburgTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 2 +- tests/Austria/Styria/StyriaTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 2 +- tests/Austria/Tyrol/TyrolTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php | 2 +- tests/Austria/UpperAustria/UpperAustriaTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 2 +- tests/Austria/Vienna/ViennaTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 2 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 2 +- tests/Base/TypographyTest.php | 2 +- tests/Base/WeekendTest.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/Canada/Alberta/AlbertaBaseTestCase.php | 2 +- tests/Canada/Alberta/AlbertaTest.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaTest.php | 2 +- tests/Canada/CanadaBaseTestCase.php | 2 +- tests/Canada/CanadaDayTest.php | 2 +- tests/Canada/CanadaTest.php | 2 +- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 2 +- tests/Canada/Manitoba/ManitobaBaseTestCase.php | 2 +- tests/Canada/Manitoba/ManitobaTest.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickTest.php | 2 +- tests/Canada/NewYearsDayTest.php | 2 +- .../NewfoundlandAndLabradorBaseTestCase.php | 2 +- .../NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php | 2 +- .../NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php | 2 +- tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php | 2 +- tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php | 2 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 2 +- tests/Canada/Nunavut/NunavutBaseTestCase.php | 2 +- tests/Canada/Nunavut/NunavutTest.php | 2 +- tests/Canada/Ontario/OntarioBaseTestCase.php | 2 +- tests/Canada/Ontario/OntarioTest.php | 2 +- .../PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php | 2 +- tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php | 2 +- tests/Canada/Quebec/QuebecBaseTestCase.php | 2 +- tests/Canada/Quebec/QuebecTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanTest.php | 2 +- tests/Canada/ThanksgivingDayTest.php | 2 +- tests/Canada/TruthAndReconciliationDayTest.php | 2 +- tests/Canada/Yukon/YukonBaseTestCase.php | 2 +- tests/Canada/Yukon/YukonTest.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/CroatiaTest.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/RemembranceDayTest.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 +- tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php | 2 +- tests/CzechRepublic/InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php | 2 +- tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/CzechRepublic/SecondChristmasDayTest.php | 2 +- tests/CzechRepublic/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/DaylightSavingTime.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/Georgia/GeorgiaBaseTestCase.php | 2 +- tests/Georgia/GeorgiaTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 2 +- tests/Georgia/MtskhetobaDayTest.php | 2 +- tests/Georgia/NewYearsDayTest.php | 2 +- tests/Georgia/OrthodoxChristmasDayTest.php | 2 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 2 +- tests/Georgia/SecondNewYearDayTest.php | 2 +- tests/Georgia/StAndrewsDayTest.php | 2 +- tests/Georgia/StGeorgesDayTest.php | 2 +- tests/Georgia/StMarysDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Georgia/VictoryDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- tests/Germany/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 +- tests/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/DayOfLiberation2020Test.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 +- .../Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php | 2 +- .../MecklenburgWesternPomeraniaBaseTestCase.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../Germany/MecklenburgWesternPomerania/ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php | 2 +- tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php | 2 +- .../NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php | 2 +- tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 2 +- tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/PentecostTest.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 +- tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php | 2 +- .../RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php | 2 +- tests/Germany/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 +- tests/Germany/SchleswigHolstein/ReformationDay2017Test.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- .../Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php | 2 +- tests/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/Germany/Thuringia/WorldChildrensDayTest.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/HolidayTestCase.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 +- tests/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/AllSoulsDayTest.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 +- tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php | 2 +- tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/SecondChristmasDayTest.php | 2 +- tests/Lithuania/StJohnsDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- tests/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/LuxembourgBaseTestCase.php | 2 +- tests/Luxembourg/LuxembourgTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/DaylightSavingTime.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/ProviderTestCase.php | 2 +- tests/Randomizer.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/StAndrewsDayTest.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 +- tests/Spain/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 +- tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- tests/Spain/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 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php | 2 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- tests/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 +- tests/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 +- .../Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php | 2 +- tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php | 2 +- tests/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 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php | 2 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.php | 2 +- .../Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- tests/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 +- tests/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/AllSaintsDayTest.php | 2 +- tests/Switzerland/Fribourg/AscensionDayTest.php | 2 +- tests/Switzerland/Fribourg/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Fribourg/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/CorpusChristiTest.php | 2 +- tests/Switzerland/Fribourg/December26thTest.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/ImmaculateConceptionTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/CorpusChristiTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/EasterTest.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/PentecostTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/December26thTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php | 2 +- tests/Switzerland/Neuchatel/January2ndTest.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 +- tests/Switzerland/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/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/Turkey/CommemorationOfAtaturkTest.php | 2 +- tests/Turkey/DemocracyDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NationalSovereigntyDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Turkey/RepublicDayTest.php | 2 +- tests/Turkey/TurkeyBaseTestCase.php | 2 +- tests/Turkey/TurkeyTest.php | 2 +- tests/Turkey/VictoryDayTest.php | 2 +- tests/USA/ChristmasDayTest.php | 2 +- tests/USA/ColumbusDayTest.php | 2 +- tests/USA/IndependenceDayTest.php | 2 +- tests/USA/JuneteenthTest.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/CatholicChristmasDayTest.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/SubstitutedHolidayTest.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/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 | 2 +- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/MotheringSundayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- tests/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 +- tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php | 2 +- tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.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 | 2 +- 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/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.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 | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- tests/YasumiBase.php | 2 +- 1675 files changed, 1675 insertions(+), 1675 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 633b53776..9d590d894 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,7 +3,7 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2022 AzuyaLabs + * Copyright (c) 2015 - 2023 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index cd30fd146..5276fcb26 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2022 AzuyaLabs +Copyright (c) 2015 - 2023 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c7356f333..ba4a53739 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ From 23d4edd7e603ea2cdf46dd78d8c0c9a55966d328 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 1 May 2023 21:30:51 +0900 Subject: [PATCH 478/687] Introduce assertion for DateTime objects with delta to avoid variations in date/time precision. Signed-off-by: Sacha Telgenhof --- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 4 ++-- tests/YasumiBase.php | 24 ++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 2ca55e6ca..94084884e 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -58,7 +58,7 @@ public function testConstructor(): void self::assertSame($holiday, $substitute->getSubstitutedHoliday()); self::assertEquals('substituteHoliday:testHoliday', $substitute->getKey()); self::assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); - self::assertEquals(new \DateTime('2019-01-02'), $substitute); + $this->assertDateTime(new \DateTime('2019-01-02'), $substitute); } /** @throws \Exception */ diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index de7bce948..a6124511c 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -69,7 +69,7 @@ public function assertHolidayWithSubstitution( $holidayOfficial = $holidays->getHoliday($key); self::assertInstanceOf(Holiday::class, $holidayOfficial); self::assertNotNull($holidayOfficial); - self::assertEquals($expectedOfficial, $holidayOfficial); + $this->assertDateTime($expectedOfficial, $holidayOfficial); self::assertTrue($holidays->isHoliday($holidayOfficial)); self::assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); @@ -81,7 +81,7 @@ public function assertHolidayWithSubstitution( // with substitution self::assertNotNull($holidaySubstitution); self::assertInstanceOf(SubstituteHoliday::class, $holidaySubstitution); - self::assertEquals($expectedSubstitution, $holidaySubstitution); + $this->assertDateTime($expectedSubstitution, $holidaySubstitution); self::assertTrue($holidays->isHoliday($holidaySubstitution)); self::assertEquals(Holiday::TYPE_OFFICIAL, $holidaySubstitution->getType()); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 2afc84194..c003de9d9 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -102,7 +102,7 @@ public function assertHoliday( $holiday = $holidays->getHoliday($key); self::assertInstanceOf(Holiday::class, $holiday); - self::assertEquals($expected, $holiday); + $this->assertDateTime($expected, $holiday); self::assertTrue($holidays->isHoliday($holiday)); } @@ -129,7 +129,7 @@ public function assertSubstituteHoliday( $holiday = $holidays->getHoliday('substituteHoliday:'.$key); self::assertInstanceOf(SubstituteHoliday::class, $holiday); - self::assertEquals($expected, $holiday); + $this->assertDateTime($expected, $holiday); self::assertTrue($holidays->isHoliday($holiday)); } @@ -292,4 +292,24 @@ public function assertSources(string $provider, int $expectedSourceCount): void self::assertCount($expectedSourceCount, $holidayProvider->getSources()); } + + /** + * Asserts that a DateTime object is canonically equal to an expected DateTime object. + * + * This helper method employs the 'assertEqualsWithDelta' method to allow for variations + * in precision between DateTime objects. The default object comparator will report some + * DateTime object pairs as not equal even if they are canonically equal because the + * object comparator looks at exact object field values. + * + * Variations have been seen between different versions of PHP and OS distributions. + * Likely this is caused by different editions of the tz database used in those releases. + * + * The chosen delta is somewhat arbitray and seems to solve the experienced issues. + * + * @throws \ExpectationFailedException + */ + public function assertDateTime(\DateTimeInterface $expected, \DateTimeInterface $actual): void + { + self::assertEqualsWithDelta($expected, $actual, 1800); + } } From e1819b46145676a3b30cf25963ddf683cc18e6e3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 22 May 2023 23:31:37 +0900 Subject: [PATCH 479/687] Update and cleanup GitHub actions. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 16 ++++++++++++---- .github/workflows/static-analysis.yml | 15 ++++++++++++--- .github/workflows/testing.yml | 15 ++++++++++++--- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 723a4e135..185960083 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -21,9 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v3.2.0 - with: - fetch-depth: 1 + uses: actions/checkout@v3 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -32,6 +30,17 @@ jobs: coverage: pcov extensions: intl + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache Composer dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + - name: Check Composer configuration run: composer validate --strict @@ -42,4 +51,3 @@ jobs: run: vendor/bin/php-cs-fixer --diff --dry-run -v fix env: PHP_CS_FIXER_IGNORE_ENV: 1 - diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 72ba6088c..307b28344 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,9 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v3.2.0 - with: - fetch-depth: 1 + uses: actions/checkout@v3 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -32,6 +30,17 @@ jobs: coverage: pcov extensions: intl + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache Composer dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + - name: Check Composer configuration run: composer validate --strict diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4b79c9070..52f2f24cb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,9 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v3.2.0 - with: - fetch-depth: 1 + uses: actions/checkout@v3 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -32,6 +30,17 @@ jobs: coverage: pcov extensions: intl, calendar + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache Composer dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + - name: Check Composer configuration run: composer validate --strict From f50c537a5cfccde7b600055990a31ed989baca2c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 23 May 2023 20:51:47 +0900 Subject: [PATCH 480/687] Add code styling rules to have a space after the NOT operator and mark parameters with a default null value as nullable. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 7 ++- src/Yasumi/Holiday.php | 8 ++-- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Canada.php | 1 - src/Yasumi/Provider/CommonHolidays.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Provider/Japan.php | 4 +- src/Yasumi/Provider/Latvia.php | 4 +- src/Yasumi/Provider/NewZealand.php | 4 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 10 ++-- src/Yasumi/Provider/USA.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 14 +++--- src/Yasumi/Yasumi.php | 18 +++---- tests/Japan/SportsDayTest.php | 2 +- tests/NewZealand/AnzacDayTest.php | 2 +- tests/NewZealand/WaitangiDayTest.php | 2 +- tests/Randomizer.php | 52 ++++++++++----------- tests/Ukraine/SubstitutedHolidayTest.php | 2 +- 22 files changed, 74 insertions(+), 72 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index e134debc6..5de24ebbe 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -20,11 +20,14 @@ '@PER' => true, 'combine_consecutive_issets' => true, 'combine_consecutive_unsets' => true, - 'declare_strict_types' => true, 'no_superfluous_elseif' => true, 'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true], + 'not_operator_with_successor_space' => true, + 'ordered_class_elements' => true, + 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true ], - // Risky rules + // Risky + 'declare_strict_types' => true, 'dir_constant' => true, 'get_class_to_class_keyword' => true, 'is_null' => true, diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index a6944b0d9..aaf211770 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -118,7 +118,7 @@ public function __construct( } // Assert display locale input - if (!\in_array($displayLocale, self::$locales, true)) { + if (! \in_array($displayLocale, self::$locales, true)) { throw new UnknownLocaleException(sprintf('Locale "%s" is not a valid locale.', $displayLocale)); } @@ -185,7 +185,7 @@ public function jsonSerialize(): self * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY */ - public function getName(array $locales = null): string + public function getName(?array $locales = null): string { $locales = $this->getLocales($locales); foreach ($locales as $locale) { @@ -231,7 +231,7 @@ public function mergeGlobalTranslations(TranslationsInterface $globalTranslation */ protected function getLocales(?array $locales): array { - if (!empty($locales)) { + if (! empty($locales)) { $expanded = []; } else { $locales = [$this->displayLocale]; @@ -242,7 +242,7 @@ protected function getLocales(?array $locales): array // Expand e.g. ['de_DE', 'en_GB'] into ['de_DE', 'de', 'en_GB', 'en']. foreach (array_reverse($locales) as $locale) { $parent = strtok($locale, '_'); - if (!$parent) { + if (! $parent) { continue; } diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 6b02b2efa..7f22760f5 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -129,7 +129,7 @@ public function isWorkingDay(\DateTimeInterface $date): bool return false; } - return !$this->isWeekendDay($date); + return ! $this->isWeekendDay($date); } public function isHoliday(\DateTimeInterface $date): bool diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index 8fa1240ed..ab0b40fcc 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -166,7 +166,6 @@ protected function calculateCivicHoliday(): void * @see Holidays Act, R.S.C., 1985, c. H-5, https://laws-lois.justice.gc.ca/eng/acts/h-5/page-1.html * * by statute, Canada Day is July 1 if that day is not Sunday, and July 2 if July 1 is a Sunday. - * * @throws \InvalidArgumentException * @throws UnknownLocaleException diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 20f55c30c..c2480c735 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -510,7 +510,7 @@ private function calculateSummerWinterTime( $transitions = $zone->getTransitions($tsBegin, $tsEnd); $transition = array_shift($transitions); - if (!is_array($transition)) { + if (! is_array($transition)) { throw new \RuntimeException('unable to get transition details'); } diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index a692e078b..1833f4a3d 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -124,7 +124,7 @@ private function calculateHomelandThanksgivingDay(): void $names['hr'] = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; } - if (!empty($names)) { + if (! empty($names)) { $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php index aded018cd..bd1d336b3 100644 --- a/src/Yasumi/Provider/DateTimeZoneFactory.php +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -26,7 +26,7 @@ final class DateTimeZoneFactory public static function getDateTimeZone(string $timezone): \DateTimeZone { - if (!isset(self::$dateTimeZones[$timezone])) { + if (! isset(self::$dateTimeZones[$timezone])) { self::$dateTimeZones[$timezone] = new \DateTimeZone($timezone); } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 814f9dc75..af1d31fdf 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -547,7 +547,7 @@ private function calculateSubstituteHolidays(): void // Loop through all holidays foreach ($this->getHolidays() as $holiday) { - if (!$holiday instanceof Holiday) { + if (! $holiday instanceof Holiday) { continue; } $date = clone $holiday; @@ -644,7 +644,7 @@ private function calculateBridgeHolidays(): void // Determine if gap between holidays is one day and create bridge holiday if (2 === (int) $previous->diff($datesIterator->current())->format('%a')) { - if (!$previous instanceof Holiday) { + if (! $previous instanceof Holiday) { throw new \RuntimeException('unable to determine the difference between dates'); } diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 5217aae88..0c3da7701 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -83,7 +83,7 @@ private function addRestorationOfIndependenceDay(): void if ($this->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'); } @@ -118,7 +118,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/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 00c8c01a8..117fac237 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -124,7 +124,7 @@ private function calculateWaitangiDay(): void $date = new \DateTime("$this->year-02-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - if ($this->year >= 2015 && !$this->isWorkingDay($date)) { + if ($this->year >= 2015 && ! $this->isWorkingDay($date)) { $date->modify('next monday'); } @@ -153,7 +153,7 @@ private function calculateAnzacDay(): void $date = new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - if ($this->year >= 2015 && !$this->isWorkingDay($date)) { + if ($this->year >= 2015 && ! $this->isWorkingDay($date)) { $date->modify('next monday'); } diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 0be859819..aabfa4168 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -323,7 +323,7 @@ private function calculateSubstituteHolidays(): void { // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { - if (!$holiday instanceof Holiday) { + if (! $holiday instanceof Holiday) { continue; } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 8570ebcf2..dcb5952ea 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -240,7 +240,7 @@ private function calculateBuddhasBirthday(): void return; } - if (!isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { + if (! isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { return; } @@ -574,11 +574,11 @@ private function calculateSubstituteHolidays(): void $holiday = $this->getHoliday((string) $name); $dates[$day][] = $name; - if (!isset($acceptedHolidays[$name])) { + if (! isset($acceptedHolidays[$name])) { continue; } - if (!$holiday instanceof Holiday) { + if (! $holiday instanceof Holiday) { continue; } @@ -617,7 +617,7 @@ private function nextWorkingDay(\DateTime $date): \DateTime $next = clone $date; do { $next->add($interval); - } while (!$this->isWorkingDay($next)); + } while (! $this->isWorkingDay($next)); return $next; } @@ -631,7 +631,7 @@ private function nextWorkingDay(\DateTime $date): \DateTime */ private function addSubstituteHoliday(?Holiday $origin, string $date_str): void { - if (!$origin instanceof Holiday) { + if (! $origin instanceof Holiday) { return; } diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 5132bed4f..39333188a 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -320,7 +320,7 @@ private function calculateSubstituteHolidays(): void { // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { - if (!$holiday instanceof Holiday) { + if (! $holiday instanceof Holiday) { continue; } diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 34e41fe81..39ae9327c 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -91,7 +91,7 @@ public function addHoliday(Holiday $holiday, bool $substitutable = true): void { parent::addHoliday($holiday); - if (!$substitutable) { + if (! $substitutable) { return; } diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 45657881a..d86df7709 100644 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -103,7 +103,7 @@ public function getSubstitutedHoliday(): Holiday * @see Holiday::DEFAULT_LOCALE * @see Holiday::LOCALE_KEY */ - public function getName(array $locales = null): string + public function getName(?array $locales = null): string { $name = parent::getName(); diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 333d3b231..ffb572cfa 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -52,11 +52,11 @@ 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; + $directoryPath = rtrim($directoryPath, '/\\').\DIRECTORY_SEPARATOR; $extension = 'php'; foreach (new \DirectoryIterator($directoryPath) as $file) { @@ -100,7 +100,7 @@ public function addTranslation(string $key, string $locale, string $translation) { $this->checkLocale($locale); - if (!\array_key_exists($key, $this->translations)) { + if (! \array_key_exists($key, $this->translations)) { $this->translations[$key] = []; } @@ -117,11 +117,11 @@ public function addTranslation(string $key, string $locale, string $translation) */ public function getTranslation(string $key, string $locale): ?string { - if (!\array_key_exists($key, $this->translations)) { + if (! \array_key_exists($key, $this->translations)) { return null; } - if (!\array_key_exists($locale, $this->translations[$key])) { + if (! \array_key_exists($locale, $this->translations[$key])) { return null; } @@ -137,7 +137,7 @@ public function getTranslation(string $key, string $locale): ?string */ public function getTranslations(string $key): array { - if (!\array_key_exists($key, $this->translations)) { + if (! \array_key_exists($key, $this->translations)) { return []; } @@ -146,7 +146,7 @@ public function getTranslations(string $key): array private function checkLocale(string $locale): void { - 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)); } } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index d396f8a99..336e0d0a1 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -80,7 +80,7 @@ public static function nextWorkingDay( while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (!$provider instanceof ProviderInterface) { + if (! $provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); } elseif ($provider->getYear() !== (int) $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); @@ -122,7 +122,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, $providerClass = $class; } - if ('AbstractProvider' === $class || !class_exists($providerClass)) { + if ('AbstractProvider' === $class || ! class_exists($providerClass)) { throw new ProviderNotFoundException(sprintf('Unable to find holiday provider "%s".', $class)); } @@ -143,7 +143,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, } // 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)); } @@ -187,7 +187,7 @@ public static function createByISO3166_2( ): ProviderInterface { $availableProviders = self::getProviders(); - if (!isset($availableProviders[$isoCode])) { + if (! isset($availableProviders[$isoCode])) { throw new ProviderNotFoundException(sprintf('Unable to find holiday provider by ISO3166-2 "%s".', $isoCode)); } @@ -205,13 +205,13 @@ public static function getProviders(): array { // Basic static cache static $providers; - if (!empty($providers)) { + if (! empty($providers)) { return $providers; } $providers = []; $filesIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator( - __DIR__.DIRECTORY_SEPARATOR.'Provider', + __DIR__.\DIRECTORY_SEPARATOR.'Provider', \FilesystemIterator::SKIP_DOTS ), \RecursiveIteratorIterator::SELF_FIRST); @@ -231,7 +231,7 @@ public static function getProviders(): array )) { continue; } - $quotedDs = preg_quote(DIRECTORY_SEPARATOR, ''); + $quotedDs = preg_quote(\DIRECTORY_SEPARATOR, ''); $provider = preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); $class = new \ReflectionClass(sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $provider))); @@ -276,11 +276,11 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (!$date instanceof \DateTimeImmutable) { + if (! $date instanceof \DateTimeImmutable) { throw new \RuntimeException('unable to perform date interval subtraction'); } - if (!$provider instanceof ProviderInterface) { + if (! $provider instanceof ProviderInterface) { $provider = self::create($class, (int) $date->format('Y')); } elseif ($provider->getYear() !== (int) $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 9b43642aa..37c9d0359 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -76,7 +76,7 @@ public function testSportsDayAfter2000(): void $year = $this->generateRandomYear(2001); // Some years the date has changed, so in this test we neeed to skip them. - if (!in_array($year, [2020, 2021])) { + if (! in_array($year, [2020, 2021])) { $this->assertHoliday( self::REGION, self::HOLIDAY, diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index ea6be2f74..652ce9c82 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -75,7 +75,7 @@ public function HolidayDataProvider(): array return; } - if (!$this->isWeekend($date)) { + if (! $this->isWeekend($date)) { return; } diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index ea8a7effa..6edfe42d3 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -105,7 +105,7 @@ public function HolidayDataProvider(): array return; } - if (!$this->isWeekend($date)) { + if (! $this->isWeekend($date)) { return; } diff --git a/tests/Randomizer.php b/tests/Randomizer.php index dcf0564c7..cf6e918bf 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -38,9 +38,9 @@ trait Randomizer public function generateRandomDates( int $month, int $day, - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { $data = []; $range ??= 1000; @@ -64,9 +64,9 @@ public function generateRandomDates( * @throws \Exception */ public function generateRandomEasterDates( - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { $data = []; $range ??= 1000; @@ -93,9 +93,9 @@ public function generateRandomEasterDates( * @throws \Exception */ public function generateRandomEasterMondayDates( - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { $range ??= 1000; @@ -118,9 +118,9 @@ public function generateRandomEasterMondayDates( */ public function generateRandomModifiedEasterDates( callable $cb, - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { $data = []; $range ??= 1000; @@ -148,9 +148,9 @@ public function generateRandomModifiedEasterDates( * @throws \Exception */ public function generateRandomGoodFridayDates( - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { $range ??= 1000; @@ -171,9 +171,9 @@ public function generateRandomGoodFridayDates( * @throws \Exception */ public function generateRandomPentecostDates( - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { $range ??= 1000; @@ -199,9 +199,9 @@ public function generateRandomPentecostDates( public function generateRandomDatesWithHolidayMovedToMonday( int $month, int $day, - string $timezone = null, - int $iterations = null, - int $range = null + ?string $timezone = null, + ?int $iterations = null, + ?int $range = null ): array { return $this->generateRandomDatesWithModifier($month, $day, function ($range, \DateTime $date): void { if ($this->isWeekend($date)) { @@ -230,7 +230,7 @@ public function generateRandomDatesWithModifier( callable $callback, int $iterations, int $range, - string $timezone = null + ?string $timezone = null ): array { $data = []; @@ -257,8 +257,8 @@ public function generateRandomDatesWithModifier( * @throws \Exception */ public function generateRandomYear( - int $lowerLimit = null, - int $upperLimit = null + ?int $lowerLimit = null, + ?int $upperLimit = null ): int { return self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } @@ -312,13 +312,13 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now { $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); - if (!$startTimestamp) { + if (! $startTimestamp) { throw new \RuntimeException('unable to get timestamp for the start date'); } $endTimestamp = static::getMaxTimestamp($endDate); - if (!$endTimestamp) { + if (! $endTimestamp) { throw new \RuntimeException('unable to get timestamp for the end date'); } diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index a6124511c..54f86b0c1 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -62,7 +62,7 @@ public function assertHolidayWithSubstitution( string $key, int $year, \DateTimeInterface $expectedOfficial, - \DateTimeInterface $expectedSubstitution = null + ?\DateTimeInterface $expectedSubstitution = null ): void { $holidays = Yasumi::create($provider, $year); From 2cd7a4e31cab3259c43a8c259c59af700620beaf Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 23 May 2023 20:57:42 +0900 Subject: [PATCH 481/687] Fix comment. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index fbf97ea69..9cce88ce8 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -33,7 +33,7 @@ class BetweenFilter extends AbstractFilter /** end date of the time frame to check against */ private string $endDate; - /**indicates whether the start and end dates should be included in the comparison */ + /** indicates whether the start and end dates should be included in the comparison */ private bool $equal; /** From 323883a5271a3690d318d5ac536d8a6bda612aac Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 23 May 2023 20:58:23 +0900 Subject: [PATCH 482/687] Made closure static as it has no context to the class itself. 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 7f22760f5..5fe5a860a 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -115,7 +115,7 @@ public function addHoliday(Holiday $holiday): void } $this->holidays[$holiday->getKey()] = $holiday; - uasort($this->holidays, fn (\DateTimeInterface $dateA, \DateTimeInterface $dateB): int => self::compareDates($dateA, $dateB)); + uasort($this->holidays, static fn (\DateTimeInterface $dateA, \DateTimeInterface $dateB): int => self::compareDates($dateA, $dateB)); } public function removeHoliday(string $key): void From 002ce9a70db935f250c81f286777ef257b44bed7 Mon Sep 17 00:00:00 2001 From: barami Date: Wed, 7 Jun 2023 21:02:21 +0900 Subject: [PATCH 483/687] Refactored the rules for calculating holidays in South Korea based on the history of holiday changes. (#314) * Updated KASI paper reference link and added conversion utility link on note of SouthKorea Provider * Fixed incorrect date of Buddha's Birthday in 2001: Unlike China, South Korea celebrated Buddha's Birthday on May 1 in 2001. * Added additional alternative holidays that will be effective May 2023. * Added methods to the South Korea provider to generate holidays that were first enacted in South Korea. * Added constant holds collection of historically recognized holidays and test case. * Fix up incorrect date for dayAfterSeollal * Modify calculateOldSubstituteHolidays and calculateSubstituteHolidays methods to use year parameter instead of instance member. * Add substitution cases for 1959, 1960, 1989 to calculateOldSubstituteHolidays method * Changed the incorrect founding year of Armed Forces Day in the ArmedForcesDayTest class * Extract the list of holidays eligible for alternative holidays into a separate function for future changes. * Copy the description of the holiday into the generator method and modify it. * Refactored the rules for calculating holidays in South Korea based on the history of holiday changes. * Fixed the SouthKoreaTest test because the year that Armed Forces Day became a public holiday was incorrect. * Modify based on the results of the composer format command * Modify based on the results of the composer phpstan command * Modify note of calculateCurrent * Added substitute holiday tests for Buddha's Day and Christmas Day * Modified testing for the Seollal to match the year it was declared a public holiday * Fixed an incorrect holiday year of enactment. * Fixed test cases related to Arbor Day 1960. * Added tests for United Nations Day. * Changed to remove the SouthKorea dependency from the lunar holidays test. * SouthKoreaTest: refactored the test case. * Refactored by merging the calculate methods of SouthKorea provider. * Modify based on the results of the composer format command * Fix up incorrect year of Chuseok in 1995 * Apply code style changes from commit f50c537a5cfccde7b600055990a31ed989baca2c * Updated CHANGELOG for this pr. --- CHANGELOG.md | 13 + src/Yasumi/Provider/SouthKorea.php | 953 ++++++++++++++------ tests/SouthKorea/ArborDayTest.php | 58 +- tests/SouthKorea/ArmedForcesDayTest.php | 2 +- tests/SouthKorea/BuddhasBirthdayTest.php | 99 +- tests/SouthKorea/ChildrensDayTest.php | 2 +- tests/SouthKorea/ChristmasDayTest.php | 65 ++ tests/SouthKorea/ChuseokTest.php | 136 +-- tests/SouthKorea/MemorialDayTest.php | 2 +- tests/SouthKorea/SeollalTest.php | 117 +-- tests/SouthKorea/SouthKoreaBaseTestCase.php | 73 ++ tests/SouthKorea/SouthKoreaTest.php | 92 +- tests/SouthKorea/UnitedNationsDayTest.php | 114 +++ 13 files changed, 1228 insertions(+), 498 deletions(-) create mode 100644 tests/SouthKorea/UnitedNationsDayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5ba753a..ceafc3eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,23 @@ changes. ### Added +- Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day + and Christmas Day, which we have reflected in our South Korea provider. + [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) + ### Changed +- Updated links to related documentation in the SouthKorea provider's note and added links to conversion utilities. + [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- Refactored the complexity of the SouthKorea provider to make it easier to understand in case of future changes. + [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) + ### Fixed +- Fixed a bug in the South Korea provider where some of the past dates for Buddha's Day, Chuseok, Armed Forces Day + and United Nations Day were incorrect during holidays, and modified the unit tests accordingly. + [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) + ### Removed ## [2.6.0] - 2023-04-27 diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index dcb5952ea..50547a994 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -51,7 +51,8 @@ class SouthKorea extends AbstractProvider * 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. - * @see https://www.kasi.re.kr/kor/research/paper/20170259 - Korea Astronomy and Space Science Institute + * @see https://koreascience.kr/article/JAKO201706163145174.pdf - Korea Astronomy and Space Science Institute + * @see https://astro.kasi.re.kr/life/pageView/8 - web utility for conversion and retrieve */ public const LUNAR_HOLIDAY = [ 'seollal' => [ @@ -76,7 +77,7 @@ class SouthKorea extends AbstractProvider 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', + 2000 => '2000-5-11', 2001 => '2001-5-1', 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', @@ -98,7 +99,7 @@ class SouthKorea extends AbstractProvider 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 => '1995-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', @@ -113,6 +114,90 @@ class SouthKorea extends AbstractProvider ], ]; + /** + * Collection of all historically recognized holidays in South Korea. + * + * Aggregated collection of all historically recognized holidays of South Korea After the government was established. + * This collection also includes items that are now obsolete and excluded from holidays. + */ + public const HOLIDAY_NAMES = [ + 'newYearsDay' => [], + 'dayAfterNewYearsDay' => [], + 'twoDaysLaterNewYearsDay' => [ + 'en' => 'Two Days Later New Year’s Day', + 'ko' => '새해 연휴', + ], + 'seollal' => [ + 'en' => 'Seollal', + 'ko' => '설날', + ], + 'dayBeforeSeollal' => [ + 'en' => 'Day before Seollal', + 'ko' => '설날 연휴', + ], + 'dayAfterSeollal' => [ + 'en' => 'Day after Seollal', + 'ko' => '설날 연휴', + ], + 'independenceMovementDay' => [ + 'en' => 'Independence Movement Day', + 'ko' => '삼일절', + ], + 'arborDay' => [ + 'en' => 'Arbor Day', + 'ko' => '식목일', + ], + 'buddhasBirthday' => [ + 'en' => 'Buddha’s Birthday', + 'ko' => '부처님오신날', + ], + 'childrensDay' => [ + 'en' => 'Children’s Day', + 'ko' => '어린이날', + ], + 'memorialDay' => [ + 'en' => 'Memorial Day', + 'ko' => '현충일', + ], + 'constitutionDay' => [ + 'en' => 'Constitution Day', + 'ko' => '제헌절', + ], + 'liberationDay' => [ + 'en' => 'Liberation Day', + 'ko' => '광복절', + ], + 'chuseok' => [ + 'en' => 'Chuseok', + 'ko' => '추석', + ], + 'dayBeforeChuseok' => [ + 'en' => 'Day before Chuseok', + 'ko' => '추석 연휴', + ], + 'dayAfterChuseok' => [ + 'en' => 'Day after Chuseok', + 'ko' => '추석 연휴', + ], + 'armedForcesDay' => [ + 'en' => 'Armed Forces Day', + 'ko' => '국군의 날', + ], + 'nationalFoundationDay' => [ + 'en' => 'National Foundation Day', + 'ko' => '개천절', + ], + 'hangulDay' => [ + 'en' => 'Hangul Day', + 'ko' => '한글날', + ], + 'unitedNationsDay' => [ + 'en' => 'United Nations Day', + 'ko' => '유엔의 날', + ], + 'christmasDay' => [], + ]; + /** * Initialize holidays for South Korea. * @@ -124,28 +209,25 @@ 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)); + // Fast-fail when before 1949 + if ($this->year < 1949) { + return; + } + + if ($this->year < 2013) { + // Holidays in used from 1949 until 2012 + $officialHolidays = $this->calculateBefore2013($this->year); + } else { + // Holidays in use from 2013 + $officialHolidays = $this->calculateCurrent($this->year); + } + + foreach ($officialHolidays as $holiday) { + $this->addHoliday($this->{$holiday}($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(); + // Substitute Holidays + $this->calculateSubstituteHolidays($this->year); } public function getSources(): array @@ -157,333 +239,600 @@ public function getSources(): array ]; } - /** - * 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. - * - * @see https://en.wikipedia.org/wiki/New_Year%27s_Day#East_Asian - * - * @throws \Exception - */ - private function calculateNewYearsDay(): void + public function addHoliday(?Holiday $holiday): 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", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); - } - if ($this->year <= 1990) { - $this->addHoliday(new Holiday( - 'twoDaysLaterNewYearsDay', - ['en' => 'Two Days Later New Year’s Day', 'ko' => '새해 연휴'], - new \DateTime("$this->year-1-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); - } + if (isset($holiday)) { + parent::addHoliday($holiday); } } + /** + * The day after New Year's Day (January 2) + * This day was established in 1949 and then removed as a public holiday in 1999. + */ + protected function dayAfterNewYearsDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'dayAfterNewYearsDay', + $this->getTranslations('dayAfterNewYearsDay', $year), + new \DateTime("$year-1-2", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * Two days after the New Year's (January 3) + * This day was established in 1949 and then removed as a public holiday in 1990. + */ + protected function twoDaysLaterNewYearsDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'twoDaysLaterNewYearsDay', + $this->getTranslations('twoDaysLaterNewYearsDay', $year), + new \DateTime("$year-1-3", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + /** * Seollal (Korean New Year's Day). * Seollal is held on the 1st day of the 1st lunar month and was established from 1985. * - * @see https://en.wikipedia.org/wiki/Korean_New_Year + * Seollal was celebrated with only one day off when it was established in 1985, and then changed to a three-day holiday in 1989. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/Korean_New_Year */ - private function calculateSeollal(): void - { - if ($this->year >= 1985 && isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { - $seollal = new \DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $this->addHoliday(new Holiday( - 'seollal', - ['en' => 'Seollal', 'ko' => '설날'], - $seollal, - $this->locale - )); - if ($this->year > 1989) { - $dayBeforeSeollal = clone $seollal; - $dayBeforeSeollal->sub(new \DateInterval('P1D')); - $this->addHoliday(new Holiday( - 'dayBeforeSeollal', - ['en' => 'Day before Seollal', 'ko' => '설날 연휴'], - $dayBeforeSeollal, - $this->locale - )); - $dayAfterSeollal = clone $seollal; - $dayAfterSeollal->add(new \DateInterval('P1D')); - $this->addHoliday(new Holiday( - 'dayAfterSeollal', - ['en' => 'Day after Seollal', 'ko' => '설날 연휴'], - $dayAfterSeollal, - $this->locale - )); - } + protected function seollal( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['seollal'][$year])) { + return null; } + + $seollal = self::LUNAR_HOLIDAY['seollal'][$year]; + + return new Holiday( + 'seollal', + $this->getTranslations('seollal', $year), + new \DateTime($seollal, DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Buddha's Birthday is held on the 8th day of the 4th lunar month and was established since 1975. + * The day before Seollal (Korean New Year's Day). + * Seollal is held on the 1st day of the 1st lunar month and was established from 1985. * - * @see https://en.wikipedia.org/wiki/Buddha%27s_Birthday + * Seollal was celebrated with only one day off when it was established in 1985, and then changed to a three-day holiday in 1989. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/Korean_New_Year */ - private function calculateBuddhasBirthday(): void - { - if ($this->year < 1975) { - return; + protected function dayBeforeSeollal( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['seollal'][$year])) { + return null; } - if (! isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { - return; - } + $seollal = self::LUNAR_HOLIDAY['seollal'][$year]; - $this->addHoliday(new Holiday( - 'buddhasBirthday', - ['en' => 'Buddha’s Birthday', 'ko' => '부처님오신날'], - new \DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + return new Holiday( + 'dayBeforeSeollal', + $this->getTranslations('dayBeforeSeollal', $year), + new \DateTime("-1 day $seollal", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * 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. + * The day after Seollal (Korean New Year's Day). + * Seollal is held on the 1st day of the 1st lunar month and was established from 1985. * - * @see https://en.wikipedia.org/wiki/Chuseok + * Seollal was celebrated with only one day off when it was established in 1985, and then changed to a three-day holiday in 1989. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/Korean_New_Year */ - private function calculateChuseok(): void - { - if ($this->year >= 1949 && isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { - // Chuseok - $chuseok = new Holiday( - 'chuseok', - ['en' => 'Chuseok', 'ko' => '추석'], - new \DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - ); - $this->addHoliday($chuseok); - - // Day after Chuseok - if ($this->year >= 1986) { - $this->addHoliday(new Holiday( - 'dayAfterChuseok', - ['en' => 'Day after Chuseok', 'ko' => '추석 연휴'], - (clone $chuseok)->add(new \DateInterval('P1D')), - $this->locale - )); - } - - // Day before Chuseok - if ($this->year >= 1989) { - $this->addHoliday(new Holiday( - 'dayBeforeChuseok', - ['en' => 'Day before Chuseok', 'ko' => '추석 연휴'], - (clone $chuseok)->sub(new \DateInterval('P1D')), - $this->locale - )); - } + protected function dayAfterSeollal( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['seollal'][$year])) { + return null; } + + $seollal = self::LUNAR_HOLIDAY['seollal'][$year]; + + return new Holiday( + 'dayAfterSeollal', + $this->getTranslations('dayAfterSeollal', $year), + new \DateTime("+1 day $seollal", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Independence Movement Day. Independence Movement Day is held on March 1st and was established from 1949. + * Independence Movement Day. + * Independence Movement Day is held on March 1st and was established from 1949. * * @see https://en.wikipedia.org/wiki/Independence_Movement_Day - * - * @throws \Exception */ - private function calculateIndependenceMovementDay(): void - { - if ($this->year >= 1949) { - $this->addHoliday(new Holiday( - 'independenceMovementDay', - ['en' => 'Independence Movement Day', 'ko' => '삼일절'], - new \DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); - } + protected function independenceMovementDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'independenceMovementDay', + $this->getTranslations('independenceMovementDay', $year), + new \DateTime("$year-3-1", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Sikmogil (Arbor Day). Sikmogil is held on May 5th and established since 1949. + * Sikmogil (Arbor Day). + * Sikmogil is held on April 5th and established since 1949, but was removed as a public holiday in 2006. * * @see https://en.wikipedia.org/wiki/Sikmogil + */ + protected function arborDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + $datetime = (1960 === $year) ? "$year-3-21" : "$year-4-5"; + + return new Holiday( + 'arborDay', + $this->getTranslations('arborDay', $year), + new \DateTime($datetime, DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * Buddha's Birthday. + * Buddha's Birthday is held on the 8th day of the 4th lunar month and was established since 1975. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/Buddha%27s_Birthday */ - private function calculateArborDay(): void - { - if (($this->year >= 1949 && $this->year < 1960) || ($this->year > 1960 && $this->year < 2006)) { - $this->addHoliday(new Holiday( - 'arborDay', - ['en' => 'Arbor Day', 'ko' => '식목일'], - new \DateTime("$this->year-4-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + protected function buddhasBirthday( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$year])) { + return null; } + + $buddhasBirthday = self::LUNAR_HOLIDAY['buddhasBirthday'][$year]; + + return new Holiday( + 'buddhasBirthday', + $this->getTranslations('buddhasBirthday', $year), + new \DateTime($buddhasBirthday, DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Children's Day. Children's Day is held on May 5th and established since 1970. + * Children's Day. + * Children's Day is held on May 5th and established since 1975. * * @see https://en.wikipedia.org/wiki/Children%27s_Day#South_Korea - * - * @throws \Exception */ - private function calculateChildrensDay(): void - { - if ($this->year >= 1970) { - $this->addHoliday(new Holiday( - 'childrensDay', - ['en' => 'Children’s Day', 'ko' => '어린이날'], - new \DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); - } + protected function childrensDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'childrensDay', + $this->getTranslations('childrensDay', $year), + new \DateTime("$year-5-5", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Memorial Day. Memorial Day is held on June 6th and established since 1956. + * Memorial Day. + * Memorial Day is held on June 6th and established since 1956. * * @see https://en.wikipedia.org/wiki/Memorial_Day_(South_Korea) - * - * @throws \Exception */ - private function calculateMemorialDay(): void - { - if ($this->year >= 1966) { - $this->addHoliday(new Holiday( - 'memorialDay', - ['en' => 'Memorial Day', 'ko' => '현충일'], - new \DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); - } + protected function memorialDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'memorialDay', + $this->getTranslations('memorialDay', $year), + new \DateTime("$year-6-6", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** * 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. + * + * It was originally a public holiday recognized by the South Korean government, + * but was removed as a public holiday in 2008 and is now a national day rather than a public holiday. * * @see https://en.wikipedia.org/wiki/Constitution_Day_(South_Korea) + */ + protected function constitutionDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'constitutionDay', + $this->getTranslations('constitutionDay', $year), + new \DateTime("$year-7-17", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * Liberation Day. + * Liberation Day is held on August 15th and established since 1949. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/National_Liberation_Day_of_Korea */ - private function calculateConstitutionDay(): void - { - if ($this->year < 1949) { - return; - } + protected function liberationDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'liberationDay', + $this->getTranslations('liberationDay', $year), + new \DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } - if ($this->year >= 2008) { - return; + /** + * 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. + * Chuseok was a one-day holiday when it was established in 1945, but was changed to a three-day holiday in 1989. + * + * @see https://en.wikipedia.org/wiki/Chuseok + */ + protected function chuseok( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['chuseok'][$year])) { + return null; } - $this->addHoliday(new Holiday( - 'constitutionDay', - ['en' => 'Constitution Day', 'ko' => '제헌절'], - new \DateTime("$this->year-7-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + $choseok = self::LUNAR_HOLIDAY['chuseok'][$year]; + + return new Holiday( + 'chuseok', + $this->getTranslations('chuseok', $year), + new \DateTime($choseok, DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Liberation Day. Liberation Day is held on August 15th and established since 1949. + * The day before Chuseok (Korean Thanksgiving Day). * - * @see https://en.wikipedia.org/wiki/National_Liberation_Day_of_Korea + * 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. + * Chuseok was a one-day holiday when it was established in 1945, but was changed to a three-day holiday in 1989. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/Chuseok */ - private function calculateLiberationDay(): void - { - if ($this->year >= 1949) { - $this->addHoliday(new Holiday( - 'liberationDay', - ['en' => 'Liberation Day', 'ko' => '광복절'], - new \DateTime("$this->year-8-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + protected function dayBeforeChuseok( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['chuseok'][$year])) { + return null; } + + $choseok = self::LUNAR_HOLIDAY['chuseok'][$year]; + + return new Holiday( + 'dayBeforeChuseok', + $this->getTranslations('dayBeforeChuseok', $year), + new \DateTime("-1 day $choseok", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Armed Forces Day. Armed Forces Day is held on October 1st and established since 1956. + * The day after Chuseok (Korean Thanksgiving Day). * - * @see https://en.wikipedia.org/wiki/Armed_Forces_Day_(South_Korea) + * 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. + * Chuseok was a one-day holiday when it was established in 1945, but was changed to a three-day holiday in 1989. * - * @throws \Exception + * @see https://en.wikipedia.org/wiki/Chuseok */ - private function calculateArmedForcesDay(): void - { - if ($this->year < 1956) { - return; + protected function dayAfterChuseok( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): ?Holiday { + if (! isset(self::LUNAR_HOLIDAY['chuseok'][$year])) { + return null; } - if ($this->year > 1990) { - return; - } + $choseok = self::LUNAR_HOLIDAY['chuseok'][$year]; + + return new Holiday( + 'dayAfterChuseok', + $this->getTranslations('dayAfterChuseok', $year), + new \DateTime("+1 day $choseok", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } - $this->addHoliday(new Holiday( + /** + * Armed Forces Day. + * Armed Forces Day is held on October 1st and established since 1956. + * + * Armed Forces Day, established in 1956, was made a public holiday in 1976 and then removed again in 1991. + * + * @see unitedNationsDay + * @see https://en.wikipedia.org/wiki/Armed_Forces_Day_(South_Korea) + */ + protected function armedForcesDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( 'armedForcesDay', - ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], - new \DateTime("$this->year-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + $this->getTranslations('armedForcesDay', $year), + new \DateTime("$year-10-1", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); } /** - * Gaecheonjeol (National Foundation Day). Gaecheonjeol is held on October 3rd and established since 1949. + * Gaecheonjeol (National Foundation Day). + * Gaecheonjeol is held on October 3rd and established since 1949. * * @see https://en.wikipedia.org/wiki/Gaecheonjeol + */ + protected function nationalFoundationDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'nationalFoundationDay', + $this->getTranslations('nationalFoundationDay', $year), + new \DateTime("$year-10-3", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * Hangul Day. + * Hangul Day is held on October 9th and established since 1949. * - * @throws \Exception + * Hangul Day, established in 1949, was removed as a public holiday in 1991 and included again in 2013. + * + * @see https://en.wikipedia.org/wiki/Hangul_Day + */ + protected function hangulDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'hangulDay', + $this->getTranslations('hangulDay', $year), + new \DateTime("$year-10-9", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * United Nations Day. + * + * On September 18, 1950, the day of the formation of the United Nations, International United Nations Day was established as a public holiday. + * Later, on September 3, 1976, United Nations Day was removed as a public holiday and Armed Forces Day was established as a new public holiday. + * + * @see https://ko.wikipedia.org/wiki/%EC%9C%A0%EC%97%94%EC%9D%98_%EB%82%A0#%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD */ - private function calculateNationalFoundationDay(): void + protected function unitedNationsDay( + int $year, + string $timezone, + string $locale, + string $type = Holiday::TYPE_OFFICIAL + ): Holiday { + return new Holiday( + 'unitedNationsDay', + $this->getTranslations('unitedNationsDay', $year), + new \DateTime("$year-10-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + $locale, + $type + ); + } + + /** + * Get holiday names for translation. + * + * @return array + */ + protected function getTranslations(string $key, int $year): array { - if ($this->year >= 1949) { - $this->addHoliday(new Holiday( - 'nationalFoundationDay', - ['en' => 'National Foundation Day', 'ko' => '개천절'], - new \DateTime("$this->year-10-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + switch ($key) { + case 'arborDay': + $names = (1960 === $year) + ? ['en' => 'Arbor Day', 'ko' => '사방의 날'] + : self::HOLIDAY_NAMES[$key]; + break; + default: + $names = isset(self::HOLIDAY_NAMES[$key]) ? self::HOLIDAY_NAMES[$key] : []; + break; } + + return $names; } /** - * Hangul Day. Hangul Day is held on October 9th and established since 1949. + * Holidays in used from 1949 until 2012. * - * @see https://en.wikipedia.org/wiki/Hangul_Day - * - * @throws \Exception + * @return array list of holidays */ - private function calculateHangulDay(): void + private function calculateBefore2013(int $year): array { - if (($this->year >= 1949 && $this->year <= 1990) || $this->year > 2012) { - $this->addHoliday(new Holiday( - 'hangulDay', - ['en' => 'Hangul Day', 'ko' => '한글날'], - new \DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + $officialHolidays = []; + + if ($year >= 1949) { + $officialHolidays[] = 'independenceMovementDay'; + $officialHolidays[] = 'liberationDay'; + $officialHolidays[] = 'nationalFoundationDay'; + $officialHolidays[] = 'newYearsDay'; + $officialHolidays[] = 'chuseok'; + $officialHolidays[] = 'christmasDay'; + + if ($year >= 1950 && $year < 1976) { + $officialHolidays[] = 'unitedNationsDay'; + } + + if ($year >= 1956) { + $officialHolidays[] = 'memorialDay'; + } + + if ($year >= 1975) { + $officialHolidays[] = 'childrensDay'; + $officialHolidays[] = 'buddhasBirthday'; + } + + if ($year >= 1976 && $year <= 1990) { + $officialHolidays[] = 'armedForcesDay'; + } + + if ($year >= 1985) { + $officialHolidays[] = 'seollal'; + } + + if ($year >= 1986) { + $officialHolidays[] = 'dayAfterChuseok'; + } + + if ($year >= 1989) { + $officialHolidays[] = 'dayBeforeChuseok'; + $officialHolidays[] = 'dayBeforeSeollal'; + $officialHolidays[] = 'dayAfterSeollal'; + } + + if ($year <= 1989) { + $officialHolidays[] = 'twoDaysLaterNewYearsDay'; + } + + if ($year <= 1990 || $year > 2012) { + $officialHolidays[] = 'hangulDay'; + } + + if ($year <= 1998) { + $officialHolidays[] = 'dayAfterNewYearsDay'; + } + + if ($year <= 2005) { + $officialHolidays[] = 'arborDay'; + } + + if ($year < 2008) { + $officialHolidays[] = 'constitutionDay'; + } } + + return $officialHolidays; + } + + /** + * Holidays in use since 2013. + * + * @return array list of holidays + */ + private function calculateCurrent(int $year): array + { + $officialHolidays = []; + + $officialHolidays[] = 'newYearsDay'; + $officialHolidays[] = 'dayBeforeSeollal'; + $officialHolidays[] = 'seollal'; + $officialHolidays[] = 'dayAfterSeollal'; + $officialHolidays[] = 'independenceMovementDay'; + $officialHolidays[] = 'buddhasBirthday'; + $officialHolidays[] = 'childrensDay'; + $officialHolidays[] = 'memorialDay'; + $officialHolidays[] = 'liberationDay'; + $officialHolidays[] = 'dayBeforeChuseok'; + $officialHolidays[] = 'chuseok'; + $officialHolidays[] = 'dayAfterChuseok'; + $officialHolidays[] = 'nationalFoundationDay'; + $officialHolidays[] = 'hangulDay'; + $officialHolidays[] = 'christmasDay'; + + return $officialHolidays; } /** - * Substitute Holidays up to 2021. + * Substitute Holidays up to 2022. * 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. @@ -492,45 +841,56 @@ private function calculateHangulDay(): void * As an exception, Children's Day also applies on Saturday. * * Since new legislation about public holiday was enacted in June 2021, - * this function is used to calculate the holidays up to 2021. + * this function is used to calculate the holidays up to 2022. * * @throws \Exception */ - private function calculateOldSubstituteHolidays(): void + private function calculateOldSubstituteHolidays(int $year): void { - if ($this->year < 2014) { - return; - } - // Add substitute holidays by fixed entries. - switch ($this->year) { + switch ($year) { + case 1959: + $this->addSubstituteHoliday($this->getHoliday('arborDay'), "$year-4-6"); + break; + case 1960: + $this->addSubstituteHoliday($this->getHoliday('constitutionDay'), "$year-7-18"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$year-10-10"); + $this->addSubstituteHoliday($this->getHoliday('christmasDay'), "$year-12-26"); + break; + case 1989: + $this->addSubstituteHoliday($this->getHoliday('armedForcesDay'), "$year-10-2"); + break; case 2014: - $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$this->year-9-10"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$year-9-10"); break; case 2015: - $this->addSubstituteHoliday($this->getHoliday('chuseok'), "$this->year-9-29"); + $this->addSubstituteHoliday($this->getHoliday('chuseok'), "$year-9-29"); break; case 2016: - $this->addSubstituteHoliday($this->getHoliday('dayBeforeSeollal'), "$this->year-2-10"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeSeollal'), "$year-2-10"); break; case 2017: - $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$this->year-1-30"); - $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$this->year-10-6"); + $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$year-1-30"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$year-10-6"); break; case 2018: - $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$this->year-5-7"); - $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$this->year-9-26"); + $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$year-5-7"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$year-9-26"); break; case 2019: - $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$this->year-5-6"); + $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$year-5-6"); break; case 2020: - $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$this->year-1-27"); + $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$year-1-27"); break; case 2021: - $this->addSubstituteHoliday($this->getHoliday('liberationDay'), "$this->year-8-16"); - $this->addSubstituteHoliday($this->getHoliday('nationalFoundationDay'), "$this->year-10-4"); - $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$this->year-10-11"); + $this->addSubstituteHoliday($this->getHoliday('liberationDay'), "$year-8-16"); + $this->addSubstituteHoliday($this->getHoliday('nationalFoundationDay'), "$year-10-4"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$year-10-11"); + break; + case 2022: + $this->addSubstituteHoliday($this->getHoliday('dayAfterChuseok'), "$year-9-12"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$year-10-10"); break; } } @@ -544,29 +904,16 @@ private function calculateOldSubstituteHolidays(): void * * @throws \Exception */ - private function calculateSubstituteHolidays(): void + private function calculateSubstituteHolidays(int $year): void { - if ($this->year < 2022) { - $this->calculateOldSubstituteHolidays(); + if ($year < 2023) { + $this->calculateOldSubstituteHolidays($year); return; } // List of holidays allowed for substitution. - $acceptedHolidays = []; - - // When deciding on alternative holidays, place lunar holidays first for consistent rules. - // These holidays will substitute for the sunday only. - $acceptedHolidays += array_fill_keys([ - 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', - 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', - ], [0]); - - // These holidays will substitute for any weekend days (Sunday and Saturday). - $acceptedHolidays += array_fill_keys([ - 'childrensDay', 'independenceMovementDay', 'liberationDay', - 'nationalFoundationDay', 'hangulDay', - ], [0, 6]); + $acceptedHolidays = $this->calculateAcceptedSubstituteHolidays($year); // Step 1. Build a temporary table that aggregates holidays by date. $dates = []; @@ -608,6 +955,42 @@ private function calculateSubstituteHolidays(): void } } + /** + * Return a dictionary of substitute holiday + * Government-recognized holidays will be replaced with an alternative holiday if they overlap with a Saturday or Sunday. + * This dictionary contains information about which day of the week the holiday is replaced when it falls on. + * + * @return array> + */ + private function calculateAcceptedSubstituteHolidays(int $year): array + { + // List of holidays allowed for substitution. + // This dictionary has key => value mappings. + // each key is key of holiday and value contains day of week (saturday or sunday or both) + // value meaning : 0 = saturday, 1 = sunday + $acceptedHolidays = []; + + if ($year < 2023) { + return $acceptedHolidays; + } + + // When deciding on alternative holidays, place lunar holidays first for consistent rules. + // These holidays will substitute for the sunday only. + $acceptedHolidays += array_fill_keys([ + 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', + 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', + ], [0]); + + // These holidays will substitute for any weekend days (Sunday and Saturday). + // 'buddhasBirthday' and 'christmasDay' included as alternative holiday in May 2023. + $acceptedHolidays += array_fill_keys([ + 'childrensDay', 'independenceMovementDay', 'liberationDay', + 'nationalFoundationDay', 'hangulDay', 'buddhasBirthday', 'christmasDay', + ], [0, 6]); + + return $acceptedHolidays; + } + /** * Helper method to find a first working day after specific date. */ diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 0de52a57b..64409b6d1 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -29,9 +29,9 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase public const REMOVED_YEAR = 2005; /** - * The year in which the holiday was not celebrated. + * The year the date was temporarily changed. */ - public const YEAR_NOT_CELEBRATED = 1960; + public const TEMPORARY_CHANGED_YEAR = 1960; /** * The name of the holiday. */ @@ -50,20 +50,16 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); - if (self::YEAR_NOT_CELEBRATED === $year) { - $this->assertNotHoliday( - self::REGION, - self::HOLIDAY, - $year - ); - } else { - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new \DateTime("$year-4-5", new \DateTimeZone(self::TIMEZONE)) - ); - } + $date = (self::TEMPORARY_CHANGED_YEAR === $year) + ? new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + : new \DateTime("$year-4-5", new \DateTimeZone(self::TIMEZONE)); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + $date + ); } /** @@ -102,14 +98,14 @@ public function testHolidayBeforeEstablishment(): void public function testTranslation(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); - if (self::YEAR_NOT_CELEBRATED !== $year) { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $year, - [self::LOCALE => '식목일'] - ); - } + $translation = (self::TEMPORARY_CHANGED_YEAR === $year) ? '사방의 날' : '식목일'; + + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => $translation] + ); } /** @@ -120,13 +116,11 @@ public function testTranslation(): void public function testHolidayType(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); - if (self::YEAR_NOT_CELEBRATED !== $year) { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $year, - Holiday::TYPE_OFFICIAL - ); - } + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); } } diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index f067ab0bb..7e51df09a 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -31,7 +31,7 @@ class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements HolidayTestCa /** * The year in which the holiday was first established. */ - public const ESTABLISHMENT_YEAR = 1956; + public const ESTABLISHMENT_YEAR = 1976; /** * The year in which the holiday was removed. diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index 87477ec66..eed7cf329 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -16,7 +16,6 @@ namespace Yasumi\tests\SouthKorea; use Yasumi\Holiday; -use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; /** @@ -34,6 +33,11 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements HolidayTestC */ public const ESTABLISHMENT_YEAR = 1975; + /** + * The year of upper limit for tests of lunar date. + */ + public const LUNAR_TEST_LIMIT = 2050; + /** * Tests the holiday defined in this test. * @@ -41,13 +45,39 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements HolidayTestC */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); - if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { - $this->assertHoliday( + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime(self::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests substitute holidays. + * + * @dataProvider SubstituteHolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param ?string $expected the expected date + * + * @throws \Exception + */ + public function testSubstituteHoliday(int $year, ?string $expected): void + { + if ($expected) { + $this->assertSubstituteHoliday( self::REGION, self::HOLIDAY, $year, - new \DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)) + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + ); + } else { + $this->assertNotSubstituteHoliday( + self::REGION, + self::HOLIDAY, + $year ); } } @@ -73,15 +103,13 @@ public function testHolidayBeforeEstablishment(): void */ 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 => '부처님오신날'] - ); - } + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '부처님오신날'] + ); } /** @@ -91,14 +119,39 @@ public function testTranslation(): void */ 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 - ); - } + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + } + + /** + * Returns a list of test dates. + * + * @return array list of test dates for the holiday defined in this test + */ + public function SubstituteHolidayDataProvider(): array + { + return [ + [1975, null], + [2005, null], + [2020, null], + [2021, null], + [2022, null], + [2023, '2023-05-29'], + [2024, null], + [2025, '2025-05-06'], + [2026, '2026-05-25'], + [2027, null], + [2028, null], + [2029, '2029-05-21'], + [2030, null], + [2031, null], + [2032, '2032-05-17'], + [2036, '2036-05-06'], + ]; } } diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 696f651a2..f6e264ef7 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -31,7 +31,7 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * The year in which the holiday was first established. */ - public const ESTABLISHMENT_YEAR = 1970; + public const ESTABLISHMENT_YEAR = 1975; /** * Tests the holiday defined in this test. diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index c6f3f815a..c1ec36d05 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -49,6 +49,34 @@ public function testHoliday(): void ); } + /** + * Tests substitute holidays. + * + * @dataProvider SubstituteHolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param ?string $expected the expected date + * + * @throws \Exception + */ + public function testSubstituteHoliday(int $year, ?string $expected): void + { + if ($expected) { + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + ); + } else { + $this->assertNotSubstituteHoliday( + self::REGION, + self::HOLIDAY, + $year + ); + } + } + /** * Tests the holiday defined in this test before establishment. * @@ -92,4 +120,41 @@ public function testHolidayType(): void Holiday::TYPE_OFFICIAL ); } + + /** + * Returns a list of test dates. + * + * @return array list of test dates for the holiday defined in this test + */ + public function SubstituteHolidayDataProvider(): array + { + return [ + [1949, null], + [1950, null], + [1959, null], + [1960, '1960-12-26'], + [1965, null], + [2020, null], + [2021, null], + [2022, null], + [2023, null], + [2024, null], + [2025, null], + [2026, null], + [2027, '2027-12-27'], + [2028, null], + [2029, null], + [2030, null], + [2031, null], + [2032, '2032-12-27'], + [2033, '2033-12-26'], + [2034, null], + [2035, null], + [2036, null], + [2037, null], + [2038, '2038-12-27'], + [2039, '2039-12-26'], + [2040, null], + ]; + } } diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index fbac5fcc5..554a37118 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -16,7 +16,6 @@ namespace Yasumi\tests\SouthKorea; use Yasumi\Holiday; -use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; /** @@ -34,6 +33,11 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public const ESTABLISHMENT_YEAR = 1949; + /** + * The year of upper limit for tests of lunar date. + */ + public const LUNAR_TEST_LIMIT = 2050; + /** * Tests the holiday defined in this test. * @@ -41,32 +45,30 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $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')) - ); - } + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $date = new \DateTime(self::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')) + ); } } @@ -173,30 +175,31 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); - if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '추석'] + ); + + if ($year >= 1986) { + $this->assertTranslatedHolidayName( + self::REGION, + 'dayAfterChuseok', + $year, + [self::LOCALE => '추석 연휴'] + ); + } + + if ($year >= 1989) { $this->assertTranslatedHolidayName( self::REGION, - self::HOLIDAY, + 'dayBeforeChuseok', $year, - [self::LOCALE => '추석'] + [self::LOCALE => '추석 연휴'] ); - if ($year >= 1986) { - $this->assertTranslatedHolidayName( - self::REGION, - 'dayAfterChuseok', - $year, - [self::LOCALE => '추석 연휴'] - ); - } - if ($year >= 1989) { - $this->assertTranslatedHolidayName( - self::REGION, - 'dayBeforeChuseok', - $year, - [self::LOCALE => '추석 연휴'] - ); - } } } @@ -207,30 +210,31 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); - if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + + $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, - self::HOLIDAY, + 'dayBeforeChuseok', $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/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index a3e326816..1e29dba1e 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -31,7 +31,7 @@ class MemorialDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase /** * The year in which the holiday was first established. */ - public const ESTABLISHMENT_YEAR = 1966; + public const ESTABLISHMENT_YEAR = 1956; /** * Tests the holiday defined in this test. diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 54e9bada6..79f66f40b 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -16,7 +16,6 @@ namespace Yasumi\tests\SouthKorea; use Yasumi\Holiday; -use Yasumi\Provider\SouthKorea; use Yasumi\tests\HolidayTestCase; /** @@ -34,6 +33,11 @@ class SeollalTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public const ESTABLISHMENT_YEAR = 1985; + /** + * The year of upper limit for tests of lunar date. + */ + public const LUNAR_TEST_LIMIT = 2050; + /** * Tests the holiday defined in this test. * @@ -41,30 +45,29 @@ class SeollalTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $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)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $date = new \DateTime(self::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)); + if ($year >= 1985) { // 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')) - ); - } + if ($year >= 1989) { + // 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')) + ); } } @@ -128,28 +131,28 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); - if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { - $this->assertTranslatedHolidayName( + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '설날'] + ); + + if ($year >= 1990) { + $this->assertHolidayType( self::REGION, - self::HOLIDAY, + 'dayBeforeSeollal', $year, - [self::LOCALE => '설날'] + Holiday::TYPE_OFFICIAL + ); + $this->assertHolidayType( + self::REGION, + 'dayAfterSeollal', + $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 - ); - } } } @@ -160,28 +163,28 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); - if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + + $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, - self::HOLIDAY, + 'dayAfterSeollal', $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 index e59b90f92..5fc3d1981 100644 --- a/tests/SouthKorea/SouthKoreaBaseTestCase.php +++ b/tests/SouthKorea/SouthKoreaBaseTestCase.php @@ -33,4 +33,77 @@ abstract class SouthKoreaBaseTestCase extends TestCase /** Locale that is considered common for this provider. */ public const LOCALE = 'ko_KR'; + + /** Lunar dates for lunar holidays */ + public const LUNAR_HOLIDAY = [ + 'seollal' => [ + '1949' => '1949-01-29', '1950' => '1950-02-17', '1951' => '1951-02-06', '1952' => '1952-01-27', '1953' => '1953-02-14', + '1954' => '1954-02-04', '1955' => '1955-01-24', '1956' => '1956-02-12', '1957' => '1957-01-31', '1958' => '1958-02-19', + '1959' => '1959-02-08', '1960' => '1960-01-28', '1961' => '1961-02-15', '1962' => '1962-02-05', '1963' => '1963-01-25', + '1964' => '1964-02-13', '1965' => '1965-02-02', '1966' => '1966-01-22', '1967' => '1967-02-09', '1968' => '1968-01-30', + '1969' => '1969-02-17', '1970' => '1970-02-06', '1971' => '1971-01-27', '1972' => '1972-02-15', '1973' => '1973-02-03', + '1974' => '1974-01-23', '1975' => '1975-02-11', '1976' => '1976-01-31', '1977' => '1977-02-18', '1978' => '1978-02-07', + '1979' => '1979-01-28', '1980' => '1980-02-16', '1981' => '1981-02-05', '1982' => '1982-01-25', '1983' => '1983-02-13', + '1984' => '1984-02-02', '1985' => '1985-02-20', '1986' => '1986-02-09', '1987' => '1987-01-29', '1988' => '1988-02-18', + '1989' => '1989-02-06', '1990' => '1990-01-27', '1991' => '1991-02-15', '1992' => '1992-02-04', '1993' => '1993-01-23', + '1994' => '1994-02-10', '1995' => '1995-01-31', '1996' => '1996-02-19', '1997' => '1997-02-08', '1998' => '1998-01-28', + '1999' => '1999-02-16', '2000' => '2000-02-05', '2001' => '2001-01-24', '2002' => '2002-02-12', '2003' => '2003-02-01', + '2004' => '2004-01-22', '2005' => '2005-02-09', '2006' => '2006-01-29', '2007' => '2007-02-18', '2008' => '2008-02-07', + '2009' => '2009-01-26', '2010' => '2010-02-14', '2011' => '2011-02-03', '2012' => '2012-01-23', '2013' => '2013-02-10', + '2014' => '2014-01-31', '2015' => '2015-02-19', '2016' => '2016-02-08', '2017' => '2017-01-28', '2018' => '2018-02-16', + '2019' => '2019-02-05', '2020' => '2020-01-25', '2021' => '2021-02-12', '2022' => '2022-02-01', '2023' => '2023-01-22', + '2024' => '2024-02-10', '2025' => '2025-01-29', '2026' => '2026-02-17', '2027' => '2027-02-07', '2028' => '2028-01-27', + '2029' => '2029-02-13', '2030' => '2030-02-03', '2031' => '2031-01-23', '2032' => '2032-02-11', '2033' => '2033-01-31', + '2034' => '2034-02-19', '2035' => '2035-02-08', '2036' => '2036-01-28', '2037' => '2037-02-15', '2038' => '2038-02-04', + '2039' => '2039-01-24', '2040' => '2040-02-12', '2041' => '2041-02-01', '2042' => '2042-01-22', '2043' => '2043-02-10', + '2044' => '2044-01-30', '2045' => '2045-02-17', '2046' => '2046-02-06', '2047' => '2047-01-26', '2048' => '2048-02-14', + '2049' => '2049-02-02', '2050' => '2050-01-23', + ], + 'buddhasBirthday' => [ + '1949' => '1949-05-05', '1950' => '1950-05-24', '1951' => '1951-05-13', '1952' => '1952-05-01', '1953' => '1953-05-20', + '1954' => '1954-05-10', '1955' => '1955-05-29', '1956' => '1956-05-17', '1957' => '1957-05-07', '1958' => '1958-05-26', + '1959' => '1959-05-15', '1960' => '1960-05-03', '1961' => '1961-05-22', '1962' => '1962-05-11', '1963' => '1963-05-01', + '1964' => '1964-05-19', '1965' => '1965-05-08', '1966' => '1966-05-27', '1967' => '1967-05-16', '1968' => '1968-05-05', + '1969' => '1969-05-23', '1970' => '1970-05-12', '1971' => '1971-05-02', '1972' => '1972-05-20', '1973' => '1973-05-10', + '1974' => '1974-04-29', '1975' => '1975-05-18', '1976' => '1976-05-06', '1977' => '1977-05-25', '1978' => '1978-05-14', + '1979' => '1979-05-03', '1980' => '1980-05-21', '1981' => '1981-05-11', '1982' => '1982-05-01', '1983' => '1983-05-20', + '1984' => '1984-05-08', '1985' => '1985-05-27', '1986' => '1986-05-16', '1987' => '1987-05-05', '1988' => '1988-05-23', + '1989' => '1989-05-12', '1990' => '1990-05-02', '1991' => '1991-05-21', '1992' => '1992-05-10', '1993' => '1993-05-28', + '1994' => '1994-05-18', '1995' => '1995-05-07', '1996' => '1996-05-24', '1997' => '1997-05-14', '1998' => '1998-05-03', + '1999' => '1999-05-22', '2000' => '2000-05-11', '2001' => '2001-05-01', '2002' => '2002-05-19', '2003' => '2003-05-08', + '2004' => '2004-05-26', '2005' => '2005-05-15', '2006' => '2006-05-05', '2007' => '2007-05-24', '2008' => '2008-05-12', + '2009' => '2009-05-02', '2010' => '2010-05-21', '2011' => '2011-05-10', '2012' => '2012-05-28', '2013' => '2013-05-17', + '2014' => '2014-05-06', '2015' => '2015-05-25', '2016' => '2016-05-14', '2017' => '2017-05-03', '2018' => '2018-05-22', + '2019' => '2019-05-12', '2020' => '2020-04-30', '2021' => '2021-05-19', '2022' => '2022-05-08', '2023' => '2023-05-27', + '2024' => '2024-05-15', '2025' => '2025-05-05', '2026' => '2026-05-24', '2027' => '2027-05-13', '2028' => '2028-05-02', + '2029' => '2029-05-20', '2030' => '2030-05-09', '2031' => '2031-05-28', '2032' => '2032-05-16', '2033' => '2033-05-06', + '2034' => '2034-05-25', '2035' => '2035-05-15', '2036' => '2036-05-03', '2037' => '2037-05-22', '2038' => '2038-05-11', + '2039' => '2039-04-30', '2040' => '2040-05-18', '2041' => '2041-05-07', '2042' => '2042-05-26', '2043' => '2043-05-16', + '2044' => '2044-05-05', '2045' => '2045-05-24', '2046' => '2046-05-13', '2047' => '2047-05-02', '2048' => '2048-05-20', + '2049' => '2049-05-09', '2050' => '2050-05-28', + ], + 'chuseok' => [ + '1949' => '1949-10-06', '1950' => '1950-09-26', '1951' => '1951-09-15', '1952' => '1952-10-03', '1953' => '1953-09-22', + '1954' => '1954-09-11', '1955' => '1955-09-30', '1956' => '1956-09-19', '1957' => '1957-09-08', '1958' => '1958-09-27', + '1959' => '1959-09-17', '1960' => '1960-10-05', '1961' => '1961-09-24', '1962' => '1962-09-13', '1963' => '1963-10-02', + '1964' => '1964-09-20', '1965' => '1965-09-10', '1966' => '1966-09-29', '1967' => '1967-09-18', '1968' => '1968-10-06', + '1969' => '1969-09-26', '1970' => '1970-09-15', '1971' => '1971-10-03', '1972' => '1972-09-22', '1973' => '1973-09-11', + '1974' => '1974-09-30', '1975' => '1975-09-20', '1976' => '1976-09-08', '1977' => '1977-09-27', '1978' => '1978-09-17', + '1979' => '1979-10-05', '1980' => '1980-09-23', '1981' => '1981-09-12', '1982' => '1982-10-01', '1983' => '1983-09-21', + '1984' => '1984-09-10', '1985' => '1985-09-29', '1986' => '1986-09-18', '1987' => '1987-10-07', '1988' => '1988-09-25', + '1989' => '1989-09-14', '1990' => '1990-10-03', '1991' => '1991-09-22', '1992' => '1992-09-11', '1993' => '1993-09-30', + '1994' => '1994-09-20', '1995' => '1995-09-09', '1996' => '1996-09-27', '1997' => '1997-09-16', '1998' => '1998-10-05', + '1999' => '1999-09-24', '2000' => '2000-09-12', '2001' => '2001-10-01', '2002' => '2002-09-21', '2003' => '2003-09-11', + '2004' => '2004-09-28', '2005' => '2005-09-18', '2006' => '2006-10-06', '2007' => '2007-09-25', '2008' => '2008-09-14', + '2009' => '2009-10-03', '2010' => '2010-09-22', '2011' => '2011-09-12', '2012' => '2012-09-30', '2013' => '2013-09-19', + '2014' => '2014-09-08', '2015' => '2015-09-27', '2016' => '2016-09-15', '2017' => '2017-10-04', '2018' => '2018-09-24', + '2019' => '2019-09-13', '2020' => '2020-10-01', '2021' => '2021-09-21', '2022' => '2022-09-10', '2023' => '2023-09-29', + '2024' => '2024-09-17', '2025' => '2025-10-06', '2026' => '2026-09-25', '2027' => '2027-09-15', '2028' => '2028-10-03', + '2029' => '2029-09-22', '2030' => '2030-09-12', '2031' => '2031-10-01', '2032' => '2032-09-19', '2033' => '2033-09-08', + '2034' => '2034-09-27', '2035' => '2035-09-16', '2036' => '2036-10-04', '2037' => '2037-09-24', '2038' => '2038-09-13', + '2039' => '2039-10-02', '2040' => '2040-09-21', '2041' => '2041-09-10', '2042' => '2042-09-28', '2043' => '2043-09-17', + '2044' => '2044-10-05', '2045' => '2045-09-25', '2046' => '2046-09-15', '2047' => '2047-10-04', '2048' => '2048-09-22', + '2049' => '2049-09-11', '2050' => '2050-09-30', + ], + ]; } diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 82e17379e..9ab30faee 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -18,12 +18,18 @@ use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\ProviderTestCase; +use Yasumi\Yasumi; /** * Class for testing holidays in South Korea. */ class SouthKoreaTest extends SouthKoreaBaseTestCase implements ProviderTestCase { + /** + * @var int the year of upper limit for tests of lunar date + */ + public const LUNAR_TEST_LIMIT = 2050; + /** * @var int year random year number used for all tests in this Test Case */ @@ -36,7 +42,7 @@ class SouthKoreaTest extends SouthKoreaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1949, 2050); + $this->year = $this->generateRandomYear(1949, self::LUNAR_TEST_LIMIT); } /** @@ -45,56 +51,65 @@ protected function setUp(): void public function testOfficialHolidays(): void { $officialHolidays = []; + if ($this->year >= 1949) { $officialHolidays[] = 'independenceMovementDay'; $officialHolidays[] = 'liberationDay'; $officialHolidays[] = 'nationalFoundationDay'; + $officialHolidays[] = 'newYearsDay'; + $officialHolidays[] = 'chuseok'; $officialHolidays[] = 'christmasDay'; - if (ArborDayTest::YEAR_NOT_CELEBRATED !== $this->year && $this->year < ArborDayTest::REMOVED_YEAR + 1) { - $officialHolidays[] = 'arborDay'; + + if ($this->year >= 1950 && $this->year < 1976) { + $officialHolidays[] = 'unitedNationsDay'; } - if ($this->year <= 1990 || $this->year > 2012) { - $officialHolidays[] = 'hangulDay'; + + if ($this->year >= 1956) { + $officialHolidays[] = 'memorialDay'; } - if ($this->year < 2008) { - $officialHolidays[] = 'constitutionDay'; + + if ($this->year >= 1975) { + $officialHolidays[] = 'childrensDay'; + $officialHolidays[] = 'buddhasBirthday'; } - } - if ($this->year >= 1950) { - $officialHolidays[] = 'newYearsDay'; - if ($this->year <= 1990) { - $officialHolidays[] = 'twoDaysLaterNewYearsDay'; + + if ($this->year >= 1976 && $this->year <= 1990) { + $officialHolidays[] = 'armedForcesDay'; } - if ($this->year <= 1998) { - $officialHolidays[] = 'dayAfterNewYearsDay'; + + if ($this->year >= 1985) { + $officialHolidays[] = 'seollal'; } - } - 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'; } + + if ($this->year <= 1989) { + $officialHolidays[] = 'twoDaysLaterNewYearsDay'; + } + + if ($this->year <= 1990 || $this->year > 2012) { + $officialHolidays[] = 'hangulDay'; + } + + if ($this->year <= 1998) { + $officialHolidays[] = 'dayAfterNewYearsDay'; + } + + if ($this->year <= 2005) { + $officialHolidays[] = 'arborDay'; + } + + if ($this->year < 2008) { + $officialHolidays[] = 'constitutionDay'; + } } $this->assertDefinedHolidays($officialHolidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); @@ -140,4 +155,17 @@ public function testSources(): void { $this->assertSources(self::REGION, 3); } + + /** + * Tests if all generation methods is exists in provider. + */ + public function testGenerationMethods(): void + { + $holidayProvider = Yasumi::create(self::REGION, $this->year); + + $this->assertIsArray(SouthKorea::HOLIDAY_NAMES, 'Yasumi\Provider\SouthKorea::HOLIDAY_NAMES is not array'); + foreach (SouthKorea::HOLIDAY_NAMES as $key => $names) { + $this->assertTrue(method_exists($holidayProvider, $key), sprintf('Generation method `%s` is not declared in provider `%s`', $key, self::REGION)); + } + } } diff --git a/tests/SouthKorea/UnitedNationsDayTest.php b/tests/SouthKorea/UnitedNationsDayTest.php new file mode 100644 index 000000000..348f2bcc9 --- /dev/null +++ b/tests/SouthKorea/UnitedNationsDayTest.php @@ -0,0 +1,114 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing United Nations Day in South Korea. + */ +class UnitedNationsDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'unitedNationsDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1950; + + /** + * The year in which the holiday was removed. + */ + public const REMOVED_YEAR = 1975; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("$year-10-24", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test after removal. + * + * @throws \Exception + */ + public function testHolidayAfterRemoval(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::REMOVED_YEAR + 1) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * + * @throws \Exception + */ + public function testHolidayBeforeEstablishment(): void + { + $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 \Exception + */ + 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 \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} From 1ceeea25a3ae4756a3a8f03927f60b9d7dcae8fb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 10 Jun 2023 21:19:01 +0900 Subject: [PATCH 484/687] Refactor code for improved readability and consistency - Remove comments that are not needed for understanding the code - Throw a runtime exception for date interval addition and subtraction if date is not immutable Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 336e0d0a1..be656ac38 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -72,17 +72,17 @@ public static function nextWorkingDay( \DateTimeInterface $startDate, int $workingDays = 1 ): \DateTimeInterface { - // convert to immutable date to prevent modification of the original $date = $startDate instanceof \DateTime ? \DateTimeImmutable::createFromMutable($startDate) : $startDate; - $provider = null; while ($workingDays > 0) { $date = $date->add(new \DateInterval('P1D')); - if (! $provider instanceof ProviderInterface) { - $provider = self::create($class, (int) $date->format('Y')); - } elseif ($provider->getYear() !== (int) $date->format('Y')) { + if (! $date instanceof \DateTimeImmutable) { + throw new \RuntimeException('Unable to perform date interval addition'); + } + + if (! $provider instanceof ProviderInterface || $provider->getYear() !== (int) $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } @@ -268,21 +268,17 @@ public static function prevWorkingDay( \DateTimeInterface $startDate, int $workingDays = 1 ): \DateTimeInterface { - // convert to immutable date to prevent modification of the original $date = $startDate instanceof \DateTime ? \DateTimeImmutable::createFromMutable($startDate) : $startDate; - $provider = null; while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); if (! $date instanceof \DateTimeImmutable) { - throw new \RuntimeException('unable to perform date interval subtraction'); + throw new \RuntimeException('Unable to perform date interval subtraction'); } - if (! $provider instanceof ProviderInterface) { - $provider = self::create($class, (int) $date->format('Y')); - } elseif ($provider->getYear() !== (int) $date->format('Y')) { + if (! $provider instanceof ProviderInterface || $provider->getYear() !== (int) $date->format('Y')) { $provider = self::create($class, (int) $date->format('Y')); } From c6fa50cf5177549d0668b348d86b7576838db953 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 10 Jun 2023 21:28:29 +0900 Subject: [PATCH 485/687] Remove unused method parameter and simplified array by directly returning the results. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 38 ++++++++++++++---------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 50547a994..2337d38aa 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -808,27 +808,25 @@ private function calculateBefore2013(int $year): array * * @return array list of holidays */ - private function calculateCurrent(int $year): array + private function calculateCurrent(): array { - $officialHolidays = []; - - $officialHolidays[] = 'newYearsDay'; - $officialHolidays[] = 'dayBeforeSeollal'; - $officialHolidays[] = 'seollal'; - $officialHolidays[] = 'dayAfterSeollal'; - $officialHolidays[] = 'independenceMovementDay'; - $officialHolidays[] = 'buddhasBirthday'; - $officialHolidays[] = 'childrensDay'; - $officialHolidays[] = 'memorialDay'; - $officialHolidays[] = 'liberationDay'; - $officialHolidays[] = 'dayBeforeChuseok'; - $officialHolidays[] = 'chuseok'; - $officialHolidays[] = 'dayAfterChuseok'; - $officialHolidays[] = 'nationalFoundationDay'; - $officialHolidays[] = 'hangulDay'; - $officialHolidays[] = 'christmasDay'; - - return $officialHolidays; + return [ + 'newYearsDay', + 'dayBeforeSeollal', + 'seollal', + 'dayAfterSeollal', + 'independenceMovementDay', + 'buddhasBirthday', + 'childrensDay', + 'memorialDay', + 'liberationDay', + 'dayBeforeChuseok', + 'chuseok', + 'dayAfterChuseok', + 'nationalFoundationDay', + 'hangulDay', + 'christmasDay', + ]; } /** From 75399e1be440657034dc82ce4fb196d2695534b8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 15 Jun 2023 00:56:33 +0900 Subject: [PATCH 486/687] refactor: Extract constant representing the date format (avoid 'magic' constants). Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 8 +++++--- src/Yasumi/Filters/OnFilter.php | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 9cce88ce8..f0246e3e1 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -27,6 +27,8 @@ */ class BetweenFilter extends AbstractFilter { + private const DATE_FORMAT = 'Y-m-d'; + /** start date of the time frame to check against. */ private string $startDate; @@ -53,13 +55,13 @@ public function __construct( ) { parent::__construct($iterator); $this->equal = $equal; - $this->startDate = $startDate->format('Y-m-d'); - $this->endDate = $endDate->format('Y-m-d'); + $this->startDate = $startDate->format(self::DATE_FORMAT); + $this->endDate = $endDate->format(self::DATE_FORMAT); } public function accept(): bool { - $holiday = $this->getInnerIterator()->current()->format('Y-m-d'); + $holiday = $this->getInnerIterator()->current()->format(self::DATE_FORMAT); if ($this->equal && $holiday >= $this->startDate && $holiday <= $this->endDate) { return true; diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 028fe33c5..6056b5e1b 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -26,6 +26,8 @@ */ class OnFilter extends AbstractFilter { + private const DATE_FORMAT = 'Y-m-d'; + /** date to check for holidays */ private string $date; @@ -40,12 +42,12 @@ public function __construct( \DateTimeInterface $date ) { parent::__construct($iterator); - $this->date = $date->format('Y-m-d'); + $this->date = $date->format(self::DATE_FORMAT); } public function accept(): bool { - $holiday = $this->getInnerIterator()->current()->format('Y-m-d'); + $holiday = $this->getInnerIterator()->current()->format(self::DATE_FORMAT); return $holiday === $this->date; } From b781aaa41b6dc691f4e6d3535d7a546f48e3b4d4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 15 Jun 2023 01:06:54 +0900 Subject: [PATCH 487/687] refactor: Replaced the anonymous function inside array_map with arrow function syntax to make it more concise and readable. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/AbstractFilter.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 3581a5ccc..871ff2122 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -31,14 +31,12 @@ abstract class AbstractFilter extends \FilterIterator implements \Countable */ public function count(): int { - $names = array_map(static function ($holiday) { - if ($holiday instanceof SubstituteHoliday) { - return $holiday->getSubstitutedHoliday()->getKey(); - } + $names = array_map( + static fn ($holiday) => $holiday instanceof SubstituteHoliday ? + $holiday->getSubstitutedHoliday()->getKey() : $holiday->getKey(), + iterator_to_array($this) + ); - return $holiday->getKey(); - }, iterator_to_array($this)); - - return \count(array_unique($names)); + return count(array_unique($names)); } } From a9732a4e17a16e7a22dad22ebfcd3e2f4acc5c44 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 16 Jun 2023 19:55:42 +0900 Subject: [PATCH 488/687] style: Simplify the code and remove useless doc blocks/annotations. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/AbstractFilter.php | 3 --- src/Yasumi/Filters/BetweenFilter.php | 4 ++-- src/Yasumi/Filters/OnFilter.php | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 871ff2122..dc82e5308 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -17,9 +17,6 @@ use Yasumi\SubstituteHoliday; -/** - * AbstractFilter. - */ abstract class AbstractFilter extends \FilterIterator implements \Countable { /** diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index f0246e3e1..2e25215b8 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -63,8 +63,8 @@ public function accept(): bool { $holiday = $this->getInnerIterator()->current()->format(self::DATE_FORMAT); - if ($this->equal && $holiday >= $this->startDate && $holiday <= $this->endDate) { - return true; + if ($this->equal) { + return $holiday >= $this->startDate && $holiday <= $this->endDate; } return $holiday > $this->startDate && $holiday < $this->endDate; diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 6056b5e1b..5dc7976ec 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -47,8 +47,6 @@ public function __construct( public function accept(): bool { - $holiday = $this->getInnerIterator()->current()->format(self::DATE_FORMAT); - - return $holiday === $this->date; + return $this->getInnerIterator()->current()->format(self::DATE_FORMAT) === $this->date; } } From 62e7f3aed161036993af45f0d96ec315069a7f63 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 16 Jun 2023 20:37:40 +0900 Subject: [PATCH 489/687] style: Simplify the code making it more concise and readable. Signed-off-by: Sacha Telgenhof --- src/Yasumi/SubstituteHoliday.php | 14 ++++++++------ src/Yasumi/Translations.php | 23 ++--------------------- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index d86df7709..55779ee25 100644 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -107,12 +107,14 @@ public function getName(?array $locales = null): string { $name = parent::getName(); - if ($name === $this->getKey()) { - foreach ($this->getLocales($locales) as $localeList) { - $pattern = $this->substituteHolidayTranslations[$localeList] ?? null; - if ($pattern) { - return str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); - } + if ($name !== $this->getKey()) { + return $name; + } + + foreach ($this->getLocales($locales) as $localeList) { + $pattern = $this->substituteHolidayTranslations[$localeList] ?? null; + if ($pattern) { + return str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); } } diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index ffb572cfa..a08ad84a2 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -17,9 +17,6 @@ use Yasumi\Exception\UnknownLocaleException; -/** - * Class Translations. - */ class Translations implements TranslationsInterface { /** @@ -100,10 +97,6 @@ public function addTranslation(string $key, string $locale, string $translation) { $this->checkLocale($locale); - if (! \array_key_exists($key, $this->translations)) { - $this->translations[$key] = []; - } - $this->translations[$key][$locale] = $translation; } @@ -117,15 +110,7 @@ public function addTranslation(string $key, string $locale, string $translation) */ public function getTranslation(string $key, string $locale): ?string { - if (! \array_key_exists($key, $this->translations)) { - return null; - } - - if (! \array_key_exists($locale, $this->translations[$key])) { - return null; - } - - return $this->translations[$key][$locale]; + return $this->translations[$key][$locale] ?? null; } /** @@ -137,11 +122,7 @@ public function getTranslation(string $key, string $locale): ?string */ public function getTranslations(string $key): array { - if (! \array_key_exists($key, $this->translations)) { - return []; - } - - return $this->translations[$key]; + return $this->translations[$key] ?? []; } private function checkLocale(string $locale): void From 825cb4987ff14de036c3a5eb2a7b6885e091f787 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 16 Jun 2023 20:51:50 +0900 Subject: [PATCH 490/687] refactor: Remove unnecessary method argument as method accepts none and change switch block to a simple check as it only has one scenario. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 2337d38aa..0cadd5fa1 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -219,7 +219,7 @@ public function initialize(): void $officialHolidays = $this->calculateBefore2013($this->year); } else { // Holidays in use from 2013 - $officialHolidays = $this->calculateCurrent($this->year); + $officialHolidays = $this->calculateCurrent(); } foreach ($officialHolidays as $holiday) { @@ -717,15 +717,10 @@ protected function unitedNationsDay( */ protected function getTranslations(string $key, int $year): array { - switch ($key) { - case 'arborDay': - $names = (1960 === $year) - ? ['en' => 'Arbor Day', 'ko' => '사방의 날'] - : self::HOLIDAY_NAMES[$key]; - break; - default: - $names = isset(self::HOLIDAY_NAMES[$key]) ? self::HOLIDAY_NAMES[$key] : []; - break; + $names = self::HOLIDAY_NAMES[$key] ?? []; + + if ('arborDay' === $key && 1960 === $year) { + $names = ['en' => 'Arbor Day', 'ko' => '사방의 날']; } return $names; From 69d3943d0659efdf8e8df00fb7fc45340f90862b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 16 Jun 2023 20:53:54 +0900 Subject: [PATCH 491/687] style: Add expected newline between different annotations. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 1 + src/Yasumi/SubstituteHoliday.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index aaf211770..e0d3fb9cb 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -60,6 +60,7 @@ class Holiday extends \DateTime implements \JsonSerializable /** * @deprecated Public access to this property is deprecated in favor of getKey() + * * @see getKey() */ public string $shortName; diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 55779ee25..0c7a5ec2b 100644 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -30,6 +30,7 @@ class SubstituteHoliday extends Holiday { /** * @deprecated public access to this property is deprecated in favor of getSubstitutedHoliday() + * * @see getSubstitutedHoliday() */ public Holiday $substitutedHoliday; From 89dfcd9be96604dabdaf42f7ee0f68011e12c267 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jun 2023 09:11:40 +0900 Subject: [PATCH 492/687] style: Remove unnecessary intermediate variable. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Netherlands.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index df44b39b2..5906027df 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -105,35 +105,32 @@ public function getSources(): array private function calculateCarnival(): void { $easter = $this->calculateEaster($this->year, $this->timezone); - $carnivalDay1 = clone $easter; $this->addHoliday(new Holiday( 'carnivalDay', ['en' => 'Carnival', 'nl' => 'Carnaval'], - $carnivalDay1->sub(new \DateInterval('P49D')), + (clone $easter)->sub(new \DateInterval('P49D')), $this->locale, Holiday::TYPE_OBSERVANCE )); - /** + /* * Second Day of Carnival. */ - $carnivalDay2 = clone $easter; $this->addHoliday(new Holiday( 'secondCarnivalDay', ['en' => 'Carnival', 'nl' => 'Carnaval'], - $carnivalDay2->sub(new \DateInterval('P48D')), + (clone $easter)->sub(new \DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE )); - /** + /* * Third Day of Carnival. */ - $carnivalDay3 = clone $easter; $this->addHoliday(new Holiday( 'thirdCarnivalDay', ['en' => 'Carnival', 'nl' => 'Carnaval'], - $carnivalDay3->sub(new \DateInterval('P47D')), + (clone $easter)->sub(new \DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE )); From 993084e5ecdf0a5974fbe4be81654252a92bd7c6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jun 2023 17:42:05 +0900 Subject: [PATCH 493/687] refactor: Optimize some if/then statements and other parts to be more succinct. Signed-off-by: Sacha Telgenhof --- tests/Netherlands/DaylightSavingTime.php | 8 +++--- tests/Netherlands/LiberationDayTest.php | 2 ++ tests/Netherlands/NetherlandsTest.php | 9 ++---- tests/Netherlands/SummerTimeTest.php | 10 +++---- tests/Netherlands/WinterTimeTest.php | 35 +++++++++--------------- 5 files changed, 26 insertions(+), 38 deletions(-) diff --git a/tests/Netherlands/DaylightSavingTime.php b/tests/Netherlands/DaylightSavingTime.php index f805b9313..7008e2285 100644 --- a/tests/Netherlands/DaylightSavingTime.php +++ b/tests/Netherlands/DaylightSavingTime.php @@ -27,12 +27,12 @@ abstract class DaylightSavingTime extends NetherlandsBaseTestCase implements Hol public function __construct() { - $observedYears = range(1916, 1940); - $observedYears = array_merge($observedYears, range(1942, 1945)); - $observedYears = array_merge($observedYears, range(1977, 2037)); // PHP caps future DST transitions + $startYear = 1916; + $endYear = 2037; // PHP caps future DST transitions + $observedYears = array_merge(range($startYear, 1940), range(1942, 1945), range(1977, $endYear)); $this->observedYears = $observedYears; - $this->unobservedYears = array_diff(range(reset($observedYears), end($observedYears)), $observedYears); + $this->unobservedYears = array_diff(range($startYear, $endYear), $observedYears); parent::__construct(); } diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 039b0a448..38365cae6 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -90,12 +90,14 @@ public function testHolidayType(): void $this->generateRandomYear(2001, 2004), Holiday::TYPE_OBSERVANCE ); + $this->assertHolidayType( self::REGION, self::HOLIDAY, 2000, Holiday::TYPE_OFFICIAL ); + $this->assertHolidayType( self::REGION, self::HOLIDAY, diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 4832f1d53..1f6871fc8 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -54,13 +54,8 @@ public function testOfficialHolidays(): void 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); - $this->assertDefinedHolidays([ - 'liberationDay', - ], self::REGION, 2015, Holiday::TYPE_OFFICIAL); - - $this->assertDefinedHolidays([ - 'liberationDay', - ], self::REGION, 2020, Holiday::TYPE_OFFICIAL); + $this->assertDefinedHolidays(['liberationDay'], self::REGION, 2015, Holiday::TYPE_OFFICIAL); + $this->assertDefinedHolidays(['liberationDay'], self::REGION, 2020, Holiday::TYPE_OFFICIAL); } /** diff --git a/tests/Netherlands/SummerTimeTest.php b/tests/Netherlands/SummerTimeTest.php index 5e42bcbde..cf2d26526 100644 --- a/tests/Netherlands/SummerTimeTest.php +++ b/tests/Netherlands/SummerTimeTest.php @@ -99,16 +99,16 @@ public function testSummertime(): void $year = $this->randomYearFromArray($this->observedYears); $expected = "first sunday of april $year"; - if ($year >= 1922) { - $expected = "may 15th $year"; + if ($year >= 1981) { + $expected = "last sunday of march $year"; } - if ($year >= 1943) { + if ($year >= 1943 && $year < 1981) { $expected = "first sunday of april $year"; } - if ($year >= 1981) { - $expected = "last sunday of march $year"; + if ($year >= 1922 && $year < 1943) { + $expected = "may 15th $year"; } if (array_key_exists($year, $this->deviantTransitions)) { diff --git a/tests/Netherlands/WinterTimeTest.php b/tests/Netherlands/WinterTimeTest.php index ecb05c232..c5dde4813 100644 --- a/tests/Netherlands/WinterTimeTest.php +++ b/tests/Netherlands/WinterTimeTest.php @@ -81,30 +81,21 @@ public function testWintertime(): void $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->randomYearFromArray($this->observedYears); - $expected = "last monday of september $year"; - - if ($year >= 1922) { - $expected = "first sunday of october $year"; - } - - if ($year >= 1977) { - $expected = "last sunday of september $year"; - } - - if ($year >= 1996) { - $expected = "last sunday of october $year"; - } - - if (array_key_exists($year, $this->deviantTransitions)) { + $isObserved = in_array($year, $this->observedYears); + + if (true == $isObserved) { + if ($year >= 1996) { + $expected = "last sunday of october $year"; + } elseif ($year >= 1977) { + $expected = "last sunday of september $year"; + } elseif ($year >= 1922) { + $expected = "first sunday of october $year"; + } else { + $expected = "last monday of september $year"; + } + } else { $expected = $this->deviantTransitions[$year]; } - - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) - ); } /** From 0278ba4ef15b161bc5dfd860c51969a0d2d43341 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 17 Jun 2023 18:05:23 +0900 Subject: [PATCH 494/687] refactor: Simplify the calculation of the three Carnival Days in the Netherlands to reduce duplication. Add check in case date subtraction fails. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Netherlands.php | 47 ++++++++++++----------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 5906027df..e00791427 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -105,35 +105,28 @@ public function getSources(): array private function calculateCarnival(): void { $easter = $this->calculateEaster($this->year, $this->timezone); - $this->addHoliday(new Holiday( - 'carnivalDay', - ['en' => 'Carnival', 'nl' => 'Carnaval'], - (clone $easter)->sub(new \DateInterval('P49D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - /* - * Second Day of Carnival. - */ - $this->addHoliday(new Holiday( - 'secondCarnivalDay', - ['en' => 'Carnival', 'nl' => 'Carnaval'], - (clone $easter)->sub(new \DateInterval('P48D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); + $intervals = [ + 'carnivalDay' => 'P49D', + 'secondCarnivalDay' => 'P48D', + 'thirdCarnivalDay' => 'P47D', + ]; - /* - * Third Day of Carnival. - */ - $this->addHoliday(new Holiday( - 'thirdCarnivalDay', - ['en' => 'Carnival', 'nl' => 'Carnaval'], - (clone $easter)->sub(new \DateInterval('P47D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); + foreach ($intervals as $name => $interval) { + $date = (clone $easter)->sub(new \DateInterval($interval)); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $name)); + } + + $this->addHoliday(new Holiday( + $name, + ['en' => 'Carnival', 'nl' => 'Carnaval'], + $date, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } } /** From e1a43693cb68b63fb132bad8c3572c112f053ea9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 18 Jun 2023 20:47:34 +0900 Subject: [PATCH 495/687] style: Remove unnecessary blank lines in doc blocks. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 1 - src/Yasumi/SubstituteHoliday.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index e0d3fb9cb..aaf211770 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -60,7 +60,6 @@ class Holiday extends \DateTime implements \JsonSerializable /** * @deprecated Public access to this property is deprecated in favor of getKey() - * * @see getKey() */ public string $shortName; diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 0c7a5ec2b..55779ee25 100644 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -30,7 +30,6 @@ class SubstituteHoliday extends Holiday { /** * @deprecated public access to this property is deprecated in favor of getSubstitutedHoliday() - * * @see getSubstitutedHoliday() */ public Holiday $substitutedHoliday; From b3156b98152cfaa3fe0cc3e25add4bcc9fbe3f27 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 00:32:02 +0900 Subject: [PATCH 496/687] style: Convert implicit variables into explicit ones in double-quoted strings. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 5 +- src/Yasumi/Provider/Argentina.php | 20 +++--- src/Yasumi/Provider/Australia.php | 12 ++-- .../Australia/AustralianCapitalTerritory.php | 4 +- .../Provider/Australia/NewSouthWales.php | 2 +- .../Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 4 +- .../Provider/Australia/SouthAustralia.php | 4 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 4 +- .../Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 10 +-- src/Yasumi/Provider/Brazil.php | 10 +-- src/Yasumi/Provider/Canada.php | 16 ++--- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 4 +- src/Yasumi/Provider/Canada/NovaScotia.php | 4 +- .../Provider/Canada/PrinceEdwardIsland.php | 4 +- src/Yasumi/Provider/Canada/Quebec.php | 4 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 4 +- src/Yasumi/Provider/ChristianHolidays.php | 30 ++++---- src/Yasumi/Provider/CommonHolidays.php | 22 +++--- src/Yasumi/Provider/Croatia.php | 12 ++-- src/Yasumi/Provider/Denmark.php | 4 +- src/Yasumi/Provider/Estonia.php | 6 +- src/Yasumi/Provider/Finland.php | 6 +- src/Yasumi/Provider/France.php | 2 +- src/Yasumi/Provider/Georgia.php | 22 +++--- src/Yasumi/Provider/Germany/Hamburg.php | 2 +- src/Yasumi/Provider/Germany/Saxony.php | 2 +- src/Yasumi/Provider/Greece.php | 8 +-- src/Yasumi/Provider/Hungary.php | 6 +- src/Yasumi/Provider/Ireland.php | 8 +-- src/Yasumi/Provider/Italy.php | 4 +- src/Yasumi/Provider/Japan.php | 60 ++++++++-------- src/Yasumi/Provider/Latvia.php | 6 +- src/Yasumi/Provider/Lithuania.php | 8 +-- src/Yasumi/Provider/Luxembourg.php | 4 +- src/Yasumi/Provider/Netherlands.php | 16 ++--- src/Yasumi/Provider/NewZealand.php | 16 ++--- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 4 +- src/Yasumi/Provider/Portugal.php | 8 +-- src/Yasumi/Provider/Romania.php | 16 ++--- src/Yasumi/Provider/Russia.php | 14 ++-- src/Yasumi/Provider/SouthKorea.php | 70 +++++++++---------- src/Yasumi/Provider/Spain.php | 4 +- src/Yasumi/Provider/Spain/Andalusia.php | 2 +- src/Yasumi/Provider/Spain/Asturias.php | 2 +- src/Yasumi/Provider/Spain/BalearicIslands.php | 2 +- src/Yasumi/Provider/Spain/BasqueCountry.php | 2 +- src/Yasumi/Provider/Spain/CanaryIslands.php | 2 +- src/Yasumi/Provider/Spain/Cantabria.php | 2 +- src/Yasumi/Provider/Spain/CastileAndLeon.php | 2 +- .../Provider/Spain/CastillaLaMancha.php | 2 +- src/Yasumi/Provider/Spain/Catalonia.php | 2 +- src/Yasumi/Provider/Spain/Ceuta.php | 2 +- .../Provider/Spain/CommunityOfMadrid.php | 2 +- src/Yasumi/Provider/Spain/Extremadura.php | 2 +- src/Yasumi/Provider/Spain/Galicia.php | 4 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- .../Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 10 +-- src/Yasumi/Provider/Turkey.php | 12 ++-- src/Yasumi/Provider/USA.php | 24 +++---- src/Yasumi/Provider/Ukraine.php | 14 ++-- src/Yasumi/Provider/UnitedKingdom.php | 24 +++---- .../Provider/UnitedKingdom/Scotland.php | 4 +- src/Yasumi/Yasumi.php | 2 +- tests/Argentina/ChristmasDayTest.php | 2 +- tests/Argentina/FlagDayTest.php | 2 +- .../Argentina/GeneralJoseSanMartinDayTest.php | 2 +- .../GeneralMartinMigueldeGuemesDayTest.php | 2 +- .../Argentina/ImmaculateConceptionDayTest.php | 2 +- tests/Argentina/IndependenceDayTest.php | 2 +- .../Argentina/InternationalWorkersDayTest.php | 2 +- tests/Argentina/MalvinasDayTest.php | 2 +- tests/Argentina/MayRevolutionTest.php | 2 +- .../Argentina/NationalSovereigntyDayTest.php | 2 +- tests/Argentina/NewYearsDayTest.php | 2 +- tests/Argentina/RaceDayTest.php | 2 +- tests/Argentina/RemembranceDayTest.php | 2 +- tests/Austria/AscensionDayTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/EasterMondayTest.php | 2 +- tests/Austria/EasterTest.php | 2 +- .../LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Belgium/AscensionDayTest.php | 2 +- tests/Belgium/EasterMondayTest.php | 2 +- tests/Belgium/EasterTest.php | 2 +- tests/Belgium/PentecostTest.php | 2 +- tests/Belgium/pentecostMondayTest.php | 2 +- tests/Bosnia/EasterTest.php | 2 +- tests/Bosnia/IndependenceDayTest.php | 2 +- tests/Bosnia/StatehoodDayTest.php | 2 +- tests/Brazil/AllSoulsDayTest.php | 2 +- tests/Brazil/AshWednesdayTest.php | 2 +- tests/Brazil/ChristmasDayTest.php | 2 +- tests/Brazil/IndependenceDayTest.php | 2 +- tests/Brazil/InternationalWorkersDayTest.php | 2 +- tests/Brazil/NewYearsDayTest.php | 2 +- tests/Brazil/OurLadyOfAparecidaDayTest.php | 2 +- .../Brazil/ProclamationOfRepublicDayTest.php | 2 +- tests/Brazil/TiradentesDayTest.php | 2 +- tests/Canada/CanadaDayTest.php | 4 +- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 2 +- tests/Canada/NewYearsDayTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 2 +- tests/Canada/ThanksgivingDayTest.php | 2 +- .../Canada/TruthAndReconciliationDayTest.php | 2 +- tests/Croatia/AntifascistStruggleDayTest.php | 2 +- tests/Croatia/EasterMondayTest.php | 2 +- tests/Croatia/EasterTest.php | 2 +- tests/Croatia/HomelandThanksgivingDayTest.php | 2 +- tests/Croatia/IndependenceDayTest.php | 2 +- tests/Croatia/RemembranceDayTest.php | 2 +- tests/Croatia/StatehoodDayTest.php | 4 +- tests/CzechRepublic/EasterMondayTest.php | 2 +- tests/CzechRepublic/GoodFridayTest.php | 2 +- tests/Denmark/AscensionDayTest.php | 2 +- tests/Denmark/ConstitutionDayTest.php | 2 +- tests/Denmark/EasterMondayTest.php | 2 +- tests/Denmark/EasterTest.php | 2 +- tests/Denmark/GoodFridayTest.php | 2 +- tests/Denmark/GreatPrayerDayTest.php | 2 +- tests/Denmark/MaundyThursdayTest.php | 2 +- tests/Denmark/PentecostMondayTest.php | 2 +- tests/Denmark/PentecostTest.php | 2 +- tests/Denmark/SummerTimeTest.php | 2 +- tests/Denmark/WinterTimeTest.php | 4 +- tests/Estonia/IndependenceDayTest.php | 2 +- .../RestorationOfIndependenceDayTest.php | 2 +- tests/Estonia/VictoryDayTest.php | 2 +- tests/Finland/AllSaintsDayTest.php | 2 +- tests/Finland/AscensionDayTest.php | 2 +- tests/Finland/EasterMondayTest.php | 2 +- tests/Finland/EasterTest.php | 2 +- tests/Finland/GoodFridayTest.php | 2 +- tests/Finland/IndependenceDayTest.php | 2 +- tests/Finland/PentecostTest.php | 2 +- tests/Finland/stJohnsDayTest.php | 2 +- tests/France/ArmisticeDayTest.php | 2 +- tests/France/AscensionDayTest.php | 2 +- tests/France/BasRhin/GoodFridayTest.php | 2 +- tests/France/BastilleDayTest.php | 2 +- tests/France/EasterMondayTest.php | 2 +- tests/France/HautRhin/GoodFridayTest.php | 2 +- tests/France/Moselle/GoodFridayTest.php | 2 +- tests/France/PentecostMondayTest.php | 2 +- tests/France/VictoryInEuropeDayTest.php | 2 +- tests/Georgia/EasterTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- .../Brandenburg/ReformationDayTest.php | 2 +- tests/Germany/Bremen/ReformationDayTest.php | 2 +- tests/Germany/EasterMondayTest.php | 2 +- tests/Germany/GermanUnityDayTest.php | 2 +- tests/Germany/GoodFridayTest.php | 2 +- .../Germany/Hamburg/DayOfReformationTest.php | 2 +- .../LowerSaxony/ReformationDayTest.php | 2 +- .../ReformationDayTest.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/Saxony/ReformationDayTest.php | 2 +- .../Saxony/RepentanceAndPrayerDayTest.php | 2 +- .../SaxonyAnhalt/ReformationDayTest.php | 2 +- .../SchleswigHolstein/ReformationDayTest.php | 2 +- .../Germany/Thuringia/ReformationDayTest.php | 2 +- .../Thuringia/WorldChildrensDayTest.php | 2 +- tests/Greece/AscensionDayTest.php | 2 +- tests/Greece/CleanMondayTest.php | 2 +- tests/Greece/EasterMondayTest.php | 2 +- tests/Greece/EasterTest.php | 2 +- tests/Greece/IndepencenceDayTest.php | 2 +- tests/Greece/OhiDayTest.php | 2 +- tests/Greece/PentecostMondayTest.php | 2 +- tests/Greece/PentecostTest.php | 2 +- tests/Greece/PolytechnioTest.php | 2 +- tests/Greece/goodFridayTest.php | 2 +- tests/Hungary/EasterMondayTest.php | 2 +- tests/Hungary/EasterTest.php | 2 +- tests/Hungary/MemorialDay1848Test.php | 2 +- tests/Hungary/MemorialDay1956Test.php | 2 +- tests/Hungary/PentecostMondayTest.php | 2 +- tests/Hungary/PentecostTest.php | 2 +- tests/Hungary/StateFoundationDayTest.php | 2 +- tests/Ireland/AugustHolidayTest.php | 2 +- tests/Ireland/ChristmasDayTest.php | 2 +- tests/Ireland/JuneHolidayTest.php | 2 +- tests/Ireland/MayDayTest.php | 2 +- tests/Ireland/NewYearsDayTest.php | 2 +- tests/Ireland/OctoberHolidayTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 2 +- tests/Ireland/StStephensDayTest.php | 2 +- tests/Italy/EasterMondayTest.php | 2 +- tests/Italy/EasterTest.php | 2 +- tests/Italy/LiberationDayTest.php | 2 +- tests/Italy/RepublicDayTest.php | 2 +- tests/Japan/AutumnalEquinoxDayTest.php | 2 +- tests/Japan/ChildrensDayTest.php | 4 +- tests/Japan/ComingOfAgeDayTest.php | 4 +- tests/Japan/ConstitutionMemorialDayTest.php | 4 +- tests/Japan/CultureDayTest.php | 4 +- tests/Japan/EmperorsBirthdayTest.php | 8 +-- tests/Japan/GreeneryDayTest.php | 8 +-- tests/Japan/LabourThanksgivingDayTest.php | 4 +- tests/Japan/MarineDayTest.php | 10 +-- tests/Japan/MountainDayTest.php | 8 +-- tests/Japan/NationalFoundationDayTest.php | 4 +- tests/Japan/NewYearsDayTest.php | 4 +- tests/Japan/PublicBridgeDayTest.php | 4 +- tests/Japan/RespectForTheAgedDayTest.php | 6 +- tests/Japan/ShowaDayTest.php | 4 +- tests/Japan/SportsDayTest.php | 10 +-- tests/Japan/VernalEquinoxDayTest.php | 2 +- tests/Lithuania/AllSoulsDayTest.php | 2 +- ...rationOfIndependenceOfLithuaniaDayTest.php | 2 +- ...estorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/EasterMondayTest.php | 2 +- tests/Netherlands/EasterTest.php | 2 +- tests/Netherlands/FathersDayTest.php | 2 +- tests/Netherlands/GoodFridayTest.php | 2 +- tests/Netherlands/KingsDayTest.php | 4 +- tests/Netherlands/LiberationDayTest.php | 2 +- tests/Netherlands/MothersDayTest.php | 2 +- tests/Netherlands/PentecostTest.php | 2 +- tests/Netherlands/QueensDayTest.php | 10 +-- tests/Netherlands/SummerTimeTest.php | 8 +-- tests/Netherlands/WinterTimeTest.php | 8 +-- 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/thirdCarnivalDay.php | 2 +- tests/NewZealand/BoxingDayTest.php | 2 +- tests/NewZealand/ChristmasDayTest.php | 2 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 2 +- tests/NewZealand/LabourDayTest.php | 2 +- tests/NewZealand/NewYearsDayTest.php | 2 +- tests/NewZealand/QueensBirthdayTest.php | 2 +- tests/Norway/AscensionDayTest.php | 2 +- tests/Norway/ConstitutionDayTest.php | 2 +- tests/Norway/EasterMondayTest.php | 2 +- tests/Norway/EasterTest.php | 2 +- tests/Norway/GoodFridayTest.php | 2 +- tests/Norway/MaundyThursdayTest.php | 2 +- tests/Norway/PentecostMondayTest.php | 2 +- tests/Norway/PentecostTest.php | 2 +- tests/Poland/ConstitutionDayTest.php | 2 +- tests/Poland/CorpusChristiTest.php | 2 +- tests/Poland/EasterMondayTest.php | 2 +- tests/Poland/EasterTest.php | 2 +- tests/Poland/IndependenceDayTest.php | 2 +- tests/Poland/PentecostTest.php | 2 +- tests/Portugal/AllSaintsDayTest.php | 4 +- tests/Portugal/CarnationRevolutionDayTest.php | 2 +- tests/Portugal/CorpusChristiTest.php | 2 +- tests/Portugal/EasterTest.php | 2 +- tests/Portugal/GoodFridayTest.php | 2 +- tests/Portugal/PortugalDayTest.php | 4 +- tests/Portugal/PortugueseRepublicDayTest.php | 4 +- .../RestorationOfIndependenceTest.php | 8 +-- tests/Randomizer.php | 12 ++-- tests/Romania/AssumptionOfMaryTest.php | 2 +- tests/Romania/ChildrensDayTest.php | 2 +- tests/Romania/ConstantinBrancusiDayTest.php | 2 +- tests/Romania/EasterMondayTest.php | 2 +- tests/Romania/EasterTest.php | 2 +- tests/Romania/EpiphanyTest.php | 2 +- tests/Romania/NationalDayTest.php | 6 +- tests/Romania/PentecostMondayTest.php | 2 +- tests/Romania/PentecostTest.php | 2 +- tests/Romania/StAndrewsDayTest.php | 2 +- tests/Romania/StJohnsDayTest.php | 2 +- tests/Romania/UnitedPrincipalitiesDayTest.php | 2 +- .../Russia/DefenceOfTheFatherlandDayTest.php | 2 +- tests/Russia/RussiaDayTest.php | 2 +- tests/Russia/UnityDayTest.php | 2 +- tests/SouthAfrica/ChristmasDayTest.php | 2 +- tests/SouthAfrica/FreedomDayTest.php | 2 +- tests/SouthAfrica/HeritageDayTest.php | 2 +- tests/SouthAfrica/HumanRightsDayTest.php | 2 +- tests/SouthAfrica/NationalWomensDayTest.php | 2 +- tests/SouthAfrica/NewYearsDayTest.php | 2 +- tests/SouthAfrica/ReconciliationDayTest.php | 2 +- tests/SouthAfrica/SecondChristmasDayTest.php | 2 +- tests/SouthAfrica/WorkersDayTest.php | 2 +- tests/SouthAfrica/YouthDayTest.php | 2 +- tests/SouthKorea/ArborDayTest.php | 4 +- tests/SouthKorea/ArmedForcesDayTest.php | 2 +- tests/SouthKorea/ChildrensDayTest.php | 6 +- 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 +- .../IndependenceMovementDayTest.php | 2 +- tests/SouthKorea/LiberationDayTest.php | 2 +- tests/SouthKorea/MemorialDayTest.php | 2 +- tests/SouthKorea/NewYearsDayTest.php | 2 +- tests/SouthKorea/UnitedNationsDayTest.php | 2 +- tests/Spain/Andalusia/AndalusiaDayTest.php | 2 +- tests/Spain/Aragon/StGeorgesDayTest.php | 2 +- tests/Spain/Asturias/AsturiasDayTest.php | 2 +- .../BalearicIslandsDayTest.php | 2 +- .../BasqueCountry/BasqueCountryDayTest.php | 2 +- .../CanaryIslands/CanaryIslandsDayTest.php | 2 +- tests/Spain/Cantabria/CantabriaDayTest.php | 2 +- .../CastileAndLeon/CastileAndLeonDayTest.php | 2 +- .../CastillaLaManchaDayTest.php | 2 +- .../Catalonia/nationalCataloniaDayTest.php | 2 +- tests/Spain/Ceuta/ceutaDayTest.php | 2 +- .../DosdeMayoUprisingDayTest.php | 2 +- tests/Spain/ConstitutionDayTest.php | 2 +- tests/Spain/EasterMondayTest.php | 2 +- .../Spain/Extremadura/ExtremaduraDayTest.php | 2 +- .../Galicia/GalicianLiteratureDayTest.php | 2 +- tests/Spain/Galicia/stJamesDayTest.php | 2 +- tests/Spain/GoodFridayTest.php | 2 +- tests/Spain/LaRioja/LaRiojaDayTest.php | 2 +- tests/Spain/MaundyThursdayTest.php | 2 +- tests/Spain/NationalDayTest.php | 2 +- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 2 +- .../ValencianCommunityDayTest.php | 2 +- tests/Sweden/AllSaintsDayTest.php | 2 +- tests/Sweden/AllSaintsEveTest.php | 2 +- tests/Sweden/AscensionDayTest.php | 2 +- tests/Sweden/EasterMondayTest.php | 2 +- tests/Sweden/EasterTest.php | 2 +- tests/Sweden/GoodFridayTest.php | 2 +- tests/Sweden/NationalDayTest.php | 2 +- tests/Sweden/PentecostTest.php | 2 +- tests/Switzerland/Aargau/AscensionDayTest.php | 2 +- tests/Switzerland/Aargau/GoodFridayTest.php | 2 +- .../AscensionDayTest.php | 2 +- .../EasterMondayTest.php | 2 +- .../AppenzellAusserrhoden/GoodFridayTest.php | 2 +- .../PentecostMondayTest.php | 2 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 2 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 2 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../PentecostMondayTest.php | 2 +- .../BaselLandschaft/AscensionDayTest.php | 2 +- .../BaselLandschaft/EasterMondayTest.php | 2 +- .../BaselLandschaft/GoodFridayTest.php | 2 +- .../BaselLandschaft/PentecostMondayTest.php | 2 +- .../BaselLandschaft/WorkersDayTest.php | 2 +- .../BaselStadt/AscensionDayTest.php | 2 +- .../BaselStadt/EasterMondayTest.php | 2 +- .../Switzerland/BaselStadt/GoodFridayTest.php | 2 +- .../BaselStadt/PentecostMondayTest.php | 2 +- .../Switzerland/BaselStadt/WorkersDayTest.php | 2 +- tests/Switzerland/Bern/AscensionDayTest.php | 2 +- tests/Switzerland/Bern/EasterMondayTest.php | 2 +- tests/Switzerland/Bern/GoodFridayTest.php | 2 +- .../Switzerland/Bern/PentecostMondayTest.php | 2 +- .../Switzerland/Fribourg/AscensionDayTest.php | 2 +- .../Switzerland/Fribourg/December26thTest.php | 2 +- .../Switzerland/Fribourg/EasterMondayTest.php | 2 +- tests/Switzerland/Fribourg/GoodFridayTest.php | 2 +- .../Fribourg/PentecostMondayTest.php | 2 +- tests/Switzerland/Geneva/AscensionDayTest.php | 2 +- tests/Switzerland/Geneva/EasterMondayTest.php | 2 +- tests/Switzerland/Geneva/GoodFridayTest.php | 2 +- .../Geneva/PentecostMondayTest.php | 2 +- tests/Switzerland/Glarus/AscensionDayTest.php | 2 +- tests/Switzerland/Glarus/EasterMondayTest.php | 2 +- tests/Switzerland/Glarus/GoodFridayTest.php | 2 +- .../Glarus/PentecostMondayTest.php | 2 +- .../Switzerland/Grisons/AscensionDayTest.php | 2 +- .../Switzerland/Grisons/EasterMondayTest.php | 2 +- tests/Switzerland/Grisons/GoodFridayTest.php | 2 +- .../Grisons/PentecostMondayTest.php | 2 +- tests/Switzerland/Jura/AscensionDayTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/EasterTest.php | 2 +- tests/Switzerland/Jura/GoodFridayTest.php | 2 +- .../Switzerland/Jura/PentecostMondayTest.php | 2 +- tests/Switzerland/Jura/PentecostTest.php | 2 +- .../Jura/PlebisciteJurassienTest.php | 2 +- tests/Switzerland/Jura/WorkersDayTest.php | 2 +- .../Switzerland/Lucerne/AscensionDayTest.php | 2 +- .../Switzerland/Lucerne/EasterMondayTest.php | 2 +- tests/Switzerland/Lucerne/GoodFridayTest.php | 2 +- .../Lucerne/PentecostMondayTest.php | 2 +- .../Neuchatel/AscensionDayTest.php | 2 +- .../Neuchatel/EasterMondayTest.php | 2 +- .../Switzerland/Neuchatel/GoodFridayTest.php | 2 +- .../Neuchatel/InstaurationRepubliqueTest.php | 2 +- .../Neuchatel/PentecostMondayTest.php | 2 +- .../Switzerland/Neuchatel/WorkersDayTest.php | 2 +- .../Nidwalden/AscensionDayTest.php | 2 +- .../Nidwalden/EasterMondayTest.php | 2 +- .../Switzerland/Nidwalden/GoodFridayTest.php | 2 +- .../Nidwalden/PentecostMondayTest.php | 2 +- .../Switzerland/Obwalden/AscensionDayTest.php | 2 +- .../Switzerland/Obwalden/EasterMondayTest.php | 2 +- tests/Switzerland/Obwalden/GoodFridayTest.php | 2 +- .../Obwalden/PentecostMondayTest.php | 2 +- .../Schaffhausen/AscensionDayTest.php | 2 +- .../Schaffhausen/EasterMondayTest.php | 2 +- .../Schaffhausen/GoodFridayTest.php | 2 +- .../Schaffhausen/PentecostMondayTest.php | 2 +- .../Schaffhausen/WorkersDayTest.php | 2 +- tests/Switzerland/Schwyz/AscensionDayTest.php | 2 +- tests/Switzerland/Schwyz/EasterMondayTest.php | 2 +- tests/Switzerland/Schwyz/GoodFridayTest.php | 2 +- .../Schwyz/PentecostMondayTest.php | 2 +- .../Solothurn/AscensionDayTest.php | 2 +- .../Switzerland/Solothurn/GoodFridayTest.php | 2 +- .../Switzerland/StGallen/AscensionDayTest.php | 2 +- .../Switzerland/StGallen/EasterMondayTest.php | 2 +- tests/Switzerland/StGallen/GoodFridayTest.php | 2 +- .../StGallen/PentecostMondayTest.php | 2 +- tests/Switzerland/SwissNationalDayTest.php | 6 +- .../Switzerland/Thurgau/AscensionDayTest.php | 2 +- .../Switzerland/Thurgau/EasterMondayTest.php | 2 +- tests/Switzerland/Thurgau/GoodFridayTest.php | 2 +- .../Thurgau/PentecostMondayTest.php | 2 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 2 +- tests/Switzerland/Ticino/AscensionDayTest.php | 2 +- tests/Switzerland/Ticino/EasterMondayTest.php | 2 +- .../Ticino/PentecostMondayTest.php | 2 +- tests/Switzerland/Ticino/WorkersDayTest.php | 2 +- tests/Switzerland/Uri/AscensionDayTest.php | 2 +- tests/Switzerland/Uri/EasterMondayTest.php | 2 +- tests/Switzerland/Uri/GoodFridayTest.php | 2 +- tests/Switzerland/Uri/PentecostMondayTest.php | 2 +- tests/Switzerland/Valais/AscensionDayTest.php | 2 +- tests/Switzerland/Vaud/AscensionDayTest.php | 2 +- tests/Switzerland/Vaud/EasterMondayTest.php | 2 +- tests/Switzerland/Vaud/GoodFridayTest.php | 2 +- .../Switzerland/Vaud/PentecostMondayTest.php | 2 +- tests/Switzerland/Zug/AscensionDayTest.php | 2 +- tests/Switzerland/Zug/EasterMondayTest.php | 2 +- tests/Switzerland/Zug/GoodFridayTest.php | 2 +- tests/Switzerland/Zug/PentecostMondayTest.php | 2 +- tests/Switzerland/Zurich/AscensionDayTest.php | 2 +- tests/Switzerland/Zurich/EasterMondayTest.php | 2 +- tests/Switzerland/Zurich/GoodFridayTest.php | 2 +- .../Zurich/PentecostMondayTest.php | 2 +- tests/Switzerland/Zurich/WorkersDayTest.php | 2 +- tests/Turkey/CommemorationOfAtaturkTest.php | 2 +- tests/Turkey/DemocracyDayTest.php | 2 +- tests/Turkey/NationalSovereigntyDayTest.php | 2 +- tests/Turkey/RepublicDayTest.php | 2 +- tests/Turkey/VictoryDayTest.php | 2 +- tests/USA/ChristmasDayTest.php | 6 +- tests/USA/ColumbusDayTest.php | 4 +- tests/USA/IndependenceDayTest.php | 6 +- tests/USA/JuneteenthTest.php | 6 +- tests/USA/LabourDayTest.php | 2 +- tests/USA/MartinLutherKingDayTest.php | 2 +- tests/USA/MemorialDayTest.php | 4 +- tests/USA/NewYearsDayTest.php | 6 +- tests/USA/ThanksgivingDayTest.php | 2 +- tests/USA/VeteransDayTest.php | 6 +- tests/USA/WashingtonsBirthdayTest.php | 4 +- tests/Ukraine/CatholicChristmasDayTest.php | 2 +- tests/Ukraine/ConstitutionDayTest.php | 2 +- tests/Ukraine/DefenderOfUkraineDayTest.php | 2 +- tests/Ukraine/EasterTest.php | 2 +- tests/Ukraine/IndependenceDayTest.php | 2 +- tests/Ukraine/PentecostTest.php | 2 +- .../SecondInternationalWorkersDayTest.php | 2 +- tests/Ukraine/SubstitutedHolidayTest.php | 12 ++-- tests/UnitedKingdom/BoxingDayTest.php | 2 +- tests/UnitedKingdom/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/England/BoxingDayTest.php | 2 +- .../England/ChristmasDayTest.php | 2 +- .../UnitedKingdom/England/GoodFridayTest.php | 2 +- .../England/MayDayBankHolidayTest.php | 2 +- .../England/SpringBankHolidayTest.php | 2 +- .../England/SummerBankHolidayTest.php | 4 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 2 +- .../NorthernIreland/BoxingDayTest.php | 2 +- .../NorthernIreland/ChristmasDayTest.php | 2 +- .../NorthernIreland/GoodFridayTest.php | 2 +- .../NorthernIreland/MayDayBankHolidayTest.php | 2 +- .../NorthernIreland/SpringBankHolidayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- .../NorthernIreland/SummerBankHolidayTest.php | 4 +- .../UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- .../Scotland/ChristmasDayTest.php | 2 +- .../UnitedKingdom/Scotland/GoodFridayTest.php | 2 +- .../Scotland/MayDayBankHolidayTest.php | 2 +- .../Scotland/NewYearsDayTest.php | 2 +- .../Scotland/SecondNewYearsDayTest.php | 2 +- .../Scotland/SpringBankHolidayTest.php | 2 +- .../Scotland/StAndrewsDayTest.php | 2 +- .../Scotland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 4 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 2 +- .../UnitedKingdom/Wales/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/Wales/GoodFridayTest.php | 2 +- .../Wales/MayDayBankHolidayTest.php | 2 +- .../Wales/SpringBankHolidayTest.php | 2 +- .../Wales/SummerBankHolidayTest.php | 4 +- 518 files changed, 833 insertions(+), 832 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 5de24ebbe..30c125fa1 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -16,15 +16,16 @@ $config = new PhpCsFixer\Config(); $config->setRiskyAllowed(true)->setRules([ - '@Symfony' => true, '@PER' => true, + '@Symfony' => true, 'combine_consecutive_issets' => true, 'combine_consecutive_unsets' => true, + 'explicit_string_variable' => true, 'no_superfluous_elseif' => true, 'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true], 'not_operator_with_successor_space' => true, - 'ordered_class_elements' => true, 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true ], + 'ordered_class_elements' => true, // Risky 'declare_strict_types' => true, diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 1027a54a5..2a47163eb 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -141,7 +141,7 @@ private function addRemembranceDay(): void 'en' => 'Day of Remembrance for Truth and Justice', 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', ], - new \DateTime("$this->year-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -167,7 +167,7 @@ private function addMalvinasDay(): void 'en' => 'Malvinas Day', 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', ], - new \DateTime("$this->year-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -195,7 +195,7 @@ private function addMayRevolution(): void 'en' => 'May Revolution', 'es' => 'Día de la Revolución de Mayo', ], - new \DateTime("$this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -216,7 +216,7 @@ private function addGeneralMartinMigueldeGuemesDay(): void 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', ], - new \DateTime("$this->year-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -239,7 +239,7 @@ private function addFlagDay(): void 'en' => 'General Manuel Belgrano Memorial Day', 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', ], - new \DateTime("$this->year-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -261,7 +261,7 @@ private function addIndependenceDay(): void 'en' => 'Independence Day', 'es' => 'Día de la Independencia', ], - new \DateTime("$this->year-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -282,7 +282,7 @@ private function addGeneralJoseSanMartinDay(): void 'en' => 'General José de San Martín Memorial Day', 'es' => 'Paso a la Inmortalidad del General José de San Martín', ], - new \DateTime("$this->year-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -305,7 +305,7 @@ private function addRaceDay(): void 'en' => 'Day of Respect for Cultural Diversity', 'es' => 'Día del Respeto a la Diversidad Cultural', ], - new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -328,7 +328,7 @@ private function addNationalSovereigntyDay(): void 'en' => 'National Sovereignty Day', 'es' => 'Día de la Soberanía Nacional', ], - new \DateTime("$this->year-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -351,7 +351,7 @@ private function addImmaculateConceptionDay(): void 'en' => 'Immaculate Conception Day', 'es' => 'Día de la Inmaculada Concepción de María', ], - new \DateTime("$this->year-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index d18471bb4..3e89db4d4 100644 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -78,7 +78,7 @@ public function getSources(): array */ private function calculateNewYearHolidays(): void { - $newYearsDay = new \DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'newYearsDay', [], @@ -130,7 +130,7 @@ private function calculateNewYearHolidays(): void */ private function calculateAustraliaDay(): void { - $date = new \DateTime("$this->year-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $holiday = new Holiday( 'australiaDay', @@ -177,7 +177,7 @@ private function calculateAnzacDay(): void return; } - $date = new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'anzacDay', [], @@ -225,7 +225,7 @@ private function calculateNationalDayOfMourning(): void $this->addHoliday(new Holiday( 'nationalDayOfMourning', ['en' => 'National Day of Mourning'], - new \DateTime("$this->year-9-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -245,8 +245,8 @@ private function calculateNationalDayOfMourning(): void */ private function calculateChristmasDay(): void { - $christmasDay = new \DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $boxingDay = new \DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $boxingDay = new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'christmasDay', [], diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 20f3113a3..f01b9881c 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -148,7 +148,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -160,7 +160,7 @@ private function calculateLabourDay(): void */ private function calculateCanberraDay(): void { - $datePattern = $this->year < 2007 ? "third monday of march $this->year" : "second monday of march $this->year"; + $datePattern = $this->year < 2007 ? "third monday of march {$this->year}" : "second monday of march {$this->year}"; $this->addHoliday( new Holiday( diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 5a73af588..5cda7813a 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -115,7 +115,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index b9cca6ed8..22205b09c 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -114,7 +114,7 @@ private function calculateQueensBirthday(): void */ private function calculateMayDay(): void { - $date = new \DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mayDay', ['en' => 'May Day'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 9238098da..f38d978d1 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -86,9 +86,9 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new \DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index d427bbc98..6aa998685 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -122,7 +122,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new \DateTime("first monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', ['en' => 'Labour Day'], $date, $this->locale)); } @@ -161,7 +161,7 @@ private function calculateAdelaideCupDay(): void */ private function calculateProclamationDay(): void { - $christmasDay = new \DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'christmasDay', diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 2f1398978..21c289ef2 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -55,7 +55,7 @@ public function initialize(): void */ private function calculateEightHoursDay(): void { - $date = new \DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('eightHourDay', ['en' => 'Eight Hour Day'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 9f43ed991..8f5e60b7f 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -122,7 +122,7 @@ private function easterSaturday( */ private function calculateLabourDay(): void { - $date = new \DateTime("second monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } @@ -160,7 +160,7 @@ private function calculateQueensBirthday(): void */ private function calculateMelbourneCupDay(): void { - $date = new \DateTime('first Tuesday of November'." $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first Tuesday of November'." {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index fd04b602b..a74c223e2 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -90,7 +90,7 @@ private function calculateQueensBirthday(): void */ private function calculateLabourDay(): void { - $date = new \DateTime("first monday of march $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("first monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 25c395909..d25e69800 100644 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -66,7 +66,7 @@ public function initialize(): void 'fr' => 'Fête nationale', 'en' => 'Belgian National Day', 'nl' => 'nationale feestdag', - ], new \DateTime("$this->year-7-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-7-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } public function getSources(): array diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index 6e75d5639..91d280560 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ć', - ], new \DateTime("$this->year-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); + ], new \DateTime("{$this->year}-01-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)))); /* * Independence Day @@ -67,7 +67,7 @@ public function initialize(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'bs_Latn' => 'Dan Nezavisnosti', - ], new \DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -77,7 +77,7 @@ public function initialize(): void $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'bs_Latn' => 'Dan državnosti', - ], new \DateTime("$this->year-11-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-11-25", DateTimeZoneFactory::getDateTimeZone($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', - ], new \DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); /* * Second Labour day @@ -94,7 +94,7 @@ public function initialize(): void $this->addHoliday(new Holiday('secondLabourDay', [ 'en' => 'Second Labour Day', 'bs_Latn' => 'Praznik rada - drugi dan', - ], new \DateTime("$this->year-05-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-05-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } public function getSources(): array diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index ed8c4c4ef..cdee5f603 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -96,7 +96,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'tiradentesDay', ['pt' => 'Dia de Tiradentes'], - new \DateTime("$this->year-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -113,7 +113,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'independenceDay', ['pt' => 'Dia da Independência do Brasil'], - new \DateTime("$this->year-09-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-09-07", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -133,7 +133,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'ourLadyOfAparecidaDay', ['pt' => 'Dia de Nossa Senhora Aparecida'], - new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -149,7 +149,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'allSoulsDay', [], - new \DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -167,7 +167,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'proclamationOfRepublicDay', ['pt' => 'Dia da Proclamação da República'], - new \DateTime("$this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index ab0b40fcc..e842db12b 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -85,7 +85,7 @@ protected function calculateFamilyDay(): void $this->addHoliday(new Holiday( 'familyDay', [], - new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -108,7 +108,7 @@ protected function calculateVictoriaDay(): void $this->addHoliday(new Holiday( 'victoriaDay', [], - new \DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday front of {$this->year}-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -131,7 +131,7 @@ protected function calculateNationalIndigenousPeoplesDay(): void $this->addHoliday(new Holiday( 'nationalIndigenousPeoplesDay', [], - new \DateTime("$this->year-06-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-06-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -154,7 +154,7 @@ protected function calculateCivicHoliday(): void $this->addHoliday(new Holiday( 'civicHoliday', [], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -206,7 +206,7 @@ private function calculateThanksgivingDay(): void $this->addHoliday(new Holiday( 'thanksgivingDay', [], - new \DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("second monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -229,7 +229,7 @@ private function calculateRemembranceDay(): void $this->addHoliday(new Holiday( 'remembranceDay', [], - new \DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -252,7 +252,7 @@ private function calculateLabourDay(): void $this->addHoliday(new Holiday( 'labourDay', [], - new \DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of september {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -275,7 +275,7 @@ private function calculateNationalDayForTruthAndReconciliation(): void $this->addHoliday(new Holiday( 'truthAndReconciliationDay', [], - new \DateTime("last day of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last day of september {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index ae5fd15b4..c6097be27 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -70,7 +70,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'heritageDay', [], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index bbe8135a7..190ea7a1f 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -70,7 +70,7 @@ protected function calculateCivicHoliday(): void $this->addHoliday(new Holiday( 'terryFoxDay', [], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -93,7 +93,7 @@ private function calculateLouisRielDay(): void $this->addHoliday(new Holiday( 'louisRielDay', [], - new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index 8734fd184..feb6375c2 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -70,7 +70,7 @@ protected function calculateCivicHoliday(): void $this->addHoliday(new Holiday( 'natalHoliday', [], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -93,7 +93,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'novaScotiaHeritageDay', [], - new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index 605d92310..d0086c927 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -70,7 +70,7 @@ private function calculateIslanderDay(): void $this->addHoliday(new Holiday( 'islanderDay', [], - new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of february {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -93,7 +93,7 @@ private function calculateGoldCupParadeDay(): void $this->addHoliday(new Holiday( 'goldCupParadeDay', [], - new \DateTime("third friday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third friday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index 60d1d8a2c..dfa4cdda6 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -81,7 +81,7 @@ private function saintJeanBaptisteDay( return new Holiday( 'saintJeanBaptisteDay', [], - new \DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -105,7 +105,7 @@ private function calculateNationalPatriotsDay(): void $this->addHoliday(new Holiday( 'nationalPatriotsDay', [], - new \DateTime("last monday front of $this->year-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday front of {$this->year}-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index dc154e917..6202044bd 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -70,7 +70,7 @@ private function calculateSaskatchewanDay(): void $this->addHoliday(new Holiday( 'saskatchewanDay', [], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index df0f03652..1eca235b4 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -71,7 +71,7 @@ private function calculateDiscoveryDay(): void $this->addHoliday(new Holiday( 'discoveryDay', [], - new \DateTime("third monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -94,7 +94,7 @@ private function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'yukonHeritageDay', [], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 3274499ad..8e7852a62 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -84,7 +84,7 @@ protected function allSaintsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('allSaintsDay', [], new \DateTime("$year-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('allSaintsDay', [], new \DateTime("{$year}-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -115,7 +115,7 @@ protected function assumptionOfMary( return new Holiday( 'assumptionOfMary', [], - new \DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -180,7 +180,7 @@ protected function epiphany( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('epiphany', [], new \DateTime("$year-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('epiphany', [], new \DateTime("{$year}-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -210,7 +210,7 @@ protected function stJosephsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stJosephsDay', [], new \DateTime("$year-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('stJosephsDay', [], new \DateTime("{$year}-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -239,7 +239,7 @@ protected function stGeorgesDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stGeorgesDay', [], new \DateTime("$year-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('stGeorgesDay', [], new \DateTime("{$year}-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -265,7 +265,7 @@ protected function calculateOrthodoxEaster(int $year, string $timezone): \DateTi $month = floor(($d + $e + 114) / 31); $day = (($d + $e + 114) % 31) + 1; - return (new \DateTime("$year-$month-$day", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new \DateInterval('P13D')); + return (new \DateTime("{$year}-{$month}-{$day}", DateTimeZoneFactory::getDateTimeZone($timezone)))->add(new \DateInterval('P13D')); } /** @@ -302,7 +302,7 @@ protected function reformationDay( return new Holiday( 'reformationDay', [], - new \DateTime("$year-10-31", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-10-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -379,7 +379,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf $easterDays = $pfm + $tmp + 1; // Easter as the number of days after 21st March } - $easter = new \DateTime("$year-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); + $easter = new \DateTime("{$year}-3-21", DateTimeZoneFactory::getDateTimeZone($timezone)); $easter->add(new \DateInterval('P'.$easterDays.'D')); return $easter; @@ -572,7 +572,7 @@ protected function christmasEve( return new Holiday( 'christmasEve', [], - new \DateTime("$year-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-12-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -604,7 +604,7 @@ protected function christmasDay( return new Holiday( 'christmasDay', [], - new \DateTime("$year-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-12-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -636,7 +636,7 @@ protected function secondChristmasDay( return new Holiday( 'secondChristmasDay', [], - new \DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -705,7 +705,7 @@ protected function immaculateConception( return new Holiday( 'immaculateConception', [], - new \DateTime("$year-12-8", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-12-8", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -741,7 +741,7 @@ protected function stStephensDay( return new Holiday( 'stStephensDay', [], - new \DateTime("$year-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-12-26", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -809,7 +809,7 @@ protected function stJohnsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('stJohnsDay', [], new \DateTime("$year-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('stJohnsDay', [], new \DateTime("{$year}-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -842,7 +842,7 @@ protected function annunciation( return new Holiday( 'annunciation', [], - new \DateTime("$year-03-25", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-03-25", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index c2480c735..f60f1bd67 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -52,7 +52,7 @@ protected function newYearsDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('newYearsDay', [], new \DateTime("$year-1-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('newYearsDay', [], new \DateTime("{$year}-1-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -85,7 +85,7 @@ protected function internationalWorkersDay( return new Holiday( 'internationalWorkersDay', [], - new \DateTime("$year-5-1", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-5-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -121,7 +121,7 @@ protected function stMartinsDay( return new Holiday( 'stMartinsDay', [], - new \DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -153,7 +153,7 @@ protected function internationalWomensDay( return new Holiday( 'internationalWomensDay', [], - new \DateTime("$year-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-03-08", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -185,7 +185,7 @@ protected function newYearsEve( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday('newYearsEve', [], new \DateTime("$year-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); + return new Holiday('newYearsEve', [], new \DateTime("{$year}-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } /** @@ -218,7 +218,7 @@ protected function valentinesDay( return new Holiday( 'valentinesDay', [], - new \DateTime("$year-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-2-14", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -252,7 +252,7 @@ protected function worldAnimalDay( return new Holiday( 'worldAnimalDay', [], - new \DateTime("$year-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-10-4", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -287,7 +287,7 @@ protected function fathersDay( return new Holiday( 'fathersDay', [], - new \DateTime("third sunday of june $year", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("third sunday of june {$year}", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -322,7 +322,7 @@ protected function mothersDay( return new Holiday( 'mothersDay', [], - new \DateTime("second sunday of may $year", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("second sunday of may {$year}", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -357,7 +357,7 @@ protected function victoryInEuropeDay( return new Holiday( 'victoryInEuropeDay', [], - new \DateTime("$year-5-8", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-5-8", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -394,7 +394,7 @@ protected function armisticeDay( return new Holiday( 'armisticeDay', [], - new \DateTime("$year-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-11-11", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 1833f4a3d..55470eb79 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -65,7 +65,7 @@ public function initialize(): void $this->addHoliday(new Holiday('antifascistStruggleDay', [ 'en' => 'Day of Antifascist Struggle', 'hr' => 'Dan antifašističke borbe', - ], new \DateTime("$this->year-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } $this->calculateStatehoodDay(); @@ -94,9 +94,9 @@ private function calculateStatehoodDay(): void $statehoodDayDate = null; if ($this->year >= 1991 && $this->year < 2020) { - $statehoodDayDate = new \DateTime("$this->year-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $statehoodDayDate = new \DateTime("{$this->year}-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2020) { - $statehoodDayDate = new \DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $statehoodDayDate = new \DateTime("{$this->year}-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if (null !== $statehoodDayDate) { @@ -128,7 +128,7 @@ private function calculateHomelandThanksgivingDay(): void $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, - new \DateTime("$this->year-8-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-8-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -154,7 +154,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'hr' => 'Dan neovisnosti', - ], new \DateTime("$this->year-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-10-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -169,7 +169,7 @@ private function calculateRemembranceDayForHomelandWarVictims(): void $this->addHoliday(new Holiday('remembranceDay', [ 'en' => 'Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja', 'hr' => 'Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje', - ], new \DateTime("$this->year-11-18", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-11-18", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index 2f917da54..a02c16223 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -103,7 +103,7 @@ private function calculateGreatPrayerDay(): void $this->addHoliday(new Holiday( 'greatPrayerDay', ['da' => 'store bededag'], - new \DateTime("fourth friday $easter", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("fourth friday {$easter}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -130,7 +130,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['da' => 'grundlovsdag'], - new \DateTime("$this->year-6-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-6-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 4b2c1c6cd..f04afa1c4 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -82,7 +82,7 @@ private function addIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'et' => 'Iseseisvuspäev', - ], new \DateTime("$this->year-02-24", new \DateTimeZone($this->timezone)))); + ], new \DateTime("{$this->year}-02-24", new \DateTimeZone($this->timezone)))); } } @@ -96,7 +96,7 @@ private function addVictoryDay(): void $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', 'et' => 'Võidupüha', - ], new \DateTime("$this->year-06-23", new \DateTimeZone($this->timezone)))); + ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } } @@ -110,7 +110,7 @@ private function addRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ 'en' => 'Day of Restoration of Independence', 'et' => 'Taasiseseisvumispäev', - ], new \DateTime("$this->year-08-20", new \DateTimeZone($this->timezone)))); + ], 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 ccbe88db6..d0a742b5e 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -91,7 +91,7 @@ public function getSources(): array */ private function calculateStJohnsDay(): void { - $stJohnsDay = $this->year < 1955 ? "$this->year-6-24" : "$this->year-6-20 this saturday"; + $stJohnsDay = $this->year < 1955 ? "{$this->year}-6-24" : "{$this->year}-6-20 this saturday"; $this->addHoliday(new Holiday( 'stJohnsDay', @@ -127,7 +127,7 @@ private function calculateAllSaintsDay(): void $this->addHoliday(new Holiday( 'allSaintsDay', [], - new \DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -155,7 +155,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['fi' => 'Itsenäisyyspäivä'], - new \DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 56d9acbf2..0ec9384b0 100644 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -98,7 +98,7 @@ private function calculateBastilleDay(): void $this->addHoliday(new Holiday('bastilleDay', [ 'en' => 'Bastille Day', 'fr' => 'La Fête nationale', - ], new \DateTime("$this->year-7-14", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-7-14", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index c378235af..a87a8fe9f 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -88,7 +88,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf */ private function addOrthodoxChristmasDay(): void { - $date = new \DateTime("$this->year-01-07", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', @@ -103,7 +103,7 @@ private function addOrthodoxChristmasDay(): void private function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { - $date = new \DateTime("$this->year-05-26", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-05-26", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', @@ -119,7 +119,7 @@ private function addIndependenceDay(): void private function addUnityDay(): void { if ($this->year >= self::APRIL_NINE_TRAGEDY_YEAR) { - $date = new \DateTime("$this->year-04-09", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-04-09", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('unityDay', [ 'en' => 'National Unity Day', @@ -134,7 +134,7 @@ private function addUnityDay(): void */ private function addMothersDay(): void { - $date = new \DateTime("$this->year-03-03", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-03-03", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mothersDay', [ 'en' => 'Mothers Day', @@ -148,7 +148,7 @@ private function addMothersDay(): void */ private function addVictoryDay(): void { - $date = new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Day of Victory over Fascism', @@ -162,7 +162,7 @@ private function addVictoryDay(): void */ private function addStAndrewsDay(): void { - $date = new \DateTime("$this->year-05-12", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-05-12", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('stAndrewsDay', [ 'en' => 'Saint Andrew the First-Called Day', @@ -176,7 +176,7 @@ private function addStAndrewsDay(): void */ private function addOrthodoxEpiphanyDay(): void { - $date = new \DateTime("$this->year-01-19", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-01-19", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('orthodoxEpiphanyDay', [ 'en' => 'Orthodox Epiphany Day', @@ -190,7 +190,7 @@ private function addOrthodoxEpiphanyDay(): void */ private function addStMarysDay(): void { - $date = new \DateTime("$this->year-08-28", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-08-28", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('stMarysDay', [ 'en' => 'Saint Marys Day', @@ -204,7 +204,7 @@ private function addStMarysDay(): void */ private function addMtskhetobaDay(): void { - $date = new \DateTime("$this->year-10-14", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-10-14", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('mtskhetobaDay', [ 'en' => 'Day of Svetitskhoveli Cathedral', @@ -218,7 +218,7 @@ private function addMtskhetobaDay(): void */ private function addStGeorgesDay(): void { - $date = new \DateTime("$this->year-11-23", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-11-23", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('stGeorgesDay', [ 'en' => 'Saint Georges Day', @@ -232,7 +232,7 @@ private function addStGeorgesDay(): void */ private function addSecondNewYearDay(): void { - $date = new \DateTime("$this->year-01-02", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-01-02", new \DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('secondDayOfNewYear', [ 'en' => 'Second day of the New Year', diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index 8894624c9..6c7bfee70 100644 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -68,7 +68,7 @@ private function calculateDayOfReformation(): void new Holiday( 'dayOfReformation', [], - new \DateTime("$this->year-10-31", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-31", new \DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL ) diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index ad2819941..070153040 100644 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -91,7 +91,7 @@ private function calculateRepentanceAndPrayerDay(): void $this->addHoliday(new Holiday( 'repentanceAndPrayerDay', ['de' => 'Buß- und Bettag'], - new \DateTime("next wednesday $this->year-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next wednesday {$this->year}-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 5420783bb..fcd98e980 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -91,7 +91,7 @@ private function calculateThreeHolyHierarchs(): void $this->addHoliday(new Holiday( 'threeHolyHierarchs', ['el' => 'Τριών Ιεραρχών'], - new \DateTime("$this->year-1-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-1-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -149,7 +149,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['el' => 'Εικοστή Πέμπτη Μαρτίου'], - new \DateTime("$this->year-3-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-3-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -172,7 +172,7 @@ private function calculateOhiDay(): void $this->addHoliday(new Holiday( 'ohiDay', ['el' => 'Επέτειος του Όχι'], - new \DateTime("$this->year-10-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -195,7 +195,7 @@ private function calculatePolytechnio(): void $this->addHoliday(new Holiday( 'polytechnio', ['el' => 'Πολυτεχνείο'], - new \DateTime("$this->year-11-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index c29e7deea..1d45ddbd7 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -67,7 +67,7 @@ public function initialize(): void $this->addHoliday(new Holiday('memorialDay1848', [ 'en' => 'Memorial day of the 1848 Revolution', 'hu' => 'Az 1848-as forradalom ünnepe', - ], new \DateTime("$this->year-3-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-3-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -77,7 +77,7 @@ public function initialize(): void $this->addHoliday(new Holiday('stateFoundation', [ 'en' => 'State Foundation Day', 'hu' => 'Az államalapítás ünnepe', - ], new \DateTime("$this->year-8-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-8-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /* @@ -87,7 +87,7 @@ public function initialize(): void $this->addHoliday(new Holiday('memorialDay1956', [ 'en' => 'Memorial day of the 1956 Revolution', 'hu' => 'Az 1956-os forradalom ünnepe', - ], new \DateTime("$this->year-10-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-10-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 76ebe65dd..9ef88c643 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -68,7 +68,7 @@ public function initialize(): void $this->addHoliday(new Holiday( 'augustHoliday', ['en' => 'August Holiday', 'ga' => 'Lá Saoire i mí Lúnasa'], - new \DateTime("next monday $this->year-7-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next monday {$this->year}-7-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); $this->calculateOctoberHoliday(); @@ -285,7 +285,7 @@ private function calculateMayDay(): void $this->addHoliday(new Holiday( 'mayDay', ['en' => 'May Day', 'ga' => 'Lá Bealtaine'], - new \DateTime("next monday $this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next monday {$this->year}-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -311,7 +311,7 @@ private function calculateJuneHoliday(): void $this->addHoliday(new Holiday( 'juneHoliday', ['en' => 'June Holiday', 'ga' => 'Lá Saoire i mí an Mheithimh'], - new \DateTime("next monday $this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("next monday {$this->year}-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -336,7 +336,7 @@ private function calculateOctoberHoliday(): void $this->addHoliday(new Holiday( 'octoberHoliday', ['en' => 'October Holiday', 'ga' => 'Lá Saoire i mí Dheireadh Fómhair'], - new \DateTime("previous monday $this->year-11-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("previous monday {$this->year}-11-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 348ba1bee..127188ff7 100644 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -90,7 +90,7 @@ private function calculateLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['it' => 'Festa della Liberazione'], - new \DateTime("$this->year-4-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-4-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -116,7 +116,7 @@ private function calculateRepublicDay(): void $this->addHoliday(new Holiday( 'republicDay', ['it' => 'Festa della Repubblica'], - new \DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index af1d31fdf..ed2db61f2 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -127,7 +127,7 @@ private function calculateNationalFoundationDay(): void 'en' => 'National Foundation Day', 'ja' => '建国記念の日', ], - new \DateTime("$this->year-2-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-2-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -147,7 +147,7 @@ private function calculateShowaDay(): void 'en' => 'Showa Day', 'ja' => '昭和の日', ], - new \DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -167,7 +167,7 @@ private function calculateConstitutionMemorialDay(): void 'en' => 'Constitution Memorial Day', 'ja' => '憲法記念日', ], - new \DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -187,7 +187,7 @@ private function calculateChildrensDay(): void 'en' => 'Children’s Day', 'ja' => 'こどもの日', ], - new \DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -204,7 +204,7 @@ private function calculateCultureDay(): void $this->addHoliday(new Holiday( 'cultureDay', ['en' => 'Culture Day', 'ja' => '文化の日'], - new \DateTime("$this->year-11-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -221,7 +221,7 @@ private function calculateLaborThanksgivingDay(): void $this->addHoliday(new Holiday( 'laborThanksgivingDay', ['en' => 'Labor Thanksgiving Day', 'ja' => '勤労感謝の日'], - new \DateTime("$this->year-11-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -239,11 +239,11 @@ private function calculateEmperorsBirthday(): void { $emperorsBirthday = false; if ($this->year >= 2020) { - $emperorsBirthday = "$this->year-2-23"; + $emperorsBirthday = "{$this->year}-2-23"; } elseif ($this->year >= 1989 && $this->year < 2019) { - $emperorsBirthday = "$this->year-12-23"; + $emperorsBirthday = "{$this->year}-12-23"; } elseif ($this->year >= 1949 && $this->year <= 1988) { - $emperorsBirthday = "$this->year-4-29"; + $emperorsBirthday = "{$this->year}-4-29"; } if (\is_string($emperorsBirthday)) { @@ -288,7 +288,7 @@ private function calculateVernalEquinoxDay(): void $this->addHoliday(new Holiday( 'vernalEquinoxDay', ['en' => 'Vernal Equinox Day', 'ja' => '春分の日'], - new \DateTime("$this->year-3-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-3-{$day}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -308,9 +308,9 @@ private function calculateComingOfAgeDay(): void { $date = null; if ($this->year >= 2000) { - $date = new \DateTime("second monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of january {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1948) { - $date = new \DateTime("$this->year-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof \DateTimeInterface) { @@ -336,9 +336,9 @@ private function calculateGreeneryDay(): void { $date = null; if ($this->year >= 2007) { - $date = new \DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1989) { - $date = new \DateTime("$this->year-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-4-29", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof \DateTimeInterface) { @@ -367,20 +367,20 @@ private function calculateMarineDay(): void return; } - $date = "$this->year-7-20"; + $date = "{$this->year}-7-20"; if ($this->year >= 2003) { - $date = "third monday of july $this->year"; + $date = "third monday of july {$this->year}"; } if (2020 === $this->year) { // For the 2020 Tokyo Olympics, Marine Day was rescheduled. - $date = "$this->year-7-23"; + $date = "{$this->year}-7-23"; } if (2021 === $this->year) { // Due to the COVID-19 pandemic, the 2020 Tokyo Olympics were rescheduled and hence Marine Day as well. - $date = "$this->year-7-22"; + $date = "{$this->year}-7-22"; } $this->addHoliday(new Holiday( @@ -405,12 +405,12 @@ private function calculateMountainDay(): void $date = null; if (2021 === $this->year) { // For Olympic 2021 Tokyo (after COVID-19) - $date = new \DateTime("$this->year-8-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-8-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif (2020 === $this->year) { // For Olympic 2020 Tokyo - $date = new \DateTime("$this->year-8-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-8-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2016) { - $date = new \DateTime("$this->year-8-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-8-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof \DateTimeInterface) { @@ -437,9 +437,9 @@ private function calculateRespectForTheAgeDay(): void { $date = null; if ($this->year >= 2003) { - $date = new \DateTime("third monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("third monday of september {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new \DateTime("$this->year-9-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-9-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } if ($date instanceof \DateTimeInterface) { @@ -467,14 +467,14 @@ private function calculateSportsDay(): void $date = null; if (2021 === $this->year) { // For Olympic 2021 Tokyo (after COVID-19) - $date = new \DateTime("$this->year-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-7-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif (2020 === $this->year) { // For Olympic 2020 Tokyo - $date = new \DateTime("$this->year-7-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-7-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 2000) { - $date = new \DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } elseif ($this->year >= 1996) { - $date = new \DateTime("$this->year-10-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-10-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $holidayName = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; @@ -524,7 +524,7 @@ private function calculateAutumnalEquinoxDay(): void $this->addHoliday(new Holiday( 'autumnalEquinoxDay', ['en' => 'Autumnal Equinox Day', 'ja' => '秋分の日'], - new \DateTime("$this->year-9-$day", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-{$day}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -593,7 +593,7 @@ private function calculateCoronationDay(): void $this->addHoliday(new Holiday( 'coronationDay', ['en' => 'Coronation Day', 'ja' => '即位の日'], - new \DateTime("$this->year-5-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -611,7 +611,7 @@ private function calculateEnthronementProclamationCeremony(): void $this->addHoliday(new Holiday( 'enthronementProclamationCeremony', ['en' => 'Enthronement Proclamation Ceremony', 'ja' => '即位礼正殿の儀'], - new \DateTime("$this->year-10-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 0c3da7701..58e87e7aa 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -81,7 +81,7 @@ public function getSources(): array private function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { - $date = new \DateTime("$this->year-05-04", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-05-04", new \DateTimeZone($this->timezone)); if (! $this->isWorkingDay($date)) { $date->modify('next monday'); @@ -103,7 +103,7 @@ private function addMidsummerEveDay(): void $this->addHoliday(new Holiday('midsummerEveDay', [ 'en' => 'Midsummer Eve', 'lv' => 'Līgo Diena', - ], new \DateTime("$this->year-06-23", new \DateTimeZone($this->timezone)))); + ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } /** @@ -116,7 +116,7 @@ private function addMidsummerEveDay(): void private function addProclamationDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { - $date = new \DateTime("$this->year-11-18", new \DateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-11-18", new \DateTimeZone($this->timezone)); if (! $this->isWorkingDay($date)) { $date->modify('next monday'); diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 7c3d05882..af0a9b3cc 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -100,7 +100,7 @@ private function addRestorationOfTheStateDay(): void $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ '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)))); + ], new \DateTime("{$this->year}-02-16", new \DateTimeZone($this->timezone)))); } } @@ -116,7 +116,7 @@ private function addRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ '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)))); + ], new \DateTime("{$this->year}-03-11", new \DateTimeZone($this->timezone)))); } } @@ -133,7 +133,7 @@ private function addStatehoodDay(): void $this->addHoliday(new Holiday('statehoodDay', [ '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)); + ], new \DateTime("{$this->year}-07-06", new \DateTimeZone($this->timezone)), $this->locale)); } } @@ -149,7 +149,7 @@ private function addAllSoulsDay(): void $this->addHoliday(new Holiday( 'allSoulsDay', [], - new \DateTime("$this->year-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 59d6294e4..80b6e2db9 100644 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -87,7 +87,7 @@ private function calculateEuropeDay(): void $this->addHoliday(new Holiday('europeDay', [ 'en_US' => 'Europe day', 'fr' => 'La Journée de l’Europe', - ], new \DateTime("$this->year-5-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-5-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -111,6 +111,6 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', 'fr' => 'La Fête nationale', - ], new \DateTime("$this->year-6-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-6-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index e00791427..9fd5e10a4 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -183,7 +183,7 @@ private function calculateStNicholasDay(): void $this->addHoliday(new Holiday( 'stNicholasDay', ['en' => 'St. Nicholas’ Day', 'nl' => 'Sinterklaas'], - new \DateTime("$this->year-12-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-12-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -206,7 +206,7 @@ private function calculateHalloween(): void $this->addHoliday(new Holiday( 'halloween', ['en' => 'Halloween', 'nl' => 'Halloween'], - new \DateTime("$this->year-10-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -225,7 +225,7 @@ private function calculatePrincesDay(): void $this->addHoliday(new Holiday( 'princesDay', ['en' => 'Prince’s Day', 'nl' => 'Prinsjesdag'], - new \DateTime("third tuesday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("third tuesday of september {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -243,9 +243,9 @@ private function calculatePrincesDay(): void private function calculateQueensday(): void { if ($this->year >= 1891 && $this->year <= 2013) { - $date = new \DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year <= 1948) { - $date = new \DateTime("$this->year-8-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-8-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } // Determine substitution day @@ -273,7 +273,7 @@ private function calculateQueensday(): void private function calculateKingsday(): void { if ($this->year >= 2014) { - $date = new \DateTime("$this->year-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (0 === (int) $date->format('w')) { $date->sub(new \DateInterval('P1D')); @@ -301,7 +301,7 @@ private function calculateCommemorationLiberationDay(): void $this->addHoliday(new Holiday( 'commemorationDay', ['en' => 'Commemoration Day', 'nl' => 'dodenherdenking'], - new \DateTime("$this->year-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -310,7 +310,7 @@ private function calculateCommemorationLiberationDay(): void $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], - new \DateTime("$this->year-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, $holidayType )); diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 117fac237..d232f21e4 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -79,8 +79,8 @@ public function getSources(): array */ private function calculateNewYearHolidays(): void { - $newYearsDay = new \DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $dayAfterNewYearsDay = new \DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $dayAfterNewYearsDay = new \DateTime("{$this->year}-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); switch ($newYearsDay->format('w')) { case 0: @@ -122,7 +122,7 @@ private function calculateWaitangiDay(): void return; } - $date = new \DateTime("$this->year-02-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-02-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 2015 && ! $this->isWorkingDay($date)) { $date->modify('next monday'); @@ -151,7 +151,7 @@ private function calculateAnzacDay(): void return; } - $date = new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 2015 && ! $this->isWorkingDay($date)) { $date->modify('next monday'); @@ -186,7 +186,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime("first monday of june $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of june {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -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}", DateTimeZoneFactory::getDateTimeZone($this->timezone) ); @@ -239,8 +239,8 @@ private function calculateLabourDay(): void */ private function calculateChristmasHolidays(): void { - $christmasDay = new \DateTime("$this->year-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - $boxingDay = new \DateTime("$this->year-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $boxingDay = new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); switch ($christmasDay->format('w')) { case 0: diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 733ec26af..401dedf47 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -92,7 +92,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['nb' => 'grunnlovsdagen'], - new \DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index e2f0817a2..a552ce54b 100644 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -93,7 +93,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', 'pl' => 'Narodowe Święto Niepodległości', - ], new \DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } /** @@ -119,6 +119,6 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday('constitutionDay', [ 'en' => 'Constitution Day', 'pl' => 'Święto Narodowe Trzeciego Maja', - ], new \DateTime("$this->year-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-5-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 7ef24e88c..d000a7bc2 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -91,7 +91,7 @@ private function calculateCarnationRevolutionDay(): void $this->addHoliday(new Holiday( '25thApril', ['pt' => 'Dia da Liberdade'], - new \DateTime("$this->year-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-04-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -136,7 +136,7 @@ private function calculatePortugalDay(): void $this->addHoliday(new Holiday( 'portugalDay', ['pt' => 'Dia de Portugal'], - new \DateTime("$this->year-06-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-06-10", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -169,7 +169,7 @@ private function calculatePortugueseRepublicDay(): void $this->addHoliday(new Holiday( 'portugueseRepublic', ['pt' => 'Implantação da República Portuguesa'], - new \DateTime("$this->year-10-05", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-05", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -223,7 +223,7 @@ private function calculateRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday( 'restorationOfIndependence', ['pt' => 'Restauração da Independência'], - new \DateTime("$this->year-12-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-12-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index c5d49f775..9a53660f4 100644 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -112,7 +112,7 @@ private function calculateDayAfterNewYearsDay(): void $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', [], - new \DateTime("$this->year-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -137,7 +137,7 @@ private function calculateUnitedPrincipalitiesDay(): void $this->addHoliday(new Holiday('unitedPrincipalitiesDay', [ 'en' => 'Union Day / Small Union', 'ro' => 'Unirea Principatelor Române / Mica Unire', - ], new \DateTime("$this->year-01-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-01-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -185,15 +185,15 @@ private function calculateNationalDay(): void // @link https://en.wikipedia.org/wiki/Great_Union_Day if ($this->year >= 1990) { - $nationalDay = "$this->year-12-01"; + $nationalDay = "{$this->year}-12-01"; } if ($this->year >= 1948 && $this->year <= 1989) { - $nationalDay = "$this->year-08-23"; + $nationalDay = "{$this->year}-08-23"; } if ($this->year >= 1866 && $this->year <= 1947) { - $nationalDay = "$this->year-05-10"; + $nationalDay = "{$this->year}-05-10"; } if (\is_string($nationalDay)) { @@ -247,7 +247,7 @@ private function calculateConstantinBrancusiDay(): void 'en' => 'Constantin Brâncuși day', 'ro' => 'Ziua Constantin Brâncuși', ], - new \DateTime("$this->year-02-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-02-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -275,7 +275,7 @@ private function calculateChildrensDay(): void 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', ], - new \DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -285,7 +285,7 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday('childrensDay', [ 'en' => 'International Children’s Day', 'ro' => 'Ziua Copilului', - ], new \DateTime("$this->year-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-06-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index c2d11ac30..d982f8b6c 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -79,7 +79,7 @@ private function addNewYearsHolidays(): void $this->addHoliday(new Holiday('newYearHolidaysDay'.$day, [ 'en' => 'New Year’s holidays', 'ru' => 'Новогодние каникулы', - ], new \DateTime("$this->year-01-$day", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); } } @@ -92,7 +92,7 @@ private function addOrthodoxChristmasDay(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', 'ru' => 'Рождество', - ], new \DateTime("$this->year-01-07", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -108,7 +108,7 @@ private function addDefenceOfTheFatherlandDay(): void $this->addHoliday(new Holiday('defenceOfTheFatherlandDay', [ 'en' => 'Defence of the Fatherland Day', 'ru' => 'День защитника Отечества', - ], new \DateTime("$this->year-02-23", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-02-23", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -129,7 +129,7 @@ private function addSpringAndLabourDay(): void $this->addHoliday(new Holiday('springAndLabourDay', [ 'en' => 'Spring and Labour Day', 'ru' => 'Праздник Весны и Труда', - ], new \DateTime("$this->year-05-01", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-05-01", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -141,7 +141,7 @@ private function addVictoryDay(): void $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', 'ru' => 'День Победы', - ], new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -157,7 +157,7 @@ private function addRussiaDay(): void $this->addHoliday(new Holiday('russiaDay', [ 'en' => 'Russia Day', 'ru' => 'День России', - ], new \DateTime("$this->year-06-12", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-06-12", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -173,6 +173,6 @@ private function addUnityDay(): void $this->addHoliday(new Holiday('unityDay', [ 'en' => 'Unity Day', 'ru' => 'День народного единства', - ], new \DateTime("$this->year-11-04", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-11-04", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 0cadd5fa1..7664d023a 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -259,7 +259,7 @@ protected function dayAfterNewYearsDay( return new Holiday( 'dayAfterNewYearsDay', $this->getTranslations('dayAfterNewYearsDay', $year), - new \DateTime("$year-1-2", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-1-2", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -278,7 +278,7 @@ protected function twoDaysLaterNewYearsDay( return new Holiday( 'twoDaysLaterNewYearsDay', $this->getTranslations('twoDaysLaterNewYearsDay', $year), - new \DateTime("$year-1-3", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-1-3", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -336,7 +336,7 @@ protected function dayBeforeSeollal( return new Holiday( 'dayBeforeSeollal', $this->getTranslations('dayBeforeSeollal', $year), - new \DateTime("-1 day $seollal", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("-1 day {$seollal}", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -365,7 +365,7 @@ protected function dayAfterSeollal( return new Holiday( 'dayAfterSeollal', $this->getTranslations('dayAfterSeollal', $year), - new \DateTime("+1 day $seollal", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("+1 day {$seollal}", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -386,7 +386,7 @@ protected function independenceMovementDay( return new Holiday( 'independenceMovementDay', $this->getTranslations('independenceMovementDay', $year), - new \DateTime("$year-3-1", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-3-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -404,7 +404,7 @@ protected function arborDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - $datetime = (1960 === $year) ? "$year-3-21" : "$year-4-5"; + $datetime = (1960 === $year) ? "{$year}-3-21" : "{$year}-4-5"; return new Holiday( 'arborDay', @@ -457,7 +457,7 @@ protected function childrensDay( return new Holiday( 'childrensDay', $this->getTranslations('childrensDay', $year), - new \DateTime("$year-5-5", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-5-5", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -478,7 +478,7 @@ protected function memorialDay( return new Holiday( 'memorialDay', $this->getTranslations('memorialDay', $year), - new \DateTime("$year-6-6", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-6-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -502,7 +502,7 @@ protected function constitutionDay( return new Holiday( 'constitutionDay', $this->getTranslations('constitutionDay', $year), - new \DateTime("$year-7-17", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-7-17", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -523,7 +523,7 @@ protected function liberationDay( return new Holiday( 'liberationDay', $this->getTranslations('liberationDay', $year), - new \DateTime("$year-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-8-15", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -583,7 +583,7 @@ protected function dayBeforeChuseok( return new Holiday( 'dayBeforeChuseok', $this->getTranslations('dayBeforeChuseok', $year), - new \DateTime("-1 day $choseok", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("-1 day {$choseok}", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -613,7 +613,7 @@ protected function dayAfterChuseok( return new Holiday( 'dayAfterChuseok', $this->getTranslations('dayAfterChuseok', $year), - new \DateTime("+1 day $choseok", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("+1 day {$choseok}", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -637,7 +637,7 @@ protected function armedForcesDay( return new Holiday( 'armedForcesDay', $this->getTranslations('armedForcesDay', $year), - new \DateTime("$year-10-1", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-10-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -658,7 +658,7 @@ protected function nationalFoundationDay( return new Holiday( 'nationalFoundationDay', $this->getTranslations('nationalFoundationDay', $year), - new \DateTime("$year-10-3", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-10-3", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -681,7 +681,7 @@ protected function hangulDay( return new Holiday( 'hangulDay', $this->getTranslations('hangulDay', $year), - new \DateTime("$year-10-9", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-10-9", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -704,7 +704,7 @@ protected function unitedNationsDay( return new Holiday( 'unitedNationsDay', $this->getTranslations('unitedNationsDay', $year), - new \DateTime("$year-10-24", DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-10-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); @@ -843,47 +843,47 @@ private function calculateOldSubstituteHolidays(int $year): void // Add substitute holidays by fixed entries. switch ($year) { case 1959: - $this->addSubstituteHoliday($this->getHoliday('arborDay'), "$year-4-6"); + $this->addSubstituteHoliday($this->getHoliday('arborDay'), "{$year}-4-6"); break; case 1960: - $this->addSubstituteHoliday($this->getHoliday('constitutionDay'), "$year-7-18"); - $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$year-10-10"); - $this->addSubstituteHoliday($this->getHoliday('christmasDay'), "$year-12-26"); + $this->addSubstituteHoliday($this->getHoliday('constitutionDay'), "{$year}-7-18"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "{$year}-10-10"); + $this->addSubstituteHoliday($this->getHoliday('christmasDay'), "{$year}-12-26"); break; case 1989: - $this->addSubstituteHoliday($this->getHoliday('armedForcesDay'), "$year-10-2"); + $this->addSubstituteHoliday($this->getHoliday('armedForcesDay'), "{$year}-10-2"); break; case 2014: - $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$year-9-10"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "{$year}-9-10"); break; case 2015: - $this->addSubstituteHoliday($this->getHoliday('chuseok'), "$year-9-29"); + $this->addSubstituteHoliday($this->getHoliday('chuseok'), "{$year}-9-29"); break; case 2016: - $this->addSubstituteHoliday($this->getHoliday('dayBeforeSeollal'), "$year-2-10"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeSeollal'), "{$year}-2-10"); break; case 2017: - $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$year-1-30"); - $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$year-10-6"); + $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "{$year}-1-30"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "{$year}-10-6"); break; case 2018: - $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$year-5-7"); - $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "$year-9-26"); + $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "{$year}-5-7"); + $this->addSubstituteHoliday($this->getHoliday('dayBeforeChuseok'), "{$year}-9-26"); break; case 2019: - $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "$year-5-6"); + $this->addSubstituteHoliday($this->getHoliday('childrensDay'), "{$year}-5-6"); break; case 2020: - $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "$year-1-27"); + $this->addSubstituteHoliday($this->getHoliday('dayAfterSeollal'), "{$year}-1-27"); break; case 2021: - $this->addSubstituteHoliday($this->getHoliday('liberationDay'), "$year-8-16"); - $this->addSubstituteHoliday($this->getHoliday('nationalFoundationDay'), "$year-10-4"); - $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$year-10-11"); + $this->addSubstituteHoliday($this->getHoliday('liberationDay'), "{$year}-8-16"); + $this->addSubstituteHoliday($this->getHoliday('nationalFoundationDay'), "{$year}-10-4"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "{$year}-10-11"); break; case 2022: - $this->addSubstituteHoliday($this->getHoliday('dayAfterChuseok'), "$year-9-12"); - $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "$year-10-10"); + $this->addSubstituteHoliday($this->getHoliday('dayAfterChuseok'), "{$year}-9-12"); + $this->addSubstituteHoliday($this->getHoliday('hangulDay'), "{$year}-10-10"); break; } } diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index e7e1d94aa..55987f765 100644 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -92,7 +92,7 @@ private function calculateNationalDay(): void 'ca' => 'Festa Nacional d’Espanya', 'es' => 'Fiesta Nacional de España', ], - new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -120,7 +120,7 @@ private function calculateConstitutionDay(): void 'ca' => 'Dia de la Constitució', 'es' => 'Día de la Constitución', ], - new \DateTime("$this->year-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-12-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index bea9bbea1..1e558509d 100644 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -77,7 +77,7 @@ private function calculateAndalusiaDay(): void $this->addHoliday(new Holiday( 'andalusiaDay', ['es' => 'Día de Andalucía'], - new \DateTime("$this->year-2-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-2-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 912ce2cfd..95d146da7 100644 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -79,7 +79,7 @@ private function calculateAsturiasDay(): void $this->addHoliday(new Holiday( 'asturiasDay', ['es' => 'Día de Asturias'], - new \DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 5535ad935..c3e185b4c 100644 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -82,7 +82,7 @@ private function calculateBalearicIslandsDay(): void 'ca' => 'Diada de les Illes Balears', 'es' => 'Día de les Illes Balears', ], - new \DateTime("$this->year-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-3-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 78f6d5190..a025ca031 100644 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -86,7 +86,7 @@ private function calculateBasqueCountryDay(): void $this->addHoliday(new Holiday( 'basqueCountryDay', ['es' => 'Euskadi Eguna'], - new \DateTime("$this->year-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index 24ea194d2..df319b967 100644 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -78,7 +78,7 @@ private function calculateCanaryIslandsDay(): void $this->addHoliday(new Holiday( 'canaryIslandsDay', ['es' => 'Día de las Canarias'], - new \DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 9bc36940c..50d7b9e3c 100644 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -82,7 +82,7 @@ private function calculateCantabriaDay(): void $this->addHoliday(new Holiday( 'cantabriaDay', ['es' => 'Día de Cantabria'], - new \DateTime("second sunday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("second sunday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index e92879dbb..2db42b9bb 100644 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -79,7 +79,7 @@ private function calculateCastileAndLeonDay(): void $this->addHoliday(new Holiday( 'castileAndLeonDay', ['es' => 'Día de Castilla y León'], - new \DateTime("$this->year-4-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-4-23", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index b5f415f35..b119c3a48 100644 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -82,7 +82,7 @@ private function calculateCastillaLaManchaDay(): void $this->addHoliday(new Holiday( 'castillaLaManchaDay', ['es' => 'Día de la Región Castilla-La Mancha'], - new \DateTime("$this->year-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index f95d4ec65..33585a22a 100644 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -85,7 +85,7 @@ private function calculateNationalDayOfCatalonia(): void 'ca' => 'Diada Nacional de Catalunya', 'es' => 'Diada Nacional de Cataluña', ], - new \DateTime("$this->year-9-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 9020e3264..4c3ec22df 100644 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -76,7 +76,7 @@ private function calculateDayOfCeuta(): void $this->addHoliday(new Holiday( 'ceutaDay', ['es' => 'Día de Ceuta'], - new \DateTime("$this->year-9-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 117064cd2..49a8fc420 100644 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -82,7 +82,7 @@ private function calculateDosdeMayoUprisingDay(): void $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', ['es' => 'Fiesta de la Comunidad de Madrid'], - new \DateTime("$this->year-5-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index c8abddb4d..d66e25bf1 100644 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -79,7 +79,7 @@ private function calculateDayOfExtremadura(): void $this->addHoliday(new Holiday( 'extremaduraDay', ['es' => 'Día de Extremadura'], - new \DateTime("$this->year-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index e1045fc6e..bf1aa327f 100644 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -80,7 +80,7 @@ private function calculateGalicianLiteratureDay(): void $this->addHoliday(new Holiday('galicianLiteratureDay', [ 'es' => 'Día de las Letras Gallegas', 'gl' => 'Día das Letras Galegas', - ], new \DateTime("$this->year-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-5-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -106,7 +106,7 @@ private function calculateStJamesDay(): void if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ 'es' => 'Santiago Apostol', - ], new \DateTime("$this->year-7-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-7-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 7d5f19434..256899b67 100644 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -75,7 +75,7 @@ private function calculateLaRiojaDay(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ 'es' => 'Día de La Rioja', - ], new \DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index dfa2ad2dd..d1c2be8b4 100644 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -76,7 +76,7 @@ private function calculateDayOfMurcia(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ 'es' => 'Día de la Región de Murcia', - ], new \DateTime("$this->year-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-6-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 4f4d44e7b..544ebc1ec 100644 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -87,7 +87,7 @@ private function calculateValencianCommunityDay(): void 'ca' => 'Diada Nacional del País Valencià', 'es' => 'Día de la Comunidad Valenciana', ], - new \DateTime("$this->year-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-9", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 880fae16e..330e99c43 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -95,7 +95,7 @@ private function calculateEpiphanyEve(): void $this->addHoliday(new Holiday( 'epiphanyEve', [], - new \DateTime("$this->year-1-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-1-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -121,7 +121,7 @@ private function calculateWalpurgisEve(): void $this->addHoliday(new Holiday( 'walpurgisEve', [], - new \DateTime("$this->year-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); @@ -147,7 +147,7 @@ private function calculateWalpurgisEve(): void */ private function calculateStJohnsHolidays(): void { - $date = new \DateTime("$this->year-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'stJohnsDay', [], @@ -187,7 +187,7 @@ private function calculateStJohnsHolidays(): void */ private function calculateAllSaintsHolidays(): void { - $date = new \DateTime("$this->year-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'allSaintsDay', [], @@ -234,7 +234,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', ['sv' => $holidayName], - new \DateTime("$this->year-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-6-6", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php index 349e1bf4b..03b2154c7 100644 --- a/src/Yasumi/Provider/Turkey.php +++ b/src/Yasumi/Provider/Turkey.php @@ -62,7 +62,7 @@ private function addLabourDay(): void { $this->addHoliday(new Holiday('labourDay', [ 'tr' => 'Emek ve Dayanışma Günü', - ], new \DateTime("$this->year-05-01", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-05-01", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -84,7 +84,7 @@ private function addCommemorationOfAtaturk(): void $this->addHoliday(new Holiday('commemorationAtaturk', [ 'tr' => 'Atatürk’ü Anma, Gençlik ve Spor Bayramı', - ], new \DateTime("$this->year-05-19", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-05-19", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -111,7 +111,7 @@ private function addNationalSovereigntyDay(): void $this->addHoliday(new Holiday('nationalSovereigntyDay', [ 'tr' => $holidayName, - ], new \DateTime("$this->year-04-23", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-04-23", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -130,7 +130,7 @@ private function addDemocracyDay(): void $this->addHoliday(new Holiday('democracyDay', [ 'tr' => 'Demokrasi ve Millî Birlik Günü', - ], new \DateTime("$this->year-07-15", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-07-15", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -157,7 +157,7 @@ private function addVictoryDay(): void $this->addHoliday(new Holiday('victoryDay', [ 'tr' => 'Zafer Bayramı', - ], new \DateTime("$this->year-08-30", new \DateTimeZone($this->timezone)), $this->locale, $holidayType)); + ], new \DateTime("{$this->year}-08-30", new \DateTimeZone($this->timezone)), $this->locale, $holidayType)); } /** @@ -179,6 +179,6 @@ private function addRepublicDay(): void $this->addHoliday(new Holiday('republicDay', [ 'tr' => 'Cumhuriyet Bayramı', - ], new \DateTime("$this->year-10-29", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-10-29", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 39333188a..027c86277 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -85,7 +85,7 @@ private function calculateMartinLutherKingday(): void if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ 'en' => 'Dr. Martin Luther King Jr’s Birthday', - ], new \DateTime("third monday of january $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("third monday of january {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -107,9 +107,9 @@ private function calculateMartinLutherKingday(): void private function calculateWashingtonsBirthday(): void { if ($this->year >= 1879) { - $date = new \DateTime("$this->year-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1968) { - $date = new \DateTime("third monday of february $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("third monday of february {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ 'en' => 'Washington’s Birthday', @@ -132,9 +132,9 @@ private function calculateWashingtonsBirthday(): void private function calculateMemorialDay(): void { if ($this->year >= 1865) { - $date = new \DateTime("$this->year-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1968) { - $date = new \DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("last monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ 'en' => 'Memorial Day', @@ -157,7 +157,7 @@ private function calculateMemorialDay(): void private function calculateJuneteenth(): void { if ($this->year >= 2021) { - $date = new \DateTime("$this->year-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $label = 'Juneteenth'; $holiday = new Holiday('juneteenth', [ @@ -204,7 +204,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - ], new \DateTime("$this->year-7-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-7-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -226,7 +226,7 @@ private function calculateLabourDay(): void [ 'en' => 'Labour Day', ], - new \DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of september {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -248,9 +248,9 @@ private function calculateLabourDay(): void private function calculateColumbusDay(): void { if ($this->year >= 1937) { - $date = new \DateTime("$this->year-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($this->year >= 1970) { - $date = new \DateTime("second monday of october $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime("second monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ 'en' => 'Columbus Day', @@ -276,7 +276,7 @@ private function calculateVeteransDay(): void $this->addHoliday(new Holiday('veteransDay', [ 'en' => $name, - ], new \DateTime("$this->year-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-11-11", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } @@ -300,7 +300,7 @@ private function calculateThanksgivingDay(): void [ 'en' => 'Thanksgiving Day', ], - new \DateTime("fourth thursday of november $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("fourth thursday of november {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 39ae9327c..eb98dea84 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -132,7 +132,7 @@ private function calculateChristmasDay(): void $this->addHoliday(new Holiday( 'christmasDay', [], - new \DateTime("$this->year-01-07", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)), $this->locale )); } @@ -156,7 +156,7 @@ private function calculateSecondInternationalWorkersDay(): void $this->addHoliday(new Holiday('secondInternationalWorkersDay', [ 'uk' => 'День міжнародної солідарності трудящих', 'ru' => 'День международной солидарности трудящихся', - ], new \DateTime("$this->year-05-02", new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime("{$this->year}-05-02", new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -179,7 +179,7 @@ private function calculateVictoryDay(): void $this->addHoliday(new Holiday( 'victoryDay', ['uk' => 'День перемоги', 'ru' => 'День победы'], - new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)), $this->locale )); } @@ -204,7 +204,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', ['uk' => 'День Конституції', 'ru' => 'День Конституции'], - new \DateTime("$this->year-06-28", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-06-28", new \DateTimeZone($this->timezone)), $this->locale )); } @@ -231,7 +231,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', ['uk' => 'День Незалежності', 'ru' => 'День Независимости'], - new \DateTime("$this->year-08-24", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-08-24", new \DateTimeZone($this->timezone)), $this->locale )); } @@ -259,7 +259,7 @@ private function calculateDefenderOfUkraineDay(): void $this->addHoliday(new Holiday( 'defenderOfUkraineDay', ['uk' => 'День захисника України', 'ru' => 'День Защитника Украины'], - new \DateTime("$this->year-10-14", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-10-14", new \DateTimeZone($this->timezone)), $this->locale )); } @@ -287,7 +287,7 @@ private function calculateCatholicChristmasDay(): void 'uk' => 'Католицький день Різдва', 'ru' => 'Католическое рождество', ], - new \DateTime("$this->year-12-25", new \DateTimeZone($this->timezone)), + new \DateTime("{$this->year}-12-25", new \DateTimeZone($this->timezone)), $this->locale ), false // Catholic Christmas Day will not be substituted to an monday if it's on a weekend! diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index e886a3fe7..d17542196 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -97,7 +97,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en' => 'May Day Bank Holiday'], - new \DateTime("$this->year-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -108,7 +108,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en' => 'May Day Bank Holiday'], - new \DateTime("first monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -142,7 +142,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new \DateTime("$this->year-6-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-6-4", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -155,7 +155,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new \DateTime("$this->year-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-6-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -166,7 +166,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', ['en' => 'Spring Bank Holiday'], - new \DateTime("last monday of may $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -192,7 +192,7 @@ protected function calculatePlatinumJubileeBankHoliday(): void $this->addHoliday(new Holiday( 'platinumJubileeBankHoliday', ['en' => 'Platinum Jubilee Bank Holiday'], - new \DateTime("$this->year-6-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-6-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -218,7 +218,7 @@ protected function calculateQueenElizabethFuneralBankHoliday(): void $this->addHoliday(new Holiday( 'queenElizabethFuneralBankHoliday', ['en' => 'Queen Elizabeth II’s State Funeral Bank Holiday'], - new \DateTime("$this->year-9-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-9-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -244,7 +244,7 @@ protected function calculateKingCharlesCoronationBankHoliday(): void $this->addHoliday(new Holiday( 'kingCharlesCoronationBankHoliday', ['en' => 'King Charles III’s Coronation Bank Holiday'], - new \DateTime("$this->year-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-5-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -332,7 +332,7 @@ private function calculateNewYearsDay(): void $type = Holiday::TYPE_OBSERVANCE; } - $newYearsDay = new \DateTime("$this->year-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); // If New Years Day falls on a Saturday or Sunday, it is observed the next Monday (January 2nd or 3rd) if (\in_array((int) $newYearsDay->format('w'), [0, 6], true)) { @@ -367,7 +367,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'August Bank Holiday'], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -382,7 +382,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'Summer Bank Holiday'], - new \DateTime("first monday of september $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of september {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -393,7 +393,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'Summer Bank Holiday'], - new \DateTime("last monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("last monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index b0583256d..3eddb5627 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -89,7 +89,7 @@ private function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', ['en' => 'August Bank Holiday'], - new \DateTime("first monday of august $this->year", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("first monday of august {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); @@ -125,7 +125,7 @@ private function calculateNewYearsHolidays(): void $secondNewYearsDay = new Holiday( 'secondNewYearsDay', [], - new \DateTime("$this->year-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime("{$this->year}-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, $type ); diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index be656ac38..7b3c0e122 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -232,7 +232,7 @@ public static function getProviders(): array continue; } $quotedDs = preg_quote(\DIRECTORY_SEPARATOR, ''); - $provider = preg_replace("#^.+{$quotedDs}Provider$quotedDs(.+)\\.php$#", '$1', $file->getPathName()); + $provider = preg_replace("#^.+{$quotedDs}Provider{$quotedDs}(.+)\\.php$#", '$1', $file->getPathName()); $class = new \ReflectionClass(sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $provider))); diff --git a/tests/Argentina/ChristmasDayTest.php b/tests/Argentina/ChristmasDayTest.php index 682a5846c..b8d5c3e2b 100644 --- a/tests/Argentina/ChristmasDayTest.php +++ b/tests/Argentina/ChristmasDayTest.php @@ -39,7 +39,7 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php index bb24046bf..97f48d418 100644 --- a/tests/Argentina/FlagDayTest.php +++ b/tests/Argentina/FlagDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-20", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php index 5302b4064..077a77888 100644 --- a/tests/Argentina/GeneralJoseSanMartinDayTest.php +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-08-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-08-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php index 2053d4fb3..b2ec6da5b 100644 --- a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php index 8f9a88982..f55ef5a64 100644 --- a/tests/Argentina/ImmaculateConceptionDayTest.php +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-08", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-08", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php index f162c6559..6827796ec 100644 --- a/tests/Argentina/IndependenceDayTest.php +++ b/tests/Argentina/IndependenceDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-07-09", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-07-09", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/InternationalWorkersDayTest.php b/tests/Argentina/InternationalWorkersDayTest.php index 8f8f8c49a..89307605c 100644 --- a/tests/Argentina/InternationalWorkersDayTest.php +++ b/tests/Argentina/InternationalWorkersDayTest.php @@ -39,7 +39,7 @@ public function testInternationalWorkersDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/MalvinasDayTest.php b/tests/Argentina/MalvinasDayTest.php index 0407f55a2..da93f41f3 100644 --- a/tests/Argentina/MalvinasDayTest.php +++ b/tests/Argentina/MalvinasDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-02", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-02", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php index 643be3167..99b114b20 100644 --- a/tests/Argentina/MayRevolutionTest.php +++ b/tests/Argentina/MayRevolutionTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-05-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-05-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php index dc62052d3..736a815a8 100644 --- a/tests/Argentina/NationalSovereigntyDayTest.php +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-20", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/NewYearsDayTest.php b/tests/Argentina/NewYearsDayTest.php index 56dde2f09..27b83d04c 100644 --- a/tests/Argentina/NewYearsDayTest.php +++ b/tests/Argentina/NewYearsDayTest.php @@ -39,7 +39,7 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php index f8bf09d75..6cd500dbc 100644 --- a/tests/Argentina/RaceDayTest.php +++ b/tests/Argentina/RaceDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Argentina/RemembranceDayTest.php b/tests/Argentina/RemembranceDayTest.php index f98b63aa6..17bce44cb 100644 --- a/tests/Argentina/RemembranceDayTest.php +++ b/tests/Argentina/RemembranceDayTest.php @@ -44,7 +44,7 @@ public function testRemembranceDayAfter2006(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-03-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-03-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index dbefaff38..f7ac2569d 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, 'ascensionDay', $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index 1c01cf677..8aebe48cc 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -58,7 +58,7 @@ public function PlebisciteDayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-10", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-10", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index 1e05bd2aa..89a184f8f 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index 9c2d68a71..0fc3b9229 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 98132ab54..510ba7110 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -58,7 +58,7 @@ public function StLeopoldsDayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-11-15", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-11-15", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 32bc27c7f..a4ed05532 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-26", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-26", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index 4a0baef2f..131c91bff 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index adc2206a8..4f17c53ae 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index 3b3302239..3ccb26e61 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -58,7 +58,7 @@ public function StLeopoldsDayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-11-15", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-11-15", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index 3ce364b8b..ffb1ed71a 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index 596caad31..26cd83c0b 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 42f5ab775..2b28af1f8 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -39,7 +39,7 @@ public function testEaster(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 55201dd2b..82ae17a2d 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index ac044c216..ccdd13f20 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, 'pentecostMonday', $year, - new \DateTime("$year-6-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index fb088ee14..e8bb6954b 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index 94515b3be..e94b25b6c 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -44,7 +44,7 @@ public function testIndependenceDayOnAfter1992(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index a893a89a6..79873de50 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -44,7 +44,7 @@ public function testStatehoodDayOnAfter1943(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index 7e731bf43..90215316f 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -44,7 +44,7 @@ public function testDiaDosFinadosAfter1300(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-02", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-02", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 811dac0c6..afd82d35f 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index 9c9ef4829..3daebc6ad 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -39,7 +39,7 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index 202aba851..9749bbb1c 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -44,7 +44,7 @@ public function testDiaDaIndependenciaDoBrasilAfter1822(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-09-07", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-09-07", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index a62dfbaf0..8bd0a2dca 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -39,7 +39,7 @@ public function testInternationalWorkersDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index e69d0a734..8a77081fc 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -39,7 +39,7 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index b880b9681..23d8de59d 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -44,7 +44,7 @@ public function testNossaSenhoraAparecidaAfter1980(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index b628203bc..0e1fb30d1 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -44,7 +44,7 @@ public function testProclamacaoDaRepublicaAfter1889(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index 211b173ba..d21405704 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -44,7 +44,7 @@ public function testDiaDeTiradentesAfter1792(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 6b49d1174..baccc0137 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -44,14 +44,14 @@ public function testCanadaDayOnAfter1983(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-07-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-07-01", new \DateTimeZone(self::TIMEZONE)) ); $year = 2018; // July 1 is Sunday $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-07-02", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-07-02", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index 2c49e6a32..bdd36a8cc 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -39,7 +39,7 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index acc40e099..d503512c7 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -44,7 +44,7 @@ public function testLabourDayOnAfter1894(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of september $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of september {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 625432cad..66fa8a98d 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -39,7 +39,7 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index 8efae8ae1..064653397 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -44,7 +44,7 @@ public function testRemembranceDayOnAfter1919(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-11", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index 3b46de478..51fc787c6 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -45,7 +45,7 @@ public function testThanksgivingDayOnAfter1879(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("second monday of october $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of october {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Canada/TruthAndReconciliationDayTest.php b/tests/Canada/TruthAndReconciliationDayTest.php index be6d8cb8b..c9814a396 100644 --- a/tests/Canada/TruthAndReconciliationDayTest.php +++ b/tests/Canada/TruthAndReconciliationDayTest.php @@ -45,7 +45,7 @@ public function testTruthAndReconciliationDayOnAfter2021(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("last day of september $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("last day of september {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index c42342735..255c19ba9 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -44,7 +44,7 @@ public function testAntifascistStruggleDayOnAfter1941(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-22", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-22", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 5065fa487..27bdf6843 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index cd35f92d7..acc9b7918 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 2ea362098..59fbc1948 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -49,7 +49,7 @@ public function testHomelandThanksgivingDayOnAfter1995(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-5", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 2157b7952..54f00eb34 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -49,7 +49,7 @@ public function testIndependenceDayOnAfter1991(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index 94e45bf39..4cde13cb3 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -44,7 +44,7 @@ public function testRemembranceDayAfterItWasEstablished(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-18", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-18", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 78907db50..9adcbe8f9 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -45,7 +45,7 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements HolidayTestCase public function testStatehoodDay(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DATE_CHANGE_YEAR - 1); - $expectedDate = "$year-6-25"; + $expectedDate = "{$year}-6-25"; $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -54,7 +54,7 @@ public function testStatehoodDay(): void ); $year = $this->generateRandomYear(self::DATE_CHANGE_YEAR); - $expectedDate = "$year-5-30"; + $expectedDate = "{$year}-5-30"; $this->assertHoliday( self::REGION, self::HOLIDAY, diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index 549b0b3ca..6b0ad7031 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -43,7 +43,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 1fb550079..62696a2fc 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -43,7 +43,7 @@ public function testGoodFriday(): void self::REGION, 'goodFriday', $year, - new \DateTime("$year-4-14", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index e4b38a000..fe4065160 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index 94f33d941..1f53df3fc 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-5", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index 890a75a01..5eaf29d71 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index 6e1dcea70..a1326c487 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-26", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-26", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 448080988..dfb5e6b0f 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-3", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index 297ad7338..93f239c83 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -49,7 +49,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-13", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-13", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index 94b0cb434..0e19d9a28 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-29", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 8330a56ae..5f41d1f7b 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index ad32ab8e2..999c399b0 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index f524c69dc..41c50bb8d 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -76,7 +76,7 @@ public function testSummerTime(): void $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->randomYearFromArray($this->observedYears); - $expectedDate = new \DateTime("last sunday of march $year", new \DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime("last sunday of march {$year}", new \DateTimeZone(self::TIMEZONE)); if (array_key_exists($year, $this->deviantTransitions)) { $expectedDate = new \DateTime($this->deviantTransitions[$year], new \DateTimeZone(self::TIMEZONE)); diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 3c97024d6..6f0fd2ed7 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -75,10 +75,10 @@ public function testWinterTime(): void $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->randomYearFromArray($this->observedYears); - $expectedDate = new \DateTime("last sunday of september $year", new \DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime("last sunday of september {$year}", new \DateTimeZone(self::TIMEZONE)); if ($year >= 1996) { - $expectedDate = new \DateTime("last sunday of october $year", new \DateTimeZone(self::TIMEZONE)); + $expectedDate = new \DateTime("last sunday of october {$year}", new \DateTimeZone(self::TIMEZONE)); } if (array_key_exists($year, $this->deviantTransitions)) { diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index 4d84c3726..f78142d47 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-02-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-02-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index 41927ac3d..539f31543 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-08-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-08-20", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 2e31799ff..41633f0dc 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 14f6125d2..902cf7e6d 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -53,7 +53,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE)); // Check between 31 October and 6th of November the day that is a Saturday for ($d = 0; $d <= 7; ++$d) { diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index 416669b3d..8205b3c4d 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-5", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index b7956d983..02b2786b1 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 1f5335466..018029fb5 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index 9cb336101..e27a69de7 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 7c03da55a..3a731f0ce 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-6", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index 6885b0d37..a75644589 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 67b2b8b8d..3ddd5c4ad 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -48,7 +48,7 @@ public function testHolidayBeforeAdjustment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index 7123c05ec..b398d6a0c 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -44,7 +44,7 @@ public function testArmisticeDayOnAfter1919(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-11", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index c50ebc2a5..2ca0abc70 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index b1795632f..d154af187 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index 6ffaa25bf..4f9318e00 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -44,7 +44,7 @@ public function testBastilleDayOnAfter1790(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-14", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 7d4263ab2..42498338d 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index 5aaffa101..4d7cc9f13 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index 0bcc21b40..84954ddc5 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index e82922520..069a3068a 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -40,7 +40,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 2feb1e54d..1f4712278 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -44,7 +44,7 @@ public function testVictoryInEuropeDayOnAfter1945(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php index 4cfb47237..3c2b5a80c 100644 --- a/tests/Georgia/EasterTest.php +++ b/tests/Georgia/EasterTest.php @@ -27,7 +27,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/IndependenceDayTest.php b/tests/Georgia/IndependenceDayTest.php index ffcfec384..e8e1d5635 100644 --- a/tests/Georgia/IndependenceDayTest.php +++ b/tests/Georgia/IndependenceDayTest.php @@ -35,7 +35,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-05-26", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-05-26", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Georgia/UnityDayTest.php b/tests/Georgia/UnityDayTest.php index 0cf687028..2e8c9bd79 100644 --- a/tests/Georgia/UnityDayTest.php +++ b/tests/Georgia/UnityDayTest.php @@ -35,7 +35,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-09", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-09", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index 7f452e8fd..384d2d1fa 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, 'ascensionDay', $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 0cdc1d9fb..ee2205477 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index e070cf7fa..a44aee439 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index bd2a96684..f01ee99d8 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index ff4503bcc..9f5c647c7 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-3", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index 2a36b4f47..488a860d6 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testGoodFriday(): void self::REGION, 'goodFriday', $year, - new \DateTime("$year-4-14", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 49ed5fefc..4e3dacc7c 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 0f9998264..74da0bfec 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index ef61f2535..f12276847 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -45,7 +45,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 67027fb77..98cdb16a2 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 2027c298c..9c2115c06 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index 6f1f3de4b..b1c9e6702 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -46,7 +46,7 @@ public function testHolidayOnAfterEstablishment(): void { // Check between the 16th and 22nd day the one that is a Wednesday $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $holiday = new \DateTime("next wednesday $year-11-15", new \DateTimeZone(self::TIMEZONE)); // Default date + $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/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index 513857af5..f1b75cf33 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 2f32416b9..461d7c701 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 8fa07a559..6eb2783dd 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index 86335f728..a06bb84ae 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $data[] = [$year, new \DateTime("$year-09-20", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-09-20", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index 5d30465cb..35cb24ebb 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index 22d1a8c9c..abb0e7eda 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-14", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 29127257f..311e1f91a 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 79e6f5dd4..07b8043e4 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index 92b79cbbf..64e19d901 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index 1bc8d17ad..d7fac51b7 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index 3d630e64f..6f344f434 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-20", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index 0bca0640c..fb1545d49 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-19", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-19", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index c5a657eeb..e9594608c 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index 663891c6f..4c7e2ed85 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-29", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index b034493fb..4181fa5d3 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index b5e8dbab1..241373f8b 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 1d256c967..4a7e63f3e 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index 77d080cf7..895bab04a 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index 86d93f0ba..19e695e38 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index 35bdb6f53..a04043532 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 7e11aaef7..85580aabe 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-20", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index a2d138f2b..722eafe23 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -61,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("next monday $year-7-31", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("next monday {$year}-7-31", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index 10afb24e9..8732fab25 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -61,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index dcf68cb0b..1c1d04c3c 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("next monday $year-5-31", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("next monday {$year}-5-31", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 5e5b3b10d..38c2ac2e8 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("next monday $year-4-30", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("next monday {$year}-4-30", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index f8dcf8728..e54f76618 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); + $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 37d90254f..96c84b6cc 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("previous monday $year-11-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("previous monday {$year}-11-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 47793963b..f51ccdce1 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-3-17", new \DateTimeZone(self::TIMEZONE)); + $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 70839ea25..39f6948f9 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -61,7 +61,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index d465f1629..f430e3440 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index a84798b65..4f3f027bd 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -39,7 +39,7 @@ public function testEaster(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 62d615c87..555d9e2f5 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -51,7 +51,7 @@ public function testLiberationDayOnAfter1949(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 4aa6259c8..9fab3628a 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -51,7 +51,7 @@ public function testRepublicDayOnAfter1946(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 7e3aa02d5..1335d0e71 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -67,7 +67,7 @@ public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-$month-$day", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-{$month}-{$day}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index 4f31f266c..8fe4e2b9b 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -44,7 +44,7 @@ public function testChildrensDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-5", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-5-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index 257b92297..fb5f6d677 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -45,7 +45,7 @@ public function testComingOfAgeDayOnAfter2000(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("second monday of january $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of january {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testComingOfAgeDayBetween1948And2000(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index f2d1e0eea..8c097b7b1 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -44,7 +44,7 @@ public function testConstitutionMemorialDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-3", new \DateTimeZone(self::TIMEZONE)) ); } @@ -61,7 +61,7 @@ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay( self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-5-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index a6d1cc986..1724dc452 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -44,7 +44,7 @@ public function testCultureDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-3", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-11-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index a3c1502dc..da6d00107 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -47,7 +47,7 @@ public function testEmperorsBirthdayOnAfter1949(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-29", new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +65,7 @@ public function testEmperorsBirthdayOnAfter1989(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -82,7 +82,7 @@ public function testEmperorsBirthdayOnAfter2020(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -99,7 +99,7 @@ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-12-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index 81fa18830..48eaad771 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -45,7 +45,7 @@ public function testHolidayOnAfter2007(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-4", new \DateTimeZone(self::TIMEZONE)) ); } @@ -61,7 +61,7 @@ public function testHolidayOnAfter2007SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-5-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); } @@ -78,7 +78,7 @@ public function testHolidayBetween1989And2007(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-29", new \DateTimeZone(self::TIMEZONE)) ); } @@ -94,7 +94,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index d3a94e61b..33b4d7214 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -45,7 +45,7 @@ public function testLabourThanksgivingDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay(): self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-11-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index dc1171cbf..da02ae828 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -38,7 +38,7 @@ public function testMarineDayIn2020(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +56,7 @@ public function testMarineDayIn2021(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-22", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-22", new \DateTimeZone(self::TIMEZONE)) ); } @@ -78,7 +78,7 @@ public function testMarineDayOnAfter2003(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("third monday of july $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of july {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -95,7 +95,7 @@ public function testMarineDayBetween1996And2003(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-20", new \DateTimeZone(self::TIMEZONE)) ); } @@ -111,7 +111,7 @@ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-7-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 173c94769..d4169ba56 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -44,7 +44,7 @@ public function testMountainDayIn2021(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-8", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testMountainDayIn2020(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-10", new \DateTimeZone(self::TIMEZONE)) ); } @@ -76,7 +76,7 @@ public function testMountainDayOnAfter2016(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-11", new \DateTimeZone(self::TIMEZONE)) ); } @@ -92,7 +92,7 @@ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-8-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 2209a1ab0..b3893641d 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -44,7 +44,7 @@ public function testNationalFoundationDayOnAfter1966(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-11", new \DateTimeZone(self::TIMEZONE)) ); } @@ -61,7 +61,7 @@ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay(): self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-2-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index f6c36a4d4..41c7e3325 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -44,7 +44,7 @@ public function testNewYearsDayOnAfter1948(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-1-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index 482237bd5..a11c69473 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -51,13 +51,13 @@ public function testPublicBridgeDay(): void self::REGION, self::HOLIDAY.'1', $this->year, - new \DateTime("$this->year-4-30", 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)) + new \DateTime("{$this->year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 7e5f5e442..41bc93ea7 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -45,7 +45,7 @@ public function testRespectForTheAgedDayOnAfter2003(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("third monday of september $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of september {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testRespectForTheAgedDayBetween1996And2003(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-9-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-15", new \DateTimeZone(self::TIMEZONE)) ); } @@ -79,7 +79,7 @@ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorking self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-9-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index dc77c1e04..e928a870c 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfter2007(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-29", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 37c9d0359..1d63a8af4 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -45,7 +45,7 @@ public function testSportsDayIn2021(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -61,7 +61,7 @@ public function testSportsDayIn2020(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-24", new \DateTimeZone(self::TIMEZONE)) ); } @@ -81,7 +81,7 @@ public function testSportsDayAfter2000(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("second monday of october $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of october {$year}", new \DateTimeZone(self::TIMEZONE)) ); } } @@ -99,7 +99,7 @@ public function testSportsDayBetween1996And2000(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-10", new \DateTimeZone(self::TIMEZONE)) ); } @@ -116,7 +116,7 @@ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void self::REGION, self::SUBSTITUTE_PREFIX.self::HOLIDAY, $year, - new \DateTime("$year-10-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-11", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 746fbb8bf..6cd29a129 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -67,7 +67,7 @@ public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, in self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-$month-$day", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-{$month}-{$day}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index 3a2e63c3e..783e22c9c 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -56,7 +56,7 @@ public function testHolidayAfterAnnounce(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-02", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-02", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 166a0f103..ca0ad125d 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-03-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-03-11", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 6f2627293..0a0ab9670 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-02-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-02-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index 6ac74520b..69b7ccf55 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-07-06", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-07-06", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index 64f27a4db..54e6ebbf2 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index 64ad9d85d..705f1b11d 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index b829be03e..6f560a7cb 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -44,7 +44,7 @@ public function testEuropeDayOnAfter2019(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index d18546108..005ac3213 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index bde238635..bba0f1a59 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index bce99d1d8..5c7e5e121 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 2b95ebe90..cbfb403a0 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -58,7 +58,7 @@ public function testCommemorationDayOnAfter1947(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index 16967e5a9..49d4f1571 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index e48c5df08..299054fb4 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -39,7 +39,7 @@ public function testEaster(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index e2b63f96b..a2e70ce94 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("third sunday of june $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("third sunday of june {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index 0157df343..58225bb01 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testGoodFriday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-14", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index f46bd4a44..07139c2c1 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -44,7 +44,7 @@ public function testKingsDayOnAfter2014(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-27", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-27", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testKingsDayOnAfter2014SubstitutedDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-26", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-26", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 38365cae6..f013b7714 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -58,7 +58,7 @@ public function testLiberationDayOnAfter1947(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-5", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index d29ef9bd1..cc8528146 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -39,7 +39,7 @@ public function testMothersDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("second sunday of may $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("second sunday of may {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index 15e2f592a..0a058803e 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, 'pentecost', $year, - new \DateTime("$year-5-31", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-31", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 32f939113..a908e1496 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -39,7 +39,7 @@ public function testQueensBetween1891and1948(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-31", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-31", new \DateTimeZone(self::TIMEZONE)) ); } @@ -55,7 +55,7 @@ public function testQueensBetween1891and1948SubstitutedLater(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-9-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-1", new \DateTimeZone(self::TIMEZONE)) ); } @@ -71,7 +71,7 @@ public function testQueensBetween1949and2013(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); } @@ -87,7 +87,7 @@ public function testQueensBetween1949and2013SubstitutedLater(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)) ); } @@ -103,7 +103,7 @@ public function testQueensBetween1949and2013SubstitutedEarlier(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-29", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/SummerTimeTest.php b/tests/Netherlands/SummerTimeTest.php index cf2d26526..e847bcbc8 100644 --- a/tests/Netherlands/SummerTimeTest.php +++ b/tests/Netherlands/SummerTimeTest.php @@ -97,18 +97,18 @@ public function testSummertime(): void $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); $year = $this->randomYearFromArray($this->observedYears); - $expected = "first sunday of april $year"; + $expected = "first sunday of april {$year}"; if ($year >= 1981) { - $expected = "last sunday of march $year"; + $expected = "last sunday of march {$year}"; } if ($year >= 1943 && $year < 1981) { - $expected = "first sunday of april $year"; + $expected = "first sunday of april {$year}"; } if ($year >= 1922 && $year < 1943) { - $expected = "may 15th $year"; + $expected = "may 15th {$year}"; } if (array_key_exists($year, $this->deviantTransitions)) { diff --git a/tests/Netherlands/WinterTimeTest.php b/tests/Netherlands/WinterTimeTest.php index c5dde4813..6cee43719 100644 --- a/tests/Netherlands/WinterTimeTest.php +++ b/tests/Netherlands/WinterTimeTest.php @@ -85,13 +85,13 @@ public function testWintertime(): void if (true == $isObserved) { if ($year >= 1996) { - $expected = "last sunday of october $year"; + $expected = "last sunday of october {$year}"; } elseif ($year >= 1977) { - $expected = "last sunday of september $year"; + $expected = "last sunday of september {$year}"; } elseif ($year >= 1922) { - $expected = "first sunday of october $year"; + $expected = "first sunday of october {$year}"; } else { - $expected = "last monday of september $year"; + $expected = "last monday of september {$year}"; } } else { $expected = $this->deviantTransitions[$year]; diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index 5ab108128..2641dde5e 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -44,7 +44,7 @@ public function testWorldAnimalDayOnAfter1931(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index 2215c4dd6..604762f5b 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index f84bdb9ba..61c1b9f49 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, 'pentecostMonday', $year, - new \DateTime("$year-6-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index 7ed5a8239..56bbed122 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -39,7 +39,7 @@ public function testPrincesDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("third tuesday of september $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("third tuesday of september {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index bbec72ef0..471b14391 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -43,7 +43,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index d58f6fb1e..31ee54e0d 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -43,7 +43,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 29e182e5a..ba8ffee0e 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -60,7 +60,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 659600c51..a0051f93d 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -60,7 +60,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); if (\in_array((int) $date->format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index a325687d5..cc7b099b4 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -85,7 +85,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-01-02", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-01-02", new \DateTimeZone(self::TIMEZONE)); switch ($date->format('w')) { case 0: diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index 1c4e46fe5..bd3e18d1c 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -74,7 +74,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 100; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new \DateTime( - (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october')." $year", + (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october')." {$year}", new \DateTimeZone(self::TIMEZONE) ); diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index ef2b653c5..b22beb85c 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -60,7 +60,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-01-01", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-01-01", new \DateTimeZone(self::TIMEZONE)); switch ($date->format('w')) { case 0: diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 0f97d15ad..dc9974e5e 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 1; $y <= 100; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $expected = new \DateTime("first monday of june $year", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("first monday of june {$year}", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $expected]; } diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index dc4206721..1f2ab4c9e 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index 3df570745..40058b0e4 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 5f0b52009..addb0b666 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index 898f61eb9..03622f6d0 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-3", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index b8ab8af4e..1f4db6c0d 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index fe01b9e44..ac495fdf4 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 2e114b24b..a83094016 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index 867c34efe..37a78130e 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index a92764fad..e4a9fd88c 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-3", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index 5c166b65a..9b87d3471 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 077834dc0..7815d964d 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 0090a2d44..041c9bb26 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index 06b6f03a2..3af836c9f 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-11", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index 70ab8ae13..6f90f980d 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 18820fedf..c9a918727 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -45,11 +45,11 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements HolidayTestCase public function testHoliday(): void { $year = 2016; - $expected = new \DateTime("$year-11-01", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-11-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); $year = 2012; - $expected = new \DateTime("$year-11-01", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-11-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index c27093bda..24e935804 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -40,7 +40,7 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements Holiday public function testHolidayAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $expected = new \DateTime("$year-04-25", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-04-25", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 3d4773dd0..ac9a96bad 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -45,7 +45,7 @@ class CorpusChristiTest extends PortugalBaseTestCase implements HolidayTestCase public function testHoliday(): void { $year = 2016; - $expected = new \DateTime("$year-5-26", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-5-26", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index 4974c93b7..8b0b0d9d4 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-03-27", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-03-27", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index 5ef232e50..da90724bc 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 2ff364dc8..3c9206130 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -47,7 +47,7 @@ class PortugalDayTest extends PortugalBaseTestCase implements HolidayTestCase public function testHolidayBeforeAbolishment(): void { $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); - $expected = new \DateTime("$year-06-10", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-06-10", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -61,7 +61,7 @@ public function testHolidayBeforeAbolishment(): void public function testHolidayAfterRestoration(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); - $expected = new \DateTime("$year-06-10", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-06-10", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index c6270f5ea..2784b0757 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -37,7 +37,7 @@ public function testHolidayOnAfterRestoration(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-05", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-05", new \DateTimeZone(self::TIMEZONE)) ); } } @@ -64,7 +64,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-05", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-05", new \DateTimeZone(self::TIMEZONE)) ); } } diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 1f6c6bc22..36625d3a7 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -51,11 +51,11 @@ public function testHolidayOnAfterEstablishment(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); - $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); $year = self::ESTABLISHMENT_YEAR; - $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -69,12 +69,12 @@ public function testHolidayOnAfterRestoration(): void { $year = 2016; - $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); - $expected = new \DateTime("$year-12-01", new \DateTimeZone(self::TIMEZONE)); + $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Randomizer.php b/tests/Randomizer.php index cf6e918bf..28b3ac1b2 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -45,8 +45,8 @@ public function generateRandomDates( $data = []; $range ??= 1000; for ($y = 1; $y <= ($iterations ?? 10); ++$y) { - $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); - $data[] = [$year, new \DateTime("$year-$month-$day", new \DateTimeZone($timezone ?? 'UTC'))]; + $year = (int) self::dateTimeBetween("-{$range} years", "+{$range} years")->format('Y'); + $data[] = [$year, new \DateTime("{$year}-{$month}-{$day}", new \DateTimeZone($timezone ?? 'UTC'))]; } return $data; @@ -72,7 +72,7 @@ public function generateRandomEasterDates( $range ??= 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) self::dateTimeBetween("-{$range} years", "+{$range} years")->format('Y'); $date = $this->calculateEaster($year, $timezone ?? 'UTC'); $data[] = [$year, $date->format('Y-m-d')]; @@ -125,7 +125,7 @@ public function generateRandomModifiedEasterDates( $data = []; $range ??= 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { - $year = (int) self::dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) self::dateTimeBetween("-{$range} years", "+{$range} years")->format('Y'); $date = $this->calculateEaster($year, $timezone ?? 'UTC'); $cb($date); @@ -236,7 +236,7 @@ public function generateRandomDatesWithModifier( for ($i = 1; $i <= $iterations; ++$i) { $year = $this->generateRandomYear($range); - $date = new \DateTime("$year-$month-$day", new \DateTimeZone($timezone ?? 'UTC')); + $date = new \DateTime("{$year}-{$month}-{$day}", new \DateTimeZone($timezone ?? 'UTC')); $callback($year, $date); @@ -416,7 +416,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf $easter_days = ($pfm + $tmp + 1); // Easter as the number of days after 21st March } - $easter = new \DateTime("$year-3-21", new \DateTimeZone($timezone)); + $easter = new \DateTime("{$year}-3-21", new \DateTimeZone($timezone)); $easter->add(new \DateInterval('P'.$easter_days.'D')); return $easter; diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 30b9f4ba0..c6f7c4b69 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -44,7 +44,7 @@ public function testAssumptionOfMaryDayOnAfter2008(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index 5dc0933a0..29e7fc51d 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -44,7 +44,7 @@ public function testChildrensDayOnAfter1950(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-01", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index 2a0ab5a99..3594caeae 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -44,7 +44,7 @@ public function testConstantinBrancusiDayOnAfter2016(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-02-19", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-02-19", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index 711d29a2e..13a079fe7 100644 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-20", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index 39501b34a..0329d2914 100644 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-19", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-19", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/EpiphanyTest.php b/tests/Romania/EpiphanyTest.php index b91a4c0b2..2e137e8e1 100644 --- a/tests/Romania/EpiphanyTest.php +++ b/tests/Romania/EpiphanyTest.php @@ -44,7 +44,7 @@ public function testEpiphanyAfter2024(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-01-06", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-01-06", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index e909b96c1..34fa988e7 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -44,7 +44,7 @@ public function testNationalDayOnAfter1990(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-1", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testNationalDayBetween19481989(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-08-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-08-23", new \DateTimeZone(self::TIMEZONE)) ); } @@ -76,7 +76,7 @@ public function testNationalDayBetween18661947(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-05-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-05-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index 524c49ee7..c55225594 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -44,7 +44,7 @@ public function testPentecostMondayOnAfter2008(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-08", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-08", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index e50fd1231..c6095e3be 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -44,7 +44,7 @@ public function testPentecostDayOnAfter2008(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-07", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-07", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index af6100c74..21f7ab1aa 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -44,7 +44,7 @@ public function testStAndrewDayOnAfter2012(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/StJohnsDayTest.php b/tests/Romania/StJohnsDayTest.php index 110483bee..ea6ca3b87 100644 --- a/tests/Romania/StJohnsDayTest.php +++ b/tests/Romania/StJohnsDayTest.php @@ -44,7 +44,7 @@ public function testStJohnsAfter2024(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-01-07", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-01-07", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index 175bdd873..15640c2d5 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -44,7 +44,7 @@ public function testUnitedPrincipalitiesDayOnAfter2015(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index b4c86669a..7fd228b0c 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -57,7 +57,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-02-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-02-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index 1081a9b4b..18557375c 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index e6122f546..c4d3851bf 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -58,7 +58,7 @@ public function testHolidayAfter(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-04", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-04", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 9c03210b7..1d6ecbf23 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 95b8eec2b..2005e753c 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-4-27", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-4-27", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index e6dc62a97..cea946eb7 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-9-24", new \DateTimeZone(self::TIMEZONE)); + $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 617e51302..d8ff27960 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)); + $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 993635f3d..cdc245cfa 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-8-9", new \DateTimeZone(self::TIMEZONE)); + $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 3f39dfc13..2c749c2d4 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); + $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 4348ea2d3..5789f8d07 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-12-16", new \DateTimeZone(self::TIMEZONE)); + $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 6036a9cd2..78fdb619d 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index d6fe62e71..eab15feaf 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $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 5b38b9943..43023f2ab 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -71,7 +71,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-6-16", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-6-16", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 64409b6d1..9faf4ee5a 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -51,8 +51,8 @@ public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $date = (self::TEMPORARY_CHANGED_YEAR === $year) - ? new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) - : new \DateTime("$year-4-5", new \DateTimeZone(self::TIMEZONE)); + ? new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) + : new \DateTime("{$year}-4-5", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday( self::REGION, diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index 7e51df09a..04ace3099 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -50,7 +50,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index f6e264ef7..13ba57189 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-5", new \DateTimeZone(self::TIMEZONE)) ); } @@ -63,14 +63,14 @@ public function testSubstituteHolidayByBuddhasBirthday(): void self::REGION, 'buddhasBirthday', $year, - new \DateTime("$year-5-5", $tz) + new \DateTime("{$year}-5-5", $tz) ); $this->assertSubstituteHoliday( self::REGION, 'buddhasBirthday', $year, - new \DateTime("$year-5-6", $tz) + new \DateTime("{$year}-5-6", $tz) ); } } diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index c1ec36d05..cefdc2294 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 554a37118..037474379 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -86,7 +86,7 @@ public function testSubstituteHolidayByGaecheonjeol(): void self::REGION, 'nationalFoundationDay', $year, - new \DateTime("$year-10-3", $tz) + new \DateTime("{$year}-10-3", $tz) ); } diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 7dd3fb568..11d23e5d2 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -50,7 +50,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index 5c3e983dc..caeea1af9 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-3", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index aaffb1654..d0fbe6fd4 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -52,7 +52,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-9", new \DateTimeZone(self::TIMEZONE)) ); } } diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 0464d767e..170bf8e12 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index 989db8e95..1d0997d57 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 1e29dba1e..5ddd04b0d 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-6", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index 5f9a340fa..ec65ee9ba 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -41,7 +41,7 @@ class NewYearsDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase public function testHoliday(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)); // New Year's Day $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); diff --git a/tests/SouthKorea/UnitedNationsDayTest.php b/tests/SouthKorea/UnitedNationsDayTest.php index 348f2bcc9..131346d46 100644 --- a/tests/SouthKorea/UnitedNationsDayTest.php +++ b/tests/SouthKorea/UnitedNationsDayTest.php @@ -50,7 +50,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index bdcc5aca2..c8ea74750 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index 52c58479c..d4ab28ca8 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index 2884efd7f..46d7e5b32 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-9-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index cdad08b5a..154f9c28b 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-1", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index d97c4f539..f562954d1 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -49,7 +49,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index a0696f52f..86d944aa3 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index a7309cbff..8f7848e9b 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("second sunday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("second sunday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index b4e6e22d2..db86bd234 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index c284097c3..b3045a464 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-31", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-31", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index ed0c996fe..086380004 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-9-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-11", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index 64a32e4d4..de4fc507e 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-9-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index 2f482d9ca..fdca2af04 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index c7d276124..bb22a5424 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-6", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index f739fec34..afdc8a67f 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index 002d11d69..77b915229 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-9-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-9-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index c1dd4e6f2..662a2d991 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index be86c1622..356922000 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index 40b47df5e..974db7ea2 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index d5ef41805..4197dded2 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index 73bc3c4fb..b44d5d95a 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-7", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-7", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index e2afa10bc..e47f847f1 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index e58a6f389..7a7928d76 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index 40fa2f267..31f26551e 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-9", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-9", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 353e49133..a955cb64d 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -53,7 +53,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-10-31", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE)); // Check between 31 October and 6th of November the day that is a Saturday for ($d = 0; $d <= 7; ++$d) { diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index f5d8e7659..3b6e1c07a 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -53,7 +53,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-10-30", new \DateTimeZone(self::TIMEZONE)); + $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) { diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index faa80f933..12c8cc0e9 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index 2cf1353ac..41e70bdee 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-8", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-8", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index cbdd5ed1c..cac4c09a9 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-4", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 81d944796..3fdfebeb9 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-25", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index 49fe60d41..b2fab13eb 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -44,7 +44,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-6", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-6", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index fe45f5a9a..10f1178b0 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-05-17", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-05-17", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index 430d322bd..d7f37b454 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index ea560bc28..c9fcc8a20 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index 7b81dc602..ed4352451 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index 855595581..0656900c3 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 5d006a2c3..e5b5fb125 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index 233e8e10d..d782b742c 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index 6a01df636..ed4f72cf5 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index 708fb6fed..75446c6d9 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index 0ae0c2f89..b08af193f 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index 904d259c5..0fc90adec 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 195197384..ec7492c48 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index a7817a39a..957ceb93d 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index edb61f133..a98ab8410 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index 7cd52a63b..01e5a9efe 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index be14b01f1..d344001e5 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index 162caf83c..0626bd1c7 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index f19fe386a..bb0fbb066 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index 8abf3362d..875b83d32 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index 0c7c07ac9..ac9593f4c 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index e7ee76974..3e73671e6 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index 5db3dc8ba..c2a7357cf 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 51021f44a..bba09cb1e 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index f5f9ee4af..f436ff45a 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index e7c0faf17..877619a81 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index f11a85d66..b544a16e4 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index 004ff261b..0b77d290d 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -39,7 +39,7 @@ public function testDecember26th(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index c57d2acdc..f476ddd54 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index 6d251846b..dd76ae246 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index 6ccb25d22..0750822c2 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index 8210bb5fe..3e1b643a4 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index b7f70a36b..d095efc00 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index 7b72739ed..c390afdff 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index b929c811f..aa0421ee9 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index be607c928..c9fcefbbc 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index c81212031..1ccb9ceba 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index 74fccec71..a265ea696 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index 703dffaa1..3f00dd972 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index f09cea9a5..55cbc0737 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index 70792e148..be2f7db4e 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index 2574797a4..301c30e81 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index 3c36343a6..0eb61dfe6 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index 0a356edc0..3f99cf51b 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index 0329d0cfa..c0b7f3830 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php index 7ca24c5ff..408f70219 100644 --- a/tests/Switzerland/Jura/EasterTest.php +++ b/tests/Switzerland/Jura/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index 3b402daa5..4ac7bc9f5 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index 2e8b6626f..bdb663285 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php index 70604ce3a..a5e295a8c 100644 --- a/tests/Switzerland/Jura/PentecostTest.php +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index 9a064b237..8896e4312 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -44,7 +44,7 @@ public function testInstaurationRepubliqueOnAfter1975(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index 5cd1a42f5..76760701a 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index c2be29587..e53013111 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index bed6542d4..4d97da6b0 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index 1ee642152..f7b522e07 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index 3fc425b92..16b545954 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index 230e66ae2..9787f7227 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 99b3da40f..2ed27c59a 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 8f434e25e..0cb32b111 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index c0b5a89e8..a76342f43 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -44,7 +44,7 @@ public function testInstaurationRepubliqueOnAfter1849(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-03-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-03-01", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index 24d1bbc80..1584c9ee7 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index 0edc522dd..eb525fb47 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index f3c92b148..4a2825c4d 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index 2970905a1..fe2cae8fa 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index c13e55ca9..c4e9dcecb 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index bc3341ed0..e92beac08 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index 83eeb1b61..41c88d7ba 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index ef0842a5f..5221636aa 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index 0860ffaa5..3f00c3ed4 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index 875409621..392a743f6 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index c64277307..4649cadf3 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 56dbea3e6..84f59a52a 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index bbf1d5025..906546808 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index 225e0586d..6e0aab93b 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index ac3679e6b..b2f85e958 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index 8aee887bb..a952063fd 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index 91b9278f1..930e89e72 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index 63b45f830..d1644251c 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index 6e89b8888..dd19fffab 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index 6639175ea..6f6755488 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index a1374c32a..5b7e7706b 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index 6f828ddd8..546659bc4 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index b7cf54c97..08287a336 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index 9c4c0054f..52e10583e 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index 06970f834..d799c6ab6 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index 2c53e9d49..b17a86251 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -54,7 +54,7 @@ public function testNationalDayOnAfter1994(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-01", new \DateTimeZone(self::TIMEZONE)) ); } @@ -70,7 +70,7 @@ public function testNationalDayOnAfter1899(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-01", new \DateTimeZone(self::TIMEZONE)) ); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } @@ -87,7 +87,7 @@ public function testNationalDayOn1891(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-01", new \DateTimeZone(self::TIMEZONE)) ); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index ba2f52f0d..006b655cf 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index e55282c65..ddcfc97b2 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index dad619805..f50800285 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index e407336e5..5375f9a53 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index d6902258b..1b48b9205 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index 95b790a96..6affe3ff6 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index 429d04b76..74375bb7f 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index 5d221c4a3..84a79bdb2 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index 27cecf5b1..53774266a 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 18df46b07..ddea8fe9a 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index fa7422c58..928787153 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index 22775b9c0..41d97c8bc 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index c6616e770..c9612a526 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index 009f28d93..791d4c1e8 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index 49b704f84..528c75690 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index d36d6b408..053156a49 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index 2f9ad595b..4a95b747f 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index 305e16027..29595b7b0 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index d3e3edb5b..71442ada9 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 3f7f6b358..81542d74f 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index 272c62140..dc28b9add 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index f0c13bf25..b6ffaef5d 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index 288aebce8..cfadd59b8 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -39,7 +39,7 @@ public function testAscensionDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-16", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-16", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index 526543b0f..611dbf2e6 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -39,7 +39,7 @@ public function testEasterMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index 9a3a61310..04336adbb 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-21", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index 31a61d98e..622f869d9 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -39,7 +39,7 @@ public function testPentecostMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index 9ae3c7ccc..b96f2b34c 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -56,7 +56,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < 50; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-5-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Turkey/CommemorationOfAtaturkTest.php b/tests/Turkey/CommemorationOfAtaturkTest.php index c3e9c8f0c..1712fc744 100644 --- a/tests/Turkey/CommemorationOfAtaturkTest.php +++ b/tests/Turkey/CommemorationOfAtaturkTest.php @@ -46,7 +46,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-19", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-19", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Turkey/DemocracyDayTest.php b/tests/Turkey/DemocracyDayTest.php index 678863e9e..6d9f974d8 100644 --- a/tests/Turkey/DemocracyDayTest.php +++ b/tests/Turkey/DemocracyDayTest.php @@ -35,7 +35,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-15", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-15", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Turkey/NationalSovereigntyDayTest.php b/tests/Turkey/NationalSovereigntyDayTest.php index 10eb1c457..d81fe401a 100644 --- a/tests/Turkey/NationalSovereigntyDayTest.php +++ b/tests/Turkey/NationalSovereigntyDayTest.php @@ -50,7 +50,7 @@ public function testHolidayOnAfterEstablishment(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-4-23", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-4-23", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Turkey/RepublicDayTest.php b/tests/Turkey/RepublicDayTest.php index 820d41a86..c17eed4c6 100644 --- a/tests/Turkey/RepublicDayTest.php +++ b/tests/Turkey/RepublicDayTest.php @@ -35,7 +35,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-29", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Turkey/VictoryDayTest.php b/tests/Turkey/VictoryDayTest.php index de13145f7..796f5e993 100644 --- a/tests/Turkey/VictoryDayTest.php +++ b/tests/Turkey/VictoryDayTest.php @@ -37,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-8-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-8-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index 7ce9ee59d..93bb8dbca 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -39,7 +39,7 @@ public function testChristmasDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)) ); } @@ -56,7 +56,7 @@ public function testChristmasDaySubstitutedMonday(): void self::REGION, 'substituteHoliday:christmasDay', $year, - new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)) ); } @@ -73,7 +73,7 @@ public function testChristmasDaySubstitutedFriday(): void self::REGION, 'substituteHoliday:christmasDay', $year, - new \DateTime("$year-12-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index e883ee4fe..9823b05b2 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -45,7 +45,7 @@ public function testColumbusDayOnAfter1970(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("second monday of october $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("second monday of october {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testColumbusBetween1937And1969(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-12", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index 6daa8d790..b97d764da 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -44,7 +44,7 @@ public function testIndependenceDayOnAfter1776(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-7-4", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-4", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testIndependenceDayOnAfter1776SubstitutedMonday(): void self::REGION, 'substituteHoliday:independenceDay', $year, - new \DateTime("$year-7-5", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-5", new \DateTimeZone(self::TIMEZONE)) ); } @@ -76,7 +76,7 @@ public function testIndependenceDayOnAfter1776SubstitutedFriday(): void self::REGION, 'substituteHoliday:independenceDay', $year, - new \DateTime("$year-7-3", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-7-3", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index c012f0cf7..2dc878b85 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -44,7 +44,7 @@ public function testJuneteenthOnAfter2021(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-19", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-19", new \DateTimeZone(self::TIMEZONE)) ); } @@ -60,7 +60,7 @@ public function testJuneteenthOnAfter2021SubstitutedMonday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-20", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-20", new \DateTimeZone(self::TIMEZONE)) ); } @@ -76,7 +76,7 @@ public function testJuneteenthOnAfter2021SubstitutedFriday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-6-18", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-6-18", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 6bd1129cd..8a0acb910 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -44,7 +44,7 @@ public function testLabourDayOnAfter1887(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of september $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of september {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index c94ae1a05..cc82e2ec2 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -45,7 +45,7 @@ public function testMartinLutherKingDayOnAfter1986(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("third monday of january $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of january {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index 8d84fd987..6f3ccfc24 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -45,7 +45,7 @@ public function testMemorialDayOnAfter1968(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("last monday of may $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of may {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testMemorialDayBetween1865And1967(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 390705ea7..42c2d43be 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -39,7 +39,7 @@ public function testNewYearsDay(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)) ); } @@ -55,7 +55,7 @@ public function testNewYearsDaySubstitutedMonday(): void self::REGION, 'substituteHoliday:newYearsDay', $year, - new \DateTime("$year-1-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-1-2", new \DateTimeZone(self::TIMEZONE)) ); } @@ -72,7 +72,7 @@ public function testNewYearsDaySubstitutedFriday(): void self::REGION, 'substituteHoliday:newYearsDay', $year, - new \DateTime("$subYear-12-31", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$subYear}-12-31", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index afd5645fb..a37764011 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -45,7 +45,7 @@ public function testThanksgivingDayOnAfter1863(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("fourth thursday of november $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("fourth thursday of november {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index c23499e31..017dbedd7 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -46,7 +46,7 @@ public function testVeteransDayOnAfter1919(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-11-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-11", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testVeteransDayOnAfter1919SubstitutedMonday(): void self::REGION, 'substituteHoliday:veteransDay', $year, - new \DateTime("$year-11-12", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-12", new \DateTimeZone(self::TIMEZONE)) ); } @@ -78,7 +78,7 @@ public function testVeteransDayOnAfter1919SubstitutedFriday(): void self::REGION, 'substituteHoliday:veteransDay', $year, - new \DateTime("$year-11-10", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-11-10", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index 798bb7549..97b929f6d 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -45,7 +45,7 @@ public function testWashingtonsBirthdayOnAfter1968(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("third monday of february $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("third monday of february {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -62,7 +62,7 @@ public function testWashingtonsBirthdayBetween1879And1967(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-2-22", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-2-22", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 913da4bf5..de138aef4 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -96,7 +96,7 @@ public function CatholicChristmasDayDataProvider(): array for ($y = 0; $y < 10; ++$y) { $year = $this->generateRandomYear(2017); - $data[] = [$year, new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index 9a81d91ff..b7cfcabe0 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -37,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-28", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-28", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index 4939a051a..a46194429 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -37,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-14", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-10-14", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index e8ef5130d..5b96c2018 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-04-19", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-04-19", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index ecb3b4c04..800d12c08 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -37,7 +37,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-08-24", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-08-24", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 651dde381..d31769cad 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-07", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-07", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 80a0db02b..76488da81 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -101,7 +101,7 @@ public function SecondInternationalWorkersDayDataProvider(): array for ($y = 0; $y < 10; ++$y) { $year = $this->generateRandomYear(null, 2017); - $data[] = [$year, new \DateTime("$year-05-02", new \DateTimeZone(self::TIMEZONE))]; + $data[] = [$year, new \DateTime("{$year}-05-02", new \DateTimeZone(self::TIMEZONE))]; } return $data; diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 54f86b0c1..1502dfb84 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -41,8 +41,8 @@ public function testSaturdaySubstitution(): void self::REGION, $holiday, $year, - new \DateTime("$year-05-09", new \DateTimeZone(self::TIMEZONE)), - new \DateTime("$year-05-11", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-05-09", new \DateTimeZone(self::TIMEZONE)), + new \DateTime("{$year}-05-11", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); @@ -105,8 +105,8 @@ public function testSundaySubstitution(): void self::REGION, $holiday, $year, - new \DateTime("$year-06-28", new \DateTimeZone(self::TIMEZONE)), - new \DateTime("$year-06-29", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-06-28", new \DateTimeZone(self::TIMEZONE)), + new \DateTime("{$year}-06-29", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); @@ -129,7 +129,7 @@ public function testNewYearNoSubstitution(): void self::REGION, $holiday, $year, - new \DateTime("$year-01-01", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-01-01", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); @@ -152,7 +152,7 @@ public function testCatholicChristmasDayNoSubstitution(): void self::REGION, $holiday, $year, - new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)) ); unset($year, $holiday); diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 96f1b676a..ced40b216 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index d3c653252..3426f6dec 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index 424cd8bf4..40a923118 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index c4bca56d6..ff7c8d46e 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index 2ecd780c8..eeff6d95a 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index bdd2e4d5f..b36359e29 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index d74489e61..bc249d498 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index 3e9563bdd..3d128c887 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -49,7 +49,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +65,7 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index d34fd9225..5677ee57a 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index da3317745..0de381de7 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index e6a6ebe63..a02148a79 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -80,7 +80,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-7-12", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-7-12", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 7bbe975d8..747bab561 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index 7f65429d5..ac58b5481 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index 1013388ba..0bf468858 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index a6ef31c28..9d6b6b12a 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index 19d420c7c..35cb8d1c9 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index f6ec148d4..51519fbaa 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -80,7 +80,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-3-17", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-3-17", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index daf4fc1b8..c481ea648 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -49,7 +49,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +65,7 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index df1b9d444..2b21b95ba 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 6151ac516..97d7ed21d 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index 51976a627..f95d1793c 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index a07ff57c3..ac15b8412 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index 74f42e96a..1750f7205 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -100,7 +100,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-1-1", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index ed55041e8..405d23b23 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -100,7 +100,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-1-2", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-1-2", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 99bb3e33a..841d79682 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index c0d310a5f..aa604c9d0 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -66,7 +66,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime("$year-11-30", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-11-30", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index c6e6da703..117721916 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 32a07bd5c..44d1ae5bb 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index 01e693495..b499ce91f 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -49,7 +49,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +65,7 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 0d56a0d94..ff3810532 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-26", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 524441f5a..712d7bd0d 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -62,7 +62,7 @@ public function HolidayDataProvider(): array for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { $year = $this->generateRandomYear(); - $date = new \DateTime("$year-12-25", new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index 8b0a71b01..8e1379097 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -39,7 +39,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-3-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-3-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index 5aef020f9..17b06321d 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-2", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 1f0960803..169beeb88 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -44,7 +44,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-5-30", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("{$year}-5-30", new \DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index 218dd6999..67793edd0 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -49,7 +49,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("last monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("last monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } @@ -65,7 +65,7 @@ public function testHolidayBefore1965(): void self::REGION, self::HOLIDAY, $year, - new \DateTime("first monday of august $year", new \DateTimeZone(self::TIMEZONE)) + new \DateTime("first monday of august {$year}", new \DateTimeZone(self::TIMEZONE)) ); } From a76da12e04fb1df647e7c88f4994dff4dee0dffd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 00:39:41 +0900 Subject: [PATCH 497/687] build: Include PHPInsights configuration for additional code analysis. Signed-off-by: Sacha Telgenhof --- phpinsights.php | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 phpinsights.php diff --git a/phpinsights.php b/phpinsights.php new file mode 100644 index 000000000..7464f56e6 --- /dev/null +++ b/phpinsights.php @@ -0,0 +1,108 @@ + 'symfony', + + /* + |-------------------------------------------------------------------------- + | IDE + |-------------------------------------------------------------------------- + | + | This options allow to add hyperlinks in your terminal to quickly open + | files in your favorite IDE while browsing your PhpInsights report. + | + | Supported: "textmate", "macvim", "emacs", "sublime", "phpstorm", + | "atom", "vscode". + | + | If you have another IDE that is not in this list but which provide an + | url-handler, you could fill this config with a pattern like this: + | + | myide://open?url=file://%f&line=%l + | + */ + + 'ide' => null, + + /* + |-------------------------------------------------------------------------- + | Configuration + |-------------------------------------------------------------------------- + | + | Here you may adjust all the various `Insights` that will be used by PHP + | Insights. You can either add, remove or configure `Insights`. Keep in + | mind, that all added `Insights` must belong to a specific `Metric`. + | + */ + + 'exclude' => [ + // 'path/to/directory-or-file' + ], + + 'add' => [ + // ExampleMetric::class => [ + // ExampleInsight::class, + // ] + ], + + 'remove' => [ + \PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::class, + \SlevomatCodingStandard\Sniffs\ControlStructures\DisallowShortTernaryOperatorSniff::class, + \SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff::class, + \SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class, + ], + + 'config' => [ + \PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class => [ + 'lineLimit' => 120, + 'absoluteLineLimit' => 140, + 'ignoreComments' => false, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Requirements + |-------------------------------------------------------------------------- + | + | Here you may define a level you want to reach per `Insights` category. + | When a score is lower than the minimum level defined, then an error + | code will be returned. This is optional and individually defined. + | + */ + + 'requirements' => [ + 'min-quality' => 90, + 'min-complexity' => 90, + 'min-architecture' => 90, + 'min-style' => 90, + 'disable-security-check' => false, + ], + + /* + |-------------------------------------------------------------------------- + | Threads + |-------------------------------------------------------------------------- + | + | Here you may adjust how many threads (core) PHPInsights can use to perform + | the analyse. This is optional, don't provide it and the tool will guess + | the max core number available. It accepts null value or integer > 0. + | + */ + + 'threads' => null, +]; From 1b394d3de6d2b5bc3bb35ed18399150e86afd256 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 01:25:23 +0900 Subject: [PATCH 498/687] refactor: Introduced private methods for each holiday to eliminate complexity. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Brazil.php | 215 ++++++++++++++++++--------------- 1 file changed, 120 insertions(+), 95 deletions(-) diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index cdee5f603..c482f0045 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -43,72 +43,104 @@ public function initialize(): void $this->timezone = 'America/Fortaleza'; // Add common holidays - $this->addHoliday($this->newYearsDay($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)); // Add Christian holidays + $this->addHoliday($this->ashWednesday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $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->easter($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $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)); - /* - * Carnaval - * - * Carnaval is the biggest popular festival of country. The festival it happens during 4 days and the last day above - * the wednesday of ashes (initiation of lent). - * - * @link https://en.wikipedia.org/wiki/Brazilian_Carnival - */ - if ($this->year >= 1700) { - $easter = $this->calculateEaster($this->year, $this->timezone); + // Calculate other holidays + $this->calculateAllSoulsDay(); + $this->calculateCarnival(); + $this->calculateIndependenceDay(); + $this->calculateOurLadyOfAparecidaDay(); + $this->calculateProclamationOfRepublicDay(); + $this->calculateTiradentesDay(); + } - $carnavalMonday = clone $easter; + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Brazil', + ]; + } + + /* + * Proclamation of Republic Day + * + * The Brazilian Proclamation of Republic was an act relevant military politic it happened on 15 November 1889 + * that initiated the build federative presidential of govern in Brazil, downed the monarchy constitutional + * parlamentary of Brazil's Empire. + * + * @link https://en.wikipedia.org/wiki/Proclamation_of_the_Republic_(Brazil) + */ + private function calculateProclamationOfRepublicDay(): void + { + if ($this->year >= 1889) { $this->addHoliday(new Holiday( - 'carnavalMonday', - ['pt' => 'Segunda-feira de Carnaval'], - $carnavalMonday->sub(new \DateInterval('P48D')), - $this->locale, - Holiday::TYPE_OBSERVANCE + 'proclamationOfRepublicDay', + ['pt' => 'Dia da Proclamação da República'], + new \DateTime("{$this->year}-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), )); + } + } - $carnavalTuesday = clone $easter; + /* + * All Souls Day + * + * The All Souls day (known like Deads Day in Mexico), is celebrated for Catholic Church on 2 November. + * + * @link http://www.johninbrazil.org/all-souls-day-o-dia-dos-finados/ + */ + private function calculateAllSoulsDay(): void + { + if ($this->year >= 1300) { $this->addHoliday(new Holiday( - 'carnavalTuesday', - ['pt' => 'Terça-feira de Carnaval'], - $carnavalTuesday->sub(new \DateInterval('P47D')), - $this->locale, - Holiday::TYPE_OBSERVANCE + 'allSoulsDay', + [], + new \DateTime("{$this->year}-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } + } - /* - * Tiradentes Day - * - * Tiradentes Day is a the Brazilian national holidays. Is the a tribute to national Brazilian hero Joaquim José - * da Silva Xavier, martyr of Inconfidência Mineira. Is celebrated on 21 Abril, because the execution of - * Tiradentes got in the day, in 1792. - * - * @link https://en.wikipedia.org/wiki/Tiradentes - */ - if ($this->year >= 1792) { + /* + * Our Lady of Aparecida Day + * + * Our Lady of Conceição Aparecida, popularly called Our Lady Aparecida, Brazil's patroness. She is + * venerated in Catholic Church. Our Lady Aparecida is represented like a little image of Virgen Maria, + * currently in Basílica of Our Lady Aparecida, localized in São Paulo. + * + * The event is celebrated on 12 October, a national holiday in Brazil since 1980. + * + * @link https://en.wikipedia.org/wiki/Our_Lady_of_Aparecida + */ + private function calculateOurLadyOfAparecidaDay(): void + { + if ($this->year >= 1980) { $this->addHoliday(new Holiday( - 'tiradentesDay', - ['pt' => 'Dia de Tiradentes'], - new \DateTime("{$this->year}-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + 'ourLadyOfAparecidaDay', + ['pt' => 'Dia de Nossa Senhora Aparecida'], + new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } + } - /* - * Independence Day - * - * The Homeland Day is a national holiday of Brazilian homeland celebrated on 7 September. The date is - * celebrated the independence declaration of Brazil to Portuguese empire on 7 September 1822. - * - * @link https://en.wikipedia.org/wiki/Independence_of_Brazil - */ + /* + * Independence Day + * + * The Homeland Day is a national holiday of Brazilian homeland celebrated on 7 September. The date is + * celebrated the independence declaration of Brazil to Portuguese empire on 7 September 1822. + * + * @link https://en.wikipedia.org/wiki/Independence_of_Brazil + */ + private function calculateIndependenceDay(): void + { if ($this->year >= 1822) { $this->addHoliday(new Holiday( 'independenceDay', @@ -117,66 +149,59 @@ public function initialize(): void $this->locale )); } + } - /* - * Our Lady of Aparecida Day - * - * Our Lady of Conceição Aparecida, popularly called Our Lady Aparecida, Brazil's patroness. She is - * venerated in Catholic Church. Our Lady Aparecida is represented like a little image of Virgen Maria, - * currently in Basílica of Our Lady Aparecida, localized in São Paulo. - * - * The event is celebrated on 12 October, a national holiday in Brazil since 1980. - * - * @link https://en.wikipedia.org/wiki/Our_Lady_of_Aparecida - */ - if ($this->year >= 1980) { + /* + * Tiradentes Day + * + * Tiradentes Day is a the Brazilian national holidays. Is the a tribute to national Brazilian hero Joaquim José + * da Silva Xavier, martyr of Inconfidência Mineira. Is celebrated on 21 Abril, because the execution of + * Tiradentes got in the day, in 1792. + * + * @link https://en.wikipedia.org/wiki/Tiradentes + */ + private function calculateTiradentesDay(): void + { + if ($this->year >= 1792) { $this->addHoliday(new Holiday( - 'ourLadyOfAparecidaDay', - ['pt' => 'Dia de Nossa Senhora Aparecida'], - new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + 'tiradentesDay', + ['pt' => 'Dia de Tiradentes'], + new \DateTime("{$this->year}-04-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } + } - /* - * All Souls Day - * - * The All Souls day (known like Deads Day in Mexico), is celebrated for Catholic Church on 2 November. - * - * @link http://www.johninbrazil.org/all-souls-day-o-dia-dos-finados/ - */ - if ($this->year >= 1300) { + /* + * Carnaval + * + * Carnaval is the biggest popular festival of country. The festival it happens during 4 days and the last day above + * the wednesday of ashes (initiation of lent). + * + * @link https://en.wikipedia.org/wiki/Brazilian_Carnival + */ + private function calculateCarnival(): void + { + if ($this->year >= 1700) { + $easter = $this->calculateEaster($this->year, $this->timezone); + + $carnavalMonday = clone $easter; $this->addHoliday(new Holiday( - 'allSoulsDay', - [], - new \DateTime("{$this->year}-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'carnavalMonday', + ['pt' => 'Segunda-feira de Carnaval'], + $carnavalMonday->sub(new \DateInterval('P48D')), + $this->locale, + Holiday::TYPE_OBSERVANCE )); - } - /* - * Proclamation of Republic Day - * - * The Brazilian Proclamation of Republic was an act relevant military politic it happened on 15 November 1889 - * that initiated the build federative presidential of govern in Brazil, downed the monarchy constitutional - * parlamentary of Brazil's Empire. - * - * @link https://en.wikipedia.org/wiki/Proclamation_of_the_Republic_(Brazil) - */ - if ($this->year >= 1889) { + $carnavalTuesday = clone $easter; $this->addHoliday(new Holiday( - 'proclamationOfRepublicDay', - ['pt' => 'Dia da Proclamação da República'], - new \DateTime("{$this->year}-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale + 'carnavalTuesday', + ['pt' => 'Terça-feira de Carnaval'], + $carnavalTuesday->sub(new \DateInterval('P47D')), + $this->locale, + Holiday::TYPE_OBSERVANCE )); } } - - public function getSources(): array - { - return [ - 'https://en.wikipedia.org/wiki/Public_holidays_in_Brazil', - ]; - } } From 08956fee8dc0648241939ddc10717cb684d3d1eb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 01:39:25 +0900 Subject: [PATCH 499/687] refactor: Simplify the calculation of Carnival in Brazil to reduce duplication. Add check in case date subtraction fails. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Brazil.php | 43 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index c482f0045..c1b21bf76 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -185,23 +185,32 @@ private function calculateCarnival(): void if ($this->year >= 1700) { $easter = $this->calculateEaster($this->year, $this->timezone); - $carnavalMonday = clone $easter; - $this->addHoliday(new Holiday( - 'carnavalMonday', - ['pt' => 'Segunda-feira de Carnaval'], - $carnavalMonday->sub(new \DateInterval('P48D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - - $carnavalTuesday = clone $easter; - $this->addHoliday(new Holiday( - 'carnavalTuesday', - ['pt' => 'Terça-feira de Carnaval'], - $carnavalTuesday->sub(new \DateInterval('P47D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); + $days = [ + 'carnavalMonday' => [ + 'interval' => 'P48D', + 'name' => 'Segunda-feira de Carnaval', + ], + 'carnavalTuesday' => [ + 'interval' => 'P47D', + 'name' => 'Terça-feira de Carnaval', + ], + ]; + + foreach ($days as $name => $day) { + $date = (clone $easter)->sub(new \DateInterval($day['interval'])); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $name)); + } + + $this->addHoliday(new Holiday( + $name, + ['pt' => $day['name']], + $date, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } } } } From 223cacc4abfaa9732e83a084781d9d54bf0bc687 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 08:28:08 +0900 Subject: [PATCH 500/687] refactor: Simplify the calculation of Carnival in Argentina to reduce duplication. Add check in case date subtraction fails. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Argentina.php | 56 +++++++++++++++++-------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 2a47163eb..893b84716 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -1,6 +1,7 @@ year >= 1700) { $easter = $this->calculateEaster($this->year, $this->timezone); - $carnavalMonday = clone $easter; - $carnavalMondayDate = $carnavalMonday->sub(new \DateInterval('P48D')); - $this->addHoliday(new Holiday( - 'carnavalMonday', - [ - 'en' => 'Carnival Monday', - 'es' => 'Lunes de Carnaval', + $days = [ + 'carnavalMonday' => [ + 'interval' => 'P48D', + 'name' => 'Lunes de Carnaval', + 'name_en' => 'Carnival Monday', ], - $carnavalMondayDate, - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - - $carnavalTuesday = clone $easter; - $carnavalTuesdayDate = $carnavalTuesday->sub(new \DateInterval('P47D')); - $this->addHoliday(new Holiday( - 'carnavalTuesday', - [ - 'en' => 'Carnival Tuesday', - 'es' => 'Martes de Carnaval', + 'carnavalTuesday' => [ + 'interval' => 'P47D', + 'name' => 'Martes de Carnaval', + 'name_en' => 'Carnival Tuesday', ], - $carnavalTuesdayDate, - $this->locale, - Holiday::TYPE_OBSERVANCE - )); + ]; + + foreach ($days as $name => $day) { + $date = (clone $easter)->sub(new \DateInterval($day['interval'])); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $name)); + } + + $this->addHoliday(new Holiday( + $name, + [ + 'es' => $day['name'], + 'en' => $day['name_en'], + ], + $date, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } } } From ce803e42abfb357f697a5388188728256aed5128 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 08:34:43 +0900 Subject: [PATCH 501/687] build: Remove checks for Superfluous naming as we follow PER which supports such convention. Signed-off-by: Sacha Telgenhof --- phpinsights.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpinsights.php b/phpinsights.php index 7464f56e6..7ee615fda 100644 --- a/phpinsights.php +++ b/phpinsights.php @@ -64,6 +64,11 @@ \SlevomatCodingStandard\Sniffs\ControlStructures\DisallowShortTernaryOperatorSniff::class, \SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff::class, \SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class, + + // Remove checks for superfluous naming as we follow PER which supports such convention + \SlevomatCodingStandard\Sniffs\Classes\SuperfluousInterfaceNamingSniff::class, + \SlevomatCodingStandard\Sniffs\Classes\SuperfluousAbstractClassNamingSniff::class, + \SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff::class, ], 'config' => [ From 0b090753bfa92e0d248cfe7a6d13025bded9f0b6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 09:04:37 +0900 Subject: [PATCH 502/687] style: Avoid use of the empty() function. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 4 ++-- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Yasumi.php | 2 +- tests/Randomizer.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index aaf211770..85367168e 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -108,7 +108,7 @@ public function __construct( string $type = self::TYPE_OFFICIAL ) { // Validate if key is not empty - if (empty($key)) { + if ('' === $key) { throw new \InvalidArgumentException('Holiday name can not be blank.'); } @@ -231,7 +231,7 @@ public function mergeGlobalTranslations(TranslationsInterface $globalTranslation */ protected function getLocales(?array $locales): array { - if (! empty($locales)) { + if (null !== $locales && [] !== $locales) { $expanded = []; } else { $locales = [$this->displayLocale]; diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 5fe5a860a..f5f5ed933 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -278,7 +278,7 @@ private function clearHolidays(): void */ private function isHolidayKeyNotEmpty(string $key): bool { - if (empty($key)) { + if ('' === $key) { throw new \InvalidArgumentException('Holiday key can not be blank.'); } diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 55470eb79..db1f4822a 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -124,7 +124,7 @@ private function calculateHomelandThanksgivingDay(): void $names['hr'] = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; } - if (! empty($names)) { + if ([] !== $names) { $this->addHoliday(new Holiday( 'homelandThanksgiving', $names, diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 7b3c0e122..e6ff06784 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -205,7 +205,7 @@ public static function getProviders(): array { // Basic static cache static $providers; - if (! empty($providers)) { + if (null !== $providers && [] !== $providers) { return $providers; } diff --git a/tests/Randomizer.php b/tests/Randomizer.php index 28b3ac1b2..bd9d4e3ce 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -434,7 +434,7 @@ protected static function getMaxTimestamp($max = 'now') } elseif ($max instanceof \DateTime) { $ts = $max->getTimestamp(); } else { - $ts = strtotime(empty($max) ? 'now' : $max); + $ts = strtotime('' === $max ? 'now' : $max); } return $ts; From 494d5f69734ade3405628c509cde7d9216f9d4f7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 20 Jun 2023 09:38:02 +0900 Subject: [PATCH 503/687] style: Remove redundant parentheses and fix array indentation. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Argentina.php | 42 +++++++++++------------ src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 32 ++++++++--------- src/Yasumi/Provider/USA.php | 4 +-- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 893b84716..150fbe7a3 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -76,7 +76,7 @@ public function initialize(): void public function getSources(): array { return [ - 'https://en.wikipedia.org/wiki/Public_holidays_in_Argentina', + 'https://en.wikipedia.org/wiki/Public_holidays_in_Argentina', ]; } @@ -144,8 +144,8 @@ private function addRemembranceDay(): void $this->addHoliday(new Holiday( 'remembranceDay', [ - 'en' => 'Day of Remembrance for Truth and Justice', - 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', + 'en' => 'Day of Remembrance for Truth and Justice', + 'es' => 'Día Nacional de la Memoria por la Verdad y la Justicia', ], new \DateTime("{$this->year}-03-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -170,8 +170,8 @@ private function addMalvinasDay(): void $this->addHoliday(new Holiday( 'malvinasDay', [ - 'en' => 'Malvinas Day', - 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', + 'en' => 'Malvinas Day', + 'es' => 'Día del Veterano y de los Caídos en la Guerra de Malvinas', ], new \DateTime("{$this->year}-04-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -198,8 +198,8 @@ private function addMayRevolution(): void $this->addHoliday(new Holiday( 'mayRevolution', [ - 'en' => 'May Revolution', - 'es' => 'Día de la Revolución de Mayo', + 'en' => 'May Revolution', + 'es' => 'Día de la Revolución de Mayo', ], new \DateTime("{$this->year}-05-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -219,8 +219,8 @@ private function addGeneralMartinMigueldeGuemesDay(): void $this->addHoliday(new Holiday( 'generalMartinMigueldeGuemesDay', [ - 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', - 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', + 'en' => 'Anniversary of the Passing of General Martín Miguel de Güemes', + 'es' => 'Paso a la Inmortalidad del General Martín Miguel de Güemes', ], new \DateTime("{$this->year}-06-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -242,8 +242,8 @@ private function addFlagDay(): void $this->addHoliday(new Holiday( 'flagDay', [ - 'en' => 'General Manuel Belgrano Memorial Day', - 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', + 'en' => 'General Manuel Belgrano Memorial Day', + 'es' => 'Paso a la Inmortalidad del General Manuel Belgrano', ], new \DateTime("{$this->year}-06-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -264,8 +264,8 @@ private function addIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', [ - 'en' => 'Independence Day', - 'es' => 'Día de la Independencia', + 'en' => 'Independence Day', + 'es' => 'Día de la Independencia', ], new \DateTime("{$this->year}-07-09", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -285,8 +285,8 @@ private function addGeneralJoseSanMartinDay(): void $this->addHoliday(new Holiday( 'generalJoseSanMartinDay', [ - 'en' => 'General José de San Martín Memorial Day', - 'es' => 'Paso a la Inmortalidad del General José de San Martín', + 'en' => 'General José de San Martín Memorial Day', + 'es' => 'Paso a la Inmortalidad del General José de San Martín', ], new \DateTime("{$this->year}-08-17", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -308,8 +308,8 @@ private function addRaceDay(): void $this->addHoliday(new Holiday( 'raceDay', [ - 'en' => 'Day of Respect for Cultural Diversity', - 'es' => 'Día del Respeto a la Diversidad Cultural', + 'en' => 'Day of Respect for Cultural Diversity', + 'es' => 'Día del Respeto a la Diversidad Cultural', ], new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -331,8 +331,8 @@ private function addNationalSovereigntyDay(): void $this->addHoliday(new Holiday( 'nationalSovereigntyDay', [ - 'en' => 'National Sovereignty Day', - 'es' => 'Día de la Soberanía Nacional', + 'en' => 'National Sovereignty Day', + 'es' => 'Día de la Soberanía Nacional', ], new \DateTime("{$this->year}-11-20", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale @@ -354,8 +354,8 @@ private function addImmaculateConceptionDay(): void $this->addHoliday(new Holiday( 'immaculateConceptionDay', [ - 'en' => 'Immaculate Conception Day', - 'es' => 'Día de la Inmaculada Concepción de María', + 'en' => 'Immaculate Conception Day', + 'es' => 'Día de la Inmaculada Concepción de María', ], new \DateTime("{$this->year}-12-08", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 8e7852a62..5d02b067d 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -357,7 +357,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf } $solar = (int) (($year - 1600) / 100) - (int) (($year - 1600) / 400); // The solar correction - $lunar = (int) (((int) (($year - 1400) / 100) * 8) / 25); // The lunar correction + $lunar = (int) (($year - 1400) / 100 * 8 / 25); // The lunar correction $pfm = (3 - (11 * $golden) + $solar - $lunar) % 30; // Uncorrected date of the Paschal full moon } diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 9fd5e10a4..e2ff63bb5 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -306,7 +306,7 @@ private function calculateCommemorationLiberationDay(): void Holiday::TYPE_OBSERVANCE )); // Liberation day is only an official holiday every 5 years - $holidayType = (0 === $this->year % 5) ? Holiday::TYPE_OFFICIAL : Holiday::TYPE_OBSERVANCE; + $holidayType = 0 === $this->year % 5 ? Holiday::TYPE_OFFICIAL : Holiday::TYPE_OBSERVANCE; $this->addHoliday(new Holiday( 'liberationDay', ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 7664d023a..492aa3e4a 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -404,7 +404,7 @@ protected function arborDay( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - $datetime = (1960 === $year) ? "{$year}-3-21" : "{$year}-4-5"; + $datetime = 1960 === $year ? "{$year}-3-21" : "{$year}-4-5"; return new Holiday( 'arborDay', @@ -806,21 +806,21 @@ private function calculateBefore2013(int $year): array private function calculateCurrent(): array { return [ - 'newYearsDay', - 'dayBeforeSeollal', - 'seollal', - 'dayAfterSeollal', - 'independenceMovementDay', - 'buddhasBirthday', - 'childrensDay', - 'memorialDay', - 'liberationDay', - 'dayBeforeChuseok', - 'chuseok', - 'dayAfterChuseok', - 'nationalFoundationDay', - 'hangulDay', - 'christmasDay', + 'newYearsDay', + 'dayBeforeSeollal', + 'seollal', + 'dayAfterSeollal', + 'independenceMovementDay', + 'buddhasBirthday', + 'childrensDay', + 'memorialDay', + 'liberationDay', + 'dayBeforeChuseok', + 'chuseok', + 'dayAfterChuseok', + 'nationalFoundationDay', + 'hangulDay', + 'christmasDay', ]; } diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 027c86277..001a9fd6e 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -161,7 +161,7 @@ private function calculateJuneteenth(): void $label = 'Juneteenth'; $holiday = new Holiday('juneteenth', [ - 'en' => $label, + 'en' => $label, ], $date, $this->locale); $this->addHoliday($holiday); @@ -178,7 +178,7 @@ private function calculateJuneteenth(): void $this->addHoliday(new SubstituteHoliday( $holiday, [ - 'en' => $label.' (observed)', + 'en' => $label.' (observed)', ], $date, $this->locale From 00b89c98045cd79c9d375568a879013391a9e7e2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 00:54:07 +0900 Subject: [PATCH 504/687] refactor: Simplify the conditions for the Coming of Age day calculation. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index ed2db61f2..b5c82f68c 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -306,14 +306,11 @@ private function calculateVernalEquinoxDay(): void */ private function calculateComingOfAgeDay(): void { - $date = null; - if ($this->year >= 2000) { - $date = new \DateTime("second monday of january {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } elseif ($this->year >= 1948) { - $date = new \DateTime("{$this->year}-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } + if ($this->year >= 1948) { + $date = ($this->year >= 2000) ? + new \DateTime("second monday of january {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)) : + new \DateTime("{$this->year}-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - if ($date instanceof \DateTimeInterface) { $this->addHoliday(new Holiday( 'comingOfAgeDay', ['en' => 'Coming of Age Day', 'ja' => '成人の日'], From fe31974d4297d70e6b7c6cf05aad147f79554ffe Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 01:30:07 +0900 Subject: [PATCH 505/687] refactor: Add check for the Australia provider in case date subtraction fails. Signed-off-by: Sacha Telgenhof --- .../Provider/Australia/AustralianCapitalTerritory.php | 8 +++++++- src/Yasumi/Provider/Australia/NewSouthWales.php | 8 +++++++- src/Yasumi/Provider/Australia/NorthernTerritory.php | 8 +++++++- src/Yasumi/Provider/Australia/SouthAustralia.php | 8 +++++++- src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php | 4 ++++ src/Yasumi/Provider/Australia/Victoria.php | 8 +++++++- 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index f01b9881c..a8cd363bf 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -106,10 +106,16 @@ private function easterSaturday( string $locale, ?string $type = null ): Holiday { + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, 'easterSaturday')); + } + return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), + $date, $locale, $type ?? Holiday::TYPE_OFFICIAL ); diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 5cda7813a..b590850fc 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -73,10 +73,16 @@ private function easterSaturday( string $locale, ?string $type = null ): Holiday { + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, 'easterSaturday')); + } + return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), + $date, $locale, $type ?? Holiday::TYPE_OFFICIAL ); diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index 22205b09c..4f8253584 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -72,10 +72,16 @@ private function easterSaturday( string $locale, ?string $type = null ): Holiday { + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, 'easterSaturday')); + } + return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), + $date, $locale, $type ?? Holiday::TYPE_OFFICIAL ); diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 6aa998685..1f200f414 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -80,10 +80,16 @@ private function easterSaturday( string $locale, ?string $type = null ): Holiday { + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, 'easterSaturday')); + } + return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), + $date, $locale, $type ?? Holiday::TYPE_OFFICIAL ); diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index d7cdfd081..91607efb8 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -55,6 +55,10 @@ private function calculateDevonportShow(): void $date = new \DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, 'devonportShow')); + } + $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 8f5e60b7f..9e9be533c 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -106,10 +106,16 @@ private function easterSaturday( string $locale, ?string $type = null ): Holiday { + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, 'easterSaturday')); + } + return new Holiday( 'easterSaturday', ['en' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')), + $date, $locale, $type ?? Holiday::TYPE_OFFICIAL ); From d1f0fbf234821d9f490c6e8824c7f4e007269a37 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 02:03:18 +0900 Subject: [PATCH 506/687] refactor: Add check in case date subtraction fails. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/ChristianHolidays.php | 45 ++++++++++++----------- src/Yasumi/Provider/Greece.php | 16 +++++--- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 5d02b067d..5af2d1e9b 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -144,13 +144,14 @@ protected function goodFriday( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday( - 'goodFriday', - [], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P2D')), - $locale, - $type - ); + $holiday = 'goodFriday'; + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P2D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $holiday)); + } + + return new Holiday($holiday, [], $date, $locale, $type); } /** @@ -667,13 +668,14 @@ protected function ashWednesday( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday( - 'ashWednesday', - [], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P46D')), - $locale, - $type - ); + $holiday = 'ashWednesday'; + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P46D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $holiday)); + } + + return new Holiday($holiday, [], $date, $locale, $type); } /** @@ -773,13 +775,14 @@ protected function maundyThursday( string $locale, string $type = Holiday::TYPE_OFFICIAL ): Holiday { - return new Holiday( - 'maundyThursday', - [], - $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P3D')), - $locale, - $type - ); + $holiday = 'maundyThursday'; + $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P3D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $holiday)); + } + + return new Holiday($holiday, [], $date, $locale, $type); } /** diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index fcd98e980..03a673cb9 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -112,12 +112,16 @@ private function calculateThreeHolyHierarchs(): void */ private function calculateCleanMonday(): void { - $this->addHoliday(new Holiday( - 'cleanMonday', - ['el' => 'Καθαρά Δευτέρα'], - $this->calculateEaster($this->year, $this->timezone)->sub(new \DateInterval('P48D')), - $this->locale - )); + $holiday = 'cleanMonday'; + $date = $this->calculateEaster($this->year, $this->timezone)->sub(new \DateInterval('P48D')); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $holiday)); + } + + $this->addHoliday( + new Holiday($holiday, ['el' => 'Καθαρά Δευτέρα'], $date, $this->locale) + ); } /** From c7087f3db137ff8402fa0dae42aa931560cf6392 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 11:31:11 +0900 Subject: [PATCH 507/687] refactor: extract Day of Antifascist Struggle calculation to a private method. Simplify Statehood Day calculation to make it more concise. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Croatia.php | 36 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index db1f4822a..f41e3fc0e 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -58,16 +58,8 @@ public function initialize(): void $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->stStephensDay($this->year, $this->timezone, $this->locale)); - /* - * Day of Antifascist Struggle - */ - if ($this->year >= 1941) { - $this->addHoliday(new Holiday('antifascistStruggleDay', [ - 'en' => 'Day of Antifascist Struggle', - 'hr' => 'Dan antifašističke borbe', - ], new \DateTime("{$this->year}-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); - } - + // Add other holidays + $this->calculateAntiFascistsStruggleDay(); $this->calculateStatehoodDay(); $this->calculateHomelandThanksgivingDay(); $this->calculateIndependenceDay(); @@ -91,15 +83,8 @@ public function getSources(): array */ private function calculateStatehoodDay(): void { - $statehoodDayDate = null; - - if ($this->year >= 1991 && $this->year < 2020) { - $statehoodDayDate = new \DateTime("{$this->year}-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } elseif ($this->year >= 2020) { - $statehoodDayDate = new \DateTime("{$this->year}-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); - } - - if (null !== $statehoodDayDate) { + if ($this->year >= 1991) { + $statehoodDayDate = new \DateTime($this->year >= 2020 ? "{$this->year}-5-30" : "{$this->year}-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', 'hr' => 'Dan državnosti', @@ -172,4 +157,17 @@ private function calculateRemembranceDayForHomelandWarVictims(): void ], new \DateTime("{$this->year}-11-18", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); } } + + /* + * Day of Antifascist Struggle + */ + private function calculateAntiFascistsStruggleDay(): void + { + if ($this->year >= 1941) { + $this->addHoliday(new Holiday('antifascistStruggleDay', [ + 'en' => 'Day of Antifascist Struggle', + 'hr' => 'Dan antifašističke borbe', + ], new \DateTime("{$this->year}-6-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } } From 3b0da70c9c60ab1aba12aa85fc948cb1b0180e71 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 11:43:12 +0900 Subject: [PATCH 508/687] refactor: change nested ifs to early return as it is best to exit early. Change to array spread instead of array_merge for simplicity. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Denmark.php | 22 +++++++++++++++------- tests/Denmark/DaylightSavingTime.php | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index a02c16223..82133fb13 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -58,6 +58,7 @@ public function initialize(): void $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); $this->calculateGreatPrayerDay(); + // Add other holidays $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); @@ -67,6 +68,7 @@ public function initialize(): void if ($summerTime instanceof Holiday) { $this->addHoliday($summerTime); } + $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); if ($winterTime instanceof Holiday) { $this->addHoliday($winterTime); @@ -99,14 +101,20 @@ private function calculateGreatPrayerDay(): void { $easter = $this->calculateEaster($this->year, $this->timezone)->format('Y-m-d'); - if ($this->year >= 1686 && $this->year < 2024) { - $this->addHoliday(new Holiday( - 'greatPrayerDay', - ['da' => 'store bededag'], - new \DateTime("fourth friday {$easter}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale - )); + if ($this->year < 1686) { + return; } + + if ($this->year >= 2024) { + return; + } + + $this->addHoliday(new Holiday( + 'greatPrayerDay', + ['da' => 'store bededag'], + new \DateTime("fourth friday {$easter}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); } /** diff --git a/tests/Denmark/DaylightSavingTime.php b/tests/Denmark/DaylightSavingTime.php index f32f2dd9c..7a8199aac 100644 --- a/tests/Denmark/DaylightSavingTime.php +++ b/tests/Denmark/DaylightSavingTime.php @@ -28,7 +28,7 @@ abstract class DaylightSavingTime extends DenmarkBaseTestCase implements Holiday public function __construct() { $observedYears = [1916, 1940]; - $observedYears = array_merge($observedYears, range(1942, 1948)); + $observedYears = [...$observedYears, ...range(1942, 1948)]; $observedYears = array_merge($observedYears, range(1980, 2037)); // PHP caps future DST transitions $this->observedYears = $observedYears; From 6f87212653b804036dc770ccce8375410dd9ed50 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 19:04:38 +0900 Subject: [PATCH 509/687] refactor: check for type rather than null value to be more explicit. Untangle nested ifs to early returns allowing for quick exit. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 13 ++++++++++--- tests/Ukraine/SubstitutedHolidayTest.php | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index e6ff06784..25ed5b95a 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -137,7 +137,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, } // Load internal translations variable - if (null === self::$globalTranslations) { + if (! self::$globalTranslations instanceof Translations) { self::$globalTranslations = new Translations(self::$locales); self::$globalTranslations->loadTranslations(__DIR__.'/data/translations'); } @@ -237,9 +237,16 @@ public static function getProviders(): array $class = new \ReflectionClass(sprintf('Yasumi\Provider\%s', str_replace('/', '\\', $provider))); $key = 'ID'; - if ($class->isSubclassOf(AbstractProvider::class) && $class->hasConstant($key)) { - $providers[strtoupper($class->getConstant($key))] = $provider; + + if (! $class->isSubclassOf(AbstractProvider::class)) { + continue; + } + + if (! $class->hasConstant($key)) { + continue; } + + $providers[strtoupper($class->getConstant($key))] = $provider; } return $providers; diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 1502dfb84..2c46696f5 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -74,7 +74,8 @@ public function assertHolidayWithSubstitution( self::assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); $holidaySubstitution = $holidays->getHoliday('substituteHoliday:'.$holidayOfficial->getKey()); - if (null === $expectedSubstitution) { + + if (! $expectedSubstitution instanceof \DateTimeInterface) { // without substitution self::assertNull($holidaySubstitution); } else { From 3be952869188a84e1cac6da700d18b7d2668974d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 25 Jun 2023 19:09:41 +0900 Subject: [PATCH 510/687] refactor: simplify foreach loop in order to remove unused variables. Signed-off-by: Sacha Telgenhof --- tests/SouthKorea/SouthKoreaTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 9ab30faee..4d9577677 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -164,7 +164,7 @@ public function testGenerationMethods(): void $holidayProvider = Yasumi::create(self::REGION, $this->year); $this->assertIsArray(SouthKorea::HOLIDAY_NAMES, 'Yasumi\Provider\SouthKorea::HOLIDAY_NAMES is not array'); - foreach (SouthKorea::HOLIDAY_NAMES as $key => $names) { + foreach (array_keys(SouthKorea::HOLIDAY_NAMES) as $key) { $this->assertTrue(method_exists($holidayProvider, $key), sprintf('Generation method `%s` is not declared in provider `%s`', $key, self::REGION)); } } From 3c1928d06643e48e877f9347c52f71971e3dc2d6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 11 Oct 2023 00:31:23 +0900 Subject: [PATCH 511/687] Fix code style issues. In the latest release of PHP CS Fixer and empty body of class, interface, trait, enum or function will be abbreviated as {} and placed on the same line as the previous symbol, separated by a single space. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Exception/Exception.php | 4 +--- src/Yasumi/Exception/InvalidYearException.php | 4 +--- src/Yasumi/Exception/ProviderNotFoundException.php | 4 +--- src/Yasumi/Exception/UnknownLocaleException.php | 4 +--- tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php | 4 +--- .../Australia/AustralianCapitalTerritory/AustraliaDayTest.php | 4 +--- tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php | 4 +--- .../Australia/AustralianCapitalTerritory/ChristmasDayTest.php | 4 +--- .../Australia/AustralianCapitalTerritory/EasterMondayTest.php | 4 +--- tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php | 4 +--- .../AustralianCapitalTerritory/NationalDayOfMourningTest.php | 4 +--- .../Australia/AustralianCapitalTerritory/NewYearsDayTest.php | 4 +--- tests/Australia/NewSouthWales/AnzacDayTest.php | 4 +--- tests/Australia/NewSouthWales/AustraliaDayTest.php | 4 +--- tests/Australia/NewSouthWales/BoxingDayTest.php | 4 +--- tests/Australia/NewSouthWales/ChristmasDayTest.php | 4 +--- tests/Australia/NewSouthWales/EasterMondayTest.php | 4 +--- tests/Australia/NewSouthWales/GoodFridayTest.php | 4 +--- tests/Australia/NewSouthWales/NationalDayOfMourningTest.php | 4 +--- tests/Australia/NewSouthWales/NewYearsDayTest.php | 4 +--- tests/Australia/NorthernTerritory/AnzacDayTest.php | 4 +--- tests/Australia/NorthernTerritory/AustraliaDayTest.php | 4 +--- tests/Australia/NorthernTerritory/BoxingDayTest.php | 4 +--- tests/Australia/NorthernTerritory/ChristmasDayTest.php | 4 +--- tests/Australia/NorthernTerritory/EasterMondayTest.php | 4 +--- tests/Australia/NorthernTerritory/GoodFridayTest.php | 4 +--- .../Australia/NorthernTerritory/NationalDayOfMourningTest.php | 4 +--- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 4 +--- tests/Australia/Queensland/AnzacDayTest.php | 4 +--- tests/Australia/Queensland/AustraliaDayTest.php | 4 +--- tests/Australia/Queensland/BoxingDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/AnzacDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/AustraliaDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/BoxingDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/ChristmasDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/EasterMondayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/GoodFridayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/LabourDayTest.php | 4 +--- .../Queensland/Brisbane/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Queensland/Brisbane/NewYearsDayTest.php | 4 +--- tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php | 4 +--- tests/Australia/Queensland/ChristmasDayTest.php | 4 +--- tests/Australia/Queensland/EasterMondayTest.php | 4 +--- tests/Australia/Queensland/GoodFridayTest.php | 4 +--- tests/Australia/Queensland/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Queensland/NewYearsDayTest.php | 4 +--- tests/Australia/SouthAustralia/AnzacDayTest.php | 4 +--- tests/Australia/SouthAustralia/AustraliaDayTest.php | 4 +--- tests/Australia/SouthAustralia/EasterMondayTest.php | 4 +--- tests/Australia/SouthAustralia/GoodFridayTest.php | 4 +--- tests/Australia/SouthAustralia/NationalDayOfMourningTest.php | 4 +--- tests/Australia/SouthAustralia/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php | 4 +--- .../Tasmania/CentralNorth/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php | 4 +--- .../Tasmania/FlindersIsland/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php | 4 +--- .../Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/GoodFridayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/GoodFridayTest.php | 4 +--- .../Tasmania/KingIsland/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/KingIsland/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/GoodFridayTest.php | 4 +--- .../Tasmania/Northeast/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/Northeast/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/ChristmasDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/AnzacDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/AustraliaDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/BoxingDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/BurnieShowTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/ChristmasDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/EasterMondayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/EightHourDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/GoodFridayTest.php | 4 +--- .../Northwest/CircularHead/NationalDayOfMourningTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/NewYearsDayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/QueensBirthdayTest.php | 4 +--- .../Tasmania/Northwest/CircularHead/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/GoodFridayTest.php | 4 +--- .../Tasmania/Northwest/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/Northwest/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/Northwest/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/South/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/South/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/South/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/South/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/South/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/South/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/South/GoodFridayTest.php | 4 +--- tests/Australia/Tasmania/South/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/South/NewYearsDayTest.php | 4 +--- tests/Australia/Tasmania/South/QueensBirthdayTest.php | 4 +--- tests/Australia/Tasmania/South/RecreationDayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/HobartShowTest.php | 4 +--- .../Tasmania/South/Southeast/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php | 4 +--- .../Australia/Tasmania/South/Southeast/QueensBirthdayTest.php | 4 +--- tests/Australia/Victoria/AnzacDayTest.php | 4 +--- tests/Australia/Victoria/AustraliaDayTest.php | 4 +--- tests/Australia/Victoria/BoxingDayTest.php | 4 +--- tests/Australia/Victoria/ChristmasDayTest.php | 4 +--- tests/Australia/Victoria/EasterMondayTest.php | 4 +--- tests/Australia/Victoria/GoodFridayTest.php | 4 +--- tests/Australia/Victoria/NationalDayOfMourningTest.php | 4 +--- tests/Australia/Victoria/NewYearsDayTest.php | 4 +--- tests/Australia/WesternAustralia/AnzacDayTest.php | 4 +--- tests/Australia/WesternAustralia/AustraliaDayTest.php | 4 +--- tests/Australia/WesternAustralia/BoxingDayTest.php | 4 +--- tests/Australia/WesternAustralia/ChristmasDayTest.php | 4 +--- tests/Australia/WesternAustralia/EasterMondayTest.php | 4 +--- tests/Australia/WesternAustralia/GoodFridayTest.php | 4 +--- .../Australia/WesternAustralia/NationalDayOfMourningTest.php | 4 +--- tests/Australia/WesternAustralia/NewYearsDayTest.php | 4 +--- tests/Germany/BadenWurttemberg/GermanUnityDayTest.php | 4 +--- tests/Germany/BadenWurttemberg/ReformationDay2017Test.php | 4 +--- tests/Germany/Bavaria/GermanUnityDayTest.php | 4 +--- tests/Germany/Bavaria/ReformationDay2017Test.php | 4 +--- tests/Germany/Berlin/GermanUnityDayTest.php | 4 +--- tests/Germany/Berlin/ReformationDay2017Test.php | 4 +--- tests/Germany/Brandenburg/GermanUnityDayTest.php | 4 +--- tests/Germany/Bremen/GermanUnityDayTest.php | 4 +--- tests/Germany/Bremen/ReformationDay2017Test.php | 4 +--- tests/Germany/Hamburg/GermanUnityDay.php | 4 +--- tests/Germany/Hamburg/ReformationDay2017Test.php | 4 +--- tests/Germany/Hesse/GermanUnityDayTest.php | 4 +--- tests/Germany/Hesse/ReformationDay2017Test.php | 4 +--- tests/Germany/LowerSaxony/GermanUnityDayTest.php | 4 +--- tests/Germany/LowerSaxony/ReformationDay2017Test.php | 4 +--- .../MecklenburgWesternPomerania/GermanUnityDayTest.php | 4 +--- tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php | 4 +--- tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php | 4 +--- tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php | 4 +--- tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php | 4 +--- tests/Germany/Saarland/GermanUnityDayTest.php | 4 +--- tests/Germany/Saarland/ReformationDay2017Test.php | 4 +--- tests/Germany/Saxony/GermanUnityDayTest.php | 4 +--- tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php | 4 +--- tests/Germany/SchleswigHolstein/GermanUnityDayTest.php | 4 +--- tests/Germany/SchleswigHolstein/ReformationDay2017Test.php | 4 +--- tests/Germany/Thuringia/GermanUnityDayTest.php | 4 +--- 192 files changed, 192 insertions(+), 576 deletions(-) diff --git a/src/Yasumi/Exception/Exception.php b/src/Yasumi/Exception/Exception.php index ec694152d..60b3c769c 100644 --- a/src/Yasumi/Exception/Exception.php +++ b/src/Yasumi/Exception/Exception.php @@ -17,6 +17,4 @@ /** * Interface Exception. */ -interface Exception -{ -} +interface Exception {} diff --git a/src/Yasumi/Exception/InvalidYearException.php b/src/Yasumi/Exception/InvalidYearException.php index 311576f03..03f30027f 100644 --- a/src/Yasumi/Exception/InvalidYearException.php +++ b/src/Yasumi/Exception/InvalidYearException.php @@ -20,6 +20,4 @@ * * @author Quentin Neyrat */ -class InvalidYearException extends \InvalidArgumentException implements Exception -{ -} +class InvalidYearException extends \InvalidArgumentException implements Exception {} diff --git a/src/Yasumi/Exception/ProviderNotFoundException.php b/src/Yasumi/Exception/ProviderNotFoundException.php index 60cdad06a..db6abd06d 100644 --- a/src/Yasumi/Exception/ProviderNotFoundException.php +++ b/src/Yasumi/Exception/ProviderNotFoundException.php @@ -19,6 +19,4 @@ * * @author Quentin Neyrat */ -class ProviderNotFoundException extends \InvalidArgumentException implements Exception -{ -} +class ProviderNotFoundException extends \InvalidArgumentException implements Exception {} diff --git a/src/Yasumi/Exception/UnknownLocaleException.php b/src/Yasumi/Exception/UnknownLocaleException.php index bb9c71756..1c732b1b5 100644 --- a/src/Yasumi/Exception/UnknownLocaleException.php +++ b/src/Yasumi/Exception/UnknownLocaleException.php @@ -17,6 +17,4 @@ /** * Class UnknownLocaleException. */ -class UnknownLocaleException extends \InvalidArgumentException implements Exception -{ -} +class UnknownLocaleException extends \InvalidArgumentException implements Exception {} diff --git a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php index abca7984e..a23d4af52 100644 --- a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Australian Capital Territory (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php index 5a4a07e39..f715b80bb 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Australian Capital Territory (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php index 2a22717d7..10f61d806 100644 --- a/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Australian Capital Territory (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php index 6d848d71c..de46ed897 100644 --- a/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Australian Capital Territory (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php index f97c1c168..fbb897d6b 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Australian Capital Territory (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php index 9ae17b093..9828e9ebb 100644 --- a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Australian Capital Territory (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php b/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php index f1d186efd..89fd01284 100644 --- a/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php +++ b/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Australian Capital Territory (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php index aa741f372..e285e138c 100644 --- a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Australian Capital Territory (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/NewSouthWales/AnzacDayTest.php b/tests/Australia/NewSouthWales/AnzacDayTest.php index f8dfa1365..6dbaf526f 100644 --- a/tests/Australia/NewSouthWales/AnzacDayTest.php +++ b/tests/Australia/NewSouthWales/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in New South Wales (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/NewSouthWales/AustraliaDayTest.php b/tests/Australia/NewSouthWales/AustraliaDayTest.php index 200ccfbd9..30ccc8f76 100644 --- a/tests/Australia/NewSouthWales/AustraliaDayTest.php +++ b/tests/Australia/NewSouthWales/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in New South Wales (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/NewSouthWales/BoxingDayTest.php b/tests/Australia/NewSouthWales/BoxingDayTest.php index 1a29cc1c8..663e188a5 100644 --- a/tests/Australia/NewSouthWales/BoxingDayTest.php +++ b/tests/Australia/NewSouthWales/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in New South Wales (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/NewSouthWales/ChristmasDayTest.php b/tests/Australia/NewSouthWales/ChristmasDayTest.php index 5ec492625..ba1d53fb1 100644 --- a/tests/Australia/NewSouthWales/ChristmasDayTest.php +++ b/tests/Australia/NewSouthWales/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in New South Wales (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/NewSouthWales/EasterMondayTest.php b/tests/Australia/NewSouthWales/EasterMondayTest.php index 553c2bdf3..bd17ad69e 100644 --- a/tests/Australia/NewSouthWales/EasterMondayTest.php +++ b/tests/Australia/NewSouthWales/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in New South Wales (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/NewSouthWales/GoodFridayTest.php b/tests/Australia/NewSouthWales/GoodFridayTest.php index 4d7e7e33a..763d51ebb 100644 --- a/tests/Australia/NewSouthWales/GoodFridayTest.php +++ b/tests/Australia/NewSouthWales/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in New South Wales (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php b/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php index 8de51bfcf..d632e9ba0 100644 --- a/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php +++ b/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in New South Wales (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/NewSouthWales/NewYearsDayTest.php b/tests/Australia/NewSouthWales/NewYearsDayTest.php index d46414d06..33a4e9cb1 100644 --- a/tests/Australia/NewSouthWales/NewYearsDayTest.php +++ b/tests/Australia/NewSouthWales/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in New South Wales (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/NorthernTerritory/AnzacDayTest.php b/tests/Australia/NorthernTerritory/AnzacDayTest.php index 929843950..43c0da63c 100644 --- a/tests/Australia/NorthernTerritory/AnzacDayTest.php +++ b/tests/Australia/NorthernTerritory/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Northern Territory (Australia). */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/NorthernTerritory/AustraliaDayTest.php b/tests/Australia/NorthernTerritory/AustraliaDayTest.php index fab4f19a3..36ab830e4 100644 --- a/tests/Australia/NorthernTerritory/AustraliaDayTest.php +++ b/tests/Australia/NorthernTerritory/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Northern Territory (Australia). */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/NorthernTerritory/BoxingDayTest.php b/tests/Australia/NorthernTerritory/BoxingDayTest.php index ba823fa1f..cd639b9d4 100644 --- a/tests/Australia/NorthernTerritory/BoxingDayTest.php +++ b/tests/Australia/NorthernTerritory/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Northern Territory (Australia). */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/NorthernTerritory/ChristmasDayTest.php b/tests/Australia/NorthernTerritory/ChristmasDayTest.php index 6e7aa8b89..d92734abb 100644 --- a/tests/Australia/NorthernTerritory/ChristmasDayTest.php +++ b/tests/Australia/NorthernTerritory/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Northern Territory (Australia). */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/NorthernTerritory/EasterMondayTest.php b/tests/Australia/NorthernTerritory/EasterMondayTest.php index 48185b919..2bd3b6efc 100644 --- a/tests/Australia/NorthernTerritory/EasterMondayTest.php +++ b/tests/Australia/NorthernTerritory/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Northern Territory (Australia). */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/NorthernTerritory/GoodFridayTest.php b/tests/Australia/NorthernTerritory/GoodFridayTest.php index bb6250b20..5f57c4496 100644 --- a/tests/Australia/NorthernTerritory/GoodFridayTest.php +++ b/tests/Australia/NorthernTerritory/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Northern Territory (Australia). */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php b/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php index 6e2f3fb5e..388737408 100644 --- a/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php +++ b/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Northern Territory (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/NorthernTerritory/NewYearsDayTest.php b/tests/Australia/NorthernTerritory/NewYearsDayTest.php index f57d98c9d..f497f4028 100644 --- a/tests/Australia/NorthernTerritory/NewYearsDayTest.php +++ b/tests/Australia/NorthernTerritory/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Northern Territory (Australia). */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/Queensland/AnzacDayTest.php b/tests/Australia/Queensland/AnzacDayTest.php index 8bec56d16..d1a8f1b08 100644 --- a/tests/Australia/Queensland/AnzacDayTest.php +++ b/tests/Australia/Queensland/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Queensland (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/Queensland/AustraliaDayTest.php b/tests/Australia/Queensland/AustraliaDayTest.php index e61d6909a..473fc5937 100644 --- a/tests/Australia/Queensland/AustraliaDayTest.php +++ b/tests/Australia/Queensland/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Queensland (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/Queensland/BoxingDayTest.php b/tests/Australia/Queensland/BoxingDayTest.php index 021840caf..922c6300f 100644 --- a/tests/Australia/Queensland/BoxingDayTest.php +++ b/tests/Australia/Queensland/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Queensland (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/AnzacDayTest.php b/tests/Australia/Queensland/Brisbane/AnzacDayTest.php index c872c384d..81a72cb57 100644 --- a/tests/Australia/Queensland/Brisbane/AnzacDayTest.php +++ b/tests/Australia/Queensland/Brisbane/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Brisbane (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Queensland\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Queensland\AnzacDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php b/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php index 90eef3a3d..34e53a2da 100644 --- a/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php +++ b/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Brisbane (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Queensland\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Queensland\AustraliaDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/BoxingDayTest.php b/tests/Australia/Queensland/Brisbane/BoxingDayTest.php index a6559a828..be580e433 100644 --- a/tests/Australia/Queensland/Brisbane/BoxingDayTest.php +++ b/tests/Australia/Queensland/Brisbane/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Brisbane (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Queensland\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Queensland\BoxingDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php b/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php index 52db481fe..0cc9006f3 100644 --- a/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php +++ b/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Brisbane (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Queensland\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Queensland\ChristmasDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/EasterMondayTest.php b/tests/Australia/Queensland/Brisbane/EasterMondayTest.php index b1fefca8f..bc7981aef 100644 --- a/tests/Australia/Queensland/Brisbane/EasterMondayTest.php +++ b/tests/Australia/Queensland/Brisbane/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Brisbane (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Queensland\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Queensland\EasterMondayTest {} diff --git a/tests/Australia/Queensland/Brisbane/GoodFridayTest.php b/tests/Australia/Queensland/Brisbane/GoodFridayTest.php index 4e4381937..999f67387 100644 --- a/tests/Australia/Queensland/Brisbane/GoodFridayTest.php +++ b/tests/Australia/Queensland/Brisbane/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Brisbane (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Queensland\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Queensland\GoodFridayTest {} diff --git a/tests/Australia/Queensland/Brisbane/LabourDayTest.php b/tests/Australia/Queensland/Brisbane/LabourDayTest.php index 94f9558b1..1c291c162 100644 --- a/tests/Australia/Queensland/Brisbane/LabourDayTest.php +++ b/tests/Australia/Queensland/Brisbane/LabourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Labour Day in Brisbane (Australia).. */ -class LabourDayTest extends \Yasumi\tests\Australia\Queensland\LabourDayTest -{ -} +class LabourDayTest extends \Yasumi\tests\Australia\Queensland\LabourDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php b/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php index 609bc2789..f591c8f6f 100644 --- a/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php +++ b/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Brisbane (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Queensland\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Queensland\NationalDayOfMourningTest {} diff --git a/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php b/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php index 334598f83..5ace3411f 100644 --- a/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php +++ b/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Brisbane (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Queensland\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Queensland\NewYearsDayTest {} diff --git a/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php b/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php index bad0a6fff..9bf73dec1 100644 --- a/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in Brisbane (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Queensland\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Queensland\QueensBirthdayTest {} diff --git a/tests/Australia/Queensland/ChristmasDayTest.php b/tests/Australia/Queensland/ChristmasDayTest.php index 7e7ce4b7d..40bea0973 100644 --- a/tests/Australia/Queensland/ChristmasDayTest.php +++ b/tests/Australia/Queensland/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Queensland (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/Queensland/EasterMondayTest.php b/tests/Australia/Queensland/EasterMondayTest.php index ebec7e644..dbeb80183 100644 --- a/tests/Australia/Queensland/EasterMondayTest.php +++ b/tests/Australia/Queensland/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Queensland (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/Queensland/GoodFridayTest.php b/tests/Australia/Queensland/GoodFridayTest.php index 57babc079..7893182fc 100644 --- a/tests/Australia/Queensland/GoodFridayTest.php +++ b/tests/Australia/Queensland/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Queensland (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/Queensland/NationalDayOfMourningTest.php b/tests/Australia/Queensland/NationalDayOfMourningTest.php index 30fb89db5..6f5e23647 100644 --- a/tests/Australia/Queensland/NationalDayOfMourningTest.php +++ b/tests/Australia/Queensland/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Queensland (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/Queensland/NewYearsDayTest.php b/tests/Australia/Queensland/NewYearsDayTest.php index b4486522f..bb9261d2d 100644 --- a/tests/Australia/Queensland/NewYearsDayTest.php +++ b/tests/Australia/Queensland/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Queensland (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/SouthAustralia/AnzacDayTest.php b/tests/Australia/SouthAustralia/AnzacDayTest.php index 1c0fd214d..946ba09eb 100644 --- a/tests/Australia/SouthAustralia/AnzacDayTest.php +++ b/tests/Australia/SouthAustralia/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in South Australia (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/SouthAustralia/AustraliaDayTest.php b/tests/Australia/SouthAustralia/AustraliaDayTest.php index 81480cabd..e69bf6115 100644 --- a/tests/Australia/SouthAustralia/AustraliaDayTest.php +++ b/tests/Australia/SouthAustralia/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in South Australia (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/SouthAustralia/EasterMondayTest.php b/tests/Australia/SouthAustralia/EasterMondayTest.php index 50430f021..ad336d6df 100644 --- a/tests/Australia/SouthAustralia/EasterMondayTest.php +++ b/tests/Australia/SouthAustralia/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in South Australia (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/SouthAustralia/GoodFridayTest.php b/tests/Australia/SouthAustralia/GoodFridayTest.php index bdc5e2d54..20ca9a09a 100644 --- a/tests/Australia/SouthAustralia/GoodFridayTest.php +++ b/tests/Australia/SouthAustralia/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in South Australia (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php b/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php index 3c84904b4..cd89b065f 100644 --- a/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php +++ b/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in South Australia (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/SouthAustralia/NewYearsDayTest.php b/tests/Australia/SouthAustralia/NewYearsDayTest.php index 6e06d443b..632144f51 100644 --- a/tests/Australia/SouthAustralia/NewYearsDayTest.php +++ b/tests/Australia/SouthAustralia/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in South Australia (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/AnzacDayTest.php b/tests/Australia/Tasmania/AnzacDayTest.php index 54b013ff8..495c56ed5 100644 --- a/tests/Australia/Tasmania/AnzacDayTest.php +++ b/tests/Australia/Tasmania/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/AustraliaDayTest.php b/tests/Australia/Tasmania/AustraliaDayTest.php index ad3ddccba..8ee324395 100644 --- a/tests/Australia/Tasmania/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/BoxingDayTest.php b/tests/Australia/Tasmania/BoxingDayTest.php index 9fec1e091..4a5f24d3e 100644 --- a/tests/Australia/Tasmania/BoxingDayTest.php +++ b/tests/Australia/Tasmania/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php b/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php index 3aedc6c05..c48c836e5 100644 --- a/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in central north Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php b/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php index 8770a1af1..68b25ac83 100644 --- a/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in central north Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php b/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php index 6593e10df..930e89e4f 100644 --- a/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in central north Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php b/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php index 9089bae2e..47a0d5dca 100644 --- a/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in central north Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php b/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php index cf9afb995..8d7e05c52 100644 --- a/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in central north Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php b/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php index 21c511303..b8023663c 100644 --- a/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in central north Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php b/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php index f361f7ed5..ffca3845f 100644 --- a/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in central north Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php index e3eac8f46..2d5ac7a8c 100644 --- a/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in central north Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php b/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php index 074069cd8..015e5a8e6 100644 --- a/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in central north Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php b/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php index eb48703ad..183886517 100644 --- a/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in central north Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php b/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php index f3a86bcb3..67db4e4f2 100644 --- a/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in central north Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/ChristmasDayTest.php b/tests/Australia/Tasmania/ChristmasDayTest.php index 279c66bcc..41a8c4991 100644 --- a/tests/Australia/Tasmania/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/EasterMondayTest.php b/tests/Australia/Tasmania/EasterMondayTest.php index 56a75610b..81967942e 100644 --- a/tests/Australia/Tasmania/EasterMondayTest.php +++ b/tests/Australia/Tasmania/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php b/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php index 28d70e25d..cfc631665 100644 --- a/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Flinders Island (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php b/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php index 2ff0f8e9f..30802a546 100644 --- a/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Flinders Island (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php b/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php index 5e0bb90ed..c29b73cb7 100644 --- a/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Flinders Island (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php b/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php index 90e306321..b5d1df588 100644 --- a/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Flinders Island (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php b/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php index 109c6422f..e733ac564 100644 --- a/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Flinders Island (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php b/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php index e8f90dc18..41f4f67e9 100644 --- a/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in Flinders Island (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php b/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php index a4844deda..ad66e0789 100644 --- a/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Flinders Island (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php index f129424ed..f1ade9a1d 100644 --- a/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Flinders Island (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php b/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php index abfc4d74c..bc777300b 100644 --- a/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Flinders Island (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php b/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php index 69df30bd9..e737c35f4 100644 --- a/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in Flinders Island (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php b/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php index 00e2e374f..c61ba79ef 100644 --- a/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in Flinders Island (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/GoodFridayTest.php b/tests/Australia/Tasmania/GoodFridayTest.php index 7663c53a9..2d771ed16 100644 --- a/tests/Australia/Tasmania/GoodFridayTest.php +++ b/tests/Australia/Tasmania/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php b/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php index a7766f194..0676a7fc7 100644 --- a/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in King Island (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php b/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php index 27fcbd8dd..d72b68e8d 100644 --- a/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in King Island (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php b/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php index 77d5b9704..24b063ac4 100644 --- a/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in King Island (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php b/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php index 35041f418..3e5acd969 100644 --- a/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in King Island (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php b/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php index ecea35ac6..9bde52e9a 100644 --- a/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php +++ b/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in King Island (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php b/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php index 6c130e793..141699b38 100644 --- a/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in King Island (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php b/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php index 69a4fc989..45cbd04b6 100644 --- a/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php +++ b/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in King Island (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php index 6d30653ff..0d3fa08f6 100644 --- a/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in King Island (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php b/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php index 61b02a86b..410d05f69 100644 --- a/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in King Island (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php b/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php index 92e19d893..037ab86f1 100644 --- a/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in King Island (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php b/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php index c4208ac1f..6452004f6 100644 --- a/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in King Island (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/NationalDayOfMourningTest.php index e4d52bc54..11cac5ad7 100644 --- a/tests/Australia/Tasmania/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/NewYearsDayTest.php b/tests/Australia/Tasmania/NewYearsDayTest.php index f92040878..f86f39cc3 100644 --- a/tests/Australia/Tasmania/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/AnzacDayTest.php b/tests/Australia/Tasmania/Northeast/AnzacDayTest.php index 90e52f65b..c805e39b0 100644 --- a/tests/Australia/Tasmania/Northeast/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northeast/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in northeastern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php b/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php index 6c2920678..21575150e 100644 --- a/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in northeastern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/BoxingDayTest.php b/tests/Australia/Tasmania/Northeast/BoxingDayTest.php index c650ad447..5ccf2eeb1 100644 --- a/tests/Australia/Tasmania/Northeast/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northeast/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in northeastern Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php b/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php index a30bc5aac..59343ec45 100644 --- a/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in northeastern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/EasterMondayTest.php b/tests/Australia/Tasmania/Northeast/EasterMondayTest.php index 46f235f7c..fb815ca1d 100644 --- a/tests/Australia/Tasmania/Northeast/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northeast/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in northeastern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/Northeast/EightHourDayTest.php b/tests/Australia/Tasmania/Northeast/EightHourDayTest.php index aacb3faf6..ff383a276 100644 --- a/tests/Australia/Tasmania/Northeast/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northeast/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in northeastern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/GoodFridayTest.php b/tests/Australia/Tasmania/Northeast/GoodFridayTest.php index 41b1260c1..559a44145 100644 --- a/tests/Australia/Tasmania/Northeast/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northeast/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in northeastern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php index 7ff73368e..5142746f7 100644 --- a/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in northeastern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php b/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php index f3ccb2d7f..db6836c9c 100644 --- a/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in northeastern Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php index 3f4d28014..c4508f15d 100644 --- a/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in northeast Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/Northeast/RecreationDayTest.php b/tests/Australia/Tasmania/Northeast/RecreationDayTest.php index 177d8c34f..94abd6673 100644 --- a/tests/Australia/Tasmania/Northeast/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northeast/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in northeastern Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/AnzacDayTest.php b/tests/Australia/Tasmania/Northwest/AnzacDayTest.php index f826b380a..18a703030 100644 --- a/tests/Australia/Tasmania/Northwest/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northwest/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in northwestern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php b/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php index 7094e4010..8f6757f31 100644 --- a/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in northwestern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/BoxingDayTest.php b/tests/Australia/Tasmania/Northwest/BoxingDayTest.php index 3f3e7f77c..13dcad40f 100644 --- a/tests/Australia/Tasmania/Northwest/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northwest/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in northwestern Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php b/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php index 56d9a8068..621023f6e 100644 --- a/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in northwestern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php index 42db9a141..ca1495163 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Circular Head (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php index 2a490c36d..53d134960 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Circular Head (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php index 88fbaec55..92230e3b4 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Circular Head (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php index c85f012d2..0bad611d1 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php @@ -17,6 +17,4 @@ /** * Class for testing Burnie Show Day in Circular Head (Australia).. */ -class BurnieShowTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BurnieShowTest -{ -} +class BurnieShowTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BurnieShowTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php index f16f4ef05..30d2db730 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Circular Head (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php index 318b39880..3b0e95108 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Circular Head (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php index b76aafb4d..68d7ccfdd 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in Circular Head (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php index c86deaf77..4d2ad8a5d 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Circular Head (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php index c1fec57e2..9c781d398 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Circular Head (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php index 2f8c9c0c2..c67ba43fc 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Circular Head (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php index 518a55d4e..540200be1 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in Circular Head (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php index 87098af7f..12fd3678a 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in Circular Head (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/EasterMondayTest.php b/tests/Australia/Tasmania/Northwest/EasterMondayTest.php index 4e80d6454..16f8df672 100644 --- a/tests/Australia/Tasmania/Northwest/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northwest/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in northwestern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/Northwest/EightHourDayTest.php b/tests/Australia/Tasmania/Northwest/EightHourDayTest.php index 74f525203..c85b53811 100644 --- a/tests/Australia/Tasmania/Northwest/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northwest/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in northwestern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/GoodFridayTest.php b/tests/Australia/Tasmania/Northwest/GoodFridayTest.php index a5b9a68dc..715c2c0e0 100644 --- a/tests/Australia/Tasmania/Northwest/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northwest/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in northwestern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php index d1a63bf71..60ea9d161 100644 --- a/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in northwestern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php b/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php index 4fbef25e7..fb3274ff7 100644 --- a/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in northwestern Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php index b1ad85c71..67c824a43 100644 --- a/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in northwest Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/Northwest/RecreationDayTest.php b/tests/Australia/Tasmania/Northwest/RecreationDayTest.php index 8b7e5b447..c3332afb3 100644 --- a/tests/Australia/Tasmania/Northwest/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northwest/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in northwestern Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/South/AnzacDayTest.php b/tests/Australia/Tasmania/South/AnzacDayTest.php index 73ada924f..618a498ff 100644 --- a/tests/Australia/Tasmania/South/AnzacDayTest.php +++ b/tests/Australia/Tasmania/South/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in southern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/South/AustraliaDayTest.php b/tests/Australia/Tasmania/South/AustraliaDayTest.php index b2a8c3017..78c31fffa 100644 --- a/tests/Australia/Tasmania/South/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/South/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in southern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/South/BoxingDayTest.php b/tests/Australia/Tasmania/South/BoxingDayTest.php index 58cc8d4a0..56d484302 100644 --- a/tests/Australia/Tasmania/South/BoxingDayTest.php +++ b/tests/Australia/Tasmania/South/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in soutehrn Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/South/ChristmasDayTest.php b/tests/Australia/Tasmania/South/ChristmasDayTest.php index 482311f79..15efef80b 100644 --- a/tests/Australia/Tasmania/South/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/South/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in southern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/South/EasterMondayTest.php b/tests/Australia/Tasmania/South/EasterMondayTest.php index b67353be5..ab35565e0 100644 --- a/tests/Australia/Tasmania/South/EasterMondayTest.php +++ b/tests/Australia/Tasmania/South/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in southern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/South/EightHourDayTest.php b/tests/Australia/Tasmania/South/EightHourDayTest.php index a4797e003..5daff5a42 100644 --- a/tests/Australia/Tasmania/South/EightHourDayTest.php +++ b/tests/Australia/Tasmania/South/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in southern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/South/GoodFridayTest.php b/tests/Australia/Tasmania/South/GoodFridayTest.php index b9bbf70bf..8cee1afd2 100644 --- a/tests/Australia/Tasmania/South/GoodFridayTest.php +++ b/tests/Australia/Tasmania/South/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in southern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php index e2024ff17..65f0d952f 100644 --- a/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in southern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/South/NewYearsDayTest.php b/tests/Australia/Tasmania/South/NewYearsDayTest.php index 2af00db13..574b0fea6 100644 --- a/tests/Australia/Tasmania/South/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/South/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in soutehrn Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/South/QueensBirthdayTest.php b/tests/Australia/Tasmania/South/QueensBirthdayTest.php index ddf89fdb3..db0704511 100644 --- a/tests/Australia/Tasmania/South/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/South/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in southe0rn Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} diff --git a/tests/Australia/Tasmania/South/RecreationDayTest.php b/tests/Australia/Tasmania/South/RecreationDayTest.php index e6d59e05a..c20c19ea2 100644 --- a/tests/Australia/Tasmania/South/RecreationDayTest.php +++ b/tests/Australia/Tasmania/South/RecreationDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Recreation Day in southern Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest -{ -} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php b/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php index 9507b97c0..1224885d8 100644 --- a/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in southeastern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\South\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\South\AnzacDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php b/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php index e8047fe27..1c0294c29 100644 --- a/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in southeastern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\South\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\South\AustraliaDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php b/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php index 6aad31745..a7f46bb77 100644 --- a/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in southeastern Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\South\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\South\BoxingDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php b/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php index f09273260..c49ebdb4a 100644 --- a/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in southeastern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\South\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\South\ChristmasDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php b/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php index a9bb1cfdc..f9e07e6c6 100644 --- a/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in southeastern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\South\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\South\EasterMondayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php b/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php index 7a0ee954e..ee11a61d0 100644 --- a/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Eight Hour Day in southeastern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\South\EightHourDayTest -{ -} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\South\EightHourDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php b/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php index 31001f762..54157cc07 100644 --- a/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in southeastern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\South\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\South\GoodFridayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php b/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php index 153d000b9..62ad45705 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php @@ -17,6 +17,4 @@ /** * Class for testing Hobart Show Day in southeastern Tasmania (Australia).. */ -class HobartShowTest extends \Yasumi\tests\Australia\Tasmania\South\HobartShowTest -{ -} +class HobartShowTest extends \Yasumi\tests\Australia\Tasmania\South\HobartShowTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php index b781a8430..2ad7af328 100644 --- a/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in southeastern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\South\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\South\NationalDayOfMourningTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php b/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php index 7329a98cb..38f6a372d 100644 --- a/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in southeastern Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\South\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\South\NewYearsDayTest {} diff --git a/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php b/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php index 4cf3036d7..feaea623b 100644 --- a/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Queen's Birthday in southeastern Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\South\QueensBirthdayTest -{ -} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\South\QueensBirthdayTest {} diff --git a/tests/Australia/Victoria/AnzacDayTest.php b/tests/Australia/Victoria/AnzacDayTest.php index 4ade076b2..a35878a58 100644 --- a/tests/Australia/Victoria/AnzacDayTest.php +++ b/tests/Australia/Victoria/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Victoria (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/Victoria/AustraliaDayTest.php b/tests/Australia/Victoria/AustraliaDayTest.php index 692e8f773..4974896ab 100644 --- a/tests/Australia/Victoria/AustraliaDayTest.php +++ b/tests/Australia/Victoria/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Victoria (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/Victoria/BoxingDayTest.php b/tests/Australia/Victoria/BoxingDayTest.php index 8fd7f875b..56a9b1753 100644 --- a/tests/Australia/Victoria/BoxingDayTest.php +++ b/tests/Australia/Victoria/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Victoria (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/Victoria/ChristmasDayTest.php b/tests/Australia/Victoria/ChristmasDayTest.php index 177d238ea..596fa7ed5 100644 --- a/tests/Australia/Victoria/ChristmasDayTest.php +++ b/tests/Australia/Victoria/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Victoria (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/Victoria/EasterMondayTest.php b/tests/Australia/Victoria/EasterMondayTest.php index c1b38fc0e..85b2e1fac 100644 --- a/tests/Australia/Victoria/EasterMondayTest.php +++ b/tests/Australia/Victoria/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Victoria (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/Victoria/GoodFridayTest.php b/tests/Australia/Victoria/GoodFridayTest.php index d6d6bd5a2..fdadf02be 100644 --- a/tests/Australia/Victoria/GoodFridayTest.php +++ b/tests/Australia/Victoria/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Victoria (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/Victoria/NationalDayOfMourningTest.php b/tests/Australia/Victoria/NationalDayOfMourningTest.php index 033be7914..1692c0e12 100644 --- a/tests/Australia/Victoria/NationalDayOfMourningTest.php +++ b/tests/Australia/Victoria/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Victoria (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/Victoria/NewYearsDayTest.php b/tests/Australia/Victoria/NewYearsDayTest.php index 1d2016897..7e6368f69 100644 --- a/tests/Australia/Victoria/NewYearsDayTest.php +++ b/tests/Australia/Victoria/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Victoria (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Australia/WesternAustralia/AnzacDayTest.php b/tests/Australia/WesternAustralia/AnzacDayTest.php index 82c1cab4f..cd8040998 100644 --- a/tests/Australia/WesternAustralia/AnzacDayTest.php +++ b/tests/Australia/WesternAustralia/AnzacDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing ANZAC day in Western Australia (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest -{ -} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} diff --git a/tests/Australia/WesternAustralia/AustraliaDayTest.php b/tests/Australia/WesternAustralia/AustraliaDayTest.php index ed58a6e28..829561943 100644 --- a/tests/Australia/WesternAustralia/AustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/AustraliaDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Australia day in Western Australia (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest -{ -} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} diff --git a/tests/Australia/WesternAustralia/BoxingDayTest.php b/tests/Australia/WesternAustralia/BoxingDayTest.php index 7c17911e3..5771a04c0 100644 --- a/tests/Australia/WesternAustralia/BoxingDayTest.php +++ b/tests/Australia/WesternAustralia/BoxingDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Boxing Day in Western Australia (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest -{ -} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} diff --git a/tests/Australia/WesternAustralia/ChristmasDayTest.php b/tests/Australia/WesternAustralia/ChristmasDayTest.php index d0508719b..36a72f99a 100644 --- a/tests/Australia/WesternAustralia/ChristmasDayTest.php +++ b/tests/Australia/WesternAustralia/ChristmasDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Christmas Day in Western Australia (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest -{ -} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} diff --git a/tests/Australia/WesternAustralia/EasterMondayTest.php b/tests/Australia/WesternAustralia/EasterMondayTest.php index eba0dae5b..76718276b 100644 --- a/tests/Australia/WesternAustralia/EasterMondayTest.php +++ b/tests/Australia/WesternAustralia/EasterMondayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Easter Monday in Western Australia (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest -{ -} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} diff --git a/tests/Australia/WesternAustralia/GoodFridayTest.php b/tests/Australia/WesternAustralia/GoodFridayTest.php index 0192aeca8..8c2d9b217 100644 --- a/tests/Australia/WesternAustralia/GoodFridayTest.php +++ b/tests/Australia/WesternAustralia/GoodFridayTest.php @@ -17,6 +17,4 @@ /** * Class for testing Good Friday in Western Australia (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest -{ -} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} diff --git a/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php b/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php index 364347f7f..f78c61448 100644 --- a/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php +++ b/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php @@ -17,6 +17,4 @@ /** * Class for testing National Day of Mourning in Western Australia (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest -{ -} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} diff --git a/tests/Australia/WesternAustralia/NewYearsDayTest.php b/tests/Australia/WesternAustralia/NewYearsDayTest.php index ea40509eb..1ab5d270e 100644 --- a/tests/Australia/WesternAustralia/NewYearsDayTest.php +++ b/tests/Australia/WesternAustralia/NewYearsDayTest.php @@ -17,6 +17,4 @@ /** * Class for testing New Years Day in Western Australia (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest -{ -} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} diff --git a/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php b/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php index d938a4c46..03eb79461 100644 --- a/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php +++ b/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Baden-Württemberg (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php b/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php index 981fda8a2..b6edd256d 100644 --- a/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php +++ b/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Baden-Württemberg (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Bavaria/GermanUnityDayTest.php b/tests/Germany/Bavaria/GermanUnityDayTest.php index 34ea48052..b1d430a97 100644 --- a/tests/Germany/Bavaria/GermanUnityDayTest.php +++ b/tests/Germany/Bavaria/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Bavaria (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Bavaria/ReformationDay2017Test.php b/tests/Germany/Bavaria/ReformationDay2017Test.php index c11c67e2f..2bcce31fd 100644 --- a/tests/Germany/Bavaria/ReformationDay2017Test.php +++ b/tests/Germany/Bavaria/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Bavaria (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Berlin/GermanUnityDayTest.php b/tests/Germany/Berlin/GermanUnityDayTest.php index a41153d68..367fd2869 100644 --- a/tests/Germany/Berlin/GermanUnityDayTest.php +++ b/tests/Germany/Berlin/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Berlin (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Berlin/ReformationDay2017Test.php b/tests/Germany/Berlin/ReformationDay2017Test.php index 77f2f666c..711990f65 100644 --- a/tests/Germany/Berlin/ReformationDay2017Test.php +++ b/tests/Germany/Berlin/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Berlin (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Brandenburg/GermanUnityDayTest.php b/tests/Germany/Brandenburg/GermanUnityDayTest.php index 9f701bd94..fec72075e 100644 --- a/tests/Germany/Brandenburg/GermanUnityDayTest.php +++ b/tests/Germany/Brandenburg/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Brandenburg (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Bremen/GermanUnityDayTest.php b/tests/Germany/Bremen/GermanUnityDayTest.php index 8b375bfbf..a17cf7a05 100644 --- a/tests/Germany/Bremen/GermanUnityDayTest.php +++ b/tests/Germany/Bremen/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Bremen (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Bremen/ReformationDay2017Test.php b/tests/Germany/Bremen/ReformationDay2017Test.php index c3de1c197..77c165730 100644 --- a/tests/Germany/Bremen/ReformationDay2017Test.php +++ b/tests/Germany/Bremen/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Bremen (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Hamburg/GermanUnityDay.php b/tests/Germany/Hamburg/GermanUnityDay.php index 92da625e9..8c4342cdb 100644 --- a/tests/Germany/Hamburg/GermanUnityDay.php +++ b/tests/Germany/Hamburg/GermanUnityDay.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Hamburg (Germany). */ -class GermanUnityDay extends BaseGermanUnityDayTest -{ -} +class GermanUnityDay extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Hamburg/ReformationDay2017Test.php b/tests/Germany/Hamburg/ReformationDay2017Test.php index b82a0b79d..607c91330 100644 --- a/tests/Germany/Hamburg/ReformationDay2017Test.php +++ b/tests/Germany/Hamburg/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Hamburg (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Hesse/GermanUnityDayTest.php b/tests/Germany/Hesse/GermanUnityDayTest.php index 446664c9a..aa0fec87f 100644 --- a/tests/Germany/Hesse/GermanUnityDayTest.php +++ b/tests/Germany/Hesse/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Hesse (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Hesse/ReformationDay2017Test.php b/tests/Germany/Hesse/ReformationDay2017Test.php index 2d8061de2..bf82684f1 100644 --- a/tests/Germany/Hesse/ReformationDay2017Test.php +++ b/tests/Germany/Hesse/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Hesse (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/LowerSaxony/GermanUnityDayTest.php b/tests/Germany/LowerSaxony/GermanUnityDayTest.php index 8e0dc561e..34e1396db 100644 --- a/tests/Germany/LowerSaxony/GermanUnityDayTest.php +++ b/tests/Germany/LowerSaxony/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Lower Saxony (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/LowerSaxony/ReformationDay2017Test.php b/tests/Germany/LowerSaxony/ReformationDay2017Test.php index 0141b794c..32985f419 100644 --- a/tests/Germany/LowerSaxony/ReformationDay2017Test.php +++ b/tests/Germany/LowerSaxony/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Lower Saxony (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php b/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php index 6a08aa040..f77f7120e 100644 --- a/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Mecklenburg-Western Pomerania (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php b/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php index 0a1131f67..84f15ce8f 100644 --- a/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in North Rhine-Westphalia (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php b/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php index d05a3cd84..cb5efa167 100644 --- a/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php +++ b/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in North Rhine-Westphalia (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php b/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php index a0d21d25f..27677daae 100644 --- a/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php +++ b/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Rhineland Palatinate (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php b/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php index 1e0d83a07..432f22718 100644 --- a/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php +++ b/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Rhineland Palatinate (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Saarland/GermanUnityDayTest.php b/tests/Germany/Saarland/GermanUnityDayTest.php index 6722e6969..51a66268b 100644 --- a/tests/Germany/Saarland/GermanUnityDayTest.php +++ b/tests/Germany/Saarland/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Saarland (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/Saarland/ReformationDay2017Test.php b/tests/Germany/Saarland/ReformationDay2017Test.php index ee2ed7e3f..f7470cf47 100644 --- a/tests/Germany/Saarland/ReformationDay2017Test.php +++ b/tests/Germany/Saarland/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Saarland (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Saxony/GermanUnityDayTest.php b/tests/Germany/Saxony/GermanUnityDayTest.php index ac1de7c9a..b790c3e93 100644 --- a/tests/Germany/Saxony/GermanUnityDayTest.php +++ b/tests/Germany/Saxony/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Saxony (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php b/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php index 716e688ef..dfd363d0a 100644 --- a/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php +++ b/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Saxony-Anhalt (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php b/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php index eaed998b7..0c2cdf7a9 100644 --- a/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php +++ b/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Schleswig-Holstein (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} diff --git a/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php b/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php index 10b351db4..6b1fed61a 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php +++ b/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php @@ -17,6 +17,4 @@ /** * Class for testing Reformation Day in Schleswig-Holstein (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test -{ -} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} diff --git a/tests/Germany/Thuringia/GermanUnityDayTest.php b/tests/Germany/Thuringia/GermanUnityDayTest.php index cbc9090e1..641f2b270 100644 --- a/tests/Germany/Thuringia/GermanUnityDayTest.php +++ b/tests/Germany/Thuringia/GermanUnityDayTest.php @@ -19,6 +19,4 @@ /** * Class for testing German Unity Day in Thuringia (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest -{ -} +class GermanUnityDayTest extends BaseGermanUnityDayTest {} From 18e49f08152fa223f4bfab93b9591651d8a8e4a7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 11 Oct 2023 00:43:40 +0900 Subject: [PATCH 512/687] Correct return type 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 25ed5b95a..c2c98af91 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -197,7 +197,7 @@ public static function createByISO3166_2( /** * Returns a list of available holiday providers. * - * @return array list of available holiday providers + * @return array|string|null> list of available holiday providers * * @throws \ReflectionException */ From 5a94ca9145f0f28357d73c0a50cb68bc97427c55 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 11 Oct 2023 23:48:59 +0900 Subject: [PATCH 513/687] Optimize method for the Emperor's birthday. Using a null value and check for that, we can remove the use of the \is_string() function. 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 b5c82f68c..64f171ed8 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -237,7 +237,7 @@ private function calculateLaborThanksgivingDay(): void */ private function calculateEmperorsBirthday(): void { - $emperorsBirthday = false; + $emperorsBirthday = null; if ($this->year >= 2020) { $emperorsBirthday = "{$this->year}-2-23"; } elseif ($this->year >= 1989 && $this->year < 2019) { @@ -246,7 +246,7 @@ private function calculateEmperorsBirthday(): void $emperorsBirthday = "{$this->year}-4-29"; } - if (\is_string($emperorsBirthday)) { + if (null !== $emperorsBirthday) { $this->addHoliday(new Holiday( 'emperorsBirthday', ['en' => 'Emperors Birthday', 'ja' => '天皇誕生日'], From 893a7f9e0e387b34c5ac04d9a075e7dcaf0e1e53 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 14 Oct 2023 19:11:11 +0900 Subject: [PATCH 514/687] Remove useless parentheses Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 64f171ed8..d49422d6d 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -307,7 +307,7 @@ private function calculateVernalEquinoxDay(): void private function calculateComingOfAgeDay(): void { if ($this->year >= 1948) { - $date = ($this->year >= 2000) ? + $date = $this->year >= 2000 ? new \DateTime("second monday of january {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)) : new \DateTime("{$this->year}-1-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)); From ae895d0fb9cbfb5ff642a1bebf3be3708cd2e38a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 15 Oct 2023 13:16:05 +0000 Subject: [PATCH 515/687] Remove summer and wintertime (#322) Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and aren't true holidays in the context of Yasumi. Refer to this discussion for further details and rationale. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 4 + src/Yasumi/Provider/Denmark.php | 10 -- src/Yasumi/Provider/Netherlands.php | 36 ------ tests/Base/HolidayBetweenFilterTest.php | 18 +-- tests/Base/HolidayFiltersTest.php | 8 +- tests/Base/HolidayOnFilterTest.php | 6 - tests/Denmark/DenmarkTest.php | 11 -- tests/Denmark/SummerTimeTest.php | 127 ------------------- tests/Denmark/WinterTimeTest.php | 125 ------------------- tests/Netherlands/NetherlandsTest.php | 11 -- tests/Netherlands/SummerTimeTest.php | 155 ------------------------ tests/Netherlands/WinterTimeTest.php | 130 -------------------- 12 files changed, 12 insertions(+), 629 deletions(-) delete mode 100644 tests/Denmark/SummerTimeTest.php delete mode 100644 tests/Denmark/WinterTimeTest.php delete mode 100644 tests/Netherlands/SummerTimeTest.php delete mode 100644 tests/Netherlands/WinterTimeTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index ceafc3eb9..10224da74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,10 @@ changes. ### Removed +- Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and + aren't true holidays in the context of Yasumi. Refer to this [discussion](https://github.com/azuyalabs/yasumi/discussions/321) + for further details and rationale. + ## [2.6.0] - 2023-04-27 ### Added diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index 82133fb13..4afff9161 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -63,16 +63,6 @@ public function initialize(): void $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $this->calculateConstitutionDay(); - - $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); - if ($summerTime instanceof Holiday) { - $this->addHoliday($summerTime); - } - - $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); - if ($winterTime instanceof Holiday) { - $this->addHoliday($winterTime); - } } public function getSources(): array diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index e2ff63bb5..5b5fe67ce 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -75,8 +75,6 @@ public function initialize(): void // Calculate other holidays $this->calculateCarnival(); - $this->calculateWinterTime(); - $this->calculateSummerTime(); $this->calculateStNicholasDay(); $this->calculateHalloween(); $this->calculatePrincesDay(); @@ -129,40 +127,6 @@ private function calculateCarnival(): void } } - /** - * Winter Time. - * - * The beginning of winter time. Winter time is also known as standard time. - * - * @throws \Exception - * - * @see \Yasumi\Provider\CommonHolidays::winterTime() - */ - private function calculateWinterTime(): void - { - $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); - if ($winterTime instanceof Holiday) { - $this->addHoliday($winterTime); - } - } - - /** - * Summer Time. - * - * The beginning of summer time. Summer time is also known as day lights saving time. - * - * @throws \Exception - * - * @see \Yasumi\Provider\CommonHolidays::summerTime() - */ - private function calculateSummerTime(): void - { - $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); - if ($summerTime instanceof Holiday) { - $this->addHoliday($summerTime); - } - } - /** * St. Nicholas' Day. * diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index 8cb860d81..a16996640 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -37,7 +37,6 @@ public function testHolidaysBetweenDateRange(): void self::assertArrayHasKey('goodFriday', $betweenHolidays); self::assertArrayHasKey('easter', $betweenHolidays); - self::assertArrayHasKey('summerTime', $betweenHolidays); self::assertArrayHasKey('easterMonday', $betweenHolidays); self::assertArrayHasKey('kingsDay', $betweenHolidays); self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); @@ -58,17 +57,16 @@ public function testHolidaysBetweenDateRange(): void self::assertArrayNotHasKey('valentinesDay', $betweenHolidays); self::assertArrayNotHasKey('princesDay', $betweenHolidays); self::assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); - self::assertArrayNotHasKey('winterTime', $betweenHolidays); self::assertArrayNotHasKey('halloween', $betweenHolidays); self::assertArrayNotHasKey('stMartinsDay', $betweenHolidays); self::assertArrayNotHasKey('stNicholasDay', $betweenHolidays); self::assertArrayNotHasKey('christmasDay', $betweenHolidays); self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - self::assertCount(13, $between); + self::assertCount(12, $between); self::assertNotCount(\count($holidays), $between); - self::assertEquals(13, $between->count()); + self::assertEquals(12, $between->count()); self::assertNotEquals(\count($holidays), $between->count()); } @@ -87,7 +85,6 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void self::assertArrayHasKey('goodFriday', $betweenHolidays); self::assertArrayHasKey('easter', $betweenHolidays); - self::assertArrayHasKey('summerTime', $betweenHolidays); self::assertArrayHasKey('easterMonday', $betweenHolidays); self::assertArrayHasKey('kingsDay', $betweenHolidays); self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); @@ -108,17 +105,16 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void self::assertArrayNotHasKey('valentinesDay', $betweenHolidays); self::assertArrayNotHasKey('princesDay', $betweenHolidays); self::assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); - self::assertArrayNotHasKey('winterTime', $betweenHolidays); self::assertArrayNotHasKey('halloween', $betweenHolidays); self::assertArrayNotHasKey('stMartinsDay', $betweenHolidays); self::assertArrayNotHasKey('stNicholasDay', $betweenHolidays); self::assertArrayNotHasKey('christmasDay', $betweenHolidays); self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - self::assertCount(13, $between); + self::assertCount(12, $between); self::assertNotCount(\count($holidays), $between); - self::assertEquals(13, $between->count()); + self::assertEquals(12, $between->count()); self::assertNotEquals(\count($holidays), $between->count()); } @@ -166,7 +162,6 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void self::assertArrayHasKey('valentinesDay', $betweenHolidays); self::assertArrayHasKey('goodFriday', $betweenHolidays); self::assertArrayHasKey('easter', $betweenHolidays); - self::assertArrayHasKey('summerTime', $betweenHolidays); self::assertArrayHasKey('easterMonday', $betweenHolidays); self::assertArrayHasKey('kingsDay', $betweenHolidays); self::assertArrayHasKey('internationalWorkersDay', $betweenHolidays); @@ -181,17 +176,16 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void self::assertArrayNotHasKey('newYearsDay', $betweenHolidays); self::assertArrayNotHasKey('princesDay', $betweenHolidays); self::assertArrayNotHasKey('worldAnimalDay', $betweenHolidays); - self::assertArrayNotHasKey('winterTime', $betweenHolidays); self::assertArrayNotHasKey('halloween', $betweenHolidays); self::assertArrayNotHasKey('stMartinsDay', $betweenHolidays); self::assertArrayNotHasKey('stNicholasDay', $betweenHolidays); self::assertArrayNotHasKey('christmasDay', $betweenHolidays); self::assertArrayNotHasKey('secondChristmasDay', $betweenHolidays); - self::assertCount(19, $between); + self::assertCount(18, $between); self::assertNotCount(\count($holidays), $between); - self::assertEquals(19, $between->count()); + self::assertEquals(18, $between->count()); self::assertNotEquals(\count($holidays), $between->count()); } diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index 5aca68812..d7cc3fd73 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -125,8 +125,6 @@ public function testSeasonalHolidaysFilter(): void $filteredHolidaysArray = iterator_to_array($filteredHolidays); // Assert array definitions - self::assertArrayHasKey('summerTime', $filteredHolidaysArray); - self::assertArrayHasKey('winterTime', $filteredHolidaysArray); self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); self::assertArrayNotHasKey('easter', $filteredHolidaysArray); self::assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); @@ -155,9 +153,9 @@ public function testSeasonalHolidaysFilter(): void self::assertArrayNotHasKey('princesDay', $filteredHolidaysArray); // Assert number of results returned - self::assertCount(2, $filteredHolidays); + self::assertCount(0, $filteredHolidays); self::assertNotCount(\count($holidays), $filteredHolidays); - self::assertEquals(2, $filteredHolidays->count()); + self::assertEquals(0, $filteredHolidays->count()); self::assertNotEquals(\count($holidays), $filteredHolidays->count()); } @@ -176,8 +174,6 @@ public function testOtherHolidaysFilter(): void self::assertArrayHasKey('mothersDay', $filteredHolidaysArray); self::assertArrayHasKey('epiphany', $filteredHolidaysArray); self::assertArrayHasKey('princesDay', $filteredHolidaysArray); - self::assertArrayNotHasKey('summerTime', $filteredHolidaysArray); - self::assertArrayNotHasKey('winterTime', $filteredHolidaysArray); self::assertArrayNotHasKey('newYearsDay', $filteredHolidaysArray); self::assertArrayNotHasKey('easter', $filteredHolidaysArray); self::assertArrayNotHasKey('easterMonday', $filteredHolidaysArray); diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 301e61270..83b3fdea7 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -31,7 +31,6 @@ 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)), ]; foreach ($holidayDates as $name => $date) { @@ -52,7 +51,6 @@ 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)), ]; foreach ($holidayWrongDates as $name => $date) { @@ -77,9 +75,5 @@ public function testCorrectNumberOfHolidaysOnDate(): void // One holiday $holidaysOnDate = $holidays->on(new \DateTime('12/25/2016', new \DateTimeZone($timezone))); self::assertEquals(1, $holidaysOnDate->count()); - - // Multiple holidays - $holidaysOnDate = $holidays->on(new \DateTime('03/27/2016', new \DateTimeZone($timezone))); - self::assertGreaterThan(1, $holidaysOnDate->count()); } } diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index 8f013dc59..2e6ee7d3d 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -69,17 +69,6 @@ public function testObservedHolidays(): void ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } - /** - * Tests if all seasonal holidays in Denmark are defined by the provider class. - * - * @throws \Exception - */ - public function testSeasonalHolidays(): void - { - $year = $this->generateRandomYear(1980, 2037); - $this->assertDefinedHolidays(['summerTime', 'winterTime'], self::REGION, $year, Holiday::TYPE_SEASON); - } - /** * Tests if all bank holidays in Denmark are defined by the provider class. */ diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php deleted file mode 100644 index 41c50bb8d..000000000 --- a/tests/Denmark/SummerTimeTest.php +++ /dev/null @@ -1,127 +0,0 @@ - - */ - -namespace Yasumi\tests\Denmark; - -use Yasumi\Holiday; - -/** - * Class for testing summer time in Denmark. - * - * @see: https://en.wikipedia.org/wiki/Time_in_the_Danish_Realm#History - */ -final class SummerTimeTest extends DaylightSavingTime -{ - /** The name of the holiday */ - public const HOLIDAY = 'summerTime'; - - /* List of transition dates that deviate from the known/defined rules. - * PHP derives the transition dates from the tz database which appear to - * be different for some dates */ - private array $deviantTransitions = [ - 1916 => '1916-05-14', - 1940 => '1940-05-14', - 1943 => '1943-03-29', - 1944 => '1944-04-03', - 1945 => '1945-04-02', - 1946 => '1946-05-01', - 1947 => '1947-05-04', - 1948 => '1948-05-09', - ]; - - public function __construct() - { - parent::__construct(); - - // no summertime defined in 1942 - if (false !== ($key = array_search(1942, $this->observedYears, true))) { - unset($this->observedYears[(int) $key]); - } - - // In version 2022f of the tz db, a correction for some years weere made for the summertime - // transitions. See: https://github.com/eggert/tz/blob/2022f/europe - if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { - $this->swapObservation([1917, 1918, 1949]); - - $this->deviantTransitions[1916] = '1916-04-30'; - $this->deviantTransitions[1917] = '1917-04-16'; - $this->deviantTransitions[1918] = '1918-04-15'; - $this->deviantTransitions[1940] = '1940-04-01'; - $this->deviantTransitions[1946] = '1946-04-14'; - $this->deviantTransitions[1947] = '1947-04-06'; - $this->deviantTransitions[1948] = '1948-04-18'; - $this->deviantTransitions[1949] = '1949-04-10'; - } - } - - /** - * Tests the holiday defined in this test. - * - * @throws \Exception - */ - public function testSummerTime(): void - { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - - $year = $this->randomYearFromArray($this->observedYears); - $expectedDate = new \DateTime("last sunday of march {$year}", new \DateTimeZone(self::TIMEZONE)); - - if (array_key_exists($year, $this->deviantTransitions)) { - $expectedDate = new \DateTime($this->deviantTransitions[$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 (1980 === $year) { - $expectedDate = new \DateTime('1980-04-06', new \DateTimeZone(self::TIMEZONE)); - } - - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - $expectedDate - ); - } - - /** - * Tests the translated name of the holiday defined in this test. - * - * @throws \Exception - */ - public function testTranslation(): void - { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - [self::LOCALE => 'sommertid starter'] - ); - } - - /** - * Tests type of the holiday defined in this test. - * - * @throws \Exception - */ - public function testHolidayType(): void - { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - Holiday::TYPE_SEASON - ); - } -} diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php deleted file mode 100644 index 6f0fd2ed7..000000000 --- a/tests/Denmark/WinterTimeTest.php +++ /dev/null @@ -1,125 +0,0 @@ - - */ - -namespace Yasumi\tests\Denmark; - -use Yasumi\Holiday; - -/** - * Class for testing winter time in Denmark. - * - * @see: https://en.wikipedia.org/wiki/Time_in_the_Danish_Realm#History - */ -final class WinterTimeTest extends DaylightSavingTime -{ - /** The name of the holiday */ - public const HOLIDAY = 'winterTime'; - - /* List of transition dates that deviate from the known/defined rules. - * PHP derives the transition dates from the tz database which appear to - * be different for some dates */ - private array $deviantTransitions = [ - 1916 => '1916-09-30', - 1942 => '1942-11-02', - 1943 => '1943-10-04', - 1944 => '1944-10-02', - 1945 => '1945-08-15', - 1946 => '1946-09-01', - 1947 => '1947-08-10', - 1948 => '1948-08-08', - ]; - - public function __construct() - { - parent::__construct(); - - // no wintertime defined for 1940 - if (false !== ($key = array_search(1940, $this->observedYears, true))) { - unset($this->observedYears[(int) $key]); - } - - // In version 2022f of the tz db, a correction for some years weere made for the wintertime - // transitions. See: https://github.com/eggert/tz/blob/2022f/europe - if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { - $this->swapObservation([1918, 1917, 1945, 1946, 1948, 1949]); - - $this->deviantTransitions[1917] = '1917-09-17'; - $this->deviantTransitions[1918] = '1918-09-16'; - $this->deviantTransitions[1945] = '1945-11-18'; - $this->deviantTransitions[1946] = '1946-10-07'; - $this->deviantTransitions[1947] = '1947-10-05'; - $this->deviantTransitions[1948] = '1948-10-03'; - $this->deviantTransitions[1949] = '1949-10-02'; - } - } - - /** - * Tests the holiday defined in this test. - * - * @throws \Exception - */ - public function testWinterTime(): void - { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - - $year = $this->randomYearFromArray($this->observedYears); - $expectedDate = new \DateTime("last sunday of september {$year}", new \DateTimeZone(self::TIMEZONE)); - - if ($year >= 1996) { - $expectedDate = new \DateTime("last sunday of october {$year}", new \DateTimeZone(self::TIMEZONE)); - } - - if (array_key_exists($year, $this->deviantTransitions)) { - $expectedDate = new \DateTime($this->deviantTransitions[$year], new \DateTimeZone(self::TIMEZONE)); - } - - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - $expectedDate - ); - } - - /** - * Tests the translated name of the holiday defined in this test. - * - * @throws \Exception - */ - public function testTranslation(): void - { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - [self::LOCALE => 'sommertid slutter'] - ); - } - - /** - * Tests type of the holiday defined in this test. - * - * @throws \Exception - */ - public function testHolidayType(): void - { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - Holiday::TYPE_SEASON - ); - } -} diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 1f6871fc8..d6560853d 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -80,17 +80,6 @@ public function testObservedHolidays(): void ], self::REGION, $this->generateRandomYear(2011, 2014), Holiday::TYPE_OBSERVANCE); } - /** - * Tests if all seasonal holidays in Netherlands are defined by the provider class. - * - * @throws \Exception - */ - public function testSeasonalHolidays(): void - { - $year = $this->generateRandomYear(1978, 2037); - $this->assertDefinedHolidays(['summerTime', 'winterTime'], self::REGION, $year, Holiday::TYPE_SEASON); - } - /** * Tests if all bank holidays in Netherlands are defined by the provider class. */ diff --git a/tests/Netherlands/SummerTimeTest.php b/tests/Netherlands/SummerTimeTest.php deleted file mode 100644 index e847bcbc8..000000000 --- a/tests/Netherlands/SummerTimeTest.php +++ /dev/null @@ -1,155 +0,0 @@ - - */ - -namespace Yasumi\tests\Netherlands; - -use Yasumi\Holiday; - -/** - * Class for testing Summertime in the Netherlands. - */ -final class SummerTimeTest extends DaylightSavingTime -{ - /** The name of the holiday */ - public const HOLIDAY = 'summerTime'; - - /* List of transition dates that deviate from the known/defined rules. - * PHP derives the transition dates from the tz database which are - * different for some years */ - private array $deviantTransitions = [ - 1916 => '1916-04-30', - 1917 => '1917-04-16', - 1919 => '1919-04-07', - 1918 => '1918-04-01', - 1920 => '1920-04-05', - 1921 => '1921-04-04', - 1922 => '1922-03-26', - 1923 => '1923-06-01', - 1924 => '1924-03-30', - 1925 => '1925-06-05', - 1932 => '1932-05-22', - 1937 => '1937-05-22', - 1943 => '1943-03-29', - 1944 => '1944-04-03', - 1945 => '1945-04-02', - ]; - - public function __construct() - { - parent::__construct(); - - // No summertime defined for 1942 - if (false !== ($key = array_search(1942, $this->observedYears, true))) { - unset($this->observedYears[(int) $key]); - } - - // In version 2022f of the tz db, a correction for some years weere made for the summertime - // transitions. See: https://github.com/eggert/tz/blob/2022f/europe - if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { - $this->swapObservation([1946]); - - $this->deviantTransitions[1918] = '1918-04-15'; - $this->deviantTransitions[1919] = '1919-03-01'; - $this->deviantTransitions[1920] = '1920-02-14'; - $this->deviantTransitions[1921] = '1921-03-14'; - $this->deviantTransitions[1922] = '1922-03-25'; - $this->deviantTransitions[1923] = '1923-04-21'; - $this->deviantTransitions[1924] = '1924-03-29'; - $this->deviantTransitions[1925] = '1925-04-04'; - $this->deviantTransitions[1926] = '1926-04-17'; - $this->deviantTransitions[1927] = '1927-04-09'; - $this->deviantTransitions[1928] = '1928-04-14'; - $this->deviantTransitions[1929] = '1929-04-21'; - $this->deviantTransitions[1931] = '1931-04-19'; - $this->deviantTransitions[1930] = '1930-04-13'; - $this->deviantTransitions[1932] = '1932-04-03'; - $this->deviantTransitions[1933] = '1933-03-26'; - $this->deviantTransitions[1934] = '1934-04-08'; - $this->deviantTransitions[1935] = '1935-03-31'; - $this->deviantTransitions[1936] = '1936-04-19'; - $this->deviantTransitions[1937] = '1937-04-04'; - $this->deviantTransitions[1938] = '1938-03-27'; - $this->deviantTransitions[1939] = '1939-04-16'; - $this->deviantTransitions[1940] = '1940-02-25'; - $this->deviantTransitions[1946] = '1946-05-19'; - } - } - - /** - * Tests Summertime. - * - * @throws \Exception - */ - public function testSummertime(): void - { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - - $year = $this->randomYearFromArray($this->observedYears); - $expected = "first sunday of april {$year}"; - - if ($year >= 1981) { - $expected = "last sunday of march {$year}"; - } - - if ($year >= 1943 && $year < 1981) { - $expected = "first sunday of april {$year}"; - } - - if ($year >= 1922 && $year < 1943) { - $expected = "may 15th {$year}"; - } - - if (array_key_exists($year, $this->deviantTransitions)) { - $expected = $this->deviantTransitions[$year]; - } - - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) - ); - } - - /** - * Tests the translated name of the holiday defined in this test. - * - * @throws \Exception - */ - public function testTranslation(): void - { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - [self::LOCALE => 'zomertijd'] - ); - } - - /** - * Tests type of the holiday defined in this test. - * - * @throws \Exception - */ - public function testHolidayType(): void - { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - Holiday::TYPE_SEASON - ); - } -} diff --git a/tests/Netherlands/WinterTimeTest.php b/tests/Netherlands/WinterTimeTest.php deleted file mode 100644 index 6cee43719..000000000 --- a/tests/Netherlands/WinterTimeTest.php +++ /dev/null @@ -1,130 +0,0 @@ - - */ - -namespace Yasumi\tests\Netherlands; - -use Yasumi\Holiday; - -/** - * Class for testing Wintertime in the Netherlands. - */ -final class WinterTimeTest extends DaylightSavingTime -{ - /** The name of the holiday */ - public const HOLIDAY = 'winterTime'; - - /* List of transition dates that deviate from the known/defined rules. - * PHP derives the transition dates from the tz database which are - * different for some years */ - private array $deviantTransitions = [ - 1916 => '1916-09-30', - 1917 => '1917-09-17', - 1922 => '1922-10-08', - 1933 => '1933-10-08', - 1939 => '1939-10-08', - 1942 => '1942-11-02', - 1943 => '1943-10-04', - 1944 => '1944-10-02', - 1945 => '1945-09-16', - 1978 => '1978-10-01', - ]; - - public function __construct() - { - parent::__construct(); - - // No wintertime defined for 1940 - if (false !== ($key = array_search(1940, $this->observedYears, true))) { - unset($this->observedYears[(int) $key]); - } - - // In version 2022f of the tz db, a correction for some years weere made for the wintertime - // transitions. See: https://github.com/eggert/tz/blob/2022f/europe - if (1 === strcmp(\intltz_get_tz_data_version(), '2022f')) { - $this->swapObservation([1946]); - - $this->deviantTransitions[1918] = '1918-09-16'; - $this->deviantTransitions[1919] = '1919-10-04'; - $this->deviantTransitions[1920] = '1920-10-23'; - $this->deviantTransitions[1921] = '1921-10-25'; - $this->deviantTransitions[1922] = '1922-10-07'; - $this->deviantTransitions[1923] = '1923-10-06'; - $this->deviantTransitions[1924] = '1924-10-04'; - $this->deviantTransitions[1925] = '1925-10-03'; - $this->deviantTransitions[1926] = '1926-10-02'; - $this->deviantTransitions[1927] = '1927-10-01'; - $this->deviantTransitions[1939] = '1939-11-19'; - $this->deviantTransitions[1944] = '1944-09-17'; - $this->deviantTransitions[1946] = '1946-10-07'; - } - } - - /** - * Tests Wintertime. - * - * @throws \Exception - */ - public function testWintertime(): void - { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->randomYearFromArray($this->unobservedYears)); - - $year = $this->randomYearFromArray($this->observedYears); - $isObserved = in_array($year, $this->observedYears); - - if (true == $isObserved) { - if ($year >= 1996) { - $expected = "last sunday of october {$year}"; - } elseif ($year >= 1977) { - $expected = "last sunday of september {$year}"; - } elseif ($year >= 1922) { - $expected = "first sunday of october {$year}"; - } else { - $expected = "last monday of september {$year}"; - } - } else { - $expected = $this->deviantTransitions[$year]; - } - } - - /** - * Tests the translated name of the holiday defined in this test. - * - * @throws \Exception - */ - public function testTranslation(): void - { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - [self::LOCALE => 'wintertijd'] - ); - } - - /** - * Tests type of the holiday defined in this test. - * - * @throws \Exception - */ - public function testHolidayType(): void - { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $this->randomYearFromArray($this->observedYears), - Holiday::TYPE_SEASON - ); - } -} From 9da5acbfa69745aece9bd42bcb2c26b820468c76 Mon Sep 17 00:00:00 2001 From: Yannick Ihmels Date: Sun, 15 Oct 2023 16:09:45 +0200 Subject: [PATCH 516/687] Add International Womens Day to DE-MV (#311) For the German state of Mecklenburg-Western Pomerania, International Womens Day is considered to be officially observed. --- .../Germany/MecklenburgWesternPomerania.php | 12 ++ src/Yasumi/Yasumi.php | 1 + .../InternationalWomensDayTest.php | 103 ++++++++++++++++++ .../MecklenburgWesternPomeraniaTest.php | 2 +- 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php index 7809fbdf2..812443d6d 100644 --- a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php +++ b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php @@ -46,10 +46,22 @@ public function initialize(): void { parent::initialize(); + if ($this->year >= 2023) { + $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); + } + // Add custom Christian holidays $this->calculateReformationDay(); } + public function getSources(): array + { + return array_merge( + ['https://www.ndr.de/nachrichten/mecklenburg-vorpommern/Frauentag-in-MV-Landtag-beschliesst-neuen-Feiertag,frauentag370.html'], + parent::getSources(), + ); + } + /** * 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. diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index c2c98af91..b91ee9b7e 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -215,6 +215,7 @@ public static function getProviders(): array \FilesystemIterator::SKIP_DOTS ), \RecursiveIteratorIterator::SELF_FIRST); + /** @var \SplFileInfo $file */ foreach ($filesIterator as $file) { if ($file->isDir()) { continue; diff --git a/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php b/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php new file mode 100644 index 000000000..729cec0f4 --- /dev/null +++ b/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php @@ -0,0 +1,103 @@ + + */ + +namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for International Womens Day in Mecklenburg–Western Pomerania, Germany. + */ +class InternationalWomensDayTest extends MecklenburgWesternPomeraniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'internationalWomensDay'; + + /** + * The year in which the holiday was established. + */ + public const ESTABLISHMENT_YEAR = 2023; + + /** + * Test the holiday defined in this test upon establishment. + * + * @throws \Exception + */ + public function testHolidayOnEstablishment(): void + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + self::ESTABLISHMENT_YEAR, + new \DateTime(self::ESTABLISHMENT_YEAR.'-03-08', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Test the holiday defined in this test before establishment. + * + * @throws \Exception + */ + public function testHolidayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Test the holiday defined in this test after completion. + * + * @throws \Exception + */ + public function testHolidayAfterCompletion(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900, self::ESTABLISHMENT_YEAR - 1)); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Internationaler Frauentag'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 7a3f7b160..b6445d3fe 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -102,6 +102,6 @@ public function testOtherHolidays(): void */ public function testSources(): void { - $this->assertSources(self::REGION, 2); + $this->assertSources(self::REGION, 3); } } From eaeb1d3287a02120a4612d6c0c256330be290633 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 15 Oct 2023 23:15:43 +0900 Subject: [PATCH 517/687] Update changelog with recent changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10224da74..71c7c2d42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ changes. ### Added +- For the German state of Mecklenburg-Western Pomerania, International Womens Day is considered to be officially + observed. [#322](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](Yannick Ihmels)) - Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day and Christmas Day, which we have reflected in our South Korea provider. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) @@ -33,7 +35,7 @@ changes. - Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and aren't true holidays in the context of Yasumi. Refer to this [discussion](https://github.com/azuyalabs/yasumi/discussions/321) - for further details and rationale. + for further details and rationale. [#322](https://github.com/azuyalabs/yasumi/pull/322) ## [2.6.0] - 2023-04-27 From cedccb60598c1977c6e400c3001c7b492e553c12 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 23 Oct 2023 00:29:38 +0900 Subject: [PATCH 518/687] Optimize the between filter class. Using a single return statement in the accept() method as it is more efficient than using two return statements, and it avoids the need to evaluate the expression in the second return statement if the first return statement is evaluated to true. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 2e25215b8..b6a6e50d9 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -63,10 +63,8 @@ public function accept(): bool { $holiday = $this->getInnerIterator()->current()->format(self::DATE_FORMAT); - if ($this->equal) { - return $holiday >= $this->startDate && $holiday <= $this->endDate; - } - - return $holiday > $this->startDate && $holiday < $this->endDate; + return $this->equal + ? $holiday >= $this->startDate && $holiday <= $this->endDate + : $holiday > $this->startDate && $holiday < $this->endDate; } } From 5f0faa1505d742cfa406b46c752e69cf8dab8830 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 30 Nov 2023 22:01:52 +0900 Subject: [PATCH 519/687] Bump package versions to latest working versions. Signed-off-by: Sacha Telgenhof --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 5aa7bd19a..ff5dc6d48 100644 --- a/composer.json +++ b/composer.json @@ -40,13 +40,13 @@ }, "require-dev": { "ext-intl": "*", - "friendsofphp/php-cs-fixer": "^2.19 || ^3.16", - "infection/infection": "^0.17 || ^0.26", + "friendsofphp/php-cs-fixer": "^2.19 || ^3.40", + "infection/infection": "^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^5.9" + "vimeo/psalm": "^5.16" }, "suggest": { "ext-calendar": "For calculating the date of Easter" From 8d67a7abe8fc6864f9e6f4027b577b3eba7a834f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 3 Dec 2023 12:11:56 +0000 Subject: [PATCH 520/687] Remove infection (#327) Remove infection package as it is unused. --- composer.json | 4 +--- infection.json | 17 ----------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 infection.json diff --git a/composer.json b/composer.json index ff5dc6d48..7ac912ba5 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "require-dev": { "ext-intl": "*", "friendsofphp/php-cs-fixer": "^2.19 || ^3.40", - "infection/infection": "^0.26", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", @@ -64,8 +63,7 @@ }, "config": { "allow-plugins": { - "composer/package-versions-deprecated": true, - "infection/extension-installer": true + "composer/package-versions-deprecated": true }, "sort-packages": true }, diff --git a/infection.json b/infection.json deleted file mode 100644 index 254270a99..000000000 --- a/infection.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "source": { - "directories": [ - "src\/Yasumi" - ] - }, - "timeout": 20, - "logs": { - "text": "var/infection.log", - "summary": "var/summary.log", - "debug": "var/debug.log", - "perMutator": "var/per-mutator.md" - }, - "mutators": { - "@default": true - } -} From 404b641062ed8ba1cc97c3a1153da2f6ac708a44 Mon Sep 17 00:00:00 2001 From: rChassat <62394317+rChassat@users.noreply.github.com> Date: Sun, 3 Dec 2023 13:15:42 +0100 Subject: [PATCH 521/687] Fixes : (#326) - Easter day calculation rounding for the lunar correction when not using calendar extension - Added some phpunit test that checks cases that were incorrect before --- src/Yasumi/Provider/ChristianHolidays.php | 2 +- tests/Belgium/EasterTest.php | 7 +++++++ tests/France/EasterMondayTest.php | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 5af2d1e9b..af7ed8dd2 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -358,7 +358,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf } $solar = (int) (($year - 1600) / 100) - (int) (($year - 1600) / 400); // The solar correction - $lunar = (int) (($year - 1400) / 100 * 8 / 25); // The lunar 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 } diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 2b28af1f8..dfe74c83e 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -41,6 +41,13 @@ public function testEaster(): void $year, new \DateTime("{$year}-4-4", new \DateTimeZone(self::TIMEZONE)) ); + $year = 2025; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-20", new \DateTimeZone(self::TIMEZONE)) + ); } /** diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 42498338d..bcca737d8 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -41,6 +41,13 @@ public function testEasterMonday(): void $year, new \DateTime("{$year}-3-28", new \DateTimeZone(self::TIMEZONE)) ); + $year = 2025; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-21", new \DateTimeZone(self::TIMEZONE)) + ); } /** From 3111af92b311cc15270f24b9e0dc2f7bf1a9b1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Sun, 3 Dec 2023 13:18:56 +0100 Subject: [PATCH 522/687] remove back tests (#323) --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index a66f62b68..0fd4e90d0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,4 @@ /CODE_OF_CONDUCT.md export-ignore /CONTRIBUTING.md export-ignore /phpunit.xml.dist export-ignore +/tests export-ignore From 0067415fbc22076d79c472860b3c6969b5831dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Sun, 3 Dec 2023 15:00:30 +0100 Subject: [PATCH 523/687] Test PHP 8.3 (#328) --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 52f2f24cb..b7c1dbc77 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '7.4', '8.0', '8.1', '8.2' ] + php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] steps: - name: Set git to use LF From 3b494320ad22993fbb786c58397ccede9cef00c4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 3 Dec 2023 23:22:28 +0900 Subject: [PATCH 524/687] Fix New Years Day tests of South Korea. The holiday 'twoDaysLaterNewYearsDay' has been removed from 1990, however the unit test for the name and holiday type allowed the possible testing range to include the year 1990. Signed-off-by: Sacha Telgenhof --- tests/SouthKorea/NewYearsDayTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index ec65ee9ba..a865e516c 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -122,7 +122,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, 'twoDaysLaterNewYearsDay', - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1990), + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1989), [self::LOCALE => '새해 연휴'] ); } @@ -149,7 +149,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, 'twoDaysLaterNewYearsDay', - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1990), + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1989), Holiday::TYPE_OFFICIAL ); } From 8b224c2054b6c2bc671664d74235ce726027d67b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 3 Dec 2023 23:51:16 +0900 Subject: [PATCH 525/687] Update changelog with all changes made since the last release. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c7c2d42..f99f45a0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,14 @@ changes. ### Added +- From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). + [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) - For the German state of Mecklenburg-Western Pomerania, International Womens Day is considered to be officially - observed. [#322](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](Yannick Ihmels)) + observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](Yannick Ihmels)) - Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day and Christmas Day, which we have reflected in our South Korea provider. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- Include PHP 8.3 in the unit test CI pipeline. [#328](https://github.com/azuyalabs/yasumi/pull/328) ([fezfez](https://github.com/fezfez)) ### Changed @@ -27,15 +30,21 @@ changes. ### Fixed -- Fixed a bug in the South Korea provider where some of the past dates for Buddha's Day, Chuseok, Armed Forces Day - and United Nations Day were incorrect during holidays, and modified the unit tests accordingly. - [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- In the South Korea provider some of the past dates for Buddha's Day, Chuseok, Armed Forces Day + and United Nations Day were incorrect during holidays. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- The holiday `twoDaysLaterNewYearsDay` has been removed from 1990, however the unit test for the name and holiday type + allowed the possible testing range to include the year 1990. +- The Easter Date calculation resulted in wrong values for the year 2025, due to an incorrect rounding for the lunar + correction when the calendar extension is not used. [#326](https://github.com/azuyalabs/yasumi/pull/326) ([rChassat](https://github.com/rChassat)) ### Removed +- Denmark will abolish Great Prayer Day ('store bededag') from 2024. [#308](https://github.com/azuyalabs/yasumi/pull/308) ([c960657](https://github.com/c960657)) - Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and aren't true holidays in the context of Yasumi. Refer to this [discussion](https://github.com/azuyalabs/yasumi/discussions/321) for further details and rationale. [#322](https://github.com/azuyalabs/yasumi/pull/322) +- The PHP [Infection](https://infection.github.io/) test package as it was hardly used. +- Unit tests from a Git export to reduce the export size. [#323](https://github.com/azuyalabs/yasumi/pull/323) ([fezfez](https://github.com/fezfez)) ## [2.6.0] - 2023-04-27 From 84fd5fb60b0a9b461e3b27e14d577b0e4209732d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 4 Dec 2023 00:00:37 +0900 Subject: [PATCH 526/687] Fix link to user profile. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f99f45a0a..ac744373a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ changes. - From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) - For the German state of Mecklenburg-Western Pomerania, International Womens Day is considered to be officially - observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](Yannick Ihmels)) + observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](https://github.com/ihmels)) - Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day and Christmas Day, which we have reflected in our South Korea provider. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) From 1c4ad1ab8a60524776bc570b690b4d0af76f944f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 4 Dec 2023 00:33:49 +0900 Subject: [PATCH 527/687] Drop PHP 7.4 support Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- .phan/config.php | 2 +- composer.json | 2 +- rector.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 185960083..79c0076b1 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '7.4', '8.0', '8.1', '8.2'] + php-versions: [ '8.0', '8.1', '8.2'] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 307b28344..3fa29fc84 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '7.4', '8.0', '8.1', '8.2' ] + php-versions: [ '8.0', '8.1', '8.2' ] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b7c1dbc77..ab81623a8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] + php-versions: [ '8.0', '8.1', '8.2', '8.3' ] steps: - name: Set git to use LF diff --git a/.phan/config.php b/.phan/config.php index 242a55d5c..665b102f6 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -51,7 +51,7 @@ // Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist. // (See `backward_compatibility_checks` for additional options) // Automatically inferred from composer.json requirement for "php" of "^7.4 || ^8.0" - 'target_php_version' => '7.4', + 'target_php_version' => '8.0', // If enabled, missing properties will be created when // they are first seen. If false, we'll report an diff --git a/composer.json b/composer.json index 7ac912ba5..8a8b9f061 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*" }, "require-dev": { diff --git a/rector.php b/rector.php index 45f0106d5..a75a58ab8 100644 --- a/rector.php +++ b/rector.php @@ -20,7 +20,7 @@ SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::EARLY_RETURN, - SetList::PHP_74, + SetList::PHP_80, SetList::TYPE_DECLARATION, ]); }; From c3de06df8090048a2d5eb5339d1051f72cabfd43 Mon Sep 17 00:00:00 2001 From: Luis Gonzalez Date: Mon, 4 Dec 2023 09:26:12 -0500 Subject: [PATCH 528/687] Mexico Provider (#329) Adding Mexico Provider --------- Co-authored-by: Luis Gonzalez --- src/Yasumi/Provider/Mexico.php | 269 +++++++++++++++++++ tests/Mexico/AllSaintsDayTest.php | 79 ++++++ tests/Mexico/AssumptionOfMaryTest.php | 79 ++++++ tests/Mexico/BenitoJuarezBirthdayTest.php | 59 ++++ tests/Mexico/ChristmasTest.php | 79 ++++++ tests/Mexico/EasterMondayTest.php | 70 +++++ tests/Mexico/EpiphanyTest.php | 79 ++++++ tests/Mexico/GoodFridayTest.php | 70 +++++ tests/Mexico/ImmaculateConceptionTest.php | 79 ++++++ tests/Mexico/IndependenceDayTest.php | 83 ++++++ tests/Mexico/InternationalWorkersDayTest.php | 79 ++++++ tests/Mexico/MexicoBaseTestCase.php | 37 +++ tests/Mexico/NewYearsDayTest.php | 66 +++++ tests/Mexico/VirginOfGuadalupeTest.php | 62 +++++ 14 files changed, 1190 insertions(+) create mode 100644 src/Yasumi/Provider/Mexico.php create mode 100644 tests/Mexico/AllSaintsDayTest.php create mode 100644 tests/Mexico/AssumptionOfMaryTest.php create mode 100644 tests/Mexico/BenitoJuarezBirthdayTest.php create mode 100644 tests/Mexico/ChristmasTest.php create mode 100644 tests/Mexico/EasterMondayTest.php create mode 100644 tests/Mexico/EpiphanyTest.php create mode 100644 tests/Mexico/GoodFridayTest.php create mode 100644 tests/Mexico/ImmaculateConceptionTest.php create mode 100644 tests/Mexico/IndependenceDayTest.php create mode 100644 tests/Mexico/InternationalWorkersDayTest.php create mode 100644 tests/Mexico/MexicoBaseTestCase.php create mode 100644 tests/Mexico/NewYearsDayTest.php create mode 100644 tests/Mexico/VirginOfGuadalupeTest.php diff --git a/src/Yasumi/Provider/Mexico.php b/src/Yasumi/Provider/Mexico.php new file mode 100644 index 000000000..c4f47a3cc --- /dev/null +++ b/src/Yasumi/Provider/Mexico.php @@ -0,0 +1,269 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Provider for all holidays in Mexico. + */ +class Mexico extends AbstractProvider +{ + use CommonHolidays; + use ChristianHolidays; + + public const PROCLAMATION_OF_INDEPENDENCE_YEAR = 1810; + + /** + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'MX'; + + /** + * Initialize holidays for Mexico. + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'America/Mexico_City'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); + + // Add Christian holidays + $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); + $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); + $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->immaculateConception($this->year, $this->timezone, $this->locale)); + + // Mexican holidays + $this->calculateConstitutionDay(); + $this->calculateBenitoJuarezBirthday(); + $this->calculateRevolutionDay(); + $this->calculateDiscoveryOfAmerica(); + $this->addIndependenceDay(); + $this->calculateDayOfTheDead(); + $this->calculateChristmasEve(); + $this->calculateNewYearsEve(); + $this->calculateVirginOfGuadalupe(); + } + + /** + * The source of the holidays. + * + * @return string[] The source URL + */ + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Mexico', + ]; + } + + /* + * Independence Day. + * + * Anniversary of the Declaration of Independence in 1810. + * + * @link https://en.wikipedia.org/wiki/Mexican_War_of_Independence + */ + private function addIndependenceDay(): void + { + if ($this->year >= 1810) { + $this->addHoliday(new Holiday( + 'independenceDay', + [ + 'en' => 'Independence Day', + 'es' => 'Día de la Independencia', + ], + new \DateTime("{$this->year}-09-16", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /* + * Constitution Day. + * + * Anniversary of the Constitution of 1917, originally February 5, observed on the first Monday of February. + */ + private function calculateConstitutionDay(): void + { + if ($this->year >= 1917) { + $this->addHoliday(new Holiday( + 'constitutionDay', + [ + 'en' => 'Constitution Day', + 'es' => 'Día de la Constitución', + ], + new \DateTime("first monday of february {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE) + ); + } + } + + /* + * Benito Juárez's birthday. + * + * Anniversary of the birth of Benito Juárez on March 21, 1806, observed on the third Monday of March. + */ + private function calculateBenitoJuarezBirthday(): void + { + if ($this->year >= 1806 && $this->year < 2010) { + $this->addHoliday(new Holiday( + 'benitoJuarezBirthday', + [ + 'en' => 'Benito Juárez’s birthday', + 'es' => 'Natalicio de Benito Juárez', + ], + new \DateTime("{$this->year}-03-21", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE) + ); + } + + if ($this->year >= 2010) { + $this->addHoliday(new Holiday( + 'benitoJuarezBirthday', + [ + 'en' => 'Benito Juárez’s birthday', + 'es' => 'Natalicio de Benito Juárez', + ], + new \DateTime("third monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE) + ); + } + } + + /* + * Revolution Day. + * + * Anniversary of the start of the Mexican Revolution on November 20, 1910, observed on the third Monday of November. + */ + private function calculateRevolutionDay(): void + { + if ($this->year >= 1910) { + $this->addHoliday(new Holiday( + 'revolutionDay', + [ + 'en' => 'Revolution Day', + 'es' => 'Día de la Revolución', + ], + new \DateTime("third monday of november {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE) + ); + } + } + + /* + * Discovery of America. + * + * Anniversary of the Discovery of America on October 12, 1492, observed on the second Monday of October. + */ + private function calculateDiscoveryOfAmerica(): void + { + if ($this->year >= 1492) { + $this->addHoliday(new Holiday( + 'discoveryOfAmerica', + [ + 'en' => 'Discovery of America', + 'es' => 'Día de la Raza', + ], + new \DateTime("second monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE) + ); + } + } + + /* + * Christmas Eve. + * + * Christmas Eve is the day before Christmas Day, which is annually on December 24, according to the Gregorian + * calendar. + */ + private function calculateChristmasEve(): void + { + $this->addHoliday(new Holiday( + 'christmasEve', + [ + 'en' => 'Christmas Eve', + 'es' => 'Nochebuena', + ], + new \DateTime("{$this->year}-12-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale) + ); + } + + /* + * New Year's Eve. + * + * New Year's Eve is the last day of the year, December 31, in the Gregorian calendar. + */ + private function calculateNewYearsEve(): void + { + $this->addHoliday(new Holiday( + 'newYearsEve', + [ + 'en' => 'New Year’s Eve', + 'es' => 'Nochevieja', + ], + new \DateTime("{$this->year}-12-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale) + ); + } + + /** + * Day of the Deaths. + * + * Day of the Deaths is a Mexican holiday celebrated throughout Mexico, in particular the Central and South regions, + * and by people of Mexican heritage elsewhere. + */ + private function calculateDayOfTheDead(): void + { + if ($this->year >= 1800) { + $this->addHoliday(new Holiday( + 'dayOfTheDeaths', + [ + 'en' => 'Day of the Deaths', + 'es' => 'Día de los Muertos', + ], + new \DateTime("{$this->year}-11-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER) + ); + } + } + + /* + * Virgin of Guadalupe. + * + * The Virgin of Guadalupe (Día de la Virgen de Guadalupe) is a celebration of the Virgin Mary, + * who is the patron saint of Mexico. It is observed on December 12th. + */ + private function calculateVirginOfGuadalupe(): void + { + if ($this->year >= 1531) { + $this->addHoliday(new Holiday( + 'virginOfGuadalupe', + ['es' => 'Día de la Virgen de Guadalupe'], + new \DateTime("{$this->year}-12-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } +} diff --git a/tests/Mexico/AllSaintsDayTest.php b/tests/Mexico/AllSaintsDayTest.php new file mode 100644 index 000000000..d15d15f28 --- /dev/null +++ b/tests/Mexico/AllSaintsDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing All Saints' Day in Mexico. + */ +class AllSaintsDayTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'allSaintsDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(11, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Día de todos los Santos'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/AssumptionOfMaryTest.php b/tests/Mexico/AssumptionOfMaryTest.php new file mode 100644 index 000000000..5f6e190bd --- /dev/null +++ b/tests/Mexico/AssumptionOfMaryTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing the day of the Assumption of Mary in Mexico. + */ +class AssumptionOfMaryTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(8, 15, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Asunción de la Virgen María'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/BenitoJuarezBirthdayTest.php b/tests/Mexico/BenitoJuarezBirthdayTest.php new file mode 100644 index 000000000..a2558c9e6 --- /dev/null +++ b/tests/Mexico/BenitoJuarezBirthdayTest.php @@ -0,0 +1,59 @@ +assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-21", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Natalicio de Benito Juárez'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Mexico/ChristmasTest.php b/tests/Mexico/ChristmasTest.php new file mode 100644 index 000000000..21ddedae4 --- /dev/null +++ b/tests/Mexico/ChristmasTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Christmas in Mexico. + */ +class ChristmasTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + 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 \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(12, 25, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Navidad'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/EasterMondayTest.php b/tests/Mexico/EasterMondayTest.php new file mode 100644 index 000000000..dd37cbb2b --- /dev/null +++ b/tests/Mexico/EasterMondayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Easter Monday in Mexico. + */ +class EasterMondayTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = 2216; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-8", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Lunes de Pascua'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Mexico/EpiphanyTest.php b/tests/Mexico/EpiphanyTest.php new file mode 100644 index 000000000..ca0915db9 --- /dev/null +++ b/tests/Mexico/EpiphanyTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Epiphany in Mexico. + */ +class EpiphanyTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'epiphany'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 6, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Día de Reyes'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/GoodFridayTest.php b/tests/Mexico/GoodFridayTest.php new file mode 100644 index 000000000..62ad7ef77 --- /dev/null +++ b/tests/Mexico/GoodFridayTest.php @@ -0,0 +1,70 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Good Friday in Mexico. + */ +class GoodFridayTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'goodFriday'; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = 2066; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-9", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Viernes Santo'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/ImmaculateConceptionTest.php b/tests/Mexico/ImmaculateConceptionTest.php new file mode 100644 index 000000000..71f2bae07 --- /dev/null +++ b/tests/Mexico/ImmaculateConceptionTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing the day of Immaculate Conception in Mexico. + */ +class ImmaculateConceptionTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'immaculateConception'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(12, 8, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Inmaculada Concepción'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/IndependenceDayTest.php b/tests/Mexico/IndependenceDayTest.php new file mode 100644 index 000000000..763398759 --- /dev/null +++ b/tests/Mexico/IndependenceDayTest.php @@ -0,0 +1,83 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Independence Day in Mexico. + */ +class IndependenceDayTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'independenceDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1810; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = self::ESTABLISHMENT_YEAR; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-09-16", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests that holiday is not present before establishment year. + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * Tests translated name of the holiday. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Día de la Independencia'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/InternationalWorkersDayTest.php b/tests/Mexico/InternationalWorkersDayTest.php new file mode 100644 index 000000000..b3f40141f --- /dev/null +++ b/tests/Mexico/InternationalWorkersDayTest.php @@ -0,0 +1,79 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for International Workers' Day (i.e. Labour Day) in Mexico. + */ +class InternationalWorkersDayTest extends MexicoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'internationalWorkersDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(5, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Día del Trabajador'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/MexicoBaseTestCase.php b/tests/Mexico/MexicoBaseTestCase.php new file mode 100644 index 000000000..5875f5057 --- /dev/null +++ b/tests/Mexico/MexicoBaseTestCase.php @@ -0,0 +1,37 @@ + + */ + +namespace Yasumi\tests\Mexico; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Class MexicoBaseTestCase. + */ +abstract class MexicoBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Country (name) to be tested. + */ + public const REGION = 'Mexico'; + + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'America/Mexico_City'; + + /** Locale that is considered common for this provider. */ + public const LOCALE = 'es'; +} diff --git a/tests/Mexico/NewYearsDayTest.php b/tests/Mexico/NewYearsDayTest.php new file mode 100644 index 000000000..402bd3dd5 --- /dev/null +++ b/tests/Mexico/NewYearsDayTest.php @@ -0,0 +1,66 @@ +assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public function NewYearsDayDataProvider(): array + { + return $this->generateRandomDates(1, 1, self::TIMEZONE); + } + + /** + * Tests translated name of New Years Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Año Nuevo'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Mexico/VirginOfGuadalupeTest.php b/tests/Mexico/VirginOfGuadalupeTest.php new file mode 100644 index 000000000..c8aa40089 --- /dev/null +++ b/tests/Mexico/VirginOfGuadalupeTest.php @@ -0,0 +1,62 @@ +assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-12-12", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Día de la Virgen de Guadalupe']); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} From 2d3ef2406c82bdadb7995bf25837f0086a71ac13 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Dec 2023 00:12:17 +0900 Subject: [PATCH 529/687] Update changelog noting new Mexico provider. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac744373a..267aba982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ changes. ### Added +- Mexico Provider [\#329](https://github.com/azuyalabs/yasumi/pull/329) ([Luis Gonzalez](https://github.com/gogl92)). - From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) - For the German state of Mecklenburg-Western Pomerania, International Womens Day is considered to be officially From 940385d3618fd5bf2300c085d14eb3eecb220e65 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Dec 2023 00:17:26 +0900 Subject: [PATCH 530/687] Add PHP 8.3 version to other GitHub action workflows. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 4 ++-- .github/workflows/static-analysis.yml | 4 ++-- .github/workflows/testing.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 79c0076b1..48ad3efde 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '8.0', '8.1', '8.2'] + operating-system: [ubuntu-latest, windows-latest] + php-versions: ["8.0", "8.1", "8.2", "8.3"] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 3fa29fc84..96b1f49e8 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '8.0', '8.1', '8.2' ] + operating-system: [ubuntu-latest, windows-latest] + php-versions: ["8.0", "8.1", "8.2", "8.3"] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ab81623a8..1cec88931 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ ubuntu-latest, windows-latest ] - php-versions: [ '8.0', '8.1', '8.2', '8.3' ] + operating-system: [ubuntu-latest, windows-latest] + php-versions: ["8.0", "8.1", "8.2", "8.3"] steps: - name: Set git to use LF From d8a136bb480be4b4ad2db29d0f80c217fd95c6ef Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Dec 2023 08:33:22 +0900 Subject: [PATCH 531/687] Fix formatting issues. Signed-off-by: Sacha Telgenhof --- CODE_OF_CONDUCT.md | 24 ++++++++++-------------- CONTRIBUTING.md | 6 +++--- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 2a00fc8e8..4572578fe 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -13,19 +13,19 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall community +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -102,11 +102,7 @@ For answers to common questions about this code of conduct, see the FAQ at at [https://www.contributor-covenant.org/translations][translations]. [homepage]: https://www.contributor-covenant.org - [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html - [Mozilla CoC]: https://github.com/mozilla/diversity - [FAQ]: https://www.contributor-covenant.org/faq - [translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49c1c9f31..e68e0bd46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ When contributing there are a few guidelines we'd like you to keep in mind: - **[PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** Please use the following command after you have completed your work: - ``` shell + ```shell composer format ``` @@ -39,12 +39,12 @@ When contributing there are a few guidelines we'd like you to keep in mind: ## Running Tests -``` shell +```shell composer test ``` Or, alternatively run with: -``` shell +```shell vendor/bin/phpunit ``` From 151a477a6687e0e0800730339967a1857221dffc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Dec 2023 08:50:54 +0900 Subject: [PATCH 532/687] Avoid silent exceptions by throwing a new one from the previous exception. Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugueseRepublicDayTest.php | 3 +++ tests/USA/VeteransDayTest.php | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 2784b0757..1f6aaf660 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -76,6 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } } catch (\Exception $e) { + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); } } @@ -91,6 +92,7 @@ public function testTranslation(): void ); } } catch (\Exception $e) { + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); } } @@ -106,6 +108,7 @@ public function testHolidayType(): void ); } } catch (\Exception $e) { + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); } } diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index 017dbedd7..26b0401d9 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -105,12 +105,13 @@ public function testVeteransDayNameBefore1954(): void { try { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); + + $holidays = Yasumi::create(self::REGION, $year); + $holiday = $holidays->getHoliday(self::HOLIDAY); + self::assertEquals('Armistice Day', $holiday->getName()); } catch (\Exception $e) { + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); } - - $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); - self::assertEquals('Armistice Day', $holiday->getName()); } /** @@ -122,12 +123,13 @@ public function testVeteransDayNameAfter1954(): void { try { $year = $this->generateRandomYear(1954); + + $holidays = Yasumi::create(self::REGION, $year); + $holiday = $holidays->getHoliday(self::HOLIDAY); + self::assertEquals('Veterans Day', $holiday->getName()); } catch (\Exception $e) { + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); } - - $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); - self::assertEquals('Veterans Day', $holiday->getName()); } /** From 34995155414cf7acfb17c9249faa8660cc08b5cf Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 5 Dec 2023 21:54:08 +0900 Subject: [PATCH 533/687] Promote some properties to the constructor. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 6 +----- src/Yasumi/Holiday.php | 16 +++------------- src/Yasumi/Provider/AbstractProvider.php | 6 +----- src/Yasumi/Translations.php | 7 +------ 4 files changed, 6 insertions(+), 29 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index b6a6e50d9..1b36ce2d7 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -35,9 +35,6 @@ class BetweenFilter extends AbstractFilter /** end date of the time frame to check against */ private string $endDate; - /** indicates whether the start and end dates should be included in the comparison */ - private bool $equal; - /** * Construct the Between FilterIterator Object. * @@ -51,10 +48,9 @@ public function __construct( \Iterator $iterator, \DateTimeInterface $startDate, \DateTimeInterface $endDate, - bool $equal = true + private bool $equal = true ) { parent::__construct($iterator); - $this->equal = $equal; $this->startDate = $startDate->format(self::DATE_FORMAT); $this->endDate = $endDate->format(self::DATE_FORMAT); } diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 85367168e..bbc758e2b 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -64,14 +64,6 @@ class Holiday extends \DateTime implements \JsonSerializable */ public string $shortName; - /** - * @var array list of translations of this holiday - */ - public array $translations; - - /** identifies the type of holiday */ - protected string $type; - /** locale (i.e. language) in which the holiday information needs to be displayed in. (Default 'en_US') */ protected string $displayLocale; @@ -87,7 +79,7 @@ class Holiday extends \DateTime implements \JsonSerializable * (DateTimeInterface) has the correct timezone set. Otherwise, the default system timezone is used. * * @param string $key Holiday key - * @param array $names An array containing the name/description of this holiday in various + * @param array $translations 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 @@ -102,10 +94,10 @@ class Holiday extends \DateTime implements \JsonSerializable */ public function __construct( string $key, - array $names, + public array $translations, \DateTimeInterface $date, string $displayLocale = self::DEFAULT_LOCALE, - string $type = self::TYPE_OFFICIAL + protected string $type = self::TYPE_OFFICIAL ) { // Validate if key is not empty if ('' === $key) { @@ -124,9 +116,7 @@ public function __construct( // Set additional attributes $this->shortName = $key; - $this->translations = $names; $this->displayLocale = $displayLocale; - $this->type = $type; // Construct instance parent::__construct($date->format('Y-m-d'), $date->getTimezone()); diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index f5f5ed933..9f2fbfc54 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -83,9 +83,6 @@ abstract class AbstractProvider implements \Countable, ProviderInterface, \Itera */ private array $holidays = []; - /** global translations */ - private ?TranslationsInterface $globalTranslations; - /** * Creates a new holiday provider (i.e. country/state). * @@ -97,13 +94,12 @@ abstract class AbstractProvider implements \Countable, ProviderInterface, \Itera public function __construct( int $year, ?string $locale = null, - ?TranslationsInterface $globalTranslations = null + private ?TranslationsInterface $globalTranslations = null ) { $this->clearHolidays(); $this->year = $year ?: (int) date('Y'); $this->locale = $locale ?? 'en_US'; - $this->globalTranslations = $globalTranslations; $this->initialize(); } diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index a08ad84a2..edad64e4b 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -24,17 +24,12 @@ class Translations implements TranslationsInterface */ public array $translations = []; - /** - * @var array list of all defined locales - */ - private array $availableLocales; - /** * Constructor. * * @param array $availableLocales list of all defined locales */ - public function __construct(array $availableLocales) + public function __construct(private array $availableLocales) { $this->availableLocales = $availableLocales; } From e46b9d302971ec70c806ffd6e69a25f63f783c32 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 6 Dec 2023 08:22:06 +0900 Subject: [PATCH 534/687] Simplify function by using class constant and removing intermediate variable. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 9f2fbfc54..7095e8b29 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -309,11 +309,8 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa */ private function anotherTime(int $year, string $key): ?Holiday { - $this->isHolidayKeyNotEmpty($key); // Validate if key is not empty - - // Get calling class name - $hReflectionClass = new \ReflectionClass(\get_class($this)); + $this->isHolidayKeyNotEmpty($key); - return Yasumi::create($hReflectionClass->getName(), $year, $this->locale)->getHoliday($key); + return Yasumi::create(static::class, $year, $this->locale)->getHoliday($key); } } From ae7ac4602bea6a33399210dd3594741f41af934c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 6 Dec 2023 23:09:50 +0900 Subject: [PATCH 535/687] Ensure empty line exists after declare statement. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Exception/Exception.php | 1 + src/Yasumi/Exception/MissingTranslationException.php | 1 + src/Yasumi/Exception/ProviderNotFoundException.php | 1 + src/Yasumi/Exception/UnknownLocaleException.php | 1 + src/Yasumi/Filters/BankHolidaysFilter.php | 1 + src/Yasumi/Filters/ObservedHolidaysFilter.php | 1 + src/Yasumi/Filters/OfficialHolidaysFilter.php | 1 + src/Yasumi/Filters/OtherHolidaysFilter.php | 1 + src/Yasumi/Filters/SeasonalHolidaysFilter.php | 1 + src/Yasumi/Provider/AbstractProvider.php | 1 + src/Yasumi/Provider/Australia.php | 1 + src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php | 1 + src/Yasumi/Provider/Australia/NewSouthWales.php | 1 + src/Yasumi/Provider/Australia/NorthernTerritory.php | 1 + src/Yasumi/Provider/Australia/Queensland.php | 1 + src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 1 + src/Yasumi/Provider/Australia/SouthAustralia.php | 1 + src/Yasumi/Provider/Australia/Tasmania.php | 1 + src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php | 1 + src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php | 1 + src/Yasumi/Provider/Australia/Tasmania/KingIsland.php | 1 + src/Yasumi/Provider/Australia/Tasmania/Northeast.php | 1 + src/Yasumi/Provider/Australia/Tasmania/Northwest.php | 1 + .../Provider/Australia/Tasmania/Northwest/CircularHead.php | 1 + src/Yasumi/Provider/Australia/Tasmania/South.php | 1 + src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php | 1 + src/Yasumi/Provider/Australia/Victoria.php | 1 + src/Yasumi/Provider/Australia/WesternAustralia.php | 1 + src/Yasumi/Provider/Austria/Burgenland.php | 1 + src/Yasumi/Provider/Austria/Carinthia.php | 1 + src/Yasumi/Provider/Austria/LowerAustria.php | 1 + src/Yasumi/Provider/Austria/Salzburg.php | 1 + src/Yasumi/Provider/Austria/Styria.php | 1 + src/Yasumi/Provider/Austria/Tyrol.php | 1 + src/Yasumi/Provider/Austria/UpperAustria.php | 1 + src/Yasumi/Provider/Austria/Vienna.php | 1 + src/Yasumi/Provider/Austria/Vorarlberg.php | 1 + src/Yasumi/Provider/Belgium.php | 1 + src/Yasumi/Provider/Bosnia.php | 1 + src/Yasumi/Provider/Brazil.php | 1 + src/Yasumi/Provider/Canada/Alberta.php | 1 + src/Yasumi/Provider/Canada/BritishColumbia.php | 1 + src/Yasumi/Provider/Canada/Manitoba.php | 1 + src/Yasumi/Provider/Canada/NewBrunswick.php | 1 + src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php | 1 + src/Yasumi/Provider/Canada/NorthwestTerritories.php | 1 + src/Yasumi/Provider/Canada/NovaScotia.php | 1 + src/Yasumi/Provider/Canada/Nunavut.php | 1 + src/Yasumi/Provider/Canada/Ontario.php | 1 + src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 1 + src/Yasumi/Provider/Canada/Quebec.php | 1 + src/Yasumi/Provider/Canada/Saskatchewan.php | 1 + src/Yasumi/Provider/Canada/Yukon.php | 1 + src/Yasumi/Provider/ChristianHolidays.php | 1 + src/Yasumi/Provider/CommonHolidays.php | 1 + src/Yasumi/Provider/Croatia.php | 1 + src/Yasumi/Provider/CzechRepublic.php | 1 + src/Yasumi/Provider/DateTimeZoneFactory.php | 1 + src/Yasumi/Provider/Finland.php | 1 + src/Yasumi/Provider/France.php | 1 + src/Yasumi/Provider/France/BasRhin.php | 1 + src/Yasumi/Provider/France/HautRhin.php | 1 + src/Yasumi/Provider/France/Moselle.php | 1 + src/Yasumi/Provider/Georgia.php | 1 + src/Yasumi/Provider/Germany/BadenWurttemberg.php | 1 + src/Yasumi/Provider/Germany/Bavaria.php | 1 + src/Yasumi/Provider/Greece.php | 1 + src/Yasumi/Provider/Hungary.php | 1 + src/Yasumi/Provider/Italy.php | 1 + src/Yasumi/Provider/Netherlands.php | 1 + src/Yasumi/Provider/NewZealand.php | 1 + src/Yasumi/Provider/Norway.php | 1 + src/Yasumi/Provider/Poland.php | 1 + src/Yasumi/Provider/Portugal.php | 1 + src/Yasumi/Provider/Romania.php | 1 + src/Yasumi/Provider/Russia.php | 1 + src/Yasumi/Provider/Spain.php | 1 + src/Yasumi/Provider/Sweden.php | 1 + src/Yasumi/Provider/Switzerland.php | 1 + src/Yasumi/Provider/Turkey.php | 1 + src/Yasumi/Provider/USA.php | 1 + src/Yasumi/Provider/UnitedKingdom.php | 1 + src/Yasumi/ProviderInterface.php | 1 + src/Yasumi/TranslationsInterface.php | 1 + src/Yasumi/Yasumi.php | 1 + 85 files changed, 85 insertions(+) diff --git a/src/Yasumi/Exception/Exception.php b/src/Yasumi/Exception/Exception.php index 60b3c769c..0323da1bf 100644 --- a/src/Yasumi/Exception/Exception.php +++ b/src/Yasumi/Exception/Exception.php @@ -1,6 +1,7 @@ Date: Sat, 30 Dec 2023 12:58:56 +0100 Subject: [PATCH 536/687] style: Fix code style issues. Signed-off-by: Sacha Telgenhof --- examples/custom_provider.php | 2 +- src/Yasumi/Exception/Exception.php | 4 +++- src/Yasumi/Exception/InvalidYearException.php | 4 +++- src/Yasumi/Exception/ProviderNotFoundException.php | 4 +++- src/Yasumi/Exception/UnknownLocaleException.php | 4 +++- tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php | 4 +++- .../Australia/AustralianCapitalTerritory/AustraliaDayTest.php | 4 +++- tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php | 4 +++- .../Australia/AustralianCapitalTerritory/ChristmasDayTest.php | 4 +++- .../Australia/AustralianCapitalTerritory/EasterMondayTest.php | 4 +++- tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php | 4 +++- .../AustralianCapitalTerritory/NationalDayOfMourningTest.php | 4 +++- .../Australia/AustralianCapitalTerritory/NewYearsDayTest.php | 4 +++- tests/Australia/NewSouthWales/AnzacDayTest.php | 4 +++- tests/Australia/NewSouthWales/AustraliaDayTest.php | 4 +++- tests/Australia/NewSouthWales/BoxingDayTest.php | 4 +++- tests/Australia/NewSouthWales/ChristmasDayTest.php | 4 +++- tests/Australia/NewSouthWales/EasterMondayTest.php | 4 +++- tests/Australia/NewSouthWales/GoodFridayTest.php | 4 +++- tests/Australia/NewSouthWales/NationalDayOfMourningTest.php | 4 +++- tests/Australia/NewSouthWales/NewYearsDayTest.php | 4 +++- tests/Australia/NorthernTerritory/AnzacDayTest.php | 4 +++- tests/Australia/NorthernTerritory/AustraliaDayTest.php | 4 +++- tests/Australia/NorthernTerritory/BoxingDayTest.php | 4 +++- tests/Australia/NorthernTerritory/ChristmasDayTest.php | 4 +++- tests/Australia/NorthernTerritory/EasterMondayTest.php | 4 +++- tests/Australia/NorthernTerritory/GoodFridayTest.php | 4 +++- .../Australia/NorthernTerritory/NationalDayOfMourningTest.php | 4 +++- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 4 +++- tests/Australia/Queensland/AnzacDayTest.php | 4 +++- tests/Australia/Queensland/AustraliaDayTest.php | 4 +++- tests/Australia/Queensland/BoxingDayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/AnzacDayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/AustraliaDayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/BoxingDayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/ChristmasDayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/EasterMondayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/GoodFridayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/LabourDayTest.php | 4 +++- .../Queensland/Brisbane/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Queensland/Brisbane/NewYearsDayTest.php | 4 +++- tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php | 4 +++- tests/Australia/Queensland/ChristmasDayTest.php | 4 +++- tests/Australia/Queensland/EasterMondayTest.php | 4 +++- tests/Australia/Queensland/GoodFridayTest.php | 4 +++- tests/Australia/Queensland/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Queensland/NewYearsDayTest.php | 4 +++- tests/Australia/SouthAustralia/AnzacDayTest.php | 4 +++- tests/Australia/SouthAustralia/AustraliaDayTest.php | 4 +++- tests/Australia/SouthAustralia/EasterMondayTest.php | 4 +++- tests/Australia/SouthAustralia/GoodFridayTest.php | 4 +++- tests/Australia/SouthAustralia/NationalDayOfMourningTest.php | 4 +++- tests/Australia/SouthAustralia/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php | 4 +++- .../Tasmania/CentralNorth/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php | 4 +++- tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php | 4 +++- .../Tasmania/FlindersIsland/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php | 4 +++- .../Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php | 4 +++- tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/GoodFridayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/GoodFridayTest.php | 4 +++- .../Tasmania/KingIsland/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php | 4 +++- tests/Australia/Tasmania/KingIsland/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/GoodFridayTest.php | 4 +++- .../Tasmania/Northeast/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php | 4 +++- tests/Australia/Tasmania/Northeast/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/ChristmasDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/AnzacDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/AustraliaDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/BoxingDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/BurnieShowTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/ChristmasDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/EasterMondayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/EightHourDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/GoodFridayTest.php | 4 +++- .../Northwest/CircularHead/NationalDayOfMourningTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/NewYearsDayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/QueensBirthdayTest.php | 4 +++- .../Tasmania/Northwest/CircularHead/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/GoodFridayTest.php | 4 +++- .../Tasmania/Northwest/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/Northwest/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php | 4 +++- tests/Australia/Tasmania/Northwest/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/South/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/South/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/South/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/South/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/South/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/South/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/South/GoodFridayTest.php | 4 +++- tests/Australia/Tasmania/South/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/South/NewYearsDayTest.php | 4 +++- tests/Australia/Tasmania/South/QueensBirthdayTest.php | 4 +++- tests/Australia/Tasmania/South/RecreationDayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/HobartShowTest.php | 4 +++- .../Tasmania/South/Southeast/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php | 4 +++- .../Australia/Tasmania/South/Southeast/QueensBirthdayTest.php | 4 +++- tests/Australia/Victoria/AnzacDayTest.php | 4 +++- tests/Australia/Victoria/AustraliaDayTest.php | 4 +++- tests/Australia/Victoria/BoxingDayTest.php | 4 +++- tests/Australia/Victoria/ChristmasDayTest.php | 4 +++- tests/Australia/Victoria/EasterMondayTest.php | 4 +++- tests/Australia/Victoria/GoodFridayTest.php | 4 +++- tests/Australia/Victoria/NationalDayOfMourningTest.php | 4 +++- tests/Australia/Victoria/NewYearsDayTest.php | 4 +++- tests/Australia/WesternAustralia/AnzacDayTest.php | 4 +++- tests/Australia/WesternAustralia/AustraliaDayTest.php | 4 +++- tests/Australia/WesternAustralia/BoxingDayTest.php | 4 +++- tests/Australia/WesternAustralia/ChristmasDayTest.php | 4 +++- tests/Australia/WesternAustralia/EasterMondayTest.php | 4 +++- tests/Australia/WesternAustralia/GoodFridayTest.php | 4 +++- .../Australia/WesternAustralia/NationalDayOfMourningTest.php | 4 +++- tests/Australia/WesternAustralia/NewYearsDayTest.php | 4 +++- tests/Germany/BadenWurttemberg/GermanUnityDayTest.php | 4 +++- tests/Germany/BadenWurttemberg/ReformationDay2017Test.php | 4 +++- tests/Germany/Bavaria/GermanUnityDayTest.php | 4 +++- tests/Germany/Bavaria/ReformationDay2017Test.php | 4 +++- tests/Germany/Berlin/GermanUnityDayTest.php | 4 +++- tests/Germany/Berlin/ReformationDay2017Test.php | 4 +++- tests/Germany/Brandenburg/GermanUnityDayTest.php | 4 +++- tests/Germany/Bremen/GermanUnityDayTest.php | 4 +++- tests/Germany/Bremen/ReformationDay2017Test.php | 4 +++- tests/Germany/Hamburg/GermanUnityDay.php | 4 +++- tests/Germany/Hamburg/ReformationDay2017Test.php | 4 +++- tests/Germany/Hesse/GermanUnityDayTest.php | 4 +++- tests/Germany/Hesse/ReformationDay2017Test.php | 4 +++- tests/Germany/LowerSaxony/GermanUnityDayTest.php | 4 +++- tests/Germany/LowerSaxony/ReformationDay2017Test.php | 4 +++- .../MecklenburgWesternPomerania/GermanUnityDayTest.php | 4 +++- tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php | 4 +++- tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php | 4 +++- tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php | 4 +++- tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php | 4 +++- tests/Germany/Saarland/GermanUnityDayTest.php | 4 +++- tests/Germany/Saarland/ReformationDay2017Test.php | 4 +++- tests/Germany/Saxony/GermanUnityDayTest.php | 4 +++- tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php | 4 +++- tests/Germany/SchleswigHolstein/GermanUnityDayTest.php | 4 +++- tests/Germany/SchleswigHolstein/ReformationDay2017Test.php | 4 +++- tests/Germany/Thuringia/GermanUnityDayTest.php | 4 +++- 193 files changed, 577 insertions(+), 193 deletions(-) diff --git a/examples/custom_provider.php b/examples/custom_provider.php index 907b58698..56be8dacb 100644 --- a/examples/custom_provider.php +++ b/examples/custom_provider.php @@ -14,7 +14,7 @@ class NYSE extends \Yasumi\Provider\USA /** * Initialize holidays for the NYSE. * - * @throws \Exception + * @throws Exception */ public function initialize(): void { diff --git a/src/Yasumi/Exception/Exception.php b/src/Yasumi/Exception/Exception.php index 0323da1bf..6044bec09 100644 --- a/src/Yasumi/Exception/Exception.php +++ b/src/Yasumi/Exception/Exception.php @@ -18,4 +18,6 @@ /** * Interface Exception. */ -interface Exception {} +interface Exception +{ +} diff --git a/src/Yasumi/Exception/InvalidYearException.php b/src/Yasumi/Exception/InvalidYearException.php index 03f30027f..311576f03 100644 --- a/src/Yasumi/Exception/InvalidYearException.php +++ b/src/Yasumi/Exception/InvalidYearException.php @@ -20,4 +20,6 @@ * * @author Quentin Neyrat */ -class InvalidYearException extends \InvalidArgumentException implements Exception {} +class InvalidYearException extends \InvalidArgumentException implements Exception +{ +} diff --git a/src/Yasumi/Exception/ProviderNotFoundException.php b/src/Yasumi/Exception/ProviderNotFoundException.php index 7d9ddff50..d147bd076 100644 --- a/src/Yasumi/Exception/ProviderNotFoundException.php +++ b/src/Yasumi/Exception/ProviderNotFoundException.php @@ -20,4 +20,6 @@ * * @author Quentin Neyrat */ -class ProviderNotFoundException extends \InvalidArgumentException implements Exception {} +class ProviderNotFoundException extends \InvalidArgumentException implements Exception +{ +} diff --git a/src/Yasumi/Exception/UnknownLocaleException.php b/src/Yasumi/Exception/UnknownLocaleException.php index 088ea73b1..184c3eed9 100644 --- a/src/Yasumi/Exception/UnknownLocaleException.php +++ b/src/Yasumi/Exception/UnknownLocaleException.php @@ -18,4 +18,6 @@ /** * Class UnknownLocaleException. */ -class UnknownLocaleException extends \InvalidArgumentException implements Exception {} +class UnknownLocaleException extends \InvalidArgumentException implements Exception +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php index a23d4af52..abca7984e 100644 --- a/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Australian Capital Territory (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php index f715b80bb..5a4a07e39 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Australian Capital Territory (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php index 10f61d806..2a22717d7 100644 --- a/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Australian Capital Territory (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php index de46ed897..6d848d71c 100644 --- a/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Australian Capital Territory (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php index fbb897d6b..f97c1c168 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Australian Capital Territory (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php index 9828e9ebb..9ae17b093 100644 --- a/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Australian Capital Territory (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php b/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php index 89fd01284..f1d186efd 100644 --- a/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php +++ b/tests/Australia/AustralianCapitalTerritory/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Australian Capital Territory (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php index e285e138c..aa741f372 100644 --- a/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Australian Capital Territory (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/NewSouthWales/AnzacDayTest.php b/tests/Australia/NewSouthWales/AnzacDayTest.php index 6dbaf526f..f8dfa1365 100644 --- a/tests/Australia/NewSouthWales/AnzacDayTest.php +++ b/tests/Australia/NewSouthWales/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in New South Wales (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/NewSouthWales/AustraliaDayTest.php b/tests/Australia/NewSouthWales/AustraliaDayTest.php index 30ccc8f76..200ccfbd9 100644 --- a/tests/Australia/NewSouthWales/AustraliaDayTest.php +++ b/tests/Australia/NewSouthWales/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in New South Wales (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/NewSouthWales/BoxingDayTest.php b/tests/Australia/NewSouthWales/BoxingDayTest.php index 663e188a5..1a29cc1c8 100644 --- a/tests/Australia/NewSouthWales/BoxingDayTest.php +++ b/tests/Australia/NewSouthWales/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in New South Wales (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/NewSouthWales/ChristmasDayTest.php b/tests/Australia/NewSouthWales/ChristmasDayTest.php index ba1d53fb1..5ec492625 100644 --- a/tests/Australia/NewSouthWales/ChristmasDayTest.php +++ b/tests/Australia/NewSouthWales/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in New South Wales (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/NewSouthWales/EasterMondayTest.php b/tests/Australia/NewSouthWales/EasterMondayTest.php index bd17ad69e..553c2bdf3 100644 --- a/tests/Australia/NewSouthWales/EasterMondayTest.php +++ b/tests/Australia/NewSouthWales/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in New South Wales (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/NewSouthWales/GoodFridayTest.php b/tests/Australia/NewSouthWales/GoodFridayTest.php index 763d51ebb..4d7e7e33a 100644 --- a/tests/Australia/NewSouthWales/GoodFridayTest.php +++ b/tests/Australia/NewSouthWales/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in New South Wales (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php b/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php index d632e9ba0..8de51bfcf 100644 --- a/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php +++ b/tests/Australia/NewSouthWales/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in New South Wales (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/NewSouthWales/NewYearsDayTest.php b/tests/Australia/NewSouthWales/NewYearsDayTest.php index 33a4e9cb1..d46414d06 100644 --- a/tests/Australia/NewSouthWales/NewYearsDayTest.php +++ b/tests/Australia/NewSouthWales/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in New South Wales (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/AnzacDayTest.php b/tests/Australia/NorthernTerritory/AnzacDayTest.php index 43c0da63c..929843950 100644 --- a/tests/Australia/NorthernTerritory/AnzacDayTest.php +++ b/tests/Australia/NorthernTerritory/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Northern Territory (Australia). */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/AustraliaDayTest.php b/tests/Australia/NorthernTerritory/AustraliaDayTest.php index 36ab830e4..fab4f19a3 100644 --- a/tests/Australia/NorthernTerritory/AustraliaDayTest.php +++ b/tests/Australia/NorthernTerritory/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Northern Territory (Australia). */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/BoxingDayTest.php b/tests/Australia/NorthernTerritory/BoxingDayTest.php index cd639b9d4..ba823fa1f 100644 --- a/tests/Australia/NorthernTerritory/BoxingDayTest.php +++ b/tests/Australia/NorthernTerritory/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Northern Territory (Australia). */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/ChristmasDayTest.php b/tests/Australia/NorthernTerritory/ChristmasDayTest.php index d92734abb..6e7aa8b89 100644 --- a/tests/Australia/NorthernTerritory/ChristmasDayTest.php +++ b/tests/Australia/NorthernTerritory/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Northern Territory (Australia). */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/EasterMondayTest.php b/tests/Australia/NorthernTerritory/EasterMondayTest.php index 2bd3b6efc..48185b919 100644 --- a/tests/Australia/NorthernTerritory/EasterMondayTest.php +++ b/tests/Australia/NorthernTerritory/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Northern Territory (Australia). */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/GoodFridayTest.php b/tests/Australia/NorthernTerritory/GoodFridayTest.php index 5f57c4496..bb6250b20 100644 --- a/tests/Australia/NorthernTerritory/GoodFridayTest.php +++ b/tests/Australia/NorthernTerritory/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Northern Territory (Australia). */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php b/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php index 388737408..6e2f3fb5e 100644 --- a/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php +++ b/tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Northern Territory (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/NorthernTerritory/NewYearsDayTest.php b/tests/Australia/NorthernTerritory/NewYearsDayTest.php index f497f4028..f57d98c9d 100644 --- a/tests/Australia/NorthernTerritory/NewYearsDayTest.php +++ b/tests/Australia/NorthernTerritory/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Northern Territory (Australia). */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/Queensland/AnzacDayTest.php b/tests/Australia/Queensland/AnzacDayTest.php index d1a8f1b08..8bec56d16 100644 --- a/tests/Australia/Queensland/AnzacDayTest.php +++ b/tests/Australia/Queensland/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Queensland (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/Queensland/AustraliaDayTest.php b/tests/Australia/Queensland/AustraliaDayTest.php index 473fc5937..e61d6909a 100644 --- a/tests/Australia/Queensland/AustraliaDayTest.php +++ b/tests/Australia/Queensland/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Queensland (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/Queensland/BoxingDayTest.php b/tests/Australia/Queensland/BoxingDayTest.php index 922c6300f..021840caf 100644 --- a/tests/Australia/Queensland/BoxingDayTest.php +++ b/tests/Australia/Queensland/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Queensland (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/AnzacDayTest.php b/tests/Australia/Queensland/Brisbane/AnzacDayTest.php index 81a72cb57..c872c384d 100644 --- a/tests/Australia/Queensland/Brisbane/AnzacDayTest.php +++ b/tests/Australia/Queensland/Brisbane/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Brisbane (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Queensland\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Queensland\AnzacDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php b/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php index 34e53a2da..90eef3a3d 100644 --- a/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php +++ b/tests/Australia/Queensland/Brisbane/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Brisbane (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Queensland\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Queensland\AustraliaDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/BoxingDayTest.php b/tests/Australia/Queensland/Brisbane/BoxingDayTest.php index be580e433..a6559a828 100644 --- a/tests/Australia/Queensland/Brisbane/BoxingDayTest.php +++ b/tests/Australia/Queensland/Brisbane/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Brisbane (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Queensland\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Queensland\BoxingDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php b/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php index 0cc9006f3..52db481fe 100644 --- a/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php +++ b/tests/Australia/Queensland/Brisbane/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Brisbane (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Queensland\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Queensland\ChristmasDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/EasterMondayTest.php b/tests/Australia/Queensland/Brisbane/EasterMondayTest.php index bc7981aef..b1fefca8f 100644 --- a/tests/Australia/Queensland/Brisbane/EasterMondayTest.php +++ b/tests/Australia/Queensland/Brisbane/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Brisbane (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Queensland\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Queensland\EasterMondayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/GoodFridayTest.php b/tests/Australia/Queensland/Brisbane/GoodFridayTest.php index 999f67387..4e4381937 100644 --- a/tests/Australia/Queensland/Brisbane/GoodFridayTest.php +++ b/tests/Australia/Queensland/Brisbane/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Brisbane (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Queensland\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Queensland\GoodFridayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/LabourDayTest.php b/tests/Australia/Queensland/Brisbane/LabourDayTest.php index 1c291c162..94f9558b1 100644 --- a/tests/Australia/Queensland/Brisbane/LabourDayTest.php +++ b/tests/Australia/Queensland/Brisbane/LabourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Labour Day in Brisbane (Australia).. */ -class LabourDayTest extends \Yasumi\tests\Australia\Queensland\LabourDayTest {} +class LabourDayTest extends \Yasumi\tests\Australia\Queensland\LabourDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php b/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php index f591c8f6f..609bc2789 100644 --- a/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php +++ b/tests/Australia/Queensland/Brisbane/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Brisbane (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Queensland\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Queensland\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php b/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php index 5ace3411f..334598f83 100644 --- a/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php +++ b/tests/Australia/Queensland/Brisbane/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Brisbane (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Queensland\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Queensland\NewYearsDayTest +{ +} diff --git a/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php b/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php index 9bf73dec1..bad0a6fff 100644 --- a/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/Brisbane/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in Brisbane (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Queensland\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Queensland\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Queensland/ChristmasDayTest.php b/tests/Australia/Queensland/ChristmasDayTest.php index 40bea0973..7e7ce4b7d 100644 --- a/tests/Australia/Queensland/ChristmasDayTest.php +++ b/tests/Australia/Queensland/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Queensland (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/Queensland/EasterMondayTest.php b/tests/Australia/Queensland/EasterMondayTest.php index dbeb80183..ebec7e644 100644 --- a/tests/Australia/Queensland/EasterMondayTest.php +++ b/tests/Australia/Queensland/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Queensland (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/Queensland/GoodFridayTest.php b/tests/Australia/Queensland/GoodFridayTest.php index 7893182fc..57babc079 100644 --- a/tests/Australia/Queensland/GoodFridayTest.php +++ b/tests/Australia/Queensland/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Queensland (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/Queensland/NationalDayOfMourningTest.php b/tests/Australia/Queensland/NationalDayOfMourningTest.php index 6f5e23647..30fb89db5 100644 --- a/tests/Australia/Queensland/NationalDayOfMourningTest.php +++ b/tests/Australia/Queensland/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Queensland (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Queensland/NewYearsDayTest.php b/tests/Australia/Queensland/NewYearsDayTest.php index bb9261d2d..b4486522f 100644 --- a/tests/Australia/Queensland/NewYearsDayTest.php +++ b/tests/Australia/Queensland/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Queensland (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/SouthAustralia/AnzacDayTest.php b/tests/Australia/SouthAustralia/AnzacDayTest.php index 946ba09eb..1c0fd214d 100644 --- a/tests/Australia/SouthAustralia/AnzacDayTest.php +++ b/tests/Australia/SouthAustralia/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in South Australia (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/SouthAustralia/AustraliaDayTest.php b/tests/Australia/SouthAustralia/AustraliaDayTest.php index e69bf6115..81480cabd 100644 --- a/tests/Australia/SouthAustralia/AustraliaDayTest.php +++ b/tests/Australia/SouthAustralia/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in South Australia (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/SouthAustralia/EasterMondayTest.php b/tests/Australia/SouthAustralia/EasterMondayTest.php index ad336d6df..50430f021 100644 --- a/tests/Australia/SouthAustralia/EasterMondayTest.php +++ b/tests/Australia/SouthAustralia/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in South Australia (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/SouthAustralia/GoodFridayTest.php b/tests/Australia/SouthAustralia/GoodFridayTest.php index 20ca9a09a..bdc5e2d54 100644 --- a/tests/Australia/SouthAustralia/GoodFridayTest.php +++ b/tests/Australia/SouthAustralia/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in South Australia (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php b/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php index cd89b065f..3c84904b4 100644 --- a/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php +++ b/tests/Australia/SouthAustralia/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in South Australia (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/SouthAustralia/NewYearsDayTest.php b/tests/Australia/SouthAustralia/NewYearsDayTest.php index 632144f51..6e06d443b 100644 --- a/tests/Australia/SouthAustralia/NewYearsDayTest.php +++ b/tests/Australia/SouthAustralia/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in South Australia (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/AnzacDayTest.php b/tests/Australia/Tasmania/AnzacDayTest.php index 495c56ed5..54b013ff8 100644 --- a/tests/Australia/Tasmania/AnzacDayTest.php +++ b/tests/Australia/Tasmania/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/AustraliaDayTest.php b/tests/Australia/Tasmania/AustraliaDayTest.php index 8ee324395..ad3ddccba 100644 --- a/tests/Australia/Tasmania/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/BoxingDayTest.php b/tests/Australia/Tasmania/BoxingDayTest.php index 4a5f24d3e..9fec1e091 100644 --- a/tests/Australia/Tasmania/BoxingDayTest.php +++ b/tests/Australia/Tasmania/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php b/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php index c48c836e5..3aedc6c05 100644 --- a/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in central north Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php b/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php index 68b25ac83..8770a1af1 100644 --- a/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in central north Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php b/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php index 930e89e4f..6593e10df 100644 --- a/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in central north Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php b/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php index 47a0d5dca..9089bae2e 100644 --- a/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in central north Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php b/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php index 8d7e05c52..cf9afb995 100644 --- a/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in central north Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php b/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php index b8023663c..21c511303 100644 --- a/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in central north Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php b/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php index ffca3845f..f361f7ed5 100644 --- a/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in central north Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php index 2d5ac7a8c..e3eac8f46 100644 --- a/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/CentralNorth/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in central north Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php b/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php index 015e5a8e6..074069cd8 100644 --- a/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in central north Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php b/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php index 183886517..eb48703ad 100644 --- a/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in central north Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php b/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php index 67db4e4f2..f3a86bcb3 100644 --- a/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php +++ b/tests/Australia/Tasmania/CentralNorth/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in central north Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/ChristmasDayTest.php b/tests/Australia/Tasmania/ChristmasDayTest.php index 41a8c4991..279c66bcc 100644 --- a/tests/Australia/Tasmania/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/EasterMondayTest.php b/tests/Australia/Tasmania/EasterMondayTest.php index 81967942e..56a75610b 100644 --- a/tests/Australia/Tasmania/EasterMondayTest.php +++ b/tests/Australia/Tasmania/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php b/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php index cfc631665..28d70e25d 100644 --- a/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Flinders Island (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php b/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php index 30802a546..2ff0f8e9f 100644 --- a/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Flinders Island (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php b/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php index c29b73cb7..5e0bb90ed 100644 --- a/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Flinders Island (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php b/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php index b5d1df588..90e306321 100644 --- a/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Flinders Island (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php b/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php index e733ac564..109c6422f 100644 --- a/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Flinders Island (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php b/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php index 41f4f67e9..e8f90dc18 100644 --- a/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in Flinders Island (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php b/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php index ad66e0789..a4844deda 100644 --- a/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Flinders Island (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php index f1ade9a1d..f129424ed 100644 --- a/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Flinders Island (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php b/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php index bc777300b..abfc4d74c 100644 --- a/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Flinders Island (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php b/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php index e737c35f4..69df30bd9 100644 --- a/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in Flinders Island (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php b/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php index c61ba79ef..00e2e374f 100644 --- a/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in Flinders Island (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/GoodFridayTest.php b/tests/Australia/Tasmania/GoodFridayTest.php index 2d771ed16..7663c53a9 100644 --- a/tests/Australia/Tasmania/GoodFridayTest.php +++ b/tests/Australia/Tasmania/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php b/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php index 0676a7fc7..a7766f194 100644 --- a/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in King Island (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php b/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php index d72b68e8d..27fcbd8dd 100644 --- a/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in King Island (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php b/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php index 24b063ac4..77d5b9704 100644 --- a/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in King Island (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php b/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php index 3e5acd969..35041f418 100644 --- a/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in King Island (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php b/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php index 9bde52e9a..ecea35ac6 100644 --- a/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php +++ b/tests/Australia/Tasmania/KingIsland/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in King Island (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php b/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php index 141699b38..6c130e793 100644 --- a/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in King Island (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php b/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php index 45cbd04b6..69a4fc989 100644 --- a/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php +++ b/tests/Australia/Tasmania/KingIsland/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in King Island (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php index 0d3fa08f6..6d30653ff 100644 --- a/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in King Island (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php b/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php index 410d05f69..61b02a86b 100644 --- a/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in King Island (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php b/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php index 037ab86f1..92e19d893 100644 --- a/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in King Island (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php b/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php index 6452004f6..c4208ac1f 100644 --- a/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php +++ b/tests/Australia/Tasmania/KingIsland/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in King Island (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/NationalDayOfMourningTest.php index 11cac5ad7..e4d52bc54 100644 --- a/tests/Australia/Tasmania/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/NewYearsDayTest.php b/tests/Australia/Tasmania/NewYearsDayTest.php index f86f39cc3..f92040878 100644 --- a/tests/Australia/Tasmania/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/AnzacDayTest.php b/tests/Australia/Tasmania/Northeast/AnzacDayTest.php index c805e39b0..90e52f65b 100644 --- a/tests/Australia/Tasmania/Northeast/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northeast/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in northeastern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php b/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php index 21575150e..6c2920678 100644 --- a/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northeast/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in northeastern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/BoxingDayTest.php b/tests/Australia/Tasmania/Northeast/BoxingDayTest.php index 5ccf2eeb1..c650ad447 100644 --- a/tests/Australia/Tasmania/Northeast/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northeast/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in northeastern Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php b/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php index 59343ec45..a30bc5aac 100644 --- a/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northeast/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in northeastern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/EasterMondayTest.php b/tests/Australia/Tasmania/Northeast/EasterMondayTest.php index fb815ca1d..46f235f7c 100644 --- a/tests/Australia/Tasmania/Northeast/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northeast/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in northeastern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/EightHourDayTest.php b/tests/Australia/Tasmania/Northeast/EightHourDayTest.php index ff383a276..aacb3faf6 100644 --- a/tests/Australia/Tasmania/Northeast/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northeast/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in northeastern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/GoodFridayTest.php b/tests/Australia/Tasmania/Northeast/GoodFridayTest.php index 559a44145..41b1260c1 100644 --- a/tests/Australia/Tasmania/Northeast/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northeast/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in northeastern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php index 5142746f7..7ff73368e 100644 --- a/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/Northeast/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in northeastern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php b/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php index db6836c9c..f3ccb2d7f 100644 --- a/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northeast/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in northeastern Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php index c4508f15d..3f4d28014 100644 --- a/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northeast/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in northeast Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/Northeast/RecreationDayTest.php b/tests/Australia/Tasmania/Northeast/RecreationDayTest.php index 94abd6673..177d8c34f 100644 --- a/tests/Australia/Tasmania/Northeast/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northeast/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in northeastern Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/AnzacDayTest.php b/tests/Australia/Tasmania/Northwest/AnzacDayTest.php index 18a703030..f826b380a 100644 --- a/tests/Australia/Tasmania/Northwest/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northwest/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in northwestern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php b/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php index 8f6757f31..7094e4010 100644 --- a/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northwest/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in northwestern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/BoxingDayTest.php b/tests/Australia/Tasmania/Northwest/BoxingDayTest.php index 13dcad40f..3f3e7f77c 100644 --- a/tests/Australia/Tasmania/Northwest/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northwest/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in northwestern Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php b/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php index 621023f6e..56d9a8068 100644 --- a/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northwest/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in northwestern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php index ca1495163..42db9a141 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Circular Head (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php index 53d134960..2a490c36d 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Circular Head (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php index 92230e3b4..88fbaec55 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Circular Head (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php index 0bad611d1..c85f012d2 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/BurnieShowTest.php @@ -17,4 +17,6 @@ /** * Class for testing Burnie Show Day in Circular Head (Australia).. */ -class BurnieShowTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BurnieShowTest {} +class BurnieShowTest extends \Yasumi\tests\Australia\Tasmania\Northwest\BurnieShowTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php index 30d2db730..f16f4ef05 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Circular Head (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php index 3b0e95108..318b39880 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Circular Head (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php index 68d7ccfdd..b76aafb4d 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in Circular Head (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php index 4d2ad8a5d..c86deaf77 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Circular Head (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php index 9c781d398..c1fec57e2 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Circular Head (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php index c67ba43fc..2f8c9c0c2 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Circular Head (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php index 540200be1..518a55d4e 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in Circular Head (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php index 12fd3678a..87098af7f 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in Circular Head (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\Northwest\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/EasterMondayTest.php b/tests/Australia/Tasmania/Northwest/EasterMondayTest.php index 16f8df672..4e80d6454 100644 --- a/tests/Australia/Tasmania/Northwest/EasterMondayTest.php +++ b/tests/Australia/Tasmania/Northwest/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in northwestern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/EightHourDayTest.php b/tests/Australia/Tasmania/Northwest/EightHourDayTest.php index c85b53811..74f525203 100644 --- a/tests/Australia/Tasmania/Northwest/EightHourDayTest.php +++ b/tests/Australia/Tasmania/Northwest/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in northwestern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/GoodFridayTest.php b/tests/Australia/Tasmania/Northwest/GoodFridayTest.php index 715c2c0e0..a5b9a68dc 100644 --- a/tests/Australia/Tasmania/Northwest/GoodFridayTest.php +++ b/tests/Australia/Tasmania/Northwest/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in northwestern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php index 60ea9d161..d1a63bf71 100644 --- a/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/Northwest/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in northwestern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php b/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php index fb3274ff7..4fbef25e7 100644 --- a/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/Northwest/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in northwestern Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php b/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php index 67c824a43..b1ad85c71 100644 --- a/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/Northwest/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in northwest Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/Northwest/RecreationDayTest.php b/tests/Australia/Tasmania/Northwest/RecreationDayTest.php index c3332afb3..8b7e5b447 100644 --- a/tests/Australia/Tasmania/Northwest/RecreationDayTest.php +++ b/tests/Australia/Tasmania/Northwest/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in northwestern Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/AnzacDayTest.php b/tests/Australia/Tasmania/South/AnzacDayTest.php index 618a498ff..73ada924f 100644 --- a/tests/Australia/Tasmania/South/AnzacDayTest.php +++ b/tests/Australia/Tasmania/South/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in southern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/AustraliaDayTest.php b/tests/Australia/Tasmania/South/AustraliaDayTest.php index 78c31fffa..b2a8c3017 100644 --- a/tests/Australia/Tasmania/South/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/South/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in southern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/BoxingDayTest.php b/tests/Australia/Tasmania/South/BoxingDayTest.php index 56d484302..58cc8d4a0 100644 --- a/tests/Australia/Tasmania/South/BoxingDayTest.php +++ b/tests/Australia/Tasmania/South/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in soutehrn Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/ChristmasDayTest.php b/tests/Australia/Tasmania/South/ChristmasDayTest.php index 15efef80b..482311f79 100644 --- a/tests/Australia/Tasmania/South/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/South/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in southern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/EasterMondayTest.php b/tests/Australia/Tasmania/South/EasterMondayTest.php index ab35565e0..b67353be5 100644 --- a/tests/Australia/Tasmania/South/EasterMondayTest.php +++ b/tests/Australia/Tasmania/South/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in southern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/South/EightHourDayTest.php b/tests/Australia/Tasmania/South/EightHourDayTest.php index 5daff5a42..a4797e003 100644 --- a/tests/Australia/Tasmania/South/EightHourDayTest.php +++ b/tests/Australia/Tasmania/South/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in southern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/GoodFridayTest.php b/tests/Australia/Tasmania/South/GoodFridayTest.php index 8cee1afd2..b9bbf70bf 100644 --- a/tests/Australia/Tasmania/South/GoodFridayTest.php +++ b/tests/Australia/Tasmania/South/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in southern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php index 65f0d952f..e2024ff17 100644 --- a/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/South/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in southern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/South/NewYearsDayTest.php b/tests/Australia/Tasmania/South/NewYearsDayTest.php index 574b0fea6..2af00db13 100644 --- a/tests/Australia/Tasmania/South/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/South/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in soutehrn Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/QueensBirthdayTest.php b/tests/Australia/Tasmania/South/QueensBirthdayTest.php index db0704511..ddf89fdb3 100644 --- a/tests/Australia/Tasmania/South/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/South/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in southe0rn Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Tasmania/South/RecreationDayTest.php b/tests/Australia/Tasmania/South/RecreationDayTest.php index c20c19ea2..e6d59e05a 100644 --- a/tests/Australia/Tasmania/South/RecreationDayTest.php +++ b/tests/Australia/Tasmania/South/RecreationDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Recreation Day in southern Tasmania (Australia).. */ -class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest {} +class RecreationDayTest extends \Yasumi\tests\Australia\Tasmania\RecreationDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php b/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php index 1224885d8..9507b97c0 100644 --- a/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in southeastern Tasmania (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\South\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\Tasmania\South\AnzacDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php b/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php index 1c0294c29..e8047fe27 100644 --- a/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in southeastern Tasmania (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\South\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\Tasmania\South\AustraliaDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php b/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php index a7f46bb77..6aad31745 100644 --- a/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in southeastern Tasmania (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\South\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\Tasmania\South\BoxingDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php b/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php index c49ebdb4a..f09273260 100644 --- a/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in southeastern Tasmania (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\South\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\Tasmania\South\ChristmasDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php b/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php index f9e07e6c6..a9bb1cfdc 100644 --- a/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in southeastern Tasmania (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\South\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\Tasmania\South\EasterMondayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php b/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php index ee11a61d0..7a0ee954e 100644 --- a/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Eight Hour Day in southeastern Tasmania (Australia).. */ -class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\South\EightHourDayTest {} +class EightHourDayTest extends \Yasumi\tests\Australia\Tasmania\South\EightHourDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php b/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php index 54157cc07..31001f762 100644 --- a/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in southeastern Tasmania (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\South\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\Tasmania\South\GoodFridayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php b/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php index 62ad45705..153d000b9 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartShowTest.php @@ -17,4 +17,6 @@ /** * Class for testing Hobart Show Day in southeastern Tasmania (Australia).. */ -class HobartShowTest extends \Yasumi\tests\Australia\Tasmania\South\HobartShowTest {} +class HobartShowTest extends \Yasumi\tests\Australia\Tasmania\South\HobartShowTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php b/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php index 2ad7af328..b781a8430 100644 --- a/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php +++ b/tests/Australia/Tasmania/South/Southeast/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in southeastern Tasmania (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\South\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\Tasmania\South\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php b/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php index 38f6a372d..7329a98cb 100644 --- a/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in southeastern Tasmania (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\South\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\Tasmania\South\NewYearsDayTest +{ +} diff --git a/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php b/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php index feaea623b..4cf3036d7 100644 --- a/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Queen's Birthday in southeastern Tasmania (Australia).. */ -class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\South\QueensBirthdayTest {} +class QueensBirthdayTest extends \Yasumi\tests\Australia\Tasmania\South\QueensBirthdayTest +{ +} diff --git a/tests/Australia/Victoria/AnzacDayTest.php b/tests/Australia/Victoria/AnzacDayTest.php index a35878a58..4ade076b2 100644 --- a/tests/Australia/Victoria/AnzacDayTest.php +++ b/tests/Australia/Victoria/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Victoria (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/Victoria/AustraliaDayTest.php b/tests/Australia/Victoria/AustraliaDayTest.php index 4974896ab..692e8f773 100644 --- a/tests/Australia/Victoria/AustraliaDayTest.php +++ b/tests/Australia/Victoria/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Victoria (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/Victoria/BoxingDayTest.php b/tests/Australia/Victoria/BoxingDayTest.php index 56a9b1753..8fd7f875b 100644 --- a/tests/Australia/Victoria/BoxingDayTest.php +++ b/tests/Australia/Victoria/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Victoria (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/Victoria/ChristmasDayTest.php b/tests/Australia/Victoria/ChristmasDayTest.php index 596fa7ed5..177d238ea 100644 --- a/tests/Australia/Victoria/ChristmasDayTest.php +++ b/tests/Australia/Victoria/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Victoria (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/Victoria/EasterMondayTest.php b/tests/Australia/Victoria/EasterMondayTest.php index 85b2e1fac..c1b38fc0e 100644 --- a/tests/Australia/Victoria/EasterMondayTest.php +++ b/tests/Australia/Victoria/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Victoria (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/Victoria/GoodFridayTest.php b/tests/Australia/Victoria/GoodFridayTest.php index fdadf02be..d6d6bd5a2 100644 --- a/tests/Australia/Victoria/GoodFridayTest.php +++ b/tests/Australia/Victoria/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Victoria (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/Victoria/NationalDayOfMourningTest.php b/tests/Australia/Victoria/NationalDayOfMourningTest.php index 1692c0e12..033be7914 100644 --- a/tests/Australia/Victoria/NationalDayOfMourningTest.php +++ b/tests/Australia/Victoria/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Victoria (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/Victoria/NewYearsDayTest.php b/tests/Australia/Victoria/NewYearsDayTest.php index 7e6368f69..1d2016897 100644 --- a/tests/Australia/Victoria/NewYearsDayTest.php +++ b/tests/Australia/Victoria/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Victoria (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Australia/WesternAustralia/AnzacDayTest.php b/tests/Australia/WesternAustralia/AnzacDayTest.php index cd8040998..82c1cab4f 100644 --- a/tests/Australia/WesternAustralia/AnzacDayTest.php +++ b/tests/Australia/WesternAustralia/AnzacDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing ANZAC day in Western Australia (Australia).. */ -class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest {} +class AnzacDayTest extends \Yasumi\tests\Australia\AnzacDayTest +{ +} diff --git a/tests/Australia/WesternAustralia/AustraliaDayTest.php b/tests/Australia/WesternAustralia/AustraliaDayTest.php index 829561943..ed58a6e28 100644 --- a/tests/Australia/WesternAustralia/AustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/AustraliaDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Australia day in Western Australia (Australia).. */ -class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest {} +class AustraliaDayTest extends \Yasumi\tests\Australia\AustraliaDayTest +{ +} diff --git a/tests/Australia/WesternAustralia/BoxingDayTest.php b/tests/Australia/WesternAustralia/BoxingDayTest.php index 5771a04c0..7c17911e3 100644 --- a/tests/Australia/WesternAustralia/BoxingDayTest.php +++ b/tests/Australia/WesternAustralia/BoxingDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Boxing Day in Western Australia (Australia).. */ -class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest {} +class BoxingDayTest extends \Yasumi\tests\Australia\BoxingDayTest +{ +} diff --git a/tests/Australia/WesternAustralia/ChristmasDayTest.php b/tests/Australia/WesternAustralia/ChristmasDayTest.php index 36a72f99a..d0508719b 100644 --- a/tests/Australia/WesternAustralia/ChristmasDayTest.php +++ b/tests/Australia/WesternAustralia/ChristmasDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Christmas Day in Western Australia (Australia).. */ -class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest {} +class ChristmasDayTest extends \Yasumi\tests\Australia\ChristmasDayTest +{ +} diff --git a/tests/Australia/WesternAustralia/EasterMondayTest.php b/tests/Australia/WesternAustralia/EasterMondayTest.php index 76718276b..eba0dae5b 100644 --- a/tests/Australia/WesternAustralia/EasterMondayTest.php +++ b/tests/Australia/WesternAustralia/EasterMondayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Easter Monday in Western Australia (Australia).. */ -class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest {} +class EasterMondayTest extends \Yasumi\tests\Australia\EasterMondayTest +{ +} diff --git a/tests/Australia/WesternAustralia/GoodFridayTest.php b/tests/Australia/WesternAustralia/GoodFridayTest.php index 8c2d9b217..0192aeca8 100644 --- a/tests/Australia/WesternAustralia/GoodFridayTest.php +++ b/tests/Australia/WesternAustralia/GoodFridayTest.php @@ -17,4 +17,6 @@ /** * Class for testing Good Friday in Western Australia (Australia).. */ -class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest {} +class GoodFridayTest extends \Yasumi\tests\Australia\GoodFridayTest +{ +} diff --git a/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php b/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php index f78c61448..364347f7f 100644 --- a/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php +++ b/tests/Australia/WesternAustralia/NationalDayOfMourningTest.php @@ -17,4 +17,6 @@ /** * Class for testing National Day of Mourning in Western Australia (Australia).. */ -class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest {} +class NationalDayOfMourningTest extends \Yasumi\tests\Australia\NationalDayOfMourningTest +{ +} diff --git a/tests/Australia/WesternAustralia/NewYearsDayTest.php b/tests/Australia/WesternAustralia/NewYearsDayTest.php index 1ab5d270e..ea40509eb 100644 --- a/tests/Australia/WesternAustralia/NewYearsDayTest.php +++ b/tests/Australia/WesternAustralia/NewYearsDayTest.php @@ -17,4 +17,6 @@ /** * Class for testing New Years Day in Western Australia (Australia).. */ -class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest {} +class NewYearsDayTest extends \Yasumi\tests\Australia\NewYearsDayTest +{ +} diff --git a/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php b/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php index 03eb79461..d938a4c46 100644 --- a/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php +++ b/tests/Germany/BadenWurttemberg/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Baden-Württemberg (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php b/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php index b6edd256d..981fda8a2 100644 --- a/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php +++ b/tests/Germany/BadenWurttemberg/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Baden-Württemberg (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Bavaria/GermanUnityDayTest.php b/tests/Germany/Bavaria/GermanUnityDayTest.php index b1d430a97..34ea48052 100644 --- a/tests/Germany/Bavaria/GermanUnityDayTest.php +++ b/tests/Germany/Bavaria/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Bavaria (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Bavaria/ReformationDay2017Test.php b/tests/Germany/Bavaria/ReformationDay2017Test.php index 2bcce31fd..c11c67e2f 100644 --- a/tests/Germany/Bavaria/ReformationDay2017Test.php +++ b/tests/Germany/Bavaria/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Bavaria (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Berlin/GermanUnityDayTest.php b/tests/Germany/Berlin/GermanUnityDayTest.php index 367fd2869..a41153d68 100644 --- a/tests/Germany/Berlin/GermanUnityDayTest.php +++ b/tests/Germany/Berlin/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Berlin (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Berlin/ReformationDay2017Test.php b/tests/Germany/Berlin/ReformationDay2017Test.php index 711990f65..77f2f666c 100644 --- a/tests/Germany/Berlin/ReformationDay2017Test.php +++ b/tests/Germany/Berlin/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Berlin (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Brandenburg/GermanUnityDayTest.php b/tests/Germany/Brandenburg/GermanUnityDayTest.php index fec72075e..9f701bd94 100644 --- a/tests/Germany/Brandenburg/GermanUnityDayTest.php +++ b/tests/Germany/Brandenburg/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Brandenburg (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Bremen/GermanUnityDayTest.php b/tests/Germany/Bremen/GermanUnityDayTest.php index a17cf7a05..8b375bfbf 100644 --- a/tests/Germany/Bremen/GermanUnityDayTest.php +++ b/tests/Germany/Bremen/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Bremen (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Bremen/ReformationDay2017Test.php b/tests/Germany/Bremen/ReformationDay2017Test.php index 77c165730..c3de1c197 100644 --- a/tests/Germany/Bremen/ReformationDay2017Test.php +++ b/tests/Germany/Bremen/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Bremen (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Hamburg/GermanUnityDay.php b/tests/Germany/Hamburg/GermanUnityDay.php index 8c4342cdb..92da625e9 100644 --- a/tests/Germany/Hamburg/GermanUnityDay.php +++ b/tests/Germany/Hamburg/GermanUnityDay.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Hamburg (Germany). */ -class GermanUnityDay extends BaseGermanUnityDayTest {} +class GermanUnityDay extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Hamburg/ReformationDay2017Test.php b/tests/Germany/Hamburg/ReformationDay2017Test.php index 607c91330..b82a0b79d 100644 --- a/tests/Germany/Hamburg/ReformationDay2017Test.php +++ b/tests/Germany/Hamburg/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Hamburg (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Hesse/GermanUnityDayTest.php b/tests/Germany/Hesse/GermanUnityDayTest.php index aa0fec87f..446664c9a 100644 --- a/tests/Germany/Hesse/GermanUnityDayTest.php +++ b/tests/Germany/Hesse/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Hesse (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Hesse/ReformationDay2017Test.php b/tests/Germany/Hesse/ReformationDay2017Test.php index bf82684f1..2d8061de2 100644 --- a/tests/Germany/Hesse/ReformationDay2017Test.php +++ b/tests/Germany/Hesse/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Hesse (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/LowerSaxony/GermanUnityDayTest.php b/tests/Germany/LowerSaxony/GermanUnityDayTest.php index 34e1396db..8e0dc561e 100644 --- a/tests/Germany/LowerSaxony/GermanUnityDayTest.php +++ b/tests/Germany/LowerSaxony/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Lower Saxony (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/LowerSaxony/ReformationDay2017Test.php b/tests/Germany/LowerSaxony/ReformationDay2017Test.php index 32985f419..0141b794c 100644 --- a/tests/Germany/LowerSaxony/ReformationDay2017Test.php +++ b/tests/Germany/LowerSaxony/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Lower Saxony (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php b/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php index f77f7120e..6a08aa040 100644 --- a/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Mecklenburg-Western Pomerania (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php b/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php index 84f15ce8f..0a1131f67 100644 --- a/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in North Rhine-Westphalia (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php b/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php index cb5efa167..d05a3cd84 100644 --- a/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php +++ b/tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in North Rhine-Westphalia (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php b/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php index 27677daae..a0d21d25f 100644 --- a/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php +++ b/tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Rhineland Palatinate (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php b/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php index 432f22718..1e0d83a07 100644 --- a/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php +++ b/tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Rhineland Palatinate (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Saarland/GermanUnityDayTest.php b/tests/Germany/Saarland/GermanUnityDayTest.php index 51a66268b..6722e6969 100644 --- a/tests/Germany/Saarland/GermanUnityDayTest.php +++ b/tests/Germany/Saarland/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Saarland (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/Saarland/ReformationDay2017Test.php b/tests/Germany/Saarland/ReformationDay2017Test.php index f7470cf47..ee2ed7e3f 100644 --- a/tests/Germany/Saarland/ReformationDay2017Test.php +++ b/tests/Germany/Saarland/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Saarland (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Saxony/GermanUnityDayTest.php b/tests/Germany/Saxony/GermanUnityDayTest.php index b790c3e93..ac1de7c9a 100644 --- a/tests/Germany/Saxony/GermanUnityDayTest.php +++ b/tests/Germany/Saxony/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Saxony (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php b/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php index dfd363d0a..716e688ef 100644 --- a/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php +++ b/tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Saxony-Anhalt (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php b/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php index 0c2cdf7a9..eaed998b7 100644 --- a/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php +++ b/tests/Germany/SchleswigHolstein/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Schleswig-Holstein (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} diff --git a/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php b/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php index 6b1fed61a..10b351db4 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php +++ b/tests/Germany/SchleswigHolstein/ReformationDay2017Test.php @@ -17,4 +17,6 @@ /** * Class for testing Reformation Day in Schleswig-Holstein (Germany). */ -class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test {} +class ReformationDay2017Test extends \Yasumi\tests\Germany\ReformationDay2017Test +{ +} diff --git a/tests/Germany/Thuringia/GermanUnityDayTest.php b/tests/Germany/Thuringia/GermanUnityDayTest.php index 641f2b270..cbc9090e1 100644 --- a/tests/Germany/Thuringia/GermanUnityDayTest.php +++ b/tests/Germany/Thuringia/GermanUnityDayTest.php @@ -19,4 +19,6 @@ /** * Class for testing German Unity Day in Thuringia (Germany). */ -class GermanUnityDayTest extends BaseGermanUnityDayTest {} +class GermanUnityDayTest extends BaseGermanUnityDayTest +{ +} From a1aed3d7a6b914ed6cf07b379d3ac9a72f7ec7a7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Dec 2023 13:14:39 +0100 Subject: [PATCH 537/687] Fix typos. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 2 +- src/Yasumi/Holiday.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Croatia/IndependenceDayTest.php | 2 +- .../MecklenburgWesternPomerania/InternationalWomensDayTest.php | 2 +- .../Greece/{IndepencenceDayTest.php => IndependenceDayTest.php} | 2 +- tests/Japan/SportsDayTest.php | 2 +- ...ovakIndependeceDayTest.php => SlovakIndependenceDayTest.php} | 2 +- tests/YasumiBase.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename tests/Greece/{IndepencenceDayTest.php => IndependenceDayTest.php} (97%) rename tests/Slovakia/{SlovakIndependeceDayTest.php => SlovakIndependenceDayTest.php} (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 267aba982..9f965190f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ changes. - Mexico Provider [\#329](https://github.com/azuyalabs/yasumi/pull/329) ([Luis Gonzalez](https://github.com/gogl92)). - From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) -- For the German state of Mecklenburg-Western Pomerania, International Womens Day is considered to be officially +- For the German state of Mecklenburg-Western Pomerania, International Women's Day is considered to be officially observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](https://github.com/ihmels)) - Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day and Christmas Day, which we have reflected in our South Korea provider. diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index bbc758e2b..96be0a73d 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -207,7 +207,7 @@ public function mergeGlobalTranslations(TranslationsInterface $globalTranslation * For each provided locale, return all locales including their parent locales. E.g. * ['ca_ES_VALENCIA', 'es_ES'] is expanded into ['ca_ES_VALENCIA', 'ca_ES', 'ca', 'es_ES', 'es']. * - * If a string is provided, return as if this string, Holiday::DEFAULT_LOCALE, and Holiday::LOCALE_SHORT_NAM + * If a string is provided, return as if this string, Holiday::DEFAULT_LOCALE, and Holiday::LOCALE_SHORT_NAME * was provided. E.g. 'de_DE' is expanded into ['de_DE', 'de', 'en_US', 'en', Holiday::LOCALE_KEY]. * * If null is provided, return as if the display locale was provided as a string. diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 521c13b10..687246a33 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -75,7 +75,7 @@ public function getSources(): array * * The Brazilian Proclamation of Republic was an act relevant military politic it happened on 15 November 1889 * that initiated the build federative presidential of govern in Brazil, downed the monarchy constitutional - * parlamentary of Brazil's Empire. + * parliamentary of Brazil's Empire. * * @link https://en.wikipedia.org/wiki/Proclamation_of_the_Republic_(Brazil) */ diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 5b826be94..706d9f819 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -100,7 +100,7 @@ private function calculateCarnationRevolutionDay(): 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 \InvalidArgumentException diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index cf50816c7..c14729c57 100644 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -63,7 +63,7 @@ public function initialize(): void $this->calculateStJohnsDay(); } - // Pentecost (50th and 51st day after Easter) and Asumption of Mary (15.08) were added as legal holidays acc. to the Law '202/2008' + // Pentecost (50th and 51st day after Easter) and Assumption of Mary (15.08) were added as legal holidays acc. to the Law '202/2008' if ($this->year >= 2008) { $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 39d9be320..2344263be 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -231,7 +231,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void } /** @throws \Exception */ - public function testHolidayGetNameWithOverridenGlobalTranslations(): void + public function testHolidayGetNameWithOverriddenGlobalTranslations(): void { $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 54f00eb34..d76fc602d 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -18,7 +18,7 @@ use Yasumi\tests\HolidayTestCase; /** - * Class containing tests for Independece Day in Croatia. + * Class containing tests for Independence Day in Croatia. */ class IndependenceDayTest extends CroatiaBaseTestCase implements HolidayTestCase { diff --git a/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php b/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php index 729cec0f4..a7ee6a9f8 100644 --- a/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php @@ -18,7 +18,7 @@ use Yasumi\tests\HolidayTestCase; /** - * Class containing tests for International Womens Day in Mecklenburg–Western Pomerania, Germany. + * Class containing tests for International Women's Day in Mecklenburg–Western Pomerania, Germany. */ class InternationalWomensDayTest extends MecklenburgWesternPomeraniaBaseTestCase implements HolidayTestCase { diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndependenceDayTest.php similarity index 97% rename from tests/Greece/IndepencenceDayTest.php rename to tests/Greece/IndependenceDayTest.php index 64e19d901..1fe1561bb 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndependenceDayTest.php @@ -20,7 +20,7 @@ /** * Class for testing the Independence Day of Greece in Greece. */ -class IndepencenceDayTest extends GreeceBaseTestCase implements HolidayTestCase +class IndependenceDayTest extends GreeceBaseTestCase implements HolidayTestCase { /** * The year in which the holiday was first established. diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 1d63a8af4..be258307e 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -75,7 +75,7 @@ public function testSportsDayAfter2000(): void { $year = $this->generateRandomYear(2001); - // Some years the date has changed, so in this test we neeed to skip them. + // Some years the date has changed, so in this test we need to skip them. if (! in_array($year, [2020, 2021])) { $this->assertHoliday( self::REGION, diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependenceDayTest.php similarity index 96% rename from tests/Slovakia/SlovakIndependeceDayTest.php rename to tests/Slovakia/SlovakIndependenceDayTest.php index da99cbc0b..9779d0cea 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependenceDayTest.php @@ -24,7 +24,7 @@ * @author Andrej Rypak (dakujem) * @author Jan Langer */ -class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements HolidayTestCase +class SlovakIndependenceDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index c003de9d9..24d586890 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -304,7 +304,7 @@ public function assertSources(string $provider, int $expectedSourceCount): void * Variations have been seen between different versions of PHP and OS distributions. * Likely this is caused by different editions of the tz database used in those releases. * - * The chosen delta is somewhat arbitray and seems to solve the experienced issues. + * The chosen delta is somewhat arbitrary and seems to solve the experienced issues. * * @throws \ExpectationFailedException */ From 3f6855a3c9a63ea844cf2536288a2f07f1b56175 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Dec 2023 14:34:00 +0100 Subject: [PATCH 538/687] Add a few more PHPStan settings and fix indendation. Signed-off-by: Sacha Telgenhof --- phpstan.neon.dist | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index fad49a494..f9ac466cf 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,10 +1,13 @@ parameters: - level: 6 - paths: - - src - - examples - ignoreErrors: - - - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' - path: src/Yasumi/Provider/Turkey.php - checkGenericClassInNonGenericObjectType: false + level: 6 + paths: + - src + - examples + ignoreErrors: + - + message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' + path: src/Yasumi/Provider/Turkey.php + checkGenericClassInNonGenericObjectType: false + reportUnmatchedIgnoredErrors: true # Do not allow outdated errors in the baseline + treatPhpDocTypesAsCertain: false + tipsOfTheDay: false From 15998c952a74cdf6ec8b0107e37421c4c596b41e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 30 Dec 2023 14:42:47 +0100 Subject: [PATCH 539/687] style: Fix indendation Signed-off-by: Sacha Telgenhof --- phpunit.xml.dist | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8ad68bdb3..06ccf5dcb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,12 +9,15 @@ ~ ~ @author Sacha Telgenhof --> - + + ./src/Yasumi @@ -23,6 +26,7 @@ ./src/Yasumi/data + ./tests From c7506f470de73ec71a08aaaf5f5a10e25ca44271 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 2 Jan 2024 10:31:51 +0100 Subject: [PATCH 540/687] style: Simplify the code for selecting holidays before and after 2013 making it more concise Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 492aa3e4a..6d111de49 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -214,13 +214,7 @@ public function initialize(): void return; } - if ($this->year < 2013) { - // Holidays in used from 1949 until 2012 - $officialHolidays = $this->calculateBefore2013($this->year); - } else { - // Holidays in use from 2013 - $officialHolidays = $this->calculateCurrent(); - } + $officialHolidays = $this->year < 2013 ? $this->calculateBefore2013($this->year) : $this->calculateCurrent(); foreach ($officialHolidays as $holiday) { $this->addHoliday($this->{$holiday}($this->year, $this->timezone, $this->locale)); From 6cc00f1a8242887ed14a9a77e7fe1f4f719f946d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 2 Jan 2024 13:24:49 +0100 Subject: [PATCH 541/687] docs: Update the changelog to reflect changes for the 2.7.0 release Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f965190f..0ef0d6d12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres -to [Semantic Versioning](https://semver.org). +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Changes related to the business logic of the holidays or their providers are listed first, followed by any technical or architectural changes. @@ -12,29 +12,48 @@ changes. ### Added +### Changed + +### Fixed + +### Removed + +## [2.7.0] - 2024-01-02 + +### Added + - Mexico Provider [\#329](https://github.com/azuyalabs/yasumi/pull/329) ([Luis Gonzalez](https://github.com/gogl92)). - From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) - For the German state of Mecklenburg-Western Pomerania, International Women's Day is considered to be officially observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](https://github.com/ihmels)) - Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day - and Christmas Day, which we have reflected in our South Korea provider. + and Christmas Day. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) -- Include PHP 8.3 in the unit test CI pipeline. [#328](https://github.com/azuyalabs/yasumi/pull/328) ([fezfez](https://github.com/fezfez)) +- Extra checks in case date subtraction fails for some holiday providers. +- PHP 8.3 support for the unit test CI pipeline. [#328](https://github.com/azuyalabs/yasumi/pull/328) ([fezfez](https://github.com/fezfez)) +- Add code styling rules to have a space after the `NOT` operator and mark parameters with a default null value as nullable. ### Changed -- Updated links to related documentation in the SouthKorea provider's note and added links to conversion utilities. - [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) -- Refactored the complexity of the SouthKorea provider to make it easier to understand in case of future changes. +- Refactor the rules for calculating holidays in South Korea based on the history of holiday changes. + ([#314](https://github.com/azuyalabs/yasumi/issues/314)) [barami](https://github.com/barams@gmail.com) +- Update links to related documentation in the South Korea provider's note and added links to conversion utilities. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- Optimize the method for the Emperor's birthday calculation in Japan. +- For Croatia, extract Day of Antifascist Struggle calculation to a private method and simplify Statehood Day calculation + to make it more concise. +- Simplify the conditions for the Coming of Age day (Japan) calculation. +- Simplify the calculation of Carnival in Argentina, Brazil and the Netherlands to reduce duplication. +- Avoid silent exceptions by throwing a new one from the previous exception. ### Fixed -- In the South Korea provider some of the past dates for Buddha's Day, Chuseok, Armed Forces Day - and United Nations Day were incorrect during holidays. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) -- The holiday `twoDaysLaterNewYearsDay` has been removed from 1990, however the unit test for the name and holiday type - allowed the possible testing range to include the year 1990. +- For South Korea, some of the past dates for Buddha's Day, Chuseok, Armed Forces Day + and United Nations Day were incorrectly calculated during for certain periods. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- The holiday `twoDaysLaterNewYearsDay` of South Korea has been removed from 1990, however the unit test for the name + and holiday type allowed the possible testing range to include the year 1990. +- New Years Day tests for South Korea were failing due to incorrect date checks. - The Easter Date calculation resulted in wrong values for the year 2025, due to an incorrect rounding for the lunar correction when the calendar extension is not used. [#326](https://github.com/azuyalabs/yasumi/pull/326) ([rChassat](https://github.com/rChassat)) @@ -44,8 +63,11 @@ changes. - Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and aren't true holidays in the context of Yasumi. Refer to this [discussion](https://github.com/azuyalabs/yasumi/discussions/321) for further details and rationale. [#322](https://github.com/azuyalabs/yasumi/pull/322) +- PHP 7.4 support. - The PHP [Infection](https://infection.github.io/) test package as it was hardly used. - Unit tests from a Git export to reduce the export size. [#323](https://github.com/azuyalabs/yasumi/pull/323) ([fezfez](https://github.com/fezfez)) +- Checks for superfluous naming as we follow PER which supports such convention. +- MacOS from testing matrix as it returns errors (requires further investigation). ## [2.6.0] - 2023-04-27 @@ -787,7 +809,9 @@ changes. - Initial Release -[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.6.0...HEAD +[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.7.0...HEAD + +[2.7.0]: https://github.com/azuyalabs/yasumi/compare/2.6.0...2.7.0 [2.6.0]: https://github.com/azuyalabs/yasumi/compare/2.5.0...2.6.0 From 59e2bf6f8e90ff86817b98003b63251e0e9b07bb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 2 Jan 2024 15:15:46 +0100 Subject: [PATCH 542/687] refactor: Update copyright year Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 2 +- LICENSE | 2 +- phpunit.xml.dist | 2 +- psalm.xml.dist | 2 +- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- src/Yasumi/Exception/MissingTranslationException.php | 2 +- src/Yasumi/Exception/ProviderNotFoundException.php | 2 +- src/Yasumi/Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 2 +- 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/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Argentina.php | 2 +- src/Yasumi/Provider/Australia.php | 2 +- src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php | 2 +- src/Yasumi/Provider/Australia/NewSouthWales.php | 2 +- src/Yasumi/Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/KingIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northeast.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northwest.php | 2 +- .../Provider/Australia/Tasmania/Northwest/CircularHead.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 2 +- src/Yasumi/Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Canada.php | 2 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/BritishColumbia.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NewBrunswick.php | 2 +- src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php | 2 +- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Ontario.php | 2 +- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/CommonHolidays.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 2 +- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Provider/Denmark.php | 2 +- src/Yasumi/Provider/Estonia.php | 2 +- src/Yasumi/Provider/Finland.php | 2 +- 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/Georgia.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 2 +- src/Yasumi/Provider/Mexico.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 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 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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/Turkey.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.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/allSoulsDay.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 +- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- src/Yasumi/data/translations/canadaDay.php | 2 +- src/Yasumi/data/translations/carnationRevolutionDay.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 2 +- src/Yasumi/data/translations/christmasEve.php | 2 +- src/Yasumi/data/translations/civicHoliday.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- src/Yasumi/data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/data/translations/dayOfLiberation.php | 2 +- src/Yasumi/data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/discoveryDay.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/familyDay.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goldCupParadeDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- src/Yasumi/data/translations/heritageDay.php | 2 +- src/Yasumi/data/translations/immaculateConception.php | 2 +- src/Yasumi/data/translations/internationalWomensDay.php | 2 +- src/Yasumi/data/translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/islanderDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/louisRielDay.php | 2 +- src/Yasumi/data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/natalHoliday.php | 2 +- src/Yasumi/data/translations/nationalIndigenousPeoplesDay.php | 2 +- src/Yasumi/data/translations/nationalPatriotsDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/novaScotiaHeritageDay.php | 2 +- src/Yasumi/data/translations/orangemensDay.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/plebisciteDay.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- src/Yasumi/data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/queensBirthday.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- src/Yasumi/data/translations/remembranceDay.php | 2 +- src/Yasumi/data/translations/restorationOfIndepence.php | 2 +- src/Yasumi/data/translations/saintJeanBaptisteDay.php | 2 +- src/Yasumi/data/translations/saskatchewanDay.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stFloriansDay.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/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/terryFoxDay.php | 2 +- src/Yasumi/data/translations/thanksgivingDay.php | 2 +- src/Yasumi/data/translations/truthAndReconciliationDay.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- src/Yasumi/data/translations/victoriaDay.php | 2 +- src/Yasumi/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 +- src/Yasumi/data/translations/yukonHeritageDay.php | 2 +- tests/Argentina/ArgentinaBaseTestCase.php | 2 +- tests/Argentina/ArgentinaTest.php | 2 +- tests/Argentina/CarnavalMondayTest.php | 2 +- tests/Argentina/CarnavalTuesdayTest.php | 2 +- tests/Argentina/ChristmasDayTest.php | 2 +- tests/Argentina/EasterTest.php | 2 +- tests/Argentina/FlagDayTest.php | 2 +- tests/Argentina/GeneralJoseSanMartinDayTest.php | 2 +- tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php | 2 +- tests/Argentina/GoodFridayTest.php | 2 +- tests/Argentina/ImmaculateConceptionDayTest.php | 2 +- tests/Argentina/IndependenceDayTest.php | 2 +- tests/Argentina/InternationalWorkersDayTest.php | 2 +- tests/Argentina/MalvinasDayTest.php | 2 +- tests/Argentina/MayRevolutionTest.php | 2 +- tests/Argentina/NationalSovereigntyDayTest.php | 2 +- tests/Argentina/NewYearsDayTest.php | 2 +- tests/Argentina/RaceDayTest.php | 2 +- tests/Argentina/RemembranceDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/AnzacDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/AustraliaDayTest.php | 2 +- .../AustralianCapitalTerritoryBaseTestCase.php | 2 +- .../AustralianCapitalTerritoryTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/BoxingDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/ChristmasDayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/EasterMondayTest.php | 2 +- .../Australia/AustralianCapitalTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/GoodFridayTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/LabourDayTest.php | 2 +- .../AustralianCapitalTerritory/NationalDayOfMourningTest.php | 2 +- tests/Australia/AustralianCapitalTerritory/NewYearsDayTest.php | 2 +- .../Australia/AustralianCapitalTerritory/QueensBirthdayTest.php | 2 +- .../AustralianCapitalTerritory/ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NationalDayOfMourningTest.php | 2 +- tests/Australia/NewSouthWales/AnzacDayTest.php | 2 +- tests/Australia/NewSouthWales/AustraliaDayTest.php | 2 +- tests/Australia/NewSouthWales/BankHolidayTest.php | 2 +- tests/Australia/NewSouthWales/BoxingDayTest.php | 2 +- tests/Australia/NewSouthWales/ChristmasDayTest.php | 2 +- tests/Australia/NewSouthWales/EasterMondayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSaturdayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSundayTest.php | 2 +- tests/Australia/NewSouthWales/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/LabourDayTest.php | 2 +- tests/Australia/NewSouthWales/NationalDayOfMourningTest.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 2 +- tests/Australia/NewSouthWales/NewYearsDayTest.php | 2 +- tests/Australia/NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/NorthernTerritory/AnzacDayTest.php | 2 +- tests/Australia/NorthernTerritory/AustraliaDayTest.php | 2 +- tests/Australia/NorthernTerritory/BoxingDayTest.php | 2 +- tests/Australia/NorthernTerritory/ChristmasDayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterMondayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/NorthernTerritory/GoodFridayTest.php | 2 +- tests/Australia/NorthernTerritory/MayDayTest.php | 2 +- tests/Australia/NorthernTerritory/NationalDayOfMourningTest.php | 2 +- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 2 +- .../NorthernTerritory/NorthernTerritoryBaseTestCase.php | 2 +- tests/Australia/NorthernTerritory/NorthernTerritoryTest.php | 2 +- tests/Australia/NorthernTerritory/PicnicDayTest.php | 2 +- tests/Australia/NorthernTerritory/QueensBirthdayTest.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 +- tests/Australia/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 +- .../Australia/Queensland/Brisbane/NationalDayOfMourningTest.php | 2 +- tests/Australia/Queensland/Brisbane/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/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/NationalDayOfMourningTest.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/SouthAustralia/AdelaideCupDayTest.php | 2 +- tests/Australia/SouthAustralia/AnzacDayTest.php | 2 +- tests/Australia/SouthAustralia/AustraliaDayTest.php | 2 +- tests/Australia/SouthAustralia/ChristmasDayTest.php | 2 +- tests/Australia/SouthAustralia/EasterMondayTest.php | 2 +- tests/Australia/SouthAustralia/EasterSaturdayTest.php | 2 +- tests/Australia/SouthAustralia/GoodFridayTest.php | 2 +- tests/Australia/SouthAustralia/LabourDayTest.php | 2 +- tests/Australia/SouthAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/SouthAustralia/NewYearsDayTest.php | 2 +- tests/Australia/SouthAustralia/ProclamationDayTest.php | 2 +- tests/Australia/SouthAustralia/QueensBirthdayTest.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaTest.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 +- tests/Australia/Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthBaseTestCase.php | 2 +- tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php | 2 +- .../Tasmania/CentralNorth/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/QueensBirthdayTest.php | 2 +- tests/Australia/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 +- tests/Australia/Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/EightHourDayTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandBaseTestCase.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandShowTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/GoodFridayTest.php | 2 +- .../Tasmania/FlindersIsland/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/QueensBirthdayTest.php | 2 +- tests/Australia/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 +- tests/Australia/Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Australia/Tasmania/KingIsland/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/NationalDayOfMourningTest.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 +- tests/Australia/Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Australia/Tasmania/Northeast/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- tests/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 +- tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Australia/Tasmania/Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Australia/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 +- .../Northwest/CircularHead/NationalDayOfMourningTest.php | 2 +- .../Tasmania/Northwest/CircularHead/NewYearsDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Tasmania/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 +- .../Australia/Tasmania/Northwest/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/Northwest/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- tests/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/NationalDayOfMourningTest.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 +- tests/Australia/Tasmania/South/Southeast/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/HobartShowTest.php | 2 +- .../Tasmania/South/Southeast/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/QueensBirthdayTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastBaseTestCase.php | 2 +- tests/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/NationalDayOfMourningTest.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/WesternAustralia/AnzacDayTest.php | 2 +- tests/Australia/WesternAustralia/AustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/BoxingDayTest.php | 2 +- tests/Australia/WesternAustralia/ChristmasDayTest.php | 2 +- tests/Australia/WesternAustralia/EasterMondayTest.php | 2 +- tests/Australia/WesternAustralia/GoodFridayTest.php | 2 +- tests/Australia/WesternAustralia/LabourDayTest.php | 2 +- tests/Australia/WesternAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/WesternAustralia/NewYearsDayTest.php | 2 +- tests/Australia/WesternAustralia/QueensBirthdayTest.php | 2 +- .../Australia/WesternAustralia/WesternAustraliaBaseTestCase.php | 2 +- tests/Australia/WesternAustralia/WesternAustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/WesternAustraliaTest.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/Burgenland/BurgenlandBaseTestCase.php | 2 +- tests/Austria/Burgenland/BurgenlandTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 2 +- tests/Austria/Carinthia/CarinthiaTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.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/LowerAustria/LowerAustriaBaseTestCase.php | 2 +- tests/Austria/LowerAustria/LowerAustriaTest.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 2 +- tests/Austria/Salzburg/SalzburgTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 2 +- tests/Austria/Styria/StyriaTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 2 +- tests/Austria/Tyrol/TyrolTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- tests/Austria/UpperAustria/UpperAustriaBaseTestCase.php | 2 +- tests/Austria/UpperAustria/UpperAustriaTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 2 +- tests/Austria/Vienna/ViennaTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 2 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 2 +- tests/Base/TypographyTest.php | 2 +- tests/Base/WeekendTest.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/Canada/Alberta/AlbertaBaseTestCase.php | 2 +- tests/Canada/Alberta/AlbertaTest.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaBaseTestCase.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaTest.php | 2 +- tests/Canada/CanadaBaseTestCase.php | 2 +- tests/Canada/CanadaDayTest.php | 2 +- tests/Canada/CanadaTest.php | 2 +- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 2 +- tests/Canada/Manitoba/ManitobaBaseTestCase.php | 2 +- tests/Canada/Manitoba/ManitobaTest.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickTest.php | 2 +- tests/Canada/NewYearsDayTest.php | 2 +- .../NewfoundlandAndLabradorBaseTestCase.php | 2 +- .../NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php | 2 +- .../NorthwestTerritories/NorthwestTerritoriesBaseTestCase.php | 2 +- tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php | 2 +- tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php | 2 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 2 +- tests/Canada/Nunavut/NunavutBaseTestCase.php | 2 +- tests/Canada/Nunavut/NunavutTest.php | 2 +- tests/Canada/Ontario/OntarioBaseTestCase.php | 2 +- tests/Canada/Ontario/OntarioTest.php | 2 +- .../PrinceEdwardIsland/PrinceEdwardIslandBaseTestCase.php | 2 +- tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php | 2 +- tests/Canada/Quebec/QuebecBaseTestCase.php | 2 +- tests/Canada/Quebec/QuebecTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanTest.php | 2 +- tests/Canada/ThanksgivingDayTest.php | 2 +- tests/Canada/TruthAndReconciliationDayTest.php | 2 +- tests/Canada/Yukon/YukonBaseTestCase.php | 2 +- tests/Canada/Yukon/YukonTest.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/CroatiaTest.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/RemembranceDayTest.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 +- tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php | 2 +- tests/CzechRepublic/InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php | 2 +- tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/CzechRepublic/SecondChristmasDayTest.php | 2 +- tests/CzechRepublic/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/DaylightSavingTime.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/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/Georgia/GeorgiaBaseTestCase.php | 2 +- tests/Georgia/GeorgiaTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 2 +- tests/Georgia/MtskhetobaDayTest.php | 2 +- tests/Georgia/NewYearsDayTest.php | 2 +- tests/Georgia/OrthodoxChristmasDayTest.php | 2 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 2 +- tests/Georgia/SecondNewYearDayTest.php | 2 +- tests/Georgia/StAndrewsDayTest.php | 2 +- tests/Georgia/StGeorgesDayTest.php | 2 +- tests/Georgia/StMarysDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Georgia/VictoryDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- tests/Germany/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 +- tests/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/DayOfLiberation2020Test.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 +- .../Germany/MecklenburgWesternPomerania/GermanUnityDayTest.php | 2 +- .../MecklenburgWesternPomerania/InternationalWomensDayTest.php | 2 +- .../MecklenburgWesternPomeraniaBaseTestCase.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../Germany/MecklenburgWesternPomerania/ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php | 2 +- tests/Germany/NorthRhineWestphalia/GermanUnityDayTest.php | 2 +- .../NorthRhineWestphalia/NorthRhineWestphaliaBaseTestCase.php | 2 +- tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 2 +- tests/Germany/NorthRhineWestphalia/ReformationDay2017Test.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/PentecostTest.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 +- tests/Germany/RhinelandPalatinate/ReformationDay2017Test.php | 2 +- .../RhinelandPalatinate/RhinelandPalatinateBaseTestCase.php | 2 +- tests/Germany/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 +- tests/Germany/SchleswigHolstein/ReformationDay2017Test.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- .../Germany/SchleswigHolstein/SchleswigHolsteinBaseTestCase.php | 2 +- tests/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/Germany/Thuringia/WorldChildrensDayTest.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/IndependenceDayTest.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/HolidayTestCase.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 +- tests/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/AllSoulsDayTest.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 +- tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php | 2 +- tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/SecondChristmasDayTest.php | 2 +- tests/Lithuania/StJohnsDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- tests/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/LuxembourgBaseTestCase.php | 2 +- tests/Luxembourg/LuxembourgTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Mexico/AllSaintsDayTest.php | 2 +- tests/Mexico/AssumptionOfMaryTest.php | 2 +- tests/Mexico/ChristmasTest.php | 2 +- tests/Mexico/EasterMondayTest.php | 2 +- tests/Mexico/EpiphanyTest.php | 2 +- tests/Mexico/GoodFridayTest.php | 2 +- tests/Mexico/ImmaculateConceptionTest.php | 2 +- tests/Mexico/IndependenceDayTest.php | 2 +- tests/Mexico/InternationalWorkersDayTest.php | 2 +- tests/Mexico/MexicoBaseTestCase.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/DaylightSavingTime.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/ValentinesDayTest.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/ProviderTestCase.php | 2 +- tests/Randomizer.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/EpiphanyTest.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/StAndrewsDayTest.php | 2 +- tests/Romania/StJohnsDayTest.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/SlovakIndependenceDayTest.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/SouthKorea/UnitedNationsDayTest.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 +- tests/Spain/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 +- tests/Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- tests/Spain/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 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridBaseTestCase.php | 2 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- tests/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 +- tests/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 +- .../Spain/ValencianCommunity/ValencianCommunityBaseTestCase.php | 2 +- tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php | 2 +- tests/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 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenBaseTestCase.php | 2 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php | 2 +- tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenBaseTestCase.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.php | 2 +- .../Switzerland/BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- tests/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 +- tests/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/AllSaintsDayTest.php | 2 +- tests/Switzerland/Fribourg/AscensionDayTest.php | 2 +- tests/Switzerland/Fribourg/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Fribourg/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/CorpusChristiTest.php | 2 +- tests/Switzerland/Fribourg/December26thTest.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/ImmaculateConceptionTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/CorpusChristiTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/EasterTest.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/PentecostTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/December26thTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php | 2 +- tests/Switzerland/Neuchatel/January2ndTest.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 +- tests/Switzerland/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/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/Turkey/CommemorationOfAtaturkTest.php | 2 +- tests/Turkey/DemocracyDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NationalSovereigntyDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Turkey/RepublicDayTest.php | 2 +- tests/Turkey/TurkeyBaseTestCase.php | 2 +- tests/Turkey/TurkeyTest.php | 2 +- tests/Turkey/VictoryDayTest.php | 2 +- tests/USA/ChristmasDayTest.php | 2 +- tests/USA/ColumbusDayTest.php | 2 +- tests/USA/IndependenceDayTest.php | 2 +- tests/USA/JuneteenthTest.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/CatholicChristmasDayTest.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/SubstitutedHolidayTest.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/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 | 2 +- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/KingCharlesCoronationBankHolidayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/MotheringSundayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- tests/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 +- tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php | 2 +- tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.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 | 2 +- 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/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.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 | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- tests/YasumiBase.php | 2 +- 1686 files changed, 1686 insertions(+), 1686 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 30c125fa1..91d0df704 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -5,7 +5,7 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2023 AzuyaLabs + * Copyright (c) 2015 - 2024 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index 5276fcb26..3e5247433 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2023 AzuyaLabs +Copyright (c) 2015 - 2024 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 06ccf5dcb..fcf8aea40 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ - + + ./src/Yasumi @@ -23,6 +26,7 @@ ./src/Yasumi/data + ./tests From 32f8dbdd89cfa29452a124eac20cbd03016295bd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 2 Jan 2024 15:29:57 +0100 Subject: [PATCH 545/687] style: Simplify the code for selecting holidays before and after 2013 making it more concise Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 492aa3e4a..6d111de49 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -214,13 +214,7 @@ public function initialize(): void return; } - if ($this->year < 2013) { - // Holidays in used from 1949 until 2012 - $officialHolidays = $this->calculateBefore2013($this->year); - } else { - // Holidays in use from 2013 - $officialHolidays = $this->calculateCurrent(); - } + $officialHolidays = $this->year < 2013 ? $this->calculateBefore2013($this->year) : $this->calculateCurrent(); foreach ($officialHolidays as $holiday) { $this->addHoliday($this->{$holiday}($this->year, $this->timezone, $this->locale)); From 5cbfbed6790403324de0b48b7d934758c09db9d3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 5 Jan 2024 17:26:55 +0100 Subject: [PATCH 546/687] style: Fix naming of fully qualified class names Signed-off-by: Sacha Telgenhof --- examples/custom_provider.php | 2 +- phpinsights.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/custom_provider.php b/examples/custom_provider.php index 56be8dacb..773f93cc3 100644 --- a/examples/custom_provider.php +++ b/examples/custom_provider.php @@ -9,7 +9,7 @@ require 'vendor/autoload.php'; /** Provider for all observed holidays by the NYSE (New York Stock Exchange) */ -class NYSE extends \Yasumi\Provider\USA +class NYSE extends Yasumi\Provider\USA { /** * Initialize holidays for the NYSE. diff --git a/phpinsights.php b/phpinsights.php index 7ee615fda..4b5520d8b 100644 --- a/phpinsights.php +++ b/phpinsights.php @@ -60,19 +60,19 @@ ], 'remove' => [ - \PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::class, - \SlevomatCodingStandard\Sniffs\ControlStructures\DisallowShortTernaryOperatorSniff::class, - \SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff::class, - \SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class, + PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::class, + SlevomatCodingStandard\Sniffs\ControlStructures\DisallowShortTernaryOperatorSniff::class, + SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff::class, + SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class, // Remove checks for superfluous naming as we follow PER which supports such convention - \SlevomatCodingStandard\Sniffs\Classes\SuperfluousInterfaceNamingSniff::class, - \SlevomatCodingStandard\Sniffs\Classes\SuperfluousAbstractClassNamingSniff::class, - \SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff::class, + SlevomatCodingStandard\Sniffs\Classes\SuperfluousInterfaceNamingSniff::class, + SlevomatCodingStandard\Sniffs\Classes\SuperfluousAbstractClassNamingSniff::class, + SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff::class, ], 'config' => [ - \PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class => [ + PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class => [ 'lineLimit' => 120, 'absoluteLineLimit' => 140, 'ignoreComments' => false, From a9d7dd3504a6a057b9e61c45093e3ad73e53208e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 7 Jan 2024 15:04:49 +0100 Subject: [PATCH 547/687] build: Remove unused infections Composer script entry Signed-off-by: Sacha Telgenhof --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 8a8b9f061..ca2d3ebea 100644 --- a/composer.json +++ b/composer.json @@ -73,7 +73,6 @@ "@psalm" ], "format": "./vendor/bin/php-cs-fixer fix", - "infection": "vendor/bin/infection run -j 2", "phan": "vendor/bin/phan -C", "phpstan": "vendor/bin/phpstan analyse", "psalm": "vendor/bin/psalm --threads=2", From 0dc328a4efc2590b2d8f256e551d1d92e359f4f4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 16 Jan 2024 21:31:46 +0900 Subject: [PATCH 548/687] build: pin version of PHP CS Fixer to 3.46 as latest (3.47) release produces undesired changes Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ca2d3ebea..ce7721da3 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ }, "require-dev": { "ext-intl": "*", - "friendsofphp/php-cs-fixer": "^2.19 || ^3.40", + "friendsofphp/php-cs-fixer": "^2.19 || 3.46", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", From 30d56d6a8e5c3afb4fbc4fc807f21a9530575fe6 Mon Sep 17 00:00:00 2001 From: Atte Pulkkinen <97888225+attepulkkinen@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:01:19 +0200 Subject: [PATCH 549/687] refactor: update methods visibility in multiple Providers (#332) * Update methods visibility in multiple Providers Methods in several providers including Switzerland, South Korea, and Luxembourg among others have been updated from private to protected. These changes allow for better extensibility and customization of the Yasumi library. The methods affected are those calculating specific holidays in the different regions. --- CHANGELOG.md | 4 ++ src/Yasumi/Provider/Argentina.php | 22 +++++------ src/Yasumi/Provider/Australia.php | 10 ++--- .../Australia/AustralianCapitalTerritory.php | 12 +++--- .../Provider/Australia/NewSouthWales.php | 8 ++-- .../Provider/Australia/NorthernTerritory.php | 8 ++-- src/Yasumi/Provider/Australia/Queensland.php | 4 +- .../Australia/Queensland/Brisbane.php | 2 +- .../Provider/Australia/SouthAustralia.php | 10 ++--- src/Yasumi/Provider/Australia/Tasmania.php | 6 +-- .../Australia/Tasmania/CentralNorth.php | 2 +- .../Australia/Tasmania/FlindersIsland.php | 2 +- .../Australia/Tasmania/KingIsland.php | 2 +- .../Provider/Australia/Tasmania/Northeast.php | 2 +- .../Provider/Australia/Tasmania/Northwest.php | 2 +- .../Tasmania/Northwest/CircularHead.php | 2 +- .../Provider/Australia/Tasmania/South.php | 2 +- .../Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 12 +++--- .../Provider/Australia/WesternAustralia.php | 6 +-- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Brazil.php | 12 +++--- src/Yasumi/Provider/Canada.php | 10 ++--- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- .../Canada/NewfoundlandAndLabrador.php | 4 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- .../Provider/Canada/PrinceEdwardIsland.php | 4 +- src/Yasumi/Provider/Canada/Quebec.php | 4 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 4 +- src/Yasumi/Provider/Croatia.php | 10 ++--- src/Yasumi/Provider/CzechRepublic.php | 12 +++--- src/Yasumi/Provider/Denmark.php | 4 +- src/Yasumi/Provider/Estonia.php | 6 +-- src/Yasumi/Provider/Finland.php | 6 +-- src/Yasumi/Provider/France.php | 4 +- src/Yasumi/Provider/Georgia.php | 22 +++++------ src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/Provider/Germany/Berlin.php | 2 +- src/Yasumi/Provider/Germany/Brandenburg.php | 2 +- src/Yasumi/Provider/Germany/Bremen.php | 2 +- src/Yasumi/Provider/Germany/Hamburg.php | 2 +- src/Yasumi/Provider/Germany/LowerSaxony.php | 2 +- .../Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/Saxony.php | 4 +- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 2 +- .../Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 4 +- src/Yasumi/Provider/Greece.php | 12 +++--- src/Yasumi/Provider/Ireland.php | 16 ++++---- src/Yasumi/Provider/Italy.php | 4 +- src/Yasumi/Provider/Japan.php | 38 +++++++++---------- src/Yasumi/Provider/Latvia.php | 6 +-- src/Yasumi/Provider/Lithuania.php | 8 ++-- src/Yasumi/Provider/Luxembourg.php | 4 +- src/Yasumi/Provider/Mexico.php | 18 ++++----- src/Yasumi/Provider/Netherlands.php | 14 +++---- src/Yasumi/Provider/NewZealand.php | 12 +++--- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 4 +- src/Yasumi/Provider/Portugal.php | 12 +++--- src/Yasumi/Provider/Romania.php | 14 +++---- src/Yasumi/Provider/Russia.php | 16 ++++---- src/Yasumi/Provider/Slovakia.php | 12 +++--- src/Yasumi/Provider/SouthAfrica.php | 20 +++++----- src/Yasumi/Provider/SouthKorea.php | 14 +++---- src/Yasumi/Provider/Spain.php | 4 +- src/Yasumi/Provider/Spain/Andalusia.php | 2 +- src/Yasumi/Provider/Spain/Asturias.php | 2 +- src/Yasumi/Provider/Spain/BalearicIslands.php | 2 +- src/Yasumi/Provider/Spain/BasqueCountry.php | 2 +- src/Yasumi/Provider/Spain/CanaryIslands.php | 2 +- src/Yasumi/Provider/Spain/Cantabria.php | 2 +- src/Yasumi/Provider/Spain/CastileAndLeon.php | 2 +- .../Provider/Spain/CastillaLaMancha.php | 2 +- src/Yasumi/Provider/Spain/Catalonia.php | 2 +- src/Yasumi/Provider/Spain/Ceuta.php | 2 +- .../Provider/Spain/CommunityOfMadrid.php | 2 +- src/Yasumi/Provider/Spain/Extremadura.php | 2 +- src/Yasumi/Provider/Spain/Galicia.php | 4 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- .../Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 10 ++--- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Fribourg.php | 2 +- src/Yasumi/Provider/Switzerland/Geneva.php | 4 +- src/Yasumi/Provider/Switzerland/Glarus.php | 2 +- src/Yasumi/Provider/Switzerland/Jura.php | 2 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 6 +-- src/Yasumi/Provider/Switzerland/Obwalden.php | 2 +- src/Yasumi/Provider/Switzerland/Ticino.php | 2 +- src/Yasumi/Provider/Turkey.php | 12 +++--- src/Yasumi/Provider/USA.php | 20 +++++----- src/Yasumi/Provider/Ukraine.php | 14 +++---- src/Yasumi/Provider/UnitedKingdom.php | 6 +-- .../UnitedKingdom/NorthernIreland.php | 4 +- .../Provider/UnitedKingdom/Scotland.php | 6 +-- 102 files changed, 313 insertions(+), 309 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef0d6d12..ea7c792d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ changes. ### Changed +- Holiday calculation methods in providers are now protected instead of private + to allow use in [custom providers](https://www.yasumi.dev/docs/cookbook/custom_provider/). + [\#331](https://github.com/azuyalabs/yasumi/issues/331) + ### Fixed ### Removed diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 22a6252ad..8c2af555c 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -88,7 +88,7 @@ public function getSources(): array * * @see https://en.wikipedia.org/wiki/Brazilian_Carnival */ - private function addCarnvalHolidays(): void + protected function addCarnvalHolidays(): void { if ($this->year >= 1700) { $easter = $this->calculateEaster($this->year, $this->timezone); @@ -138,7 +138,7 @@ private function addCarnvalHolidays(): void * * @link https://en.wikipedia.org/wiki/Day_of_Remembrance_for_Truth_and_Justice */ - private function addRemembranceDay(): void + protected function addRemembranceDay(): void { if ($this->year >= 2006) { $this->addHoliday(new Holiday( @@ -164,7 +164,7 @@ private function addRemembranceDay(): void * * @link https://en.wikipedia.org/wiki/Malvinas_Day */ - private function addMalvinasDay(): void + protected function addMalvinasDay(): void { if ($this->year >= 1982) { $this->addHoliday(new Holiday( @@ -192,7 +192,7 @@ private function addMalvinasDay(): void * * @link https://en.wikipedia.org/wiki/First_National_Government */ - private function addMayRevolution(): void + protected function addMayRevolution(): void { if ($this->year >= 1810) { $this->addHoliday(new Holiday( @@ -213,7 +213,7 @@ private function addMayRevolution(): void * Anniversary of the death of Martín Miguel de Güemes, general of the * Argentine War of Independence. */ - private function addGeneralMartinMigueldeGuemesDay(): void + protected function addGeneralMartinMigueldeGuemesDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( @@ -236,7 +236,7 @@ private function addGeneralMartinMigueldeGuemesDay(): void * * @link https://en.wikipedia.org/wiki/Flag_Day_(Argentina) */ - private function addFlagDay(): void + protected function addFlagDay(): void { if ($this->year >= 1938) { $this->addHoliday(new Holiday( @@ -258,7 +258,7 @@ private function addFlagDay(): void * * @link https://en.wikipedia.org/wiki/Argentine_Declaration_of_Independence */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday( @@ -279,7 +279,7 @@ private function addIndependenceDay(): void * Anniversary of the death of José de San Martín, liberator of * Argentina, Chile and Peru. */ - private function addGeneralJoseSanMartinDay(): void + protected function addGeneralJoseSanMartinDay(): void { if ($this->year >= 1850) { $this->addHoliday(new Holiday( @@ -302,7 +302,7 @@ private function addGeneralJoseSanMartinDay(): void * * @link https://en.wikipedia.org/wiki/Columbus_Day */ - private function addRaceDay(): void + protected function addRaceDay(): void { if ($this->year >= 1492) { $this->addHoliday(new Holiday( @@ -325,7 +325,7 @@ private function addRaceDay(): void * * @link https://en.wikipedia.org/wiki/National_Sovereignty_Day */ - private function addNationalSovereigntyDay(): void + protected function addNationalSovereigntyDay(): void { if ($this->year >= 2010) { $this->addHoliday(new Holiday( @@ -348,7 +348,7 @@ private function addNationalSovereigntyDay(): void * * @link https://en.wikipedia.org/wiki/Immaculate_Conception */ - private function addImmaculateConceptionDay(): void + protected function addImmaculateConceptionDay(): void { if ($this->year >= 1900) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 16e559123..f599c3e7b 100644 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -77,7 +77,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearHolidays(): void + protected function calculateNewYearHolidays(): void { $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( @@ -129,7 +129,7 @@ private function calculateNewYearHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAustraliaDay(): void + protected function calculateAustraliaDay(): void { $date = new \DateTime("{$this->year}-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -172,7 +172,7 @@ private function calculateAustraliaDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAnzacDay(): void + protected function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -217,7 +217,7 @@ private function calculateAnzacDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDayOfMourning(): void + protected function calculateNationalDayOfMourning(): void { if (2022 !== $this->year) { return; @@ -244,7 +244,7 @@ private function calculateNationalDayOfMourning(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasDay(): void + protected function calculateChristmasDay(): void { $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $boxingDay = new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 819cb723e..4e2957726 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -69,7 +69,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSunday( + protected function easterSunday( int $year, string $timezone, string $locale, @@ -101,7 +101,7 @@ private function easterSunday( * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -137,7 +137,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -153,7 +153,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -165,7 +165,7 @@ private function calculateLabourDay(): void * * @throws \Exception */ - private function calculateCanberraDay(): void + protected function calculateCanberraDay(): void { $datePattern = $this->year < 2007 ? "third monday of march {$this->year}" : "second monday of march {$this->year}"; @@ -184,7 +184,7 @@ private function calculateCanberraDay(): void * * @throws \Exception */ - private function calculateReconciliationDay(): void + protected function calculateReconciliationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index af4c71a6d..54366a841 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -68,7 +68,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -104,7 +104,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -120,7 +120,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -133,7 +133,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateBankHoliday(): void + protected function calculateBankHoliday(): void { $this->addHoliday(new Holiday( 'bankHoliday', diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index be4ca50eb..55c69d125 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -67,7 +67,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -103,7 +103,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -119,7 +119,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateMayDay(): void + protected function calculateMayDay(): void { $date = new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -134,7 +134,7 @@ private function calculateMayDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculatePicnicDay(): void + protected function calculatePicnicDay(): void { $this->addHoliday(new Holiday( 'picnicDay', diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 8299eb353..0c6e38dc7 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $birthDay = 'first monday of october '.$this->year; @@ -85,7 +85,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index 538402938..b63d8f2dd 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -65,7 +65,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePeoplesDay(): void + protected function calculatePeoplesDay(): void { $date = new \DateTime('first friday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($date->format('d') < 5) { diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 75048026b..a08713fc0 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -75,7 +75,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -111,7 +111,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -127,7 +127,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -142,7 +142,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateAdelaideCupDay(): void + protected function calculateAdelaideCupDay(): void { if ($this->year >= 1973) { $cupDay = 'second monday of march '.$this->year; @@ -166,7 +166,7 @@ private function calculateAdelaideCupDay(): void * * @throws \Exception */ - private function calculateProclamationDay(): void + protected function calculateProclamationDay(): void { $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 5ccb1900e..7d97aa80f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -54,7 +54,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateEightHoursDay(): void + protected function calculateEightHoursDay(): void { $date = new \DateTime("second monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -76,7 +76,7 @@ private function calculateEightHoursDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -95,7 +95,7 @@ private function calculateQueensBirthday(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateRecreationDay(): void + protected function calculateRecreationDay(): void { $this->addHoliday(new Holiday( 'recreationDay', diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index aaa45dcf4..3701c94b9 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateDevonportShow(): void + protected function calculateDevonportShow(): void { $date = new \DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index b4ee4ff8c..7f50e4579 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateFlindersIslandShow(): void + protected function calculateFlindersIslandShow(): void { $date = new \DateTime('third saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index b0c454540..78e4abc43 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateKingIslandShow(): void + protected function calculateKingIslandShow(): void { $this->addHoliday(new Holiday( 'kingIslandShow', diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index eceb3b804..b2aca1fd9 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateLauncestonShow(): void + protected function calculateLauncestonShow(): void { $date = new \DateTime('second saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index 80f3a372c..be6fe7582 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateBurnieShow(): void + protected function calculateBurnieShow(): void { $date = new \DateTime('first saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 4c407c65b..160e966a0 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateAGFEST(): void + protected function calculateAGFEST(): void { $date = new \DateTime('first thursday of may '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->add(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index c963147bd..512815daa 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateHobartShow(): void + protected function calculateHobartShow(): void { $date = new \DateTime('fourth saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index 76d224620..b489e4c53 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -54,7 +54,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateHobartRegatta(): void + protected function calculateHobartRegatta(): void { $this->addHoliday(new Holiday( 'hobartRegatta', diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index a6d6954e7..e0784de43 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -69,7 +69,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSunday( + protected function easterSunday( int $year, string $timezone, string $locale, @@ -101,7 +101,7 @@ private function easterSunday( * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -127,7 +127,7 @@ private function easterSaturday( * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("second monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -149,7 +149,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -165,7 +165,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateMelbourneCupDay(): void + protected function calculateMelbourneCupDay(): void { $date = new \DateTime('first Tuesday of November'." {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -177,7 +177,7 @@ private function calculateMelbourneCupDay(): void * * @throws \Exception */ - private function calculateAFLGrandFinalDay(): void + protected function calculateAFLGrandFinalDay(): void { switch ($this->year) { case 2015: diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index 39f820f19..6727b2609 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -64,7 +64,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $birthDay = 'last monday of september '.$this->year; if (2011 === $this->year) { @@ -89,7 +89,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -104,7 +104,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateWesternAustraliaDay(): void + protected function calculateWesternAustraliaDay(): void { $this->addHoliday(new Holiday( 'westernAustraliaDay', diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index db259971f..1e3c5516b 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -116,7 +116,7 @@ protected function calculateStLeopoldsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { if ($this->year < 1955) { return; diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php index ea5df7f89..b77b22d25 100644 --- a/src/Yasumi/Provider/Austria/Carinthia.php +++ b/src/Yasumi/Provider/Austria/Carinthia.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePlebisciteDay(): void + protected function calculatePlebisciteDay(): void { if ($this->year < 1920) { return; diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php index 98f227606..89d422beb 100644 --- a/src/Yasumi/Provider/Austria/Salzburg.php +++ b/src/Yasumi/Provider/Austria/Salzburg.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStRupertsDay(): void + protected function calculateStRupertsDay(): void { if ($this->year < 710) { return; diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php index fbb044643..7773c16d8 100644 --- a/src/Yasumi/Provider/Austria/UpperAustria.php +++ b/src/Yasumi/Provider/Austria/UpperAustria.php @@ -64,7 +64,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStFloriansDay(): void + protected function calculateStFloriansDay(): void { if ($this->year < 304) { return; diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index ea778e2c0..ebd7662cb 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -79,7 +79,7 @@ public function getSources(): array * * @link https://en.wikipedia.org/wiki/Proclamation_of_the_Republic_(Brazil) */ - private function calculateProclamationOfRepublicDay(): void + protected function calculateProclamationOfRepublicDay(): void { if ($this->year >= 1889) { $this->addHoliday(new Holiday( @@ -97,7 +97,7 @@ private function calculateProclamationOfRepublicDay(): void * * @link http://www.johninbrazil.org/all-souls-day-o-dia-dos-finados/ */ - private function calculateAllSoulsDay(): void + protected function calculateAllSoulsDay(): void { if ($this->year >= 1300) { $this->addHoliday(new Holiday( @@ -120,7 +120,7 @@ private function calculateAllSoulsDay(): void * * @link https://en.wikipedia.org/wiki/Our_Lady_of_Aparecida */ - private function calculateOurLadyOfAparecidaDay(): void + protected function calculateOurLadyOfAparecidaDay(): void { if ($this->year >= 1980) { $this->addHoliday(new Holiday( @@ -140,7 +140,7 @@ private function calculateOurLadyOfAparecidaDay(): void * * @link https://en.wikipedia.org/wiki/Independence_of_Brazil */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1822) { $this->addHoliday(new Holiday( @@ -161,7 +161,7 @@ private function calculateIndependenceDay(): void * * @link https://en.wikipedia.org/wiki/Tiradentes */ - private function calculateTiradentesDay(): void + protected function calculateTiradentesDay(): void { if ($this->year >= 1792) { $this->addHoliday(new Holiday( @@ -181,7 +181,7 @@ private function calculateTiradentesDay(): void * * @link https://en.wikipedia.org/wiki/Brazilian_Carnival */ - private function calculateCarnival(): void + protected function calculateCarnival(): void { if ($this->year >= 1700) { $easter = $this->calculateEaster($this->year, $this->timezone); diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index e001f71f6..e376329fc 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -171,7 +171,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCanadaDay(): void + protected function calculateCanadaDay(): void { if ($this->year < 1983) { return; @@ -197,7 +197,7 @@ private function calculateCanadaDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateThanksgivingDay(): void + protected function calculateThanksgivingDay(): void { if ($this->year < 1879) { return; @@ -220,7 +220,7 @@ private function calculateThanksgivingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRemembranceDay(): void + protected function calculateRemembranceDay(): void { if ($this->year < 1919) { return; @@ -243,7 +243,7 @@ private function calculateRemembranceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { if ($this->year < 1894) { return; @@ -266,7 +266,7 @@ private function calculateLabourDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDayForTruthAndReconciliation(): void + protected function calculateNationalDayForTruthAndReconciliation(): void { if ($this->year < 2021) { return; diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index 1e44ef419..ef982cfa1 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { if ($this->year < 1879) { return; diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index fe676a8ea..6cd9ee414 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -85,7 +85,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLouisRielDay(): void + protected function calculateLouisRielDay(): void { if ($this->year < 2008) { return; diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index 074456631..7df2a70b4 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -69,7 +69,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPatricksDay(): void + protected function calculateStPatricksDay(): void { if ($this->year < 1971) { return; @@ -113,7 +113,7 @@ private function calculateStPatricksDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOrangemensDay(): void + protected function calculateOrangemensDay(): void { if ($this->year < 1926) { return; diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index dfa23b35a..b29307c28 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -85,7 +85,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { if ($this->year < 2015) { return; diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index ba4e24383..e40d7f420 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIslanderDay(): void + protected function calculateIslanderDay(): void { if ($this->year < 2009) { return; @@ -85,7 +85,7 @@ private function calculateIslanderDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGoldCupParadeDay(): void + protected function calculateGoldCupParadeDay(): void { if ($this->year < 1962) { return; diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index fed6d481e..8d867ff22 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function saintJeanBaptisteDay( + protected function saintJeanBaptisteDay( int $year, string $timezone, string $locale, @@ -97,7 +97,7 @@ private function saintJeanBaptisteDay( * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalPatriotsDay(): void + protected function calculateNationalPatriotsDay(): void { if ($this->year < 2003) { return; diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index f9c9c19da..85c8ad4f0 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSaskatchewanDay(): void + protected function calculateSaskatchewanDay(): void { if ($this->year < 1879) { return; diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index 1e25d04f0..6a8d9437e 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDiscoveryDay(): void + protected function calculateDiscoveryDay(): void { if ($this->year < 1897) { return; @@ -86,7 +86,7 @@ private function calculateDiscoveryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { if ($this->year < 2009) { return; diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 2f4cc8ab7..f8e0d0460 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -82,7 +82,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateStatehoodDay(): void + protected function calculateStatehoodDay(): void { if ($this->year >= 1991) { $statehoodDayDate = new \DateTime($this->year >= 2020 ? "{$this->year}-5-30" : "{$this->year}-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -99,7 +99,7 @@ private function calculateStatehoodDay(): void * * @throws \Exception */ - private function calculateHomelandThanksgivingDay(): void + protected function calculateHomelandThanksgivingDay(): void { $names = []; if ($this->year >= 1995 && $this->year < 2020) { @@ -127,7 +127,7 @@ private function calculateHomelandThanksgivingDay(): void * * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year < 1991) { return; @@ -149,7 +149,7 @@ private function calculateIndependenceDay(): void * * @throws \Exception */ - private function calculateRemembranceDayForHomelandWarVictims(): void + protected function calculateRemembranceDayForHomelandWarVictims(): void { if ($this->year >= 2020) { $this->addHoliday(new Holiday('remembranceDay', [ @@ -162,7 +162,7 @@ private function calculateRemembranceDayForHomelandWarVictims(): void /* * Day of Antifascist Struggle */ - private function calculateAntiFascistsStruggleDay(): void + protected function calculateAntiFascistsStruggleDay(): void { if ($this->year >= 1941) { $this->addHoliday(new Holiday('antifascistStruggleDay', [ diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 8486bebc8..066c76a4a 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -80,7 +80,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRenewalOfCzechIndependenceDay(): void + protected function calculateRenewalOfCzechIndependenceDay(): void { $this->addHoliday(new Holiday( 'czechRenewalOfIndependentStateDay', @@ -113,7 +113,7 @@ private function calculateRenewalOfCzechIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSaintsCyrilAndMethodiusDay(): void + protected function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', @@ -140,7 +140,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJanHusDay(): void + protected function calculateJanHusDay(): void { $this->addHoliday(new Holiday( 'janHusDay', @@ -167,7 +167,7 @@ private function calculateJanHusDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCzechStatehoodDay(): void + protected function calculateCzechStatehoodDay(): void { $this->addHoliday(new Holiday( 'czechStateHoodDay', @@ -189,7 +189,7 @@ private function calculateCzechStatehoodDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependentCzechoslovakStateDay(): void + protected function calculateIndependentCzechoslovakStateDay(): void { $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs' => 'Den vzniku samostatného československého státu', @@ -206,7 +206,7 @@ private function calculateIndependentCzechoslovakStateDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStruggleForFreedomAndDemocracyDay(): void + protected function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index c43e5d0a5..407ed95e8 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -87,7 +87,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGreatPrayerDay(): void + protected function calculateGreatPrayerDay(): void { $easter = $this->calculateEaster($this->year, $this->timezone)->format('Y-m-d'); @@ -122,7 +122,7 @@ private function calculateGreatPrayerDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1849) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index c986adf2a..75459f3b6 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -76,7 +76,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= self::DECLARATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('independenceDay', [ @@ -90,7 +90,7 @@ private function addIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { if ($this->year >= self::VICTORY_DAY_START_YEAR) { $this->addHoliday(new Holiday('victoryDay', [ @@ -104,7 +104,7 @@ private function addVictoryDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfIndependenceDay(): void + protected function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 5e205be56..ed76e5860 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -90,7 +90,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsDay(): void + protected function calculateStJohnsDay(): void { $stJohnsDay = $this->year < 1955 ? "{$this->year}-6-24" : "{$this->year}-6-20 this saturday"; @@ -123,7 +123,7 @@ private function calculateStJohnsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsDay(): void + protected function calculateAllSaintsDay(): void { $this->addHoliday(new Holiday( 'allSaintsDay', @@ -150,7 +150,7 @@ private function calculateAllSaintsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1917) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 1a548a024..4957a7246 100644 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -93,7 +93,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBastilleDay(): void + protected function calculateBastilleDay(): void { if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ @@ -115,7 +115,7 @@ private function calculateBastilleDay(): void * * @throws \Exception */ - private function calculatePentecostMonday(): void + protected function calculatePentecostMonday(): void { $type = Holiday::TYPE_OFFICIAL; diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 129983392..2473fe625 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -87,7 +87,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf * @throws \InvalidArgumentException * @throws \Exception */ - private function addOrthodoxChristmasDay(): void + protected function addOrthodoxChristmasDay(): void { $date = new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)); @@ -101,7 +101,7 @@ private function addOrthodoxChristmasDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-05-26", new \DateTimeZone($this->timezone)); @@ -117,7 +117,7 @@ private function addIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addUnityDay(): void + protected function addUnityDay(): void { if ($this->year >= self::APRIL_NINE_TRAGEDY_YEAR) { $date = new \DateTime("{$this->year}-04-09", new \DateTimeZone($this->timezone)); @@ -133,7 +133,7 @@ private function addUnityDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addMothersDay(): void + protected function addMothersDay(): void { $date = new \DateTime("{$this->year}-03-03", new \DateTimeZone($this->timezone)); @@ -147,7 +147,7 @@ private function addMothersDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { $date = new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)); @@ -161,7 +161,7 @@ private function addVictoryDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStAndrewsDay(): void + protected function addStAndrewsDay(): void { $date = new \DateTime("{$this->year}-05-12", new \DateTimeZone($this->timezone)); @@ -175,7 +175,7 @@ private function addStAndrewsDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addOrthodoxEpiphanyDay(): void + protected function addOrthodoxEpiphanyDay(): void { $date = new \DateTime("{$this->year}-01-19", new \DateTimeZone($this->timezone)); @@ -189,7 +189,7 @@ private function addOrthodoxEpiphanyDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStMarysDay(): void + protected function addStMarysDay(): void { $date = new \DateTime("{$this->year}-08-28", new \DateTimeZone($this->timezone)); @@ -203,7 +203,7 @@ private function addStMarysDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addMtskhetobaDay(): void + protected function addMtskhetobaDay(): void { $date = new \DateTime("{$this->year}-10-14", new \DateTimeZone($this->timezone)); @@ -217,7 +217,7 @@ private function addMtskhetobaDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStGeorgesDay(): void + protected function addStGeorgesDay(): void { $date = new \DateTime("{$this->year}-11-23", new \DateTimeZone($this->timezone)); @@ -231,7 +231,7 @@ private function addStGeorgesDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addSecondNewYearDay(): void + protected function addSecondNewYearDay(): void { $date = new \DateTime("{$this->year}-01-02", new \DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 654a4c2c2..272220569 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -90,7 +90,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGermanUnityDay(): void + protected function calculateGermanUnityDay(): void { if ($this->year >= 1990) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 092839582..0e398c858 100644 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -74,7 +74,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function dayOfLiberation( + protected function dayOfLiberation( string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Germany/Brandenburg.php b/src/Yasumi/Provider/Germany/Brandenburg.php index ea4a63f1d..3e29945af 100644 --- a/src/Yasumi/Provider/Germany/Brandenburg.php +++ b/src/Yasumi/Provider/Germany/Brandenburg.php @@ -61,7 +61,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; diff --git a/src/Yasumi/Provider/Germany/Bremen.php b/src/Yasumi/Provider/Germany/Bremen.php index 074fa2c1d..3cff05a37 100644 --- a/src/Yasumi/Provider/Germany/Bremen.php +++ b/src/Yasumi/Provider/Germany/Bremen.php @@ -57,7 +57,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index 019896fbf..538fc8d3a 100644 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -58,7 +58,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfReformation(): void + protected function calculateDayOfReformation(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/LowerSaxony.php b/src/Yasumi/Provider/Germany/LowerSaxony.php index 5618cbc0a..8cf4bd770 100644 --- a/src/Yasumi/Provider/Germany/LowerSaxony.php +++ b/src/Yasumi/Provider/Germany/LowerSaxony.php @@ -60,7 +60,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php index 549c54542..34876641a 100644 --- a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php +++ b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php @@ -70,7 +70,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index b98973c98..0c54143bb 100644 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -60,7 +60,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; @@ -85,7 +85,7 @@ private function calculateReformationDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRepentanceAndPrayerDay(): void + protected function calculateRepentanceAndPrayerDay(): void { if ($this->year >= 1995) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php index 849038769..f33f1d61d 100644 --- a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php +++ b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php @@ -58,7 +58,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; diff --git a/src/Yasumi/Provider/Germany/SchleswigHolstein.php b/src/Yasumi/Provider/Germany/SchleswigHolstein.php index 253272611..f16a3526b 100644 --- a/src/Yasumi/Provider/Germany/SchleswigHolstein.php +++ b/src/Yasumi/Provider/Germany/SchleswigHolstein.php @@ -57,7 +57,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index fa7adec4d..1555d0e3e 100644 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; @@ -77,7 +77,7 @@ private function calculateReformationDay(): void * * @throws \Exception */ - private function calculateWorldChildrensDay(): void + protected function calculateWorldChildrensDay(): void { if ($this->year < 2019) { return; diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 1193eed7d..dd8aa353c 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -87,7 +87,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateThreeHolyHierarchs(): void + protected function calculateThreeHolyHierarchs(): void { $this->addHoliday(new Holiday( 'threeHolyHierarchs', @@ -111,7 +111,7 @@ private function calculateThreeHolyHierarchs(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCleanMonday(): void + protected function calculateCleanMonday(): void { $holiday = 'cleanMonday'; $date = $this->calculateEaster($this->year, $this->timezone)->sub(new \DateInterval('P48D')); @@ -132,7 +132,7 @@ private function calculateCleanMonday(): void * * @throws \Exception */ - private function calculateEaster(int $year, string $timezone): \DateTimeInterface + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { return $this->calculateOrthodoxEaster($year, $timezone); } @@ -148,7 +148,7 @@ private function calculateEaster(int $year, string $timezone): \DateTimeInterfac * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( @@ -171,7 +171,7 @@ private function calculateIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOhiDay(): void + protected function calculateOhiDay(): void { if ($this->year >= 1940) { $this->addHoliday(new Holiday( @@ -194,7 +194,7 @@ private function calculateOhiDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePolytechnio(): void + protected function calculatePolytechnio(): void { if ($this->year >= 1973) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 998b8d401..6dd73c33f 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -99,7 +99,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearsDay(): void + protected function calculateNewYearsDay(): void { if ($this->year < 1974) { return; @@ -134,7 +134,7 @@ private function calculateNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePentecostMonday(): void + protected function calculatePentecostMonday(): void { if ($this->year > 1973) { return; @@ -155,7 +155,7 @@ private function calculatePentecostMonday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasDay(): void + protected function calculateChristmasDay(): void { $holiday = new Holiday( 'christmasDay', @@ -193,7 +193,7 @@ private function calculateChristmasDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStStephensDay(): void + protected function calculateStStephensDay(): void { $holiday = new Holiday( 'stStephensDay', @@ -233,7 +233,7 @@ private function calculateStStephensDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPatricksDay(): void + protected function calculateStPatricksDay(): void { if ($this->year < 1903) { return; @@ -276,7 +276,7 @@ private function calculateStPatricksDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMayDay(): void + protected function calculateMayDay(): void { if ($this->year < 1994) { return; @@ -302,7 +302,7 @@ private function calculateMayDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJuneHoliday(): void + protected function calculateJuneHoliday(): void { if ($this->year < 1974) { return; @@ -327,7 +327,7 @@ private function calculateJuneHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOctoberHoliday(): void + protected function calculateOctoberHoliday(): void { if ($this->year < 1977) { return; diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index cab081509..8266fd9ab 100644 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -85,7 +85,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLiberationDay(): void + protected function calculateLiberationDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -111,7 +111,7 @@ private function calculateLiberationDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRepublicDay(): void + protected function calculateRepublicDay(): void { if ($this->year >= 1946) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 3230f28f3..5070e9f53 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -118,7 +118,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateNationalFoundationDay(): void + protected function calculateNationalFoundationDay(): void { if ($this->year >= 1966) { $this->addHoliday(new Holiday( @@ -138,7 +138,7 @@ private function calculateNationalFoundationDay(): void * * @throws \Exception */ - private function calculateShowaDay(): void + protected function calculateShowaDay(): void { if ($this->year >= 2007) { $this->addHoliday(new Holiday( @@ -158,7 +158,7 @@ private function calculateShowaDay(): void * * @throws \Exception */ - private function calculateConstitutionMemorialDay(): void + protected function calculateConstitutionMemorialDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -178,7 +178,7 @@ private function calculateConstitutionMemorialDay(): void * * @throws \Exception */ - private function calculateChildrensDay(): void + protected function calculateChildrensDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -198,7 +198,7 @@ private function calculateChildrensDay(): void * * @throws \Exception */ - private function calculateCultureDay(): void + protected function calculateCultureDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -215,7 +215,7 @@ private function calculateCultureDay(): void * * @throws \Exception */ - private function calculateLaborThanksgivingDay(): void + protected function calculateLaborThanksgivingDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -235,7 +235,7 @@ private function calculateLaborThanksgivingDay(): void * * @throws \Exception */ - private function calculateEmperorsBirthday(): void + protected function calculateEmperorsBirthday(): void { $emperorsBirthday = null; if ($this->year >= 2020) { @@ -269,7 +269,7 @@ private function calculateEmperorsBirthday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateVernalEquinoxDay(): void + protected function calculateVernalEquinoxDay(): void { $day = null; if ($this->year >= 1948 && $this->year <= 1979) { @@ -304,7 +304,7 @@ private function calculateVernalEquinoxDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateComingOfAgeDay(): void + protected function calculateComingOfAgeDay(): void { if ($this->year >= 1948) { $date = $this->year >= 2000 ? @@ -329,7 +329,7 @@ private function calculateComingOfAgeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGreeneryDay(): void + protected function calculateGreeneryDay(): void { $date = null; if ($this->year >= 2007) { @@ -358,7 +358,7 @@ private function calculateGreeneryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMarineDay(): void + protected function calculateMarineDay(): void { if (1996 > $this->year) { return; @@ -397,7 +397,7 @@ private function calculateMarineDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMountainDay(): void + protected function calculateMountainDay(): void { $date = null; if (2021 === $this->year) { @@ -430,7 +430,7 @@ private function calculateMountainDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRespectForTheAgeDay(): void + protected function calculateRespectForTheAgeDay(): void { $date = null; if ($this->year >= 2003) { @@ -459,7 +459,7 @@ private function calculateRespectForTheAgeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSportsDay(): void + protected function calculateSportsDay(): void { $date = null; if (2021 === $this->year) { @@ -502,7 +502,7 @@ private function calculateSportsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAutumnalEquinoxDay(): void + protected function calculateAutumnalEquinoxDay(): void { $day = null; if ($this->year >= 1948 && $this->year <= 1979) { @@ -537,7 +537,7 @@ private function calculateAutumnalEquinoxDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteHolidays(): void + protected function calculateSubstituteHolidays(): void { // Get initial list of holiday dates $dates = $this->getHolidayDates(); @@ -584,7 +584,7 @@ private function calculateSubstituteHolidays(): void * * @throws \Exception */ - private function calculateCoronationDay(): void + protected function calculateCoronationDay(): void { if (2019 === $this->year) { $this->addHoliday(new Holiday( @@ -602,7 +602,7 @@ private function calculateCoronationDay(): void * * @throws \Exception */ - private function calculateEnthronementProclamationCeremony(): void + protected function calculateEnthronementProclamationCeremony(): void { if (2019 === $this->year) { $this->addHoliday(new Holiday( @@ -623,7 +623,7 @@ private function calculateEnthronementProclamationCeremony(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBridgeHolidays(): void + protected function calculateBridgeHolidays(): void { // Get initial list of holidays and iterator $datesIterator = $this->getIterator(); diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 4b3b6da3e..9afe8d51e 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -78,7 +78,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfIndependenceDay(): void + protected function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-05-04", new \DateTimeZone($this->timezone)); @@ -98,7 +98,7 @@ private function addRestorationOfIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addMidsummerEveDay(): void + protected function addMidsummerEveDay(): void { $this->addHoliday(new Holiday('midsummerEveDay', [ 'en' => 'Midsummer Eve', @@ -113,7 +113,7 @@ private function addMidsummerEveDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addProclamationDay(): void + protected function addProclamationDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-11-18", new \DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 3827b8320..a840578f9 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -94,7 +94,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfTheStateDay(): void + protected function addRestorationOfTheStateDay(): void { if ($this->year >= self::RESTORATION_OF_THE_STATE_YEAR) { $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ @@ -110,7 +110,7 @@ private function addRestorationOfTheStateDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfIndependenceDay(): void + protected function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ @@ -127,7 +127,7 @@ private function addRestorationOfIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStatehoodDay(): void + protected function addStatehoodDay(): void { if ($this->year >= self::STATEHOOD_YEAR) { $this->addHoliday(new Holiday('statehoodDay', [ @@ -143,7 +143,7 @@ private function addStatehoodDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addAllSoulsDay(): void + protected function addAllSoulsDay(): void { if ($this->year >= self::ALL_SOULS_DAY) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 9700b5b9e..b7214149e 100644 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -81,7 +81,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateEuropeDay(): void + protected function calculateEuropeDay(): void { if ($this->year >= 2019) { $this->addHoliday(new Holiday('europeDay', [ @@ -106,7 +106,7 @@ private function calculateEuropeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', diff --git a/src/Yasumi/Provider/Mexico.php b/src/Yasumi/Provider/Mexico.php index 3beb222f2..d4bbffaff 100644 --- a/src/Yasumi/Provider/Mexico.php +++ b/src/Yasumi/Provider/Mexico.php @@ -92,7 +92,7 @@ public function getSources(): array * * @link https://en.wikipedia.org/wiki/Mexican_War_of_Independence */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= 1810) { $this->addHoliday(new Holiday( @@ -112,7 +112,7 @@ private function addIndependenceDay(): void * * Anniversary of the Constitution of 1917, originally February 5, observed on the first Monday of February. */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1917) { $this->addHoliday(new Holiday( @@ -131,7 +131,7 @@ private function calculateConstitutionDay(): void * * Anniversary of the birth of Benito Juárez on March 21, 1806, observed on the third Monday of March. */ - private function calculateBenitoJuarezBirthday(): void + protected function calculateBenitoJuarezBirthday(): void { if ($this->year >= 1806 && $this->year < 2010) { $this->addHoliday(new Holiday( @@ -161,7 +161,7 @@ private function calculateBenitoJuarezBirthday(): void * * Anniversary of the start of the Mexican Revolution on November 20, 1910, observed on the third Monday of November. */ - private function calculateRevolutionDay(): void + protected function calculateRevolutionDay(): void { if ($this->year >= 1910) { $this->addHoliday(new Holiday( @@ -180,7 +180,7 @@ private function calculateRevolutionDay(): void * * Anniversary of the Discovery of America on October 12, 1492, observed on the second Monday of October. */ - private function calculateDiscoveryOfAmerica(): void + protected function calculateDiscoveryOfAmerica(): void { if ($this->year >= 1492) { $this->addHoliday(new Holiday( @@ -200,7 +200,7 @@ private function calculateDiscoveryOfAmerica(): void * Christmas Eve is the day before Christmas Day, which is annually on December 24, according to the Gregorian * calendar. */ - private function calculateChristmasEve(): void + protected function calculateChristmasEve(): void { $this->addHoliday(new Holiday( 'christmasEve', @@ -217,7 +217,7 @@ private function calculateChristmasEve(): void * * New Year's Eve is the last day of the year, December 31, in the Gregorian calendar. */ - private function calculateNewYearsEve(): void + protected function calculateNewYearsEve(): void { $this->addHoliday(new Holiday( 'newYearsEve', @@ -235,7 +235,7 @@ private function calculateNewYearsEve(): void * Day of the Deaths is a Mexican holiday celebrated throughout Mexico, in particular the Central and South regions, * and by people of Mexican heritage elsewhere. */ - private function calculateDayOfTheDead(): void + protected function calculateDayOfTheDead(): void { if ($this->year >= 1800) { $this->addHoliday(new Holiday( @@ -255,7 +255,7 @@ private function calculateDayOfTheDead(): void * The Virgin of Guadalupe (Día de la Virgen de Guadalupe) is a celebration of the Virgin Mary, * who is the patron saint of Mexico. It is observed on December 12th. */ - private function calculateVirginOfGuadalupe(): void + protected function calculateVirginOfGuadalupe(): void { if ($this->year >= 1531) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 94003b53d..754e3e015 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -101,7 +101,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateCarnival(): void + protected function calculateCarnival(): void { $easter = $this->calculateEaster($this->year, $this->timezone); @@ -140,7 +140,7 @@ private function calculateCarnival(): void * * @throws \Exception */ - private function calculateStNicholasDay(): void + protected function calculateStNicholasDay(): void { /* * St. Nicholas' Day @@ -166,7 +166,7 @@ private function calculateStNicholasDay(): void * * @throws \Exception */ - private function calculateHalloween(): void + protected function calculateHalloween(): void { $this->addHoliday(new Holiday( 'halloween', @@ -185,7 +185,7 @@ private function calculateHalloween(): void * * @throws \Exception */ - private function calculatePrincesDay(): void + protected function calculatePrincesDay(): void { $this->addHoliday(new Holiday( 'princesDay', @@ -205,7 +205,7 @@ private function calculatePrincesDay(): void * * @throws \Exception */ - private function calculateQueensday(): void + protected function calculateQueensday(): void { if ($this->year >= 1891 && $this->year <= 2013) { $date = new \DateTime("{$this->year}-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -235,7 +235,7 @@ private function calculateQueensday(): void * * @throws \Exception */ - private function calculateKingsday(): void + protected function calculateKingsday(): void { if ($this->year >= 2014) { $date = new \DateTime("{$this->year}-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -260,7 +260,7 @@ private function calculateKingsday(): void * * @throws \Exception */ - private function calculateCommemorationLiberationDay(): void + protected function calculateCommemorationLiberationDay(): void { if ($this->year >= 1947) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 8f3261997..22fb45a6d 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -78,7 +78,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearHolidays(): void + protected function calculateNewYearHolidays(): void { $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $dayAfterNewYearsDay = new \DateTime("{$this->year}-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -117,7 +117,7 @@ private function calculateNewYearHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateWaitangiDay(): void + protected function calculateWaitangiDay(): void { if ($this->year < 1974) { return; @@ -146,7 +146,7 @@ private function calculateWaitangiDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAnzacDay(): void + protected function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -178,7 +178,7 @@ private function calculateAnzacDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { if ($this->year < 1952) { return; @@ -210,7 +210,7 @@ private function calculateQueensBirthday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { if ($this->year < 1900) { return; @@ -238,7 +238,7 @@ private function calculateLabourDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasHolidays(): void + protected function calculateChristmasHolidays(): void { $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $boxingDay = new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index db911d959..894d5dc74 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -87,7 +87,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1836) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 9c972386d..4c6e71d08 100644 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -85,7 +85,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year < 1918) { return; @@ -111,7 +111,7 @@ private function calculateIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year < 1791) { return; diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 8f60e25d2..5199fc308 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -86,7 +86,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCarnationRevolutionDay(): void + protected function calculateCarnationRevolutionDay(): void { if ($this->year >= 1974) { $this->addHoliday(new Holiday( @@ -107,7 +107,7 @@ private function calculateCarnationRevolutionDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCorpusChristi(): void + protected function calculateCorpusChristi(): void { if ($this->year <= 2012 || $this->year >= 2016) { $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); @@ -131,7 +131,7 @@ private function calculateCorpusChristi(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePortugalDay(): void + protected function calculatePortugalDay(): void { if ($this->year <= 1932 || $this->year >= 1974) { $this->addHoliday(new Holiday( @@ -164,7 +164,7 @@ private function calculatePortugalDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePortugueseRepublicDay(): void + protected function calculatePortugueseRepublicDay(): void { if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( @@ -184,7 +184,7 @@ private function calculatePortugueseRepublicDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsDay(): void + protected function calculateAllSaintsDay(): void { if ($this->year <= 2012 || $this->year >= 2016) { $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); @@ -217,7 +217,7 @@ private function calculateAllSaintsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRestorationOfIndependenceDay(): void + protected function calculateRestorationOfIndependenceDay(): void { // The Wikipedia article mentions that this has been a holiday since the second of half of the XIX century. if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) { diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index ff0e00e27..b258d844d 100644 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -108,7 +108,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayAfterNewYearsDay(): void + protected function calculateDayAfterNewYearsDay(): void { $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', @@ -131,7 +131,7 @@ private function calculateDayAfterNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateUnitedPrincipalitiesDay(): void + protected function calculateUnitedPrincipalitiesDay(): void { // The law is official since 21.12.2014. if ($this->year > 2014) { @@ -153,7 +153,7 @@ private function calculateUnitedPrincipalitiesDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStAndrewDay(): void + protected function calculateStAndrewDay(): void { if ($this->year >= 2012) { $this->addHoliday(new Holiday( @@ -180,7 +180,7 @@ private function calculateStAndrewDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { $nationalDay = null; @@ -216,7 +216,7 @@ private function calculateNationalDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsDay(): void + protected function calculateStJohnsDay(): void { if ($this->year >= 2024) { $this->addHoliday(new Holiday( @@ -239,7 +239,7 @@ private function calculateStJohnsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstantinBrancusiDay(): void + protected function calculateConstantinBrancusiDay(): void { if ($this->year >= 2016) { $this->addHoliday(new Holiday( @@ -267,7 +267,7 @@ private function calculateConstantinBrancusiDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChildrensDay(): void + protected function calculateChildrensDay(): void { if ($this->year >= 1950 && $this->year <= 2016) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 5c976d07a..8f9b94f13 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -72,7 +72,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addNewYearsHolidays(): void + protected function addNewYearsHolidays(): void { $holidayDays = [2, 3, 4, 5, 6, 8]; @@ -88,7 +88,7 @@ private function addNewYearsHolidays(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addOrthodoxChristmasDay(): void + protected function addOrthodoxChristmasDay(): void { $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', @@ -100,7 +100,7 @@ private function addOrthodoxChristmasDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addDefenceOfTheFatherlandDay(): void + protected function addDefenceOfTheFatherlandDay(): void { if ($this->year < self::DEFENCE_OF_THE_FATHERLAND_START_YEAR) { return; @@ -116,7 +116,7 @@ private function addDefenceOfTheFatherlandDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addInternationalWomensDay(): void + protected function addInternationalWomensDay(): void { $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); } @@ -125,7 +125,7 @@ private function addInternationalWomensDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addSpringAndLabourDay(): void + protected function addSpringAndLabourDay(): void { $this->addHoliday(new Holiday('springAndLabourDay', [ 'en' => 'Spring and Labour Day', @@ -137,7 +137,7 @@ private function addSpringAndLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', @@ -149,7 +149,7 @@ private function addVictoryDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addRussiaDay(): void + protected function addRussiaDay(): void { if ($this->year < self::RUSSIA_DAY_START_YEAR) { return; @@ -165,7 +165,7 @@ private function addRussiaDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addUnityDay(): void + protected function addUnityDay(): void { if ($this->year < self::UNITY_DAY_START_YEAR) { return; diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 12f625531..62406f4d5 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -121,7 +121,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSlovakIndependenceDay(): void + protected function calculateSlovakIndependenceDay(): void { $this->addHoliday(new Holiday( 'slovakIndependenceDay', @@ -145,7 +145,7 @@ private function calculateSlovakIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSaintsCyrilAndMethodiusDay(): void + protected function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', @@ -169,7 +169,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSlovakNationalUprisingDay(): void + protected function calculateSlovakNationalUprisingDay(): void { $this->addHoliday(new Holiday( 'slovakNationalUprisingDay', @@ -192,7 +192,7 @@ private function calculateSlovakNationalUprisingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSlovakConstitutionDay(): void + protected function calculateSlovakConstitutionDay(): void { $this->addHoliday(new Holiday( 'slovakConstitutionDay', @@ -219,7 +219,7 @@ private function calculateSlovakConstitutionDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOurLadyOfSorrowsDay(): void + protected function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', @@ -236,7 +236,7 @@ private function calculateOurLadyOfSorrowsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStruggleForFreedomAndDemocracyDay(): void + protected function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 792af587f..42e14b406 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -101,7 +101,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHumanRightsDay(): void + protected function calculateHumanRightsDay(): void { $this->addHoliday(new Holiday( 'humanRightsDay', @@ -122,7 +122,7 @@ private function calculateHumanRightsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateFamilyDay(): void + protected function calculateFamilyDay(): void { $this->addHoliday(new Holiday( 'familyDay', @@ -144,7 +144,7 @@ private function calculateFamilyDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateFreedomDay(): void + protected function calculateFreedomDay(): void { $this->addHoliday(new Holiday( 'freedomDay', @@ -170,7 +170,7 @@ private function calculateFreedomDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateYouthDay(): void + protected function calculateYouthDay(): void { $this->addHoliday(new Holiday( 'youthDay', @@ -192,7 +192,7 @@ private function calculateYouthDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculate2016MunicipalElectionsDay(): void + protected function calculate2016MunicipalElectionsDay(): void { if (2016 !== $this->year) { return; @@ -220,7 +220,7 @@ private function calculate2016MunicipalElectionsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalWomensDay(): void + protected function calculateNationalWomensDay(): void { $this->addHoliday(new Holiday( 'nationalWomensDay', @@ -244,7 +244,7 @@ private function calculateNationalWomensDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { $this->addHoliday(new Holiday( 'heritageDay', @@ -270,7 +270,7 @@ private function calculateHeritageDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfReconciliation(): void + protected function calculateDayOfReconciliation(): void { $this->addHoliday(new Holiday( 'reconciliationDay', @@ -295,7 +295,7 @@ private function calculateDayOfReconciliation(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteDayOfGoodwill(): void + protected function calculateSubstituteDayOfGoodwill(): void { if (2016 !== $this->year) { return; @@ -319,7 +319,7 @@ private function calculateSubstituteDayOfGoodwill(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteHolidays(): void + protected function calculateSubstituteHolidays(): void { // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 34f5b8280..4315758fc 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -725,7 +725,7 @@ protected function getTranslations(string $key, int $year): array * * @return array list of holidays */ - private function calculateBefore2013(int $year): array + protected function calculateBefore2013(int $year): array { $officialHolidays = []; @@ -797,7 +797,7 @@ private function calculateBefore2013(int $year): array * * @return array list of holidays */ - private function calculateCurrent(): array + protected function calculateCurrent(): array { return [ 'newYearsDay', @@ -832,7 +832,7 @@ private function calculateCurrent(): array * * @throws \Exception */ - private function calculateOldSubstituteHolidays(int $year): void + protected function calculateOldSubstituteHolidays(int $year): void { // Add substitute holidays by fixed entries. switch ($year) { @@ -891,7 +891,7 @@ private function calculateOldSubstituteHolidays(int $year): void * * @throws \Exception */ - private function calculateSubstituteHolidays(int $year): void + protected function calculateSubstituteHolidays(int $year): void { if ($year < 2023) { $this->calculateOldSubstituteHolidays($year); @@ -949,7 +949,7 @@ private function calculateSubstituteHolidays(int $year): void * * @return array> */ - private function calculateAcceptedSubstituteHolidays(int $year): array + protected function calculateAcceptedSubstituteHolidays(int $year): array { // List of holidays allowed for substitution. // This dictionary has key => value mappings. @@ -981,7 +981,7 @@ private function calculateAcceptedSubstituteHolidays(int $year): array /** * Helper method to find a first working day after specific date. */ - private function nextWorkingDay(\DateTime $date): \DateTime + protected function nextWorkingDay(\DateTime $date): \DateTime { $interval = new \DateInterval('P1D'); $next = clone $date; @@ -999,7 +999,7 @@ private function nextWorkingDay(\DateTime $date): \DateTime * * @throws \Exception */ - private function addSubstituteHoliday(?Holiday $origin, string $date_str): void + protected function addSubstituteHoliday(?Holiday $origin, string $date_str): void { if (! $origin instanceof Holiday) { return; diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 9fcf2d270..d5cf10c35 100644 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -84,7 +84,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { if ($this->year >= 1981) { $this->addHoliday(new Holiday( @@ -112,7 +112,7 @@ private function calculateNationalDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1978) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 94af4cb13..64f24478e 100644 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAndalusiaDay(): void + protected function calculateAndalusiaDay(): void { if ($this->year >= 1980) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 94072c59b..96c7e91f0 100644 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAsturiasDay(): void + protected function calculateAsturiasDay(): void { if ($this->year >= 1984) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 05f6809c1..2d7bf331a 100644 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBalearicIslandsDay(): void + protected function calculateBalearicIslandsDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index a75e88412..893f64fc1 100644 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBasqueCountryDay(): void + protected function calculateBasqueCountryDay(): void { if ($this->year < 2011) { return; diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index aa800299a..807872a8c 100644 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCanaryIslandsDay(): void + protected function calculateCanaryIslandsDay(): void { if ($this->year >= 1984) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 0baa7dc34..e0cc05fa3 100644 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCantabriaDay(): void + protected function calculateCantabriaDay(): void { if ($this->year >= 1967) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 75326dacb..c959cf481 100644 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCastileAndLeonDay(): void + protected function calculateCastileAndLeonDay(): void { if ($this->year >= 1976) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index cc80a91ee..cef46a150 100644 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCastillaLaManchaDay(): void + protected function calculateCastillaLaManchaDay(): void { if ($this->year >= 1984) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index 285a3b431..ce27fab50 100644 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDayOfCatalonia(): void + protected function calculateNationalDayOfCatalonia(): void { if ($this->year >= 1886) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 227c1be29..b657b5ab1 100644 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfCeuta(): void + protected function calculateDayOfCeuta(): void { if ($this->year >= 1416) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 94bdf57fa..0f465007b 100644 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDosdeMayoUprisingDay(): void + protected function calculateDosdeMayoUprisingDay(): void { $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index d877ee629..5be59e97d 100644 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfExtremadura(): void + protected function calculateDayOfExtremadura(): void { if ($this->year >= 1985) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 4b4d9d3c8..fd885ecd6 100644 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -74,7 +74,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGalicianLiteratureDay(): void + protected function calculateGalicianLiteratureDay(): void { if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ @@ -101,7 +101,7 @@ private function calculateGalicianLiteratureDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJamesDay(): void + protected function calculateStJamesDay(): void { if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 5fe8b01c9..2aaa82c66 100644 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLaRiojaDay(): void + protected function calculateLaRiojaDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index 05b32d4a8..8536eade4 100644 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfMurcia(): void + protected function calculateDayOfMurcia(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 116644721..0f164de97 100644 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateValencianCommunityDay(): void + protected function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 8d2c62f56..7271efefc 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -91,7 +91,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateEpiphanyEve(): void + protected function calculateEpiphanyEve(): void { $this->addHoliday(new Holiday( 'epiphanyEve', @@ -117,7 +117,7 @@ private function calculateEpiphanyEve(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateWalpurgisEve(): void + protected function calculateWalpurgisEve(): void { $this->addHoliday(new Holiday( 'walpurgisEve', @@ -146,7 +146,7 @@ private function calculateWalpurgisEve(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsHolidays(): void + protected function calculateStJohnsHolidays(): void { $date = new \DateTime("{$this->year}-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( @@ -186,7 +186,7 @@ private function calculateStJohnsHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsHolidays(): void + protected function calculateAllSaintsHolidays(): void { $date = new \DateTime("{$this->year}-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( @@ -219,7 +219,7 @@ private function calculateAllSaintsHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { if ($this->year < 1916) { return; diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index a10be9c7c..cf9e30639 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -126,7 +126,7 @@ protected function calculateBettagsMontag(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { $translations = [ 'en' => 'National Day', diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index 2f2540a8f..70675aad5 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDecember26th(): void + protected function calculateDecember26th(): void { $this->addHoliday(new Holiday( 'december26th', diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index aaa621319..44f97125a 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJeuneGenevois(): void + protected function calculateJeuneGenevois(): void { if (self::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR > $this->year) { return; @@ -107,7 +107,7 @@ private function calculateJeuneGenevois(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRestaurationGenevoise(): void + protected function calculateRestaurationGenevoise(): void { if ($this->year > 1813) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 1f07bfde8..a364d9516 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNafelserFahrt(): void + protected function calculateNafelserFahrt(): void { if ($this->year >= 1389) { $date = new \DateTime('First Thursday of '.$this->year.'-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index c2bae96ef..d6de391cf 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -79,7 +79,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePlebisciteJurassien(): void + protected function calculatePlebisciteJurassien(): void { if ($this->year > 1974) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 4b8a73472..4b77c92dd 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -86,7 +86,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateInstaurationRepublique(): void + protected function calculateInstaurationRepublique(): void { if ($this->year > 1848) { $this->addHoliday(new Holiday( @@ -108,7 +108,7 @@ private function calculateInstaurationRepublique(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJanuary2nd(): void + protected function calculateJanuary2nd(): void { $this->addHoliday(new Holiday( 'january2nd', @@ -129,7 +129,7 @@ private function calculateJanuary2nd(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDecember26th(): void + protected function calculateDecember26th(): void { $this->addHoliday(new Holiday( 'december26th', diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index af8ed96c3..8ba26a4fb 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBruderKlausenFest(): void + protected function calculateBruderKlausenFest(): void { if ($this->year >= 1947) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 22dd15f92..85380f091 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -82,7 +82,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPeterPaul(): void + protected function calculateStPeterPaul(): void { $this->addHoliday(new Holiday( 'stPeterPaul', diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php index d20194f14..8f344713e 100644 --- a/src/Yasumi/Provider/Turkey.php +++ b/src/Yasumi/Provider/Turkey.php @@ -59,7 +59,7 @@ public function getSources(): array /** * @throws \Exception */ - private function addLabourDay(): void + protected function addLabourDay(): void { $this->addHoliday(new Holiday('labourDay', [ 'tr' => 'Emek ve Dayanışma Günü', @@ -77,7 +77,7 @@ private function addLabourDay(): void * * @throws \Exception */ - private function addCommemorationOfAtaturk(): void + protected function addCommemorationOfAtaturk(): void { if (1920 > $this->year) { return; @@ -97,7 +97,7 @@ private function addCommemorationOfAtaturk(): void * * @throws \Exception */ - private function addNationalSovereigntyDay(): void + protected function addNationalSovereigntyDay(): void { if (1922 > $this->year) { return; @@ -123,7 +123,7 @@ private function addNationalSovereigntyDay(): void * * @throws \Exception */ - private function addDemocracyDay(): void + protected function addDemocracyDay(): void { if (2017 > $this->year) { return; @@ -142,7 +142,7 @@ private function addDemocracyDay(): void * * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { if (1923 > $this->year) { return; @@ -172,7 +172,7 @@ private function addVictoryDay(): void * * @throws \Exception */ - private function addRepublicDay(): void + protected function addRepublicDay(): void { if (1924 > $this->year) { return; diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index d0255e145..c3edc1c22 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -81,7 +81,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateMartinLutherKingday(): void + protected function calculateMartinLutherKingday(): void { if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ @@ -105,7 +105,7 @@ private function calculateMartinLutherKingday(): void * * @throws \Exception */ - private function calculateWashingtonsBirthday(): void + protected function calculateWashingtonsBirthday(): void { if ($this->year >= 1879) { $date = new \DateTime("{$this->year}-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -130,7 +130,7 @@ private function calculateWashingtonsBirthday(): void * * @throws \Exception */ - private function calculateMemorialDay(): void + protected function calculateMemorialDay(): void { if ($this->year >= 1865) { $date = new \DateTime("{$this->year}-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -155,7 +155,7 @@ private function calculateMemorialDay(): void * * @throws \Exception */ - private function calculateJuneteenth(): void + protected function calculateJuneteenth(): void { if ($this->year >= 2021) { $date = new \DateTime("{$this->year}-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -200,7 +200,7 @@ private function calculateJuneteenth(): void * * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ @@ -219,7 +219,7 @@ private function calculateIndependenceDay(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { if ($this->year >= 1887) { $this->addHoliday(new Holiday( @@ -246,7 +246,7 @@ private function calculateLabourDay(): void * * @throws \Exception */ - private function calculateColumbusDay(): void + protected function calculateColumbusDay(): void { if ($this->year >= 1937) { $date = new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -270,7 +270,7 @@ private function calculateColumbusDay(): void * * @throws \Exception */ - private function calculateVeteransDay(): void + protected function calculateVeteransDay(): void { if ($this->year >= 1919) { $name = $this->year < 1954 ? 'Armistice Day' : 'Veterans Day'; @@ -293,7 +293,7 @@ private function calculateVeteransDay(): void * * @throws \Exception */ - private function calculateThanksgivingDay(): void + protected function calculateThanksgivingDay(): void { if ($this->year >= 1863) { $this->addHoliday(new Holiday( @@ -317,7 +317,7 @@ private function calculateThanksgivingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteHolidays(): void + protected function calculateSubstituteHolidays(): void { // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 72caaf448..d08cb4cc3 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -127,7 +127,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasDay(): void + protected function calculateChristmasDay(): void { $this->addHoliday(new Holiday( 'christmasDay', @@ -147,7 +147,7 @@ private function calculateChristmasDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSecondInternationalWorkersDay(): void + protected function calculateSecondInternationalWorkersDay(): void { if ($this->year >= 2018) { return; @@ -174,7 +174,7 @@ private function calculateSecondInternationalWorkersDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateVictoryDay(): void + protected function calculateVictoryDay(): void { $this->addHoliday(new Holiday( 'victoryDay', @@ -195,7 +195,7 @@ private function calculateVictoryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year < 1996) { return; @@ -222,7 +222,7 @@ private function calculateConstitutionDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year < 1991) { return; @@ -250,7 +250,7 @@ private function calculateIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDefenderOfUkraineDay(): void + protected function calculateDefenderOfUkraineDay(): void { if ($this->year < 2015) { return; @@ -274,7 +274,7 @@ private function calculateDefenderOfUkraineDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCatholicChristmasDay(): void + protected function calculateCatholicChristmasDay(): void { if ($this->year < 2017) { return; diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 223751e06..0a1851676 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -321,7 +321,7 @@ protected function calculateChristmasHolidays(?string $type = null): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearsDay(): void + protected function calculateNewYearsDay(): void { // Before 1871 it was not an observed or statutory holiday if ($this->year < 1871) { @@ -358,7 +358,7 @@ private function calculateNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSummerBankHoliday(): void + protected function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; @@ -409,7 +409,7 @@ private function calculateSummerBankHoliday(): void * * @throws \Exception */ - private function calculateMotheringSunday(): void + protected function calculateMotheringSunday(): void { $date = $this->calculateEaster($this->year, $this->timezone); $date->sub(new \DateInterval('P3W')); diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index 30310d851..87b98c7cf 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -67,7 +67,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPatricksDay(): void + protected function calculateStPatricksDay(): void { if ($this->year < 1971) { return; @@ -111,7 +111,7 @@ private function calculateStPatricksDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBattleOfTheBoyne(): void + protected function calculateBattleOfTheBoyne(): void { if ($this->year < 1926) { return; diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 2668258eb..258d26b93 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -80,7 +80,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSummerBankHoliday(): void + protected function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; @@ -109,7 +109,7 @@ private function calculateSummerBankHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearsHolidays(): void + protected function calculateNewYearsHolidays(): void { // Before 1871 it was not an observed or statutory holiday if ($this->year < 1871) { @@ -169,7 +169,7 @@ private function calculateNewYearsHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStAndrewsDay(): void + protected function calculateStAndrewsDay(): void { if ($this->year < 2007) { return; From babcb46b10f6a43e04c4323624983853e2e93719 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 27 Jan 2024 00:16:55 +0900 Subject: [PATCH 550/687] build: bump package versions to latest working versions Signed-off-by: Sacha Telgenhof --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ce7721da3..e1519b520 100644 --- a/composer.json +++ b/composer.json @@ -40,12 +40,12 @@ }, "require-dev": { "ext-intl": "*", - "friendsofphp/php-cs-fixer": "^2.19 || 3.46", + "friendsofphp/php-cs-fixer": "^2.19 || 3.48", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^5.16" + "vimeo/psalm": "^5.20" }, "suggest": { "ext-calendar": "For calculating the date of Easter" From ae0b17d26e4d98f41775946580ddde82e2202b20 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 31 Jan 2024 01:06:31 +0900 Subject: [PATCH 551/687] build: use shared PHP CS Fixer config Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 25 ++----------------------- composer.json | 6 ++++-- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 91d0df704..b84347c26 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -12,29 +12,8 @@ * * @author Sacha Telgenhof */ -$finder = PhpCsFixer\Finder::create()->in(__DIR__); -$config = new PhpCsFixer\Config(); -$config->setRiskyAllowed(true)->setRules([ - '@PER' => true, - '@Symfony' => true, - 'combine_consecutive_issets' => true, - 'combine_consecutive_unsets' => true, - 'explicit_string_variable' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true], - 'not_operator_with_successor_space' => true, - 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true ], - 'ordered_class_elements' => true, - - // Risky - 'declare_strict_types' => true, - 'dir_constant' => true, - 'get_class_to_class_keyword' => true, - 'is_null' => true, - 'modernize_strpos' => true, - 'modernize_types_casting' => true, - 'self_accessor' => true, -])->setFinder($finder); +$config = new AzuyaLabs\PhpCsFixerConfig\Config(); +$config->getFinder()->in(__DIR__)->notPath('var'); return $config; diff --git a/composer.json b/composer.json index e1519b520..1b06f3622 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "azuyalabs/yasumi", - "description": "The easy PHP Library for calculating holidays.", + "description": "The easy PHP Library for calculating holidays", "license": "MIT", "type": "library", "keywords": [ @@ -40,6 +40,7 @@ }, "require-dev": { "ext-intl": "*", + "azuyalabs/php-cs-fixer-config": "^0.1", "friendsofphp/php-cs-fixer": "^2.19 || 3.48", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", @@ -72,7 +73,8 @@ "@phpstan", "@psalm" ], - "format": "./vendor/bin/php-cs-fixer fix", + "cs": "vendor/bin/php-cs-fixer fix -v --diff --dry-run", + "cs-fix": "vendor/bin/php-cs-fixer fix -v", "phan": "vendor/bin/phan -C", "phpstan": "vendor/bin/phpstan analyse", "psalm": "vendor/bin/psalm --threads=2", From aaa8d41c4550474adc4a44d73ed859dd335a0f56 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 10 Apr 2024 14:49:09 +0000 Subject: [PATCH 552/687] style: fix code styling and formatting issues (#338) Using the latest version of the PHP CS configuration, update all source code to use the most recent code style and formatting rules. For the most part this updates the header comment and the strict type declaration. It should not have any affect on the working of the tests nor the main code. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 14 ++++++-- composer.json | 3 +- examples/basic.php | 33 +++++++++++++------ examples/between_filter.php | 25 ++++++++++---- examples/custom_provider.php | 21 +++++++++--- examples/filters.php | 19 +++++++++-- phpinsights.php | 15 ++++++++- rector.php | 19 +++++++++-- src/Yasumi/Exception/Exception.php | 8 +++-- src/Yasumi/Exception/InvalidYearException.php | 8 +++-- .../Exception/MissingTranslationException.php | 8 +++-- .../Exception/ProviderNotFoundException.php | 8 +++-- .../Exception/UnknownLocaleException.php | 8 +++-- src/Yasumi/Filters/AbstractFilter.php | 8 +++-- src/Yasumi/Filters/BankHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/BetweenFilter.php | 8 +++-- src/Yasumi/Filters/ObservedHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/OfficialHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/OnFilter.php | 8 +++-- src/Yasumi/Filters/OtherHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 8 +++-- src/Yasumi/Holiday.php | 10 +++--- src/Yasumi/Provider/AbstractProvider.php | 8 +++-- src/Yasumi/Provider/Argentina.php | 8 +++-- src/Yasumi/Provider/Australia.php | 8 +++-- .../Australia/AustralianCapitalTerritory.php | 14 ++++---- .../Provider/Australia/NewSouthWales.php | 12 ++++--- .../Provider/Australia/NorthernTerritory.php | 12 ++++--- src/Yasumi/Provider/Australia/Queensland.php | 12 ++++--- .../Australia/Queensland/Brisbane.php | 10 +++--- .../Provider/Australia/SouthAustralia.php | 14 ++++---- src/Yasumi/Provider/Australia/Tasmania.php | 12 ++++--- .../Australia/Tasmania/CentralNorth.php | 10 +++--- .../Australia/Tasmania/FlindersIsland.php | 10 +++--- .../Australia/Tasmania/KingIsland.php | 10 +++--- .../Provider/Australia/Tasmania/Northeast.php | 10 +++--- .../Provider/Australia/Tasmania/Northwest.php | 10 +++--- .../Tasmania/Northwest/CircularHead.php | 10 +++--- .../Provider/Australia/Tasmania/South.php | 10 +++--- .../Australia/Tasmania/South/Southeast.php | 10 +++--- src/Yasumi/Provider/Australia/Victoria.php | 12 ++++--- .../Provider/Australia/WesternAustralia.php | 12 ++++--- src/Yasumi/Provider/Austria.php | 12 ++++--- src/Yasumi/Provider/Austria/Burgenland.php | 8 +++-- src/Yasumi/Provider/Austria/Carinthia.php | 10 +++--- src/Yasumi/Provider/Austria/LowerAustria.php | 8 +++-- src/Yasumi/Provider/Austria/Salzburg.php | 10 +++--- src/Yasumi/Provider/Austria/Styria.php | 8 +++-- src/Yasumi/Provider/Austria/Tyrol.php | 8 +++-- src/Yasumi/Provider/Austria/UpperAustria.php | 10 +++--- src/Yasumi/Provider/Austria/Vienna.php | 8 +++-- src/Yasumi/Provider/Austria/Vorarlberg.php | 8 +++-- src/Yasumi/Provider/Belgium.php | 8 +++-- src/Yasumi/Provider/Bosnia.php | 8 +++-- src/Yasumi/Provider/Brazil.php | 8 +++-- src/Yasumi/Provider/Canada.php | 12 ++++--- src/Yasumi/Provider/Canada/Alberta.php | 8 +++-- .../Provider/Canada/BritishColumbia.php | 8 +++-- src/Yasumi/Provider/Canada/Manitoba.php | 8 +++-- src/Yasumi/Provider/Canada/NewBrunswick.php | 8 +++-- .../Canada/NewfoundlandAndLabrador.php | 12 ++++--- .../Provider/Canada/NorthwestTerritories.php | 8 +++-- src/Yasumi/Provider/Canada/NovaScotia.php | 8 +++-- src/Yasumi/Provider/Canada/Nunavut.php | 8 +++-- src/Yasumi/Provider/Canada/Ontario.php | 8 +++-- .../Provider/Canada/PrinceEdwardIsland.php | 8 +++-- src/Yasumi/Provider/Canada/Quebec.php | 8 +++-- src/Yasumi/Provider/Canada/Saskatchewan.php | 8 +++-- src/Yasumi/Provider/Canada/Yukon.php | 8 +++-- src/Yasumi/Provider/ChristianHolidays.php | 10 +++--- src/Yasumi/Provider/CommonHolidays.php | 8 +++-- src/Yasumi/Provider/Croatia.php | 8 +++-- src/Yasumi/Provider/CzechRepublic.php | 20 ++++++----- src/Yasumi/Provider/DateTimeZoneFactory.php | 8 +++-- src/Yasumi/Provider/Denmark.php | 8 +++-- src/Yasumi/Provider/Estonia.php | 8 +++-- src/Yasumi/Provider/Finland.php | 8 +++-- src/Yasumi/Provider/France.php | 8 +++-- src/Yasumi/Provider/France/BasRhin.php | 8 +++-- src/Yasumi/Provider/France/HautRhin.php | 8 +++-- src/Yasumi/Provider/France/Moselle.php | 8 +++-- src/Yasumi/Provider/Georgia.php | 8 +++-- src/Yasumi/Provider/Germany.php | 10 +++--- .../Provider/Germany/BadenWurttemberg.php | 8 +++-- src/Yasumi/Provider/Germany/Berlin.php | 9 +++-- src/Yasumi/Provider/Germany/Brandenburg.php | 9 +++-- src/Yasumi/Provider/Germany/Bremen.php | 9 +++-- src/Yasumi/Provider/Germany/Hamburg.php | 9 +++-- src/Yasumi/Provider/Germany/Hesse.php | 9 +++-- src/Yasumi/Provider/Germany/LowerSaxony.php | 9 +++-- .../Germany/MecklenburgWesternPomerania.php | 9 +++-- .../Provider/Germany/NorthRhineWestphalia.php | 9 +++-- .../Provider/Germany/RhinelandPalatinate.php | 9 +++-- src/Yasumi/Provider/Germany/Saarland.php | 9 +++-- src/Yasumi/Provider/Germany/Saxony.php | 9 +++-- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 9 +++-- .../Provider/Germany/SchleswigHolstein.php | 9 +++-- src/Yasumi/Provider/Germany/Thuringia.php | 9 +++-- src/Yasumi/Provider/Greece.php | 8 +++-- src/Yasumi/Provider/Hungary.php | 8 +++-- src/Yasumi/Provider/Ireland.php | 14 ++++---- src/Yasumi/Provider/Italy.php | 8 +++-- src/Yasumi/Provider/Japan.php | 10 +++--- src/Yasumi/Provider/Latvia.php | 8 +++-- src/Yasumi/Provider/Lithuania.php | 8 +++-- src/Yasumi/Provider/Luxembourg.php | 15 ++++++++- src/Yasumi/Provider/Mexico.php | 6 ++-- src/Yasumi/Provider/Netherlands.php | 8 +++-- src/Yasumi/Provider/NewZealand.php | 10 +++--- src/Yasumi/Provider/Norway.php | 8 +++-- src/Yasumi/Provider/Poland.php | 8 +++-- src/Yasumi/Provider/Portugal.php | 8 +++-- src/Yasumi/Provider/Romania.php | 12 ++++--- src/Yasumi/Provider/Russia.php | 10 +++--- src/Yasumi/Provider/Slovakia.php | 20 ++++++----- src/Yasumi/Provider/SouthAfrica.php | 20 ++++++----- src/Yasumi/Provider/SouthKorea.php | 10 +++--- src/Yasumi/Provider/Spain.php | 8 +++-- src/Yasumi/Provider/Spain/Andalusia.php | 9 +++-- src/Yasumi/Provider/Spain/Aragon.php | 9 +++-- src/Yasumi/Provider/Spain/Asturias.php | 9 +++-- src/Yasumi/Provider/Spain/BalearicIslands.php | 9 +++-- src/Yasumi/Provider/Spain/BasqueCountry.php | 9 +++-- src/Yasumi/Provider/Spain/CanaryIslands.php | 9 +++-- src/Yasumi/Provider/Spain/Cantabria.php | 9 +++-- src/Yasumi/Provider/Spain/CastileAndLeon.php | 8 +++-- .../Provider/Spain/CastillaLaMancha.php | 8 +++-- src/Yasumi/Provider/Spain/Catalonia.php | 9 +++-- src/Yasumi/Provider/Spain/Ceuta.php | 9 +++-- .../Provider/Spain/CommunityOfMadrid.php | 9 +++-- src/Yasumi/Provider/Spain/Extremadura.php | 9 +++-- src/Yasumi/Provider/Spain/Galicia.php | 9 +++-- src/Yasumi/Provider/Spain/LaRioja.php | 9 +++-- src/Yasumi/Provider/Spain/Melilla.php | 9 +++-- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 9 +++-- .../Provider/Spain/ValencianCommunity.php | 9 +++-- src/Yasumi/Provider/Sweden.php | 8 +++-- src/Yasumi/Provider/Switzerland.php | 16 +++++---- src/Yasumi/Provider/Switzerland/Aargau.php | 9 +++-- .../Switzerland/AppenzellAusserrhoden.php | 9 +++-- .../Switzerland/AppenzellInnerrhoden.php | 9 +++-- .../Provider/Switzerland/BaselLandschaft.php | 9 +++-- .../Provider/Switzerland/BaselStadt.php | 9 +++-- src/Yasumi/Provider/Switzerland/Bern.php | 9 +++-- src/Yasumi/Provider/Switzerland/Fribourg.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Geneva.php | 13 +++++--- src/Yasumi/Provider/Switzerland/Glarus.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Grisons.php | 9 +++-- src/Yasumi/Provider/Switzerland/Jura.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Lucerne.php | 9 +++-- src/Yasumi/Provider/Switzerland/Neuchatel.php | 15 +++++---- src/Yasumi/Provider/Switzerland/Nidwalden.php | 9 +++-- src/Yasumi/Provider/Switzerland/Obwalden.php | 13 +++++--- .../Provider/Switzerland/Schaffhausen.php | 9 +++-- src/Yasumi/Provider/Switzerland/Schwyz.php | 9 +++-- src/Yasumi/Provider/Switzerland/Solothurn.php | 9 +++-- src/Yasumi/Provider/Switzerland/StGallen.php | 9 +++-- src/Yasumi/Provider/Switzerland/Thurgau.php | 9 +++-- src/Yasumi/Provider/Switzerland/Ticino.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Uri.php | 9 +++-- src/Yasumi/Provider/Switzerland/Valais.php | 9 +++-- src/Yasumi/Provider/Switzerland/Vaud.php | 9 +++-- src/Yasumi/Provider/Switzerland/Zug.php | 9 +++-- src/Yasumi/Provider/Switzerland/Zurich.php | 9 +++-- src/Yasumi/Provider/Turkey.php | 8 +++-- src/Yasumi/Provider/USA.php | 10 +++--- src/Yasumi/Provider/Ukraine.php | 8 +++-- src/Yasumi/Provider/UnitedKingdom.php | 8 +++-- src/Yasumi/Provider/UnitedKingdom/England.php | 9 +++-- .../UnitedKingdom/NorthernIreland.php | 13 +++++--- .../Provider/UnitedKingdom/Scotland.php | 11 ++++--- src/Yasumi/Provider/UnitedKingdom/Wales.php | 9 +++-- src/Yasumi/ProviderInterface.php | 8 +++-- src/Yasumi/SubstituteHoliday.php | 10 +++--- src/Yasumi/Translations.php | 14 ++++---- src/Yasumi/TranslationsInterface.php | 8 +++-- src/Yasumi/Yasumi.php | 14 ++++---- src/Yasumi/data/locales.php | 9 +++-- src/Yasumi/data/translations/allSaintsDay.php | 8 +++-- src/Yasumi/data/translations/allSaintsEve.php | 8 +++-- src/Yasumi/data/translations/allSoulsDay.php | 8 +++-- src/Yasumi/data/translations/annunciation.php | 8 +++-- src/Yasumi/data/translations/anzacDay.php | 8 +++-- src/Yasumi/data/translations/armisticeDay.php | 8 +++-- src/Yasumi/data/translations/ascensionDay.php | 8 +++-- src/Yasumi/data/translations/ashWednesday.php | 8 +++-- .../data/translations/assumptionOfMary.php | 8 +++-- src/Yasumi/data/translations/australiaDay.php | 8 +++-- src/Yasumi/data/translations/canadaDay.php | 8 +++-- .../translations/carnationRevolutionDay.php | 8 +++-- src/Yasumi/data/translations/christmasDay.php | 8 +++-- src/Yasumi/data/translations/christmasEve.php | 8 +++-- src/Yasumi/data/translations/civicHoliday.php | 8 +++-- .../data/translations/corpusChristi.php | 8 +++-- .../data/translations/dayAfterNewYearsDay.php | 8 +++-- .../data/translations/dayOfLiberation.php | 9 +++-- .../data/translations/dayOfReformation.php | 8 +++-- src/Yasumi/data/translations/discoveryDay.php | 8 +++-- src/Yasumi/data/translations/easter.php | 8 +++-- src/Yasumi/data/translations/easterMonday.php | 8 +++-- src/Yasumi/data/translations/epiphany.php | 8 +++-- src/Yasumi/data/translations/epiphanyEve.php | 8 +++-- src/Yasumi/data/translations/familyDay.php | 8 +++-- src/Yasumi/data/translations/fathersDay.php | 8 +++-- .../data/translations/goldCupParadeDay.php | 8 +++-- src/Yasumi/data/translations/goodFriday.php | 8 +++-- src/Yasumi/data/translations/heritageDay.php | 8 +++-- .../translations/immaculateConception.php | 8 +++-- .../translations/internationalWomensDay.php | 8 +++-- .../translations/internationalWorkersDay.php | 8 +++-- src/Yasumi/data/translations/islanderDay.php | 8 +++-- src/Yasumi/data/translations/labourDay.php | 8 +++-- src/Yasumi/data/translations/louisRielDay.php | 8 +++-- .../data/translations/maundyThursday.php | 8 +++-- src/Yasumi/data/translations/mothersDay.php | 8 +++-- src/Yasumi/data/translations/natalHoliday.php | 8 +++-- .../nationalIndigenousPeoplesDay.php | 8 +++-- .../data/translations/nationalPatriotsDay.php | 8 +++-- src/Yasumi/data/translations/newYearsDay.php | 8 +++-- src/Yasumi/data/translations/newYearsEve.php | 8 +++-- .../translations/novaScotiaHeritageDay.php | 8 +++-- .../data/translations/orangemensDay.php | 8 +++-- src/Yasumi/data/translations/pentecost.php | 8 +++-- .../data/translations/pentecostMonday.php | 8 +++-- .../data/translations/plebisciteDay.php | 8 +++-- src/Yasumi/data/translations/portugalDay.php | 8 +++-- .../translations/portugueseRepublicDay.php | 8 +++-- .../data/translations/queensBirthday.php | 8 +++-- .../data/translations/reformationDay.php | 8 +++-- .../data/translations/remembranceDay.php | 8 +++-- .../translations/restorationOfIndepence.php | 8 +++-- .../translations/saintJeanBaptisteDay.php | 8 +++-- .../data/translations/saskatchewanDay.php | 8 +++-- .../data/translations/secondChristmasDay.php | 8 +++-- .../data/translations/secondNewYearsDay.php | 8 +++-- src/Yasumi/data/translations/stAndrewsDay.php | 8 +++-- src/Yasumi/data/translations/stDavidsDay.php | 8 +++-- .../data/translations/stFloriansDay.php | 8 +++-- src/Yasumi/data/translations/stGeorgesDay.php | 8 +++-- src/Yasumi/data/translations/stJohnsDay.php | 8 +++-- src/Yasumi/data/translations/stJohnsEve.php | 8 +++-- src/Yasumi/data/translations/stJosephsDay.php | 8 +++-- .../data/translations/stLeopoldsDay.php | 8 +++-- src/Yasumi/data/translations/stMartinsDay.php | 8 +++-- src/Yasumi/data/translations/stRupertsDay.php | 8 +++-- .../data/translations/stStephensDay.php | 8 +++-- .../data/translations/substituteHoliday.php | 8 +++-- src/Yasumi/data/translations/summerTime.php | 8 +++-- src/Yasumi/data/translations/terryFoxDay.php | 8 +++-- .../data/translations/thanksgivingDay.php | 8 +++-- .../truthAndReconciliationDay.php | 8 +++-- .../data/translations/valentinesDay.php | 8 +++-- src/Yasumi/data/translations/victoriaDay.php | 8 +++-- .../data/translations/victoryInEuropeDay.php | 8 +++-- src/Yasumi/data/translations/waitangiDay.php | 8 +++-- src/Yasumi/data/translations/walpurgisEve.php | 8 +++-- src/Yasumi/data/translations/winterTime.php | 8 +++-- .../data/translations/worldAnimalDay.php | 8 +++-- .../data/translations/yukonHeritageDay.php | 8 +++-- tests/Argentina/ArgentinaBaseTestCase.php | 9 +++-- tests/Argentina/ArgentinaTest.php | 9 +++-- tests/Argentina/CarnavalMondayTest.php | 9 +++-- tests/Argentina/CarnavalTuesdayTest.php | 9 +++-- tests/Argentina/ChristmasDayTest.php | 9 +++-- tests/Argentina/EasterTest.php | 9 +++-- tests/Argentina/FlagDayTest.php | 9 +++-- .../Argentina/GeneralJoseSanMartinDayTest.php | 9 +++-- .../GeneralMartinMigueldeGuemesDayTest.php | 9 +++-- tests/Argentina/GoodFridayTest.php | 9 +++-- .../Argentina/ImmaculateConceptionDayTest.php | 9 +++-- tests/Argentina/IndependenceDayTest.php | 9 +++-- .../Argentina/InternationalWorkersDayTest.php | 9 +++-- tests/Argentina/MalvinasDayTest.php | 9 +++-- tests/Argentina/MayRevolutionTest.php | 9 +++-- .../Argentina/NationalSovereigntyDayTest.php | 9 +++-- tests/Argentina/NewYearsDayTest.php | 9 +++-- tests/Argentina/RaceDayTest.php | 9 +++-- tests/Argentina/RemembranceDayTest.php | 9 +++-- tests/Australia/AnzacDayTest.php | 9 +++-- tests/Australia/AustraliaBaseTestCase.php | 9 +++-- tests/Australia/AustraliaDayTest.php | 9 +++-- tests/Australia/AustraliaTest.php | 9 +++-- .../AnzacDayTest.php | 9 +++-- .../AustraliaDayTest.php | 9 +++-- ...AustralianCapitalTerritoryBaseTestCase.php | 9 +++-- .../AustralianCapitalTerritoryTest.php | 9 +++-- .../BoxingDayTest.php | 9 +++-- .../CanberraDayTest.php | 9 +++-- .../ChristmasDayTest.php | 9 +++-- .../EasterMondayTest.php | 9 +++-- .../EasterSaturdayTest.php | 9 +++-- .../EasterSundayTest.php | 9 +++-- .../GoodFridayTest.php | 9 +++-- .../LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../NewYearsDayTest.php | 9 +++-- .../QueensBirthdayTest.php | 9 +++-- .../ReconciliationDayTest.php | 9 +++-- tests/Australia/BoxingDayTest.php | 9 +++-- tests/Australia/ChristmasDayTest.php | 9 +++-- tests/Australia/EasterMondayTest.php | 9 +++-- tests/Australia/GoodFridayTest.php | 9 +++-- tests/Australia/NationalDayOfMourningTest.php | 9 +++-- .../Australia/NewSouthWales/AnzacDayTest.php | 9 +++-- .../NewSouthWales/AustraliaDayTest.php | 9 +++-- .../NewSouthWales/BankHolidayTest.php | 9 +++-- .../Australia/NewSouthWales/BoxingDayTest.php | 9 +++-- .../NewSouthWales/ChristmasDayTest.php | 9 +++-- .../NewSouthWales/EasterMondayTest.php | 9 +++-- .../NewSouthWales/EasterSaturdayTest.php | 9 +++-- .../NewSouthWales/EasterSundayTest.php | 9 +++-- .../NewSouthWales/GoodFridayTest.php | 9 +++-- .../Australia/NewSouthWales/LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../NewSouthWalesBaseTestCase.php | 9 +++-- .../NewSouthWales/NewSouthWalesTest.php | 9 +++-- .../NewSouthWales/NewYearsDayTest.php | 9 +++-- .../NewSouthWales/QueensBirthdayTest.php | 9 +++-- tests/Australia/NewYearsDayTest.php | 9 +++-- .../NorthernTerritory/AnzacDayTest.php | 9 +++-- .../NorthernTerritory/AustraliaDayTest.php | 9 +++-- .../NorthernTerritory/BoxingDayTest.php | 9 +++-- .../NorthernTerritory/ChristmasDayTest.php | 9 +++-- .../NorthernTerritory/EasterMondayTest.php | 9 +++-- .../NorthernTerritory/EasterSaturdayTest.php | 9 +++-- .../NorthernTerritory/GoodFridayTest.php | 9 +++-- .../NorthernTerritory/MayDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../NorthernTerritory/NewYearsDayTest.php | 9 +++-- .../NorthernTerritoryBaseTestCase.php | 9 +++-- .../NorthernTerritoryTest.php | 9 +++-- .../NorthernTerritory/PicnicDayTest.php | 9 +++-- .../NorthernTerritory/QueensBirthdayTest.php | 9 +++-- tests/Australia/Queensland/AnzacDayTest.php | 9 +++-- .../Australia/Queensland/AustraliaDayTest.php | 9 +++-- tests/Australia/Queensland/BoxingDayTest.php | 9 +++-- .../Queensland/Brisbane/AnzacDayTest.php | 9 +++-- .../Queensland/Brisbane/AustraliaDayTest.php | 9 +++-- .../Queensland/Brisbane/BoxingDayTest.php | 9 +++-- .../Brisbane/BrisbaneBaseTestCase.php | 9 +++-- .../Queensland/Brisbane/BrisbaneTest.php | 9 +++-- .../Queensland/Brisbane/ChristmasDayTest.php | 9 +++-- .../Queensland/Brisbane/EasterMondayTest.php | 9 +++-- .../Queensland/Brisbane/GoodFridayTest.php | 9 +++-- .../Queensland/Brisbane/LabourDayTest.php | 9 +++-- .../Brisbane/NationalDayOfMourningTest.php | 9 +++-- .../Queensland/Brisbane/NewYearsDayTest.php | 9 +++-- .../Queensland/Brisbane/PeoplesDayTest.php | 9 +++-- .../Brisbane/QueensBirthdayTest.php | 9 +++-- .../Australia/Queensland/ChristmasDayTest.php | 9 +++-- .../Australia/Queensland/EasterMondayTest.php | 9 +++-- tests/Australia/Queensland/GoodFridayTest.php | 9 +++-- tests/Australia/Queensland/LabourDayTest.php | 9 +++-- .../Queensland/NationalDayOfMourningTest.php | 9 +++-- .../Australia/Queensland/NewYearsDayTest.php | 9 +++-- .../Queensland/QueensBirthdayTest.php | 9 +++-- .../Queensland/QueenslandBaseTestCase.php | 9 +++-- tests/Australia/Queensland/QueenslandTest.php | 9 +++-- .../SouthAustralia/AdelaideCupDayTest.php | 9 +++-- .../Australia/SouthAustralia/AnzacDayTest.php | 9 +++-- .../SouthAustralia/AustraliaDayTest.php | 9 +++-- .../SouthAustralia/ChristmasDayTest.php | 9 +++-- .../SouthAustralia/EasterMondayTest.php | 9 +++-- .../SouthAustralia/EasterSaturdayTest.php | 9 +++-- .../SouthAustralia/GoodFridayTest.php | 9 +++-- .../SouthAustralia/LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../SouthAustralia/NewYearsDayTest.php | 9 +++-- .../SouthAustralia/ProclamationDayTest.php | 9 +++-- .../SouthAustralia/QueensBirthdayTest.php | 9 +++-- .../SouthAustraliaBaseTestCase.php | 9 +++-- .../SouthAustralia/SouthAustraliaTest.php | 9 +++-- tests/Australia/Tasmania/AnzacDayTest.php | 9 +++-- tests/Australia/Tasmania/AustraliaDayTest.php | 9 +++-- tests/Australia/Tasmania/BoxingDayTest.php | 9 +++-- .../Tasmania/CentralNorth/AnzacDayTest.php | 9 +++-- .../CentralNorth/AustraliaDayTest.php | 9 +++-- .../Tasmania/CentralNorth/BoxingDayTest.php | 9 +++-- .../CentralNorth/CentralNorthBaseTestCase.php | 9 +++-- .../CentralNorth/CentralNorthTest.php | 9 +++-- .../CentralNorth/ChristmasDayTest.php | 9 +++-- .../CentralNorth/DevonportShowTest.php | 9 +++-- .../CentralNorth/EasterMondayTest.php | 9 +++-- .../CentralNorth/EightHourDayTest.php | 9 +++-- .../Tasmania/CentralNorth/GoodFridayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/CentralNorth/NewYearsDayTest.php | 9 +++-- .../CentralNorth/QueensBirthdayTest.php | 9 +++-- .../CentralNorth/RecreationDayTest.php | 9 +++-- tests/Australia/Tasmania/ChristmasDayTest.php | 9 +++-- tests/Australia/Tasmania/EasterMondayTest.php | 9 +++-- tests/Australia/Tasmania/EightHourDayTest.php | 9 +++-- .../Tasmania/FlindersIsland/AnzacDayTest.php | 9 +++-- .../FlindersIsland/AustraliaDayTest.php | 9 +++-- .../Tasmania/FlindersIsland/BoxingDayTest.php | 9 +++-- .../FlindersIsland/ChristmasDayTest.php | 9 +++-- .../FlindersIsland/EasterMondayTest.php | 9 +++-- .../FlindersIsland/EightHourDayTest.php | 9 +++-- .../FlindersIslandBaseTestCase.php | 9 +++-- .../FlindersIsland/FlindersIslandShowTest.php | 9 +++-- .../FlindersIsland/FlindersIslandTest.php | 9 +++-- .../FlindersIsland/GoodFridayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../FlindersIsland/NewYearsDayTest.php | 9 +++-- .../FlindersIsland/QueensBirthdayTest.php | 9 +++-- .../FlindersIsland/RecreationDayTest.php | 9 +++-- tests/Australia/Tasmania/GoodFridayTest.php | 9 +++-- .../Tasmania/KingIsland/AnzacDayTest.php | 9 +++-- .../Tasmania/KingIsland/AustraliaDayTest.php | 9 +++-- .../Tasmania/KingIsland/BoxingDayTest.php | 9 +++-- .../Tasmania/KingIsland/ChristmasDayTest.php | 9 +++-- .../Tasmania/KingIsland/EasterMondayTest.php | 9 +++-- .../Tasmania/KingIsland/EightHourDayTest.php | 9 +++-- .../Tasmania/KingIsland/GoodFridayTest.php | 9 +++-- .../KingIsland/KingIslandBaseTestCase.php | 9 +++-- .../KingIsland/KingIslandShowTest.php | 9 +++-- .../Tasmania/KingIsland/KingIslandTest.php | 9 +++-- .../KingIsland/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/KingIsland/NewYearsDayTest.php | 9 +++-- .../KingIsland/QueensBirthdayTest.php | 9 +++-- .../Tasmania/KingIsland/RecreationDayTest.php | 9 +++-- .../Tasmania/NationalDayOfMourningTest.php | 9 +++-- tests/Australia/Tasmania/NewYearsDayTest.php | 9 +++-- .../Tasmania/Northeast/AnzacDayTest.php | 9 +++-- .../Tasmania/Northeast/AustraliaDayTest.php | 9 +++-- .../Tasmania/Northeast/BoxingDayTest.php | 9 +++-- .../Tasmania/Northeast/ChristmasDayTest.php | 9 +++-- .../Tasmania/Northeast/EasterMondayTest.php | 9 +++-- .../Tasmania/Northeast/EightHourDayTest.php | 9 +++-- .../Tasmania/Northeast/GoodFridayTest.php | 9 +++-- .../Tasmania/Northeast/LauncestonShowTest.php | 9 +++-- .../Northeast/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/Northeast/NewYearsDayTest.php | 9 +++-- .../Northeast/NortheastBaseTestCase.php | 9 +++-- .../Tasmania/Northeast/NortheastTest.php | 9 +++-- .../Tasmania/Northeast/QueensBirthdayTest.php | 9 +++-- .../Tasmania/Northeast/RecreationDayTest.php | 9 +++-- .../Tasmania/Northwest/AnzacDayTest.php | 9 +++-- .../Tasmania/Northwest/AustraliaDayTest.php | 9 +++-- .../Tasmania/Northwest/BoxingDayTest.php | 9 +++-- .../Tasmania/Northwest/BurnieShowTest.php | 9 +++-- .../Tasmania/Northwest/ChristmasDayTest.php | 9 +++-- .../Northwest/CircularHead/AGFESTTest.php | 9 +++-- .../Northwest/CircularHead/AnzacDayTest.php | 9 +++-- .../CircularHead/AustraliaDayTest.php | 9 +++-- .../Northwest/CircularHead/BoxingDayTest.php | 9 +++-- .../Northwest/CircularHead/BurnieShowTest.php | 9 +++-- .../CircularHead/ChristmasDayTest.php | 9 +++-- .../CircularHead/CircularHeadBaseTestCase.php | 9 +++-- .../CircularHead/CircularHeadTest.php | 9 +++-- .../CircularHead/EasterMondayTest.php | 9 +++-- .../CircularHead/EightHourDayTest.php | 9 +++-- .../Northwest/CircularHead/GoodFridayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../CircularHead/NewYearsDayTest.php | 9 +++-- .../CircularHead/QueensBirthdayTest.php | 9 +++-- .../CircularHead/RecreationDayTest.php | 9 +++-- .../Tasmania/Northwest/EasterMondayTest.php | 9 +++-- .../Tasmania/Northwest/EightHourDayTest.php | 9 +++-- .../Tasmania/Northwest/GoodFridayTest.php | 9 +++-- .../Northwest/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/Northwest/NewYearsDayTest.php | 9 +++-- .../Northwest/NorthwestBaseTestCase.php | 9 +++-- .../Tasmania/Northwest/NorthwestTest.php | 9 +++-- .../Tasmania/Northwest/QueensBirthdayTest.php | 9 +++-- .../Tasmania/Northwest/RecreationDayTest.php | 9 +++-- .../Australia/Tasmania/QueensBirthdayTest.php | 9 +++-- .../Australia/Tasmania/RecreationDayTest.php | 9 +++-- .../Australia/Tasmania/South/AnzacDayTest.php | 9 +++-- .../Tasmania/South/AustraliaDayTest.php | 9 +++-- .../Tasmania/South/BoxingDayTest.php | 9 +++-- .../Tasmania/South/ChristmasDayTest.php | 9 +++-- .../Tasmania/South/EasterMondayTest.php | 9 +++-- .../Tasmania/South/EightHourDayTest.php | 9 +++-- .../Tasmania/South/GoodFridayTest.php | 9 +++-- .../Tasmania/South/HobartShowTest.php | 9 +++-- .../South/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/South/NewYearsDayTest.php | 9 +++-- .../Tasmania/South/QueensBirthdayTest.php | 9 +++-- .../Tasmania/South/RecreationDayTest.php | 9 +++-- .../Tasmania/South/SouthBaseTestCase.php | 9 +++-- tests/Australia/Tasmania/South/SouthTest.php | 9 +++-- .../Tasmania/South/Southeast/AnzacDayTest.php | 9 +++-- .../South/Southeast/AustraliaDayTest.php | 9 +++-- .../South/Southeast/BoxingDayTest.php | 9 +++-- .../South/Southeast/ChristmasDayTest.php | 9 +++-- .../South/Southeast/EasterMondayTest.php | 9 +++-- .../South/Southeast/EightHourDayTest.php | 9 +++-- .../South/Southeast/GoodFridayTest.php | 9 +++-- .../South/Southeast/HobartRegattaTest.php | 9 +++-- .../South/Southeast/HobartShowTest.php | 9 +++-- .../Southeast/NationalDayOfMourningTest.php | 9 +++-- .../South/Southeast/NewYearsDayTest.php | 9 +++-- .../South/Southeast/QueensBirthdayTest.php | 9 +++-- .../South/Southeast/SoutheastBaseTestCase.php | 9 +++-- .../South/Southeast/SoutheastTest.php | 9 +++-- .../Tasmania/TasmaniaBaseTestCase.php | 9 +++-- tests/Australia/Tasmania/TasmaniaTest.php | 9 +++-- .../Victoria/AFLGrandFinalFridayTest.php | 9 +++-- tests/Australia/Victoria/AnzacDayTest.php | 9 +++-- tests/Australia/Victoria/AustraliaDayTest.php | 9 +++-- tests/Australia/Victoria/BoxingDayTest.php | 9 +++-- tests/Australia/Victoria/ChristmasDayTest.php | 9 +++-- tests/Australia/Victoria/EasterMondayTest.php | 9 +++-- .../Australia/Victoria/EasterSaturdayTest.php | 9 +++-- tests/Australia/Victoria/EasterSundayTest.php | 9 +++-- tests/Australia/Victoria/GoodFridayTest.php | 9 +++-- tests/Australia/Victoria/LabourDayTest.php | 9 +++-- .../Victoria/MelbourneCupDayTest.php | 9 +++-- .../Victoria/NationalDayOfMourningTest.php | 9 +++-- tests/Australia/Victoria/NewYearsDayTest.php | 9 +++-- .../Australia/Victoria/QueensBirthdayTest.php | 9 +++-- .../Victoria/VictoriaBaseTestCase.php | 9 +++-- tests/Australia/Victoria/VictoriaTest.php | 9 +++-- .../WesternAustralia/AnzacDayTest.php | 9 +++-- .../WesternAustralia/AustraliaDayTest.php | 9 +++-- .../WesternAustralia/BoxingDayTest.php | 9 +++-- .../WesternAustralia/ChristmasDayTest.php | 9 +++-- .../WesternAustralia/EasterMondayTest.php | 9 +++-- .../WesternAustralia/GoodFridayTest.php | 9 +++-- .../WesternAustralia/LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../WesternAustralia/NewYearsDayTest.php | 9 +++-- .../WesternAustralia/QueensBirthdayTest.php | 9 +++-- .../WesternAustraliaBaseTestCase.php | 9 +++-- .../WesternAustraliaDayTest.php | 9 +++-- .../WesternAustralia/WesternAustraliaTest.php | 9 +++-- tests/Austria/AllSaintsDayTest.php | 9 +++-- tests/Austria/AscensionDayTest.php | 9 +++-- tests/Austria/AssumptionOfMaryTest.php | 9 +++-- tests/Austria/AustriaBaseTestCase.php | 9 +++-- tests/Austria/AustriaTest.php | 9 +++-- .../Burgenland/BurgenlandBaseTestCase.php | 9 +++-- tests/Austria/Burgenland/BurgenlandTest.php | 9 +++-- tests/Austria/Burgenland/stMartinsDayTest.php | 9 +++-- .../Carinthia/CarinthiaBaseTestCase.php | 9 +++-- tests/Austria/Carinthia/CarinthiaTest.php | 9 +++-- tests/Austria/Carinthia/PlebisciteDayTest.php | 9 +++-- tests/Austria/Carinthia/StJosephsDayTest.php | 9 +++-- tests/Austria/ChristmasTest.php | 9 +++-- tests/Austria/CorpusChristiTest.php | 9 +++-- tests/Austria/EasterMondayTest.php | 9 +++-- tests/Austria/EasterTest.php | 9 +++-- tests/Austria/EpiphanyTest.php | 9 +++-- tests/Austria/ImmaculateConceptionTest.php | 9 +++-- tests/Austria/InternationalWorkersDayTest.php | 9 +++-- .../LowerAustria/LowerAustriaBaseTestCase.php | 9 +++-- .../Austria/LowerAustria/LowerAustriaTest.php | 9 +++-- .../LowerAustria/StLeopoldsDayTest.php | 9 +++-- tests/Austria/NationalDayTest.php | 9 +++-- tests/Austria/NewYearsDayTest.php | 9 +++-- tests/Austria/PentecostMondayTest.php | 9 +++-- tests/Austria/PentecostTest.php | 9 +++-- .../Austria/Salzburg/SalzburgBaseTestCase.php | 9 +++-- tests/Austria/Salzburg/SalzburgTest.php | 9 +++-- tests/Austria/Salzburg/StRupertsDayTest.php | 9 +++-- tests/Austria/SecondChristmasDayTest.php | 9 +++-- tests/Austria/Styria/StJosephsDayTest.php | 9 +++-- tests/Austria/Styria/StyriaBaseTestCase.php | 9 +++-- tests/Austria/Styria/StyriaTest.php | 9 +++-- tests/Austria/Tyrol/StJosephsDayTest.php | 9 +++-- tests/Austria/Tyrol/TyrolBaseTestCase.php | 9 +++-- tests/Austria/Tyrol/TyrolTest.php | 9 +++-- .../UpperAustria/StFloriansDayTest.php | 9 +++-- .../UpperAustria/UpperAustriaBaseTestCase.php | 9 +++-- .../Austria/UpperAustria/UpperAustriaTest.php | 9 +++-- tests/Austria/Vienna/StLeopoldsDayTest.php | 9 +++-- tests/Austria/Vienna/ViennaBaseTestCase.php | 9 +++-- tests/Austria/Vienna/ViennaTest.php | 9 +++-- tests/Austria/Vorarlberg/StJosephsDayTest.php | 9 +++-- .../Vorarlberg/VorarlbergBaseTestCase.php | 9 +++-- tests/Austria/Vorarlberg/VorarlbergTest.php | 9 +++-- tests/Base/HolidayBetweenFilterTest.php | 33 ++++++++++--------- tests/Base/HolidayFiltersTest.php | 9 +++-- tests/Base/HolidayOnFilterTest.php | 9 +++-- tests/Base/HolidayTest.php | 9 +++-- tests/Base/SubstituteHolidayTest.php | 11 ++++--- tests/Base/TranslationsTest.php | 19 ++++++----- tests/Base/TypographyTest.php | 8 +++-- tests/Base/WeekendTest.php | 8 +++-- tests/Base/YasumiExternalProvider.php | 9 +++-- tests/Base/YasumiTest.php | 17 ++++++---- tests/Base/YasumiWorkdayTest.php | 9 +++-- tests/Belgium/AllSaintsDayTest.php | 9 +++-- tests/Belgium/ArmisticeDayTest.php | 9 +++-- tests/Belgium/AscensionDayTest.php | 9 +++-- tests/Belgium/AssumptionOfMaryTest.php | 9 +++-- tests/Belgium/BelgiumBaseTestCase.php | 9 +++-- tests/Belgium/BelgiumTest.php | 9 +++-- tests/Belgium/ChristmasTest.php | 9 +++-- tests/Belgium/EasterMondayTest.php | 9 +++-- tests/Belgium/EasterTest.php | 9 +++-- tests/Belgium/InternationalWorkersDayTest.php | 9 +++-- tests/Belgium/NationalDayTest.php | 9 +++-- tests/Belgium/NewYearsDayTest.php | 9 +++-- tests/Belgium/PentecostTest.php | 9 +++-- tests/Belgium/pentecostMondayTest.php | 9 +++-- tests/Bosnia/BosniaBaseTestCase.php | 9 +++-- tests/Bosnia/BosniaTest.php | 9 +++-- tests/Bosnia/ChristmasDayTest.php | 9 +++-- tests/Bosnia/DayAfterNewYearsDay.php | 9 +++-- tests/Bosnia/EasterTest.php | 9 +++-- tests/Bosnia/IndependenceDayTest.php | 9 +++-- tests/Bosnia/InternationalWorkersDayTest.php | 9 +++-- tests/Bosnia/NewYearsDayTest.php | 9 +++-- tests/Bosnia/OrthodoxChristmasDay.php | 9 +++-- tests/Bosnia/SecondLabourDay.php | 9 +++-- tests/Bosnia/StatehoodDayTest.php | 9 +++-- tests/Brazil/AllSoulsDayTest.php | 9 +++-- tests/Brazil/AshWednesdayTest.php | 9 +++-- tests/Brazil/BrazilBaseTestCase.php | 9 +++-- tests/Brazil/BrazilTest.php | 9 +++-- tests/Brazil/CarnavalMondayTest.php | 9 +++-- tests/Brazil/CarnavalTuesdayTest.php | 9 +++-- tests/Brazil/ChristmasDayTest.php | 9 +++-- tests/Brazil/CorpusChristiTest.php | 9 +++-- tests/Brazil/EasterTest.php | 9 +++-- tests/Brazil/GoodFridayTest.php | 9 +++-- tests/Brazil/IndependenceDayTest.php | 9 +++-- tests/Brazil/InternationalWorkersDayTest.php | 9 +++-- tests/Brazil/NewYearsDayTest.php | 9 +++-- tests/Brazil/OurLadyOfAparecidaDayTest.php | 9 +++-- .../Brazil/ProclamationOfRepublicDayTest.php | 9 +++-- tests/Brazil/TiradentesDayTest.php | 9 +++-- tests/Canada/Alberta/AlbertaBaseTestCase.php | 9 +++-- tests/Canada/Alberta/AlbertaTest.php | 9 +++-- .../BritishColumbiaBaseTestCase.php | 9 +++-- .../BritishColumbia/BritishColumbiaTest.php | 9 +++-- tests/Canada/CanadaBaseTestCase.php | 9 +++-- tests/Canada/CanadaDayTest.php | 9 +++-- tests/Canada/CanadaTest.php | 9 +++-- tests/Canada/ChristmasDayTest.php | 9 +++-- tests/Canada/LabourDayTest.php | 9 +++-- .../Canada/Manitoba/ManitobaBaseTestCase.php | 9 +++-- tests/Canada/Manitoba/ManitobaTest.php | 9 +++-- .../NewBrunswick/NewBrunswickBaseTestCase.php | 9 +++-- .../Canada/NewBrunswick/NewBrunswickTest.php | 9 +++-- tests/Canada/NewYearsDayTest.php | 9 +++-- .../NewfoundlandAndLabradorBaseTestCase.php | 9 +++-- .../NewfoundlandAndLabradorTest.php | 9 +++-- .../NorthwestTerritoriesBaseTestCase.php | 9 +++-- .../NorthwestTerritoriesTest.php | 9 +++-- .../NovaScotia/NovaScotiaBaseTestCase.php | 9 +++-- tests/Canada/NovaScotia/NovaScotiaTest.php | 9 +++-- tests/Canada/Nunavut/NunavutBaseTestCase.php | 9 +++-- tests/Canada/Nunavut/NunavutTest.php | 9 +++-- tests/Canada/Ontario/OntarioBaseTestCase.php | 9 +++-- tests/Canada/Ontario/OntarioTest.php | 9 +++-- .../PrinceEdwardIslandBaseTestCase.php | 9 +++-- .../PrinceEdwardIslandTest.php | 9 +++-- tests/Canada/Quebec/QuebecBaseTestCase.php | 9 +++-- tests/Canada/Quebec/QuebecTest.php | 9 +++-- tests/Canada/RemembranceDayTest.php | 9 +++-- .../Saskatchewan/SaskatchewanBaseTestCase.php | 9 +++-- .../Canada/Saskatchewan/SaskatchewanTest.php | 9 +++-- tests/Canada/ThanksgivingDayTest.php | 9 +++-- .../Canada/TruthAndReconciliationDayTest.php | 9 +++-- tests/Canada/Yukon/YukonBaseTestCase.php | 9 +++-- tests/Canada/Yukon/YukonTest.php | 9 +++-- tests/Croatia/AllSaintsDayTest.php | 9 +++-- tests/Croatia/AntifascistStruggleDayTest.php | 9 +++-- tests/Croatia/AssumptionOfMaryTest.php | 9 +++-- tests/Croatia/ChristmasDayTest.php | 9 +++-- tests/Croatia/CorpusChristiTest.php | 9 +++-- tests/Croatia/CroatiaBaseTestCase.php | 9 +++-- tests/Croatia/CroatiaTest.php | 9 +++-- tests/Croatia/EasterMondayTest.php | 9 +++-- tests/Croatia/EasterTest.php | 9 +++-- tests/Croatia/EpiphanyTest.php | 9 +++-- tests/Croatia/HomelandThanksgivingDayTest.php | 9 +++-- tests/Croatia/IndependenceDayTest.php | 9 +++-- tests/Croatia/InternationalWorkersDayTest.php | 9 +++-- tests/Croatia/NewYearsDayTest.php | 9 +++-- tests/Croatia/RemembranceDayTest.php | 9 +++-- tests/Croatia/StStephensDayTest.php | 9 +++-- tests/Croatia/StatehoodDayTest.php | 9 +++-- tests/CzechRepublic/ChristmasDayTest.php | 9 +++-- tests/CzechRepublic/ChristmasEveTest.php | 9 +++-- .../CzechRepublicBaseTestCase.php | 9 +++-- tests/CzechRepublic/CzechRepublicTest.php | 9 +++-- tests/CzechRepublic/CzechStateHoodDayTest.php | 9 +++-- tests/CzechRepublic/EasterMondayTest.php | 9 +++-- tests/CzechRepublic/GoodFridayTest.php | 9 +++-- .../IndependentCzechoslovakStateDayTest.php | 9 +++-- .../InternationalWorkersDayTest.php | 9 +++-- tests/CzechRepublic/JanHusDayTest.php | 9 +++-- tests/CzechRepublic/NewYearsDayTest.php | 9 +++-- .../RenewalOfIndependentCzechStateDayTest.php | 9 +++-- .../SaintsCyrilAndMethodiusDayTest.php | 9 +++-- .../CzechRepublic/SecondChristmasDayTest.php | 9 +++-- .../StruggleForFreedomAndDemocracyDayTest.php | 9 +++-- .../CzechRepublic/VictoryInEuropeDayTest.php | 9 +++-- tests/Denmark/AscensionDayTest.php | 9 +++-- tests/Denmark/ChristmasDayTest.php | 9 +++-- tests/Denmark/ChristmasEveTest.php | 9 +++-- tests/Denmark/ConstitutionDayTest.php | 9 +++-- tests/Denmark/DaylightSavingTime.php | 8 +++-- tests/Denmark/DenmarkBaseTestCase.php | 9 +++-- tests/Denmark/DenmarkTest.php | 9 +++-- tests/Denmark/EasterMondayTest.php | 9 +++-- tests/Denmark/EasterTest.php | 9 +++-- tests/Denmark/GoodFridayTest.php | 9 +++-- tests/Denmark/GreatPrayerDayTest.php | 9 +++-- tests/Denmark/InternationalWorkersDayTest.php | 9 +++-- tests/Denmark/MaundyThursdayTest.php | 9 +++-- tests/Denmark/NewYearsDayTest.php | 9 +++-- tests/Denmark/NewYearsEveTest.php | 9 +++-- tests/Denmark/PentecostMondayTest.php | 9 +++-- tests/Denmark/PentecostTest.php | 9 +++-- tests/Denmark/SecondChristmasDayTest.php | 9 +++-- tests/Estonia/ChristmasDayTest.php | 8 +++-- tests/Estonia/ChristmasEveDayTest.php | 8 +++-- tests/Estonia/EasterDayTest.php | 8 +++-- tests/Estonia/EstoniaBaseTestCase.php | 8 +++-- tests/Estonia/EstoniaTest.php | 8 +++-- tests/Estonia/GoodFridayDayTest.php | 8 +++-- tests/Estonia/IndependenceDayTest.php | 8 +++-- tests/Estonia/InternationalWorkersDayTest.php | 8 +++-- tests/Estonia/NewYearsDayTest.php | 8 +++-- tests/Estonia/PentecostTest.php | 8 +++-- .../RestorationOfIndependenceDayTest.php | 8 +++-- tests/Estonia/SecondChristmasDayTest.php | 8 +++-- tests/Estonia/StJohnsDayTest.php | 8 +++-- tests/Estonia/VictoryDayTest.php | 8 +++-- tests/Finland/AllSaintsDayTest.php | 9 +++-- tests/Finland/AscensionDayTest.php | 9 +++-- tests/Finland/ChristmasDayTest.php | 9 +++-- tests/Finland/EasterMondayTest.php | 9 +++-- tests/Finland/EasterTest.php | 9 +++-- tests/Finland/EpiphanyTest.php | 9 +++-- tests/Finland/FinlandBaseTestCase.php | 9 +++-- tests/Finland/FinlandTest.php | 9 +++-- tests/Finland/GoodFridayTest.php | 9 +++-- tests/Finland/IndependenceDayTest.php | 9 +++-- tests/Finland/InternationalWorkersDayTest.php | 9 +++-- tests/Finland/NewYearsDayTest.php | 9 +++-- tests/Finland/PentecostTest.php | 9 +++-- tests/Finland/SecondChristmasDayTest.php | 9 +++-- tests/Finland/stJohnsDayTest.php | 9 +++-- tests/France/AllSaintsDayTest.php | 9 +++-- tests/France/ArmisticeDayTest.php | 9 +++-- tests/France/AscensionDayTest.php | 9 +++-- tests/France/AssumptionOfMaryTest.php | 9 +++-- tests/France/BasRhin/BasRhinBaseTestCase.php | 9 +++-- tests/France/BasRhin/BasRhinTest.php | 9 +++-- tests/France/BasRhin/GoodFridayTest.php | 9 +++-- tests/France/BasRhin/stStephensDayTest.php | 9 +++-- tests/France/BastilleDayTest.php | 9 +++-- tests/France/ChristmasDayTest.php | 9 +++-- tests/France/EasterMondayTest.php | 9 +++-- tests/France/FranceBaseTestCase.php | 9 +++-- tests/France/FranceTest.php | 9 +++-- tests/France/HautRhin/GoodFridayTest.php | 9 +++-- .../France/HautRhin/HautRhinBaseTestCase.php | 9 +++-- tests/France/HautRhin/HautRhinTest.php | 9 +++-- tests/France/HautRhin/stStephensDayTest.php | 9 +++-- tests/France/InternationalWorkersDayTest.php | 9 +++-- tests/France/Moselle/GoodFridayTest.php | 9 +++-- tests/France/Moselle/MoselleBaseTestCase.php | 9 +++-- tests/France/Moselle/MoselleTest.php | 9 +++-- tests/France/Moselle/stStephensDayTest.php | 9 +++-- tests/France/NewYearsDayTest.php | 9 +++-- tests/France/PentecostMondayTest.php | 9 +++-- tests/France/VictoryInEuropeDayTest.php | 9 +++-- tests/Georgia/EasterTest.php | 15 ++++++++- tests/Georgia/GeorgiaBaseTestCase.php | 8 +++-- tests/Georgia/GeorgiaTest.php | 8 +++-- tests/Georgia/IndependenceDayTest.php | 8 +++-- tests/Georgia/InternationalWomensDayTest.php | 8 +++-- tests/Georgia/MtskhetobaDayTest.php | 8 +++-- tests/Georgia/NewYearsDayTest.php | 8 +++-- tests/Georgia/OrthodoxChristmasDayTest.php | 8 +++-- tests/Georgia/OrthodoxEpiphanyDayTest.php | 8 +++-- tests/Georgia/SecondNewYearDayTest.php | 8 +++-- tests/Georgia/StAndrewsDayTest.php | 8 +++-- tests/Georgia/StGeorgesDayTest.php | 8 +++-- tests/Georgia/StMarysDayTest.php | 8 +++-- tests/Georgia/UnityDayTest.php | 8 +++-- tests/Georgia/VictoryDayTest.php | 8 +++-- tests/Germany/AscensionDayTest.php | 9 +++-- .../BadenWurttemberg/AllSaintsDayTest.php | 9 +++-- .../BadenWurttembergBaseTestCase.php | 9 +++-- .../BadenWurttemberg/BadenWurttembergTest.php | 9 +++-- .../BadenWurttemberg/CorpusChristiTest.php | 9 +++-- .../Germany/BadenWurttemberg/EpiphanyTest.php | 9 +++-- .../BadenWurttemberg/GermanUnityDayTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- tests/Germany/Bavaria/AllSaintsDayTest.php | 9 +++-- tests/Germany/Bavaria/BavariaBaseTestCase.php | 9 +++-- tests/Germany/Bavaria/BavariaTest.php | 9 +++-- tests/Germany/Bavaria/CorpusChristiTest.php | 9 +++-- tests/Germany/Bavaria/EpiphanyTest.php | 9 +++-- tests/Germany/Bavaria/GermanUnityDayTest.php | 9 +++-- .../Bavaria/ReformationDay2017Test.php | 9 +++-- tests/Germany/Berlin/BerlinBaseTestCase.php | 9 +++-- tests/Germany/Berlin/BerlinTest.php | 9 +++-- .../Berlin/DayOfLiberation2020Test.php | 11 ++++--- tests/Germany/Berlin/GermanUnityDayTest.php | 9 +++-- .../Berlin/InternationalWomensDay2019Test.php | 11 ++++--- .../Germany/Berlin/ReformationDay2017Test.php | 9 +++-- .../Brandenburg/BrandenburgBaseTestCase.php | 9 +++-- tests/Germany/Brandenburg/BrandenburgTest.php | 9 +++-- .../Brandenburg/GermanUnityDayTest.php | 9 +++-- .../Brandenburg/ReformationDayTest.php | 9 +++-- tests/Germany/Bremen/BremenBaseTestCase.php | 9 +++-- tests/Germany/Bremen/BremenTest.php | 9 +++-- tests/Germany/Bremen/GermanUnityDayTest.php | 9 +++-- .../Germany/Bremen/ReformationDay2017Test.php | 9 +++-- tests/Germany/Bremen/ReformationDayTest.php | 9 +++-- tests/Germany/ChristmasTest.php | 9 +++-- tests/Germany/EasterMondayTest.php | 9 +++-- tests/Germany/GermanUnityDayTest.php | 9 +++-- tests/Germany/GermanyBaseTestCase.php | 9 +++-- tests/Germany/GermanyTest.php | 9 +++-- tests/Germany/GoodFridayTest.php | 9 +++-- .../Germany/Hamburg/DayOfReformationTest.php | 9 +++-- tests/Germany/Hamburg/GermanUnityDay.php | 9 +++-- tests/Germany/Hamburg/HamburgBaseTestCase.php | 9 +++-- tests/Germany/Hamburg/HamburgTest.php | 9 +++-- .../Hamburg/ReformationDay2017Test.php | 9 +++-- tests/Germany/Hesse/CorpusChristiTest.php | 9 +++-- tests/Germany/Hesse/GermanUnityDayTest.php | 9 +++-- tests/Germany/Hesse/HesseBaseTestCase.php | 9 +++-- tests/Germany/Hesse/HesseTest.php | 9 +++-- .../Germany/Hesse/ReformationDay2017Test.php | 9 +++-- tests/Germany/InternationalWorkersDayTest.php | 9 +++-- .../LowerSaxony/GermanUnityDayTest.php | 9 +++-- .../LowerSaxony/LowerSaxonyBaseTestCase.php | 9 +++-- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 9 +++-- .../LowerSaxony/ReformationDay2017Test.php | 9 +++-- .../LowerSaxony/ReformationDayTest.php | 9 +++-- .../GermanUnityDayTest.php | 9 +++-- .../InternationalWomensDayTest.php | 11 ++++--- ...ecklenburgWesternPomeraniaBaseTestCase.php | 9 +++-- .../MecklenburgWesternPomeraniaTest.php | 9 +++-- .../ReformationDayTest.php | 9 +++-- tests/Germany/NewYearsDayTest.php | 9 +++-- tests/Germany/NewYearsEveTest.php | 9 +++-- .../NorthRhineWestphalia/AllSaintsDayTest.php | 9 +++-- .../CorpusChristiTest.php | 9 +++-- .../GermanUnityDayTest.php | 9 +++-- .../NorthRhineWestphaliaBaseTestCase.php | 9 +++-- .../NorthRhineWestphaliaTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- tests/Germany/PentecostMondayTest.php | 9 +++-- tests/Germany/PentecostTest.php | 11 ++++--- tests/Germany/ReformationDay2017Test.php | 11 ++++--- .../RhinelandPalatinate/AllSaintsDayTest.php | 9 +++-- .../RhinelandPalatinate/CorpusChristiTest.php | 9 +++-- .../GermanUnityDayTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- .../RhinelandPalatinateBaseTestCase.php | 9 +++-- .../RhinelandPalatinateTest.php | 9 +++-- tests/Germany/Saarland/AllSaintsDayTest.php | 9 +++-- .../Germany/Saarland/AssumptionOfMaryTest.php | 9 +++-- tests/Germany/Saarland/CorpusChristiTest.php | 9 +++-- tests/Germany/Saarland/GermanUnityDayTest.php | 9 +++-- .../Saarland/ReformationDay2017Test.php | 9 +++-- .../Germany/Saarland/SaarlandBaseTestCase.php | 9 +++-- tests/Germany/Saarland/SaarlandTest.php | 9 +++-- tests/Germany/Saxony/GermanUnityDayTest.php | 9 +++-- tests/Germany/Saxony/ReformationDayTest.php | 9 +++-- .../Saxony/RepentanceAndPrayerDayTest.php | 9 +++-- tests/Germany/Saxony/SaxonyBaseTestCase.php | 9 +++-- tests/Germany/Saxony/SaxonyTest.php | 9 +++-- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 9 +++-- .../SaxonyAnhalt/GermanUnityDayTest.php | 9 +++-- .../SaxonyAnhalt/ReformationDayTest.php | 9 +++-- .../SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 9 +++-- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 9 +++-- .../SchleswigHolstein/GermanUnityDayTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- .../SchleswigHolstein/ReformationDayTest.php | 9 +++-- .../SchleswigHolsteinBaseTestCase.php | 9 +++-- .../SchleswigHolsteinTest.php | 9 +++-- tests/Germany/SecondChristmasDayTest.php | 9 +++-- .../Germany/Thuringia/GermanUnityDayTest.php | 9 +++-- .../Germany/Thuringia/ReformationDayTest.php | 9 +++-- .../Thuringia/ThuringiaBaseTestCase.php | 9 +++-- tests/Germany/Thuringia/ThuringiaTest.php | 9 +++-- .../Thuringia/WorldChildrensDayTest.php | 9 +++-- tests/Greece/AnnunciationTest.php | 9 +++-- tests/Greece/AscensionDayTest.php | 9 +++-- tests/Greece/AssumptionOfMaryTest.php | 9 +++-- tests/Greece/ChristmasDayTest.php | 9 +++-- tests/Greece/CleanMondayTest.php | 9 +++-- tests/Greece/EasterMondayTest.php | 9 +++-- tests/Greece/EasterTest.php | 9 +++-- tests/Greece/EpiphanyTest.php | 9 +++-- tests/Greece/GreeceBaseTestCase.php | 9 +++-- tests/Greece/GreeceTest.php | 9 +++-- tests/Greece/IndependenceDayTest.php | 9 +++-- tests/Greece/InternationalWorkersDayTest.php | 9 +++-- tests/Greece/NewYearsDayTest.php | 9 +++-- tests/Greece/OhiDayTest.php | 9 +++-- tests/Greece/PentecostMondayTest.php | 9 +++-- tests/Greece/PentecostTest.php | 9 +++-- tests/Greece/PolytechnioTest.php | 9 +++-- tests/Greece/ThreeHolyHierarchsTest.php | 9 +++-- tests/Greece/goodFridayTest.php | 9 +++-- tests/HolidayTestCase.php | 9 +++-- tests/Hungary/AllSaintsDayTest.php | 9 +++-- tests/Hungary/ChristmasTest.php | 9 +++-- tests/Hungary/EasterMondayTest.php | 9 +++-- tests/Hungary/EasterTest.php | 9 +++-- tests/Hungary/HungaryBaseTestCase.php | 9 +++-- tests/Hungary/HungaryTest.php | 9 +++-- tests/Hungary/InternationalWorkersDayTest.php | 9 +++-- tests/Hungary/MemorialDay1848Test.php | 9 +++-- tests/Hungary/MemorialDay1956Test.php | 9 +++-- tests/Hungary/NewYearsDayTest.php | 9 +++-- tests/Hungary/PentecostMondayTest.php | 9 +++-- tests/Hungary/PentecostTest.php | 9 +++-- tests/Hungary/SecondChristmasDayTest.php | 9 +++-- tests/Hungary/StateFoundationDayTest.php | 9 +++-- tests/Ireland/AugustHolidayTest.php | 9 +++-- tests/Ireland/ChristmasDayTest.php | 11 ++++--- tests/Ireland/EasterMondayTest.php | 9 +++-- tests/Ireland/EasterTest.php | 9 +++-- tests/Ireland/GoodFridayTest.php | 9 +++-- tests/Ireland/IrelandBaseTestCase.php | 9 +++-- tests/Ireland/IrelandTest.php | 9 +++-- tests/Ireland/JuneHolidayTest.php | 9 +++-- tests/Ireland/MayDayTest.php | 9 +++-- tests/Ireland/NewYearsDayTest.php | 11 ++++--- tests/Ireland/OctoberHolidayTest.php | 9 +++-- tests/Ireland/PentecostTest.php | 9 +++-- tests/Ireland/StPatricksDayTest.php | 11 ++++--- tests/Ireland/StStephensDayTest.php | 11 ++++--- tests/Ireland/pentecostMondayTest.php | 9 +++-- tests/Italy/AllSaintsDayTest.php | 9 +++-- tests/Italy/AssumptionOfMaryTest.php | 9 +++-- tests/Italy/ChristmasTest.php | 9 +++-- tests/Italy/EasterMondayTest.php | 9 +++-- tests/Italy/EasterTest.php | 9 +++-- tests/Italy/EpiphanyTest.php | 9 +++-- tests/Italy/ImmaculateConceptionTest.php | 9 +++-- tests/Italy/InternationalWorkersDayTest.php | 9 +++-- tests/Italy/ItalyBaseTestCase.php | 9 +++-- tests/Italy/ItalyTest.php | 9 +++-- tests/Italy/LiberationDayTest.php | 9 +++-- tests/Italy/NewYearsDayTest.php | 9 +++-- tests/Italy/RepublicDayTest.php | 9 +++-- tests/Italy/stStephensDayTest.php | 9 +++-- tests/Japan/AutumnalEquinoxDayTest.php | 9 +++-- tests/Japan/ChildrensDayTest.php | 11 ++++--- tests/Japan/ComingOfAgeDayTest.php | 9 +++-- tests/Japan/ConstitutionMemorialDayTest.php | 11 ++++--- tests/Japan/CoronationDayTest.php | 9 +++-- tests/Japan/CultureDayTest.php | 11 ++++--- tests/Japan/EmperorsBirthdayTest.php | 11 ++++--- .../EnthronementProclamationCeremonyTest.php | 9 +++-- tests/Japan/GreeneryDayTest.php | 13 +++++--- tests/Japan/JapanBaseTestCase.php | 9 +++-- tests/Japan/JapanTest.php | 9 +++-- tests/Japan/LabourThanksgivingDayTest.php | 11 ++++--- tests/Japan/MarineDayTest.php | 11 ++++--- tests/Japan/MountainDayTest.php | 11 ++++--- tests/Japan/NationalFoundationDayTest.php | 11 ++++--- tests/Japan/NewYearsDayTest.php | 11 ++++--- tests/Japan/PublicBridgeDayTest.php | 17 ++++++---- tests/Japan/RespectForTheAgedDayTest.php | 11 ++++--- tests/Japan/ShowaDayTest.php | 11 ++++--- tests/Japan/SportsDayTest.php | 11 ++++--- tests/Japan/VernalEquinoxDayTest.php | 9 +++-- tests/Latvia/ChristmasDayTest.php | 8 +++-- tests/Latvia/ChristmasEveDayTest.php | 8 +++-- tests/Latvia/EasterDayTest.php | 8 +++-- tests/Latvia/EasterMondayDayTest.php | 8 +++-- tests/Latvia/GoodFridayDayTest.php | 8 +++-- tests/Latvia/InternationalWorkersDayTest.php | 8 +++-- tests/Latvia/LatviaBaseTestCase.php | 8 +++-- tests/Latvia/LatviaTest.php | 8 +++-- tests/Latvia/MidsummerEveDayTest.php | 8 +++-- tests/Latvia/NewYearsDayTest.php | 8 +++-- tests/Latvia/NewYearsEveDayTest.php | 8 +++-- ...oclamationOfTheRepublicOfLatviaDayTest.php | 8 +++-- .../RestorationOfIndependenceDayTest.php | 8 +++-- tests/Latvia/SecondChristmasDayTest.php | 8 +++-- tests/Latvia/StJohnsDayTest.php | 8 +++-- tests/Lithuania/AllSaintsDayTest.php | 8 +++-- tests/Lithuania/AllSoulsDayTest.php | 8 +++-- tests/Lithuania/AssumptionOfMaryDayTest.php | 8 +++-- tests/Lithuania/ChristmasDayTest.php | 8 +++-- tests/Lithuania/ChristmasEveDayTest.php | 8 +++-- tests/Lithuania/EasterDayTest.php | 8 +++-- tests/Lithuania/EasterMondayDayTest.php | 8 +++-- .../Lithuania/InternationalWorkersDayTest.php | 8 +++-- tests/Lithuania/LithuaniaBaseTestCase.php | 8 +++-- tests/Lithuania/LithuaniaTest.php | 8 +++-- tests/Lithuania/NewYearsDayTest.php | 8 +++-- ...rationOfIndependenceOfLithuaniaDayTest.php | 8 +++-- ...estorationOfTheStateOfLithuaniaDayTest.php | 8 +++-- tests/Lithuania/SecondChristmasDayTest.php | 8 +++-- tests/Lithuania/StJohnsDayTest.php | 8 +++-- tests/Lithuania/StatehoodDayTest.php | 8 +++-- tests/Luxembourg/AllSaintsDayTest.php | 9 +++-- tests/Luxembourg/AscensionDayTest.php | 9 +++-- tests/Luxembourg/AssumptionOfMaryTest.php | 9 +++-- tests/Luxembourg/ChristmasDayTest.php | 9 +++-- tests/Luxembourg/EasterMondayTest.php | 9 +++-- tests/Luxembourg/EuropeDayTest.php | 9 +++-- .../InternationalWorkersDayTest.php | 9 +++-- tests/Luxembourg/LuxembourgBaseTestCase.php | 9 +++-- tests/Luxembourg/LuxembourgTest.php | 9 +++-- tests/Luxembourg/NationalDayTest.php | 9 +++-- tests/Luxembourg/NewYearsDayTest.php | 9 +++-- tests/Luxembourg/PentecostMondayTest.php | 9 +++-- tests/Luxembourg/SecondChristmasDayTest.php | 9 +++-- tests/Mexico/AllSaintsDayTest.php | 9 +++-- tests/Mexico/AssumptionOfMaryTest.php | 9 +++-- tests/Mexico/BenitoJuarezBirthdayTest.php | 15 ++++++++- tests/Mexico/ChristmasTest.php | 9 +++-- tests/Mexico/EasterMondayTest.php | 9 +++-- tests/Mexico/EpiphanyTest.php | 9 +++-- tests/Mexico/GoodFridayTest.php | 9 +++-- tests/Mexico/ImmaculateConceptionTest.php | 9 +++-- tests/Mexico/IndependenceDayTest.php | 9 +++-- tests/Mexico/InternationalWorkersDayTest.php | 9 +++-- tests/Mexico/MexicoBaseTestCase.php | 9 +++-- tests/Mexico/NewYearsDayTest.php | 15 ++++++++- tests/Mexico/VirginOfGuadalupeTest.php | 15 ++++++++- tests/Netherlands/AscensionDayTest.php | 9 +++-- tests/Netherlands/AshWednesdayTest.php | 9 +++-- tests/Netherlands/ChristmasDayTest.php | 9 +++-- tests/Netherlands/CommemorationDayTest.php | 9 +++-- tests/Netherlands/DaylightSavingTime.php | 8 +++-- tests/Netherlands/EasterMondayTest.php | 9 +++-- tests/Netherlands/EasterTest.php | 9 +++-- tests/Netherlands/EpiphanyTest.php | 9 +++-- tests/Netherlands/FathersDayTest.php | 9 +++-- tests/Netherlands/GoodFridayTest.php | 9 +++-- tests/Netherlands/HalloweenTest.php | 9 +++-- .../InternationalWorkersDayTest.php | 9 +++-- tests/Netherlands/KingsDayTest.php | 9 +++-- tests/Netherlands/LiberationDayTest.php | 9 +++-- tests/Netherlands/MothersDayTest.php | 9 +++-- tests/Netherlands/NetherlandsBaseTestCase.php | 9 +++-- tests/Netherlands/NetherlandsTest.php | 9 +++-- tests/Netherlands/NewYearsDayTest.php | 9 +++-- tests/Netherlands/PentecostTest.php | 9 +++-- tests/Netherlands/QueensDayTest.php | 9 +++-- tests/Netherlands/ValentinesDayTest.php | 9 +++-- tests/Netherlands/WorldAnimalDayTest.php | 9 +++-- tests/Netherlands/carnivalDayTest.php | 9 +++-- tests/Netherlands/pentecostMondayTest.php | 9 +++-- tests/Netherlands/princesDayTest.php | 9 +++-- tests/Netherlands/secondCarnivalDay.php | 9 +++-- tests/Netherlands/secondChristmasdayTest.php | 9 +++-- tests/Netherlands/stMartinsDayTest.php | 9 +++-- tests/Netherlands/stNicholasDayTest.php | 9 +++-- tests/Netherlands/thirdCarnivalDay.php | 9 +++-- tests/NewZealand/AnzacDayTest.php | 9 +++-- tests/NewZealand/BoxingDayTest.php | 9 +++-- tests/NewZealand/ChristmasDayTest.php | 9 +++-- tests/NewZealand/DayAfterNewYearsDayTest.php | 9 +++-- tests/NewZealand/EasterMondayTest.php | 9 +++-- tests/NewZealand/GoodFridayTest.php | 9 +++-- tests/NewZealand/LabourDayTest.php | 11 ++++--- tests/NewZealand/NewYearsDayTest.php | 9 +++-- tests/NewZealand/NewZealandBaseTestCase.php | 9 +++-- tests/NewZealand/NewZealandTest.php | 9 +++-- tests/NewZealand/QueensBirthdayTest.php | 9 +++-- tests/NewZealand/WaitangiDayTest.php | 9 +++-- tests/Norway/AscensionDayTest.php | 9 +++-- tests/Norway/ChristmasDayTest.php | 9 +++-- tests/Norway/ConstitutionDayTest.php | 9 +++-- tests/Norway/EasterMondayTest.php | 9 +++-- tests/Norway/EasterTest.php | 9 +++-- tests/Norway/GoodFridayTest.php | 9 +++-- tests/Norway/InternationalWorkersDayTest.php | 9 +++-- tests/Norway/MaundyThursdayTest.php | 9 +++-- tests/Norway/NewYearsDayTest.php | 9 +++-- tests/Norway/NorwayBaseTestCase.php | 9 +++-- tests/Norway/NorwayTest.php | 9 +++-- tests/Norway/PentecostMondayTest.php | 9 +++-- tests/Norway/PentecostTest.php | 9 +++-- tests/Norway/SecondChristmasDayTest.php | 9 +++-- tests/Poland/AllSaintsDayTest.php | 9 +++-- tests/Poland/AssumptionOfMaryTest.php | 9 +++-- tests/Poland/ChristmasTest.php | 9 +++-- tests/Poland/ConstitutionDayTest.php | 9 +++-- tests/Poland/CorpusChristiTest.php | 9 +++-- tests/Poland/EasterMondayTest.php | 9 +++-- tests/Poland/EasterTest.php | 9 +++-- tests/Poland/EpiphanyTest.php | 9 +++-- tests/Poland/IndependenceDayTest.php | 9 +++-- tests/Poland/InternationalWorkersDayTest.php | 9 +++-- tests/Poland/NewYearsDayTest.php | 9 +++-- tests/Poland/PentecostTest.php | 9 +++-- tests/Poland/PolandBaseTestCase.php | 9 +++-- tests/Poland/PolandTest.php | 9 +++-- tests/Poland/SecondChristmasDayTest.php | 9 +++-- tests/Portugal/AllSaintsDayTest.php | 9 +++-- tests/Portugal/AssumptionOfMaryTest.php | 9 +++-- tests/Portugal/CarnationRevolutionDayTest.php | 9 +++-- tests/Portugal/ChristmasTest.php | 9 +++-- tests/Portugal/CorpusChristiTest.php | 9 +++-- tests/Portugal/EasterTest.php | 9 +++-- tests/Portugal/GoodFridayTest.php | 9 +++-- tests/Portugal/ImmaculateConceptionTest.php | 9 +++-- .../Portugal/InternationalWorkersDayTest.php | 9 +++-- tests/Portugal/NewYearsDayTest.php | 9 +++-- tests/Portugal/PortugalBaseTestCase.php | 9 +++-- tests/Portugal/PortugalDayTest.php | 9 +++-- tests/Portugal/PortugalTest.php | 9 +++-- tests/Portugal/PortugueseRepublicDayTest.php | 9 +++-- .../RestorationOfIndependenceTest.php | 9 +++-- tests/ProviderTestCase.php | 9 +++-- tests/Randomizer.php | 12 ++++--- tests/Romania/AssumptionOfMaryTest.php | 9 +++-- tests/Romania/ChildrensDayTest.php | 9 +++-- tests/Romania/ChristmasDayTest.php | 9 +++-- tests/Romania/ConstantinBrancusiDayTest.php | 9 +++-- tests/Romania/DayAfterNewYearsDayTest.php | 9 +++-- tests/Romania/EasterMondayTest.php | 9 +++-- tests/Romania/EasterTest.php | 9 +++-- tests/Romania/EpiphanyTest.php | 9 +++-- tests/Romania/InternationalWorkersDayTest.php | 9 +++-- tests/Romania/NationalDayTest.php | 9 +++-- tests/Romania/NewYearsDayTest.php | 9 +++-- tests/Romania/PentecostMondayTest.php | 9 +++-- tests/Romania/PentecostTest.php | 9 +++-- tests/Romania/RomaniaBaseTestCase.php | 9 +++-- tests/Romania/RomaniaTest.php | 8 +++-- tests/Romania/SecondChristmasDayTest.php | 9 +++-- tests/Romania/StAndrewsDayTest.php | 9 +++-- tests/Romania/StJohnsDayTest.php | 9 +++-- tests/Romania/UnitedPrincipalitiesDayTest.php | 9 +++-- .../Russia/DefenceOfTheFatherlandDayTest.php | 9 +++-- tests/Russia/InternationalWomensDayTest.php | 8 +++-- tests/Russia/NewYearHolidaysDay2Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay3Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay4Test.php | 9 +++-- tests/Russia/NewYearHolidaysDay5Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay6Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay8Test.php | 9 +++-- tests/Russia/NewYearsDayTest.php | 8 +++-- tests/Russia/OrthodoxChristmasDayTest.php | 8 +++-- tests/Russia/RussiaBaseTestCase.php | 8 +++-- tests/Russia/RussiaDayTest.php | 8 +++-- tests/Russia/RussiaTest.php | 8 +++-- tests/Russia/SpringAndLabourDayTest.php | 8 +++-- tests/Russia/UnityDayTest.php | 8 +++-- tests/Russia/VictoryDayTest.php | 8 +++-- tests/Slovakia/AllSaintsDayTest.php | 8 +++-- tests/Slovakia/ChristmasDayTest.php | 8 +++-- tests/Slovakia/ChristmasEveTest.php | 8 +++-- tests/Slovakia/EasterMondayTest.php | 8 +++-- tests/Slovakia/EpiphanyTest.php | 8 +++-- tests/Slovakia/GoodFridayTest.php | 8 +++-- .../Slovakia/InternationalWorkersDayTest.php | 8 +++-- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 8 +++-- .../SaintsCyrilAndMethodiusDayTest.php | 8 +++-- tests/Slovakia/SecondChristmasDayTest.php | 8 +++-- tests/Slovakia/SlovakConstitutionDayTest.php | 8 +++-- tests/Slovakia/SlovakIndependenceDayTest.php | 8 +++-- .../SlovakNationalUprisingDayTest.php | 8 +++-- tests/Slovakia/SlovakiaBaseTestCase.php | 8 +++-- tests/Slovakia/SlovakiaTest.php | 8 +++-- .../StruggleForFreedomAndDemocracyDayTest.php | 8 +++-- tests/Slovakia/VictoryInEuropeDayTest.php | 8 +++-- tests/SouthAfrica/ChristmasDayTest.php | 11 ++++--- tests/SouthAfrica/FamilyDayTest.php | 9 +++-- tests/SouthAfrica/FreedomDayTest.php | 11 ++++--- tests/SouthAfrica/GoodFridayTest.php | 9 +++-- tests/SouthAfrica/HeritageDayTest.php | 11 ++++--- tests/SouthAfrica/HumanRightsDayTest.php | 11 ++++--- .../MunicipalElections2016DayTest.php | 11 ++++--- tests/SouthAfrica/NationalWomensDayTest.php | 11 ++++--- tests/SouthAfrica/NewYearsDayTest.php | 11 ++++--- tests/SouthAfrica/ReconciliationDayTest.php | 11 ++++--- tests/SouthAfrica/SecondChristmasDayTest.php | 11 ++++--- tests/SouthAfrica/SouthAfricaBaseTestCase.php | 8 +++-- tests/SouthAfrica/SouthAfricaTest.php | 8 +++-- .../SubstituteDayOfGoodwillTest.php | 11 ++++--- tests/SouthAfrica/WorkersDayTest.php | 11 ++++--- tests/SouthAfrica/YouthDayTest.php | 11 ++++--- tests/SouthKorea/ArborDayTest.php | 8 +++-- tests/SouthKorea/ArmedForcesDayTest.php | 8 +++-- tests/SouthKorea/BuddhasBirthdayTest.php | 8 +++-- tests/SouthKorea/ChildrensDayTest.php | 8 +++-- tests/SouthKorea/ChristmasDayTest.php | 8 +++-- tests/SouthKorea/ChuseokTest.php | 8 +++-- tests/SouthKorea/ConstitutionDayTest.php | 8 +++-- tests/SouthKorea/GaecheonjeolTest.php | 8 +++-- tests/SouthKorea/HangulDayTest.php | 8 +++-- .../IndependenceMovementDayTest.php | 8 +++-- tests/SouthKorea/LiberationDayTest.php | 8 +++-- tests/SouthKorea/MemorialDayTest.php | 8 +++-- tests/SouthKorea/NewYearsDayTest.php | 8 +++-- tests/SouthKorea/SeollalTest.php | 8 +++-- tests/SouthKorea/SouthKoreaBaseTestCase.php | 8 +++-- tests/SouthKorea/SouthKoreaTest.php | 8 +++-- tests/SouthKorea/UnitedNationsDayTest.php | 8 +++-- tests/Spain/AllSaintsDayTest.php | 9 +++-- .../Spain/Andalusia/AndalusiaBaseTestCase.php | 9 +++-- tests/Spain/Andalusia/AndalusiaDayTest.php | 9 +++-- tests/Spain/Andalusia/AndalusiaTest.php | 9 +++-- tests/Spain/Aragon/AragonBaseTestCase.php | 9 +++-- tests/Spain/Aragon/AragonTest.php | 9 +++-- tests/Spain/Aragon/StGeorgesDayTest.php | 9 +++-- tests/Spain/AssumptionOfMaryTest.php | 9 +++-- tests/Spain/Asturias/AsturiasBaseTestCase.php | 9 +++-- tests/Spain/Asturias/AsturiasDayTest.php | 9 +++-- tests/Spain/Asturias/AsturiasTest.php | 9 +++-- .../BalearicIslandsBaseTestCase.php | 9 +++-- .../BalearicIslandsDayTest.php | 9 +++-- .../BalearicIslands/BalearicIslandsTest.php | 9 +++-- .../BasqueCountryBaseTestCase.php | 9 +++-- .../BasqueCountry/BasqueCountryDayTest.php | 9 +++-- .../Spain/BasqueCountry/BasqueCountryTest.php | 9 +++-- .../CanaryIslandsBaseTestCase.php | 9 +++-- .../CanaryIslands/CanaryIslandsDayTest.php | 9 +++-- .../Spain/CanaryIslands/CanaryIslandsTest.php | 9 +++-- .../Spain/Cantabria/CantabriaBaseTestCase.php | 9 +++-- tests/Spain/Cantabria/CantabriaDayTest.php | 9 +++-- tests/Spain/Cantabria/CantabriaTest.php | 9 +++-- .../CastileAndLeonBaseTestCase.php | 9 +++-- .../CastileAndLeon/CastileAndLeonDayTest.php | 9 +++-- .../CastileAndLeon/CastileAndLeonTest.php | 9 +++-- .../CastillaLaManchaBaseTestCase.php | 9 +++-- .../CastillaLaManchaDayTest.php | 9 +++-- .../CastillaLaMancha/CastillaLaManchaTest.php | 9 +++-- .../Spain/Catalonia/CataloniaBaseTestCase.php | 9 +++-- tests/Spain/Catalonia/CataloniaTest.php | 9 +++-- .../Catalonia/nationalCataloniaDayTest.php | 9 +++-- tests/Spain/Catalonia/stJohnsDayTest.php | 9 +++-- tests/Spain/Ceuta/CeutaBaseTestCase.php | 9 +++-- tests/Spain/Ceuta/CeutaTest.php | 9 +++-- tests/Spain/Ceuta/ceutaDayTest.php | 9 +++-- tests/Spain/ChristmasTest.php | 9 +++-- .../CommunityOfMadridBaseTestCase.php | 9 +++-- .../CommunityOfMadridTest.php | 9 +++-- .../DosdeMayoUprisingDayTest.php | 9 +++-- tests/Spain/ConstitutionDayTest.php | 9 +++-- tests/Spain/EasterMondayTest.php | 9 +++-- tests/Spain/EpiphanyTest.php | 9 +++-- .../Extremadura/ExtremaduraBaseTestCase.php | 9 +++-- .../Spain/Extremadura/ExtremaduraDayTest.php | 9 +++-- tests/Spain/Extremadura/ExtremaduraTest.php | 9 +++-- tests/Spain/Galicia/GaliciaBaseTestCase.php | 9 +++-- tests/Spain/Galicia/GaliciaTest.php | 9 +++-- .../Galicia/GalicianLiteratureDayTest.php | 9 +++-- tests/Spain/Galicia/stJamesDayTest.php | 9 +++-- tests/Spain/GoodFridayTest.php | 9 +++-- tests/Spain/ImmaculateConceptionTest.php | 9 +++-- tests/Spain/InternationalWorkersDayTest.php | 9 +++-- tests/Spain/LaRioja/LaRiojaBaseTestCase.php | 9 +++-- tests/Spain/LaRioja/LaRiojaDayTest.php | 9 +++-- tests/Spain/LaRioja/LaRiojaTest.php | 9 +++-- tests/Spain/MaundyThursdayTest.php | 9 +++-- tests/Spain/Melilla/MelillaBaseTestCase.php | 9 +++-- tests/Spain/Melilla/MelillaTest.php | 9 +++-- tests/Spain/NationalDayTest.php | 9 +++-- tests/Spain/Navarre/NavarreBaseTestCase.php | 9 +++-- tests/Spain/Navarre/NavarreTest.php | 9 +++-- tests/Spain/NewYearsDayTest.php | 9 +++-- .../RegionOfMurciaBaseTestCase.php | 9 +++-- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 9 +++-- .../RegionOfMurcia/RegionOfMurciaTest.php | 9 +++-- tests/Spain/SpainBaseTestCase.php | 9 +++-- tests/Spain/SpainTest.php | 9 +++-- .../ValencianCommunityBaseTestCase.php | 9 +++-- .../ValencianCommunityDayTest.php | 9 +++-- .../ValencianCommunityTest.php | 9 +++-- tests/Spain/ValentinesDayTest.php | 9 +++-- tests/Spain/stJosephsDayTest.php | 9 +++-- tests/Sweden/AllSaintsDayTest.php | 9 +++-- tests/Sweden/AllSaintsEveTest.php | 9 +++-- tests/Sweden/AscensionDayTest.php | 9 +++-- tests/Sweden/ChristmasDayTest.php | 9 +++-- tests/Sweden/ChristmasEveTest.php | 9 +++-- tests/Sweden/EasterMondayTest.php | 9 +++-- tests/Sweden/EasterTest.php | 9 +++-- tests/Sweden/EpiphanyEveTest.php | 9 +++-- tests/Sweden/EpiphanyTest.php | 9 +++-- tests/Sweden/GoodFridayTest.php | 9 +++-- tests/Sweden/InternationalWorkersDayTest.php | 9 +++-- tests/Sweden/NationalDayTest.php | 9 +++-- tests/Sweden/NewYearsDayTest.php | 9 +++-- tests/Sweden/NewYearsEveTest.php | 9 +++-- tests/Sweden/PentecostTest.php | 9 +++-- tests/Sweden/SecondChristmasDayTest.php | 9 +++-- tests/Sweden/StJohnsDayTest.php | 9 +++-- tests/Sweden/StJohnsEveTest.php | 9 +++-- tests/Sweden/SwedenBaseTestCase.php | 9 +++-- tests/Sweden/SwedenTest.php | 9 +++-- tests/Sweden/WalpurgisEveTest.php | 9 +++-- .../Switzerland/Aargau/AargauBaseTestCase.php | 9 +++-- tests/Switzerland/Aargau/AargauTest.php | 9 +++-- tests/Switzerland/Aargau/AscensionDayTest.php | 9 +++-- tests/Switzerland/Aargau/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Aargau/GoodFridayTest.php | 9 +++-- tests/Switzerland/Aargau/NewYearsDayTest.php | 9 +++-- .../AppenzellAusserrhodenBaseTestCase.php | 9 +++-- .../AppenzellAusserrhodenTest.php | 9 +++-- .../AscensionDayTest.php | 9 +++-- .../ChristmasDayTest.php | 9 +++-- .../EasterMondayTest.php | 9 +++-- .../AppenzellAusserrhoden/GoodFridayTest.php | 9 +++-- .../AppenzellAusserrhoden/NewYearsDayTest.php | 9 +++-- .../PentecostMondayTest.php | 9 +++-- .../StStephensDayTest.php | 9 +++-- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 9 +++-- .../AppenzellInnerrhodenBaseTestCase.php | 9 +++-- .../AppenzellInnerrhodenTest.php | 9 +++-- .../AppenzellInnerrhoden/AscensionDayTest.php | 9 +++-- .../AssumptionOfMaryTest.php | 9 +++-- .../AppenzellInnerrhoden/ChristmasDayTest.php | 9 +++-- .../CorpusChristiTest.php | 9 +++-- .../AppenzellInnerrhoden/EasterMondayTest.php | 9 +++-- .../AppenzellInnerrhoden/GoodFridayTest.php | 9 +++-- .../ImmaculateConceptionTest.php | 9 +++-- .../AppenzellInnerrhoden/NewYearsDayTest.php | 9 +++-- .../PentecostMondayTest.php | 9 +++-- .../StStephensDayTest.php | 9 +++-- .../BaselLandschaft/AscensionDayTest.php | 9 +++-- .../BaselLandschaftBaseTestCase.php | 9 +++-- .../BaselLandschaft/BaselLandschaftTest.php | 9 +++-- .../BaselLandschaft/ChristmasDayTest.php | 9 +++-- .../BaselLandschaft/EasterMondayTest.php | 9 +++-- .../BaselLandschaft/GoodFridayTest.php | 9 +++-- .../BaselLandschaft/NewYearsDayTest.php | 9 +++-- .../BaselLandschaft/PentecostMondayTest.php | 9 +++-- .../BaselLandschaft/StStephensDayTest.php | 9 +++-- .../BaselLandschaft/WorkersDayTest.php | 9 +++-- .../BaselStadt/AscensionDayTest.php | 9 +++-- .../BaselStadt/BaselStadtBaseTestCase.php | 9 +++-- .../Switzerland/BaselStadt/BaselStadtTest.php | 9 +++-- .../BaselStadt/ChristmasDayTest.php | 9 +++-- .../BaselStadt/EasterMondayTest.php | 9 +++-- .../Switzerland/BaselStadt/GoodFridayTest.php | 9 +++-- .../BaselStadt/NewYearsDayTest.php | 9 +++-- .../BaselStadt/PentecostMondayTest.php | 9 +++-- .../BaselStadt/StStephensDayTest.php | 9 +++-- .../Switzerland/BaselStadt/WorkersDayTest.php | 9 +++-- tests/Switzerland/Bern/AscensionDayTest.php | 9 +++-- tests/Switzerland/Bern/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Bern/BernBaseTestCase.php | 9 +++-- tests/Switzerland/Bern/BernTest.php | 9 +++-- tests/Switzerland/Bern/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Bern/EasterMondayTest.php | 9 +++-- tests/Switzerland/Bern/GoodFridayTest.php | 9 +++-- tests/Switzerland/Bern/NewYearsDayTest.php | 9 +++-- .../Switzerland/Bern/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Bern/StStephensDayTest.php | 9 +++-- .../Switzerland/Fribourg/AllSaintsDayTest.php | 9 +++-- .../Switzerland/Fribourg/AscensionDayTest.php | 9 +++-- .../Fribourg/AssumptionOfMaryTest.php | 9 +++-- .../Fribourg/BerchtoldsTagTest.php | 11 ++++--- .../Switzerland/Fribourg/ChristmasDayTest.php | 9 +++-- .../Fribourg/CorpusChristiTest.php | 9 +++-- .../Switzerland/Fribourg/December26thTest.php | 9 +++-- .../Switzerland/Fribourg/EasterMondayTest.php | 9 +++-- .../Fribourg/FribourgBaseTestCase.php | 9 +++-- tests/Switzerland/Fribourg/FribourgTest.php | 9 +++-- tests/Switzerland/Fribourg/GoodFridayTest.php | 9 +++-- .../Fribourg/ImmaculateConceptionTest.php | 9 +++-- .../Switzerland/Fribourg/NewYearsDayTest.php | 9 +++-- .../Fribourg/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Geneva/AscensionDayTest.php | 9 +++-- tests/Switzerland/Geneva/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Geneva/EasterMondayTest.php | 9 +++-- .../Switzerland/Geneva/GenevaBaseTestCase.php | 9 +++-- tests/Switzerland/Geneva/GenevaTest.php | 9 +++-- tests/Switzerland/Geneva/GoodFridayTest.php | 9 +++-- .../Switzerland/Geneva/JeuneGenevoisTest.php | 13 +++++--- tests/Switzerland/Geneva/NewYearsDayTest.php | 9 +++-- .../Geneva/PentecostMondayTest.php | 9 +++-- .../Geneva/RestaurationGenevoiseTest.php | 11 ++++--- tests/Switzerland/Glarus/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Glarus/AscensionDayTest.php | 9 +++-- .../Switzerland/Glarus/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Glarus/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Glarus/EasterMondayTest.php | 9 +++-- .../Switzerland/Glarus/GlarusBaseTestCase.php | 9 +++-- tests/Switzerland/Glarus/GlarusTest.php | 9 +++-- tests/Switzerland/Glarus/GoodFridayTest.php | 9 +++-- .../Switzerland/Glarus/NafelserFahrtTest.php | 11 ++++--- tests/Switzerland/Glarus/NewYearsDayTest.php | 9 +++-- .../Glarus/PentecostMondayTest.php | 9 +++-- .../Switzerland/Glarus/StStephensDayTest.php | 9 +++-- .../Switzerland/Grisons/AscensionDayTest.php | 9 +++-- .../Switzerland/Grisons/ChristmasDayTest.php | 9 +++-- .../Switzerland/Grisons/EasterMondayTest.php | 9 +++-- tests/Switzerland/Grisons/GoodFridayTest.php | 9 +++-- .../Grisons/GrisonsBaseTestCase.php | 9 +++-- tests/Switzerland/Grisons/GrisonsTest.php | 9 +++-- tests/Switzerland/Grisons/NewYearsDayTest.php | 9 +++-- .../Grisons/PentecostMondayTest.php | 9 +++-- .../Switzerland/Grisons/StStephensDayTest.php | 9 +++-- tests/Switzerland/Jura/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Jura/AscensionDayTest.php | 9 +++-- .../Switzerland/Jura/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Jura/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Jura/BettagsMontagTest.php | 11 ++++--- tests/Switzerland/Jura/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Jura/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Jura/EasterMondayTest.php | 9 +++-- tests/Switzerland/Jura/EasterTest.php | 9 +++-- tests/Switzerland/Jura/GoodFridayTest.php | 9 +++-- tests/Switzerland/Jura/JuraBaseTestCase.php | 9 +++-- tests/Switzerland/Jura/JuraTest.php | 9 +++-- tests/Switzerland/Jura/NewYearsDayTest.php | 9 +++-- .../Switzerland/Jura/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Jura/PentecostTest.php | 9 +++-- .../Jura/PlebisciteJurassienTest.php | 9 +++-- tests/Switzerland/Jura/WorkersDayTest.php | 9 +++-- .../Switzerland/Lucerne/AllSaintsDayTest.php | 9 +++-- .../Switzerland/Lucerne/AscensionDayTest.php | 9 +++-- .../Lucerne/AssumptionOfMaryTest.php | 9 +++-- .../Switzerland/Lucerne/BerchtoldsTagTest.php | 11 ++++--- .../Switzerland/Lucerne/ChristmasDayTest.php | 9 +++-- .../Switzerland/Lucerne/CorpusChristiTest.php | 9 +++-- .../Switzerland/Lucerne/EasterMondayTest.php | 9 +++-- tests/Switzerland/Lucerne/GoodFridayTest.php | 9 +++-- .../Lucerne/ImmaculateConceptionTest.php | 9 +++-- .../Lucerne/LucerneBaseTestCase.php | 9 +++-- tests/Switzerland/Lucerne/LucerneTest.php | 9 +++-- tests/Switzerland/Lucerne/NewYearsDayTest.php | 9 +++-- .../Lucerne/PentecostMondayTest.php | 9 +++-- .../Switzerland/Lucerne/StStephensDayTest.php | 9 +++-- .../Neuchatel/AscensionDayTest.php | 9 +++-- .../Neuchatel/BettagsMontagTest.php | 11 ++++--- .../Neuchatel/ChristmasDayTest.php | 9 +++-- .../Neuchatel/December26thTest.php | 11 ++++--- .../Neuchatel/EasterMondayTest.php | 9 +++-- .../Switzerland/Neuchatel/GoodFridayTest.php | 9 +++-- .../Neuchatel/InstaurationRepubliqueTest.php | 9 +++-- .../Switzerland/Neuchatel/January2ndTest.php | 11 ++++--- .../Neuchatel/NeuchatelBaseTestCase.php | 9 +++-- tests/Switzerland/Neuchatel/NeuchatelTest.php | 9 +++-- .../Switzerland/Neuchatel/NewYearsDayTest.php | 9 +++-- .../Neuchatel/PentecostMondayTest.php | 9 +++-- .../Switzerland/Neuchatel/WorkersDayTest.php | 9 +++-- .../Nidwalden/AllSaintsDayTest.php | 9 +++-- .../Nidwalden/AscensionDayTest.php | 9 +++-- .../Nidwalden/AssumptionOfMaryTest.php | 9 +++-- .../Nidwalden/ChristmasDayTest.php | 9 +++-- .../Nidwalden/CorpusChristiTest.php | 9 +++-- .../Nidwalden/EasterMondayTest.php | 9 +++-- .../Switzerland/Nidwalden/GoodFridayTest.php | 9 +++-- .../Nidwalden/ImmaculateConceptionTest.php | 9 +++-- .../Switzerland/Nidwalden/NewYearsDayTest.php | 9 +++-- .../Nidwalden/NidwaldenBaseTestCase.php | 9 +++-- tests/Switzerland/Nidwalden/NidwaldenTest.php | 9 +++-- .../Nidwalden/PentecostMondayTest.php | 9 +++-- .../Switzerland/Nidwalden/StJosephDayTest.php | 9 +++-- .../Nidwalden/StStephensDayTest.php | 9 +++-- .../Switzerland/Obwalden/AllSaintsDayTest.php | 9 +++-- .../Switzerland/Obwalden/AscensionDayTest.php | 9 +++-- .../Obwalden/AssumptionOfMaryTest.php | 9 +++-- .../Obwalden/BerchtoldsTagTest.php | 11 ++++--- .../Obwalden/BruderKlausenFestTest.php | 13 +++++--- .../Switzerland/Obwalden/ChristmasDayTest.php | 9 +++-- .../Obwalden/CorpusChristiTest.php | 9 +++-- .../Switzerland/Obwalden/EasterMondayTest.php | 9 +++-- tests/Switzerland/Obwalden/GoodFridayTest.php | 9 +++-- .../Obwalden/ImmaculateConceptionTest.php | 9 +++-- .../Switzerland/Obwalden/NewYearsDayTest.php | 9 +++-- .../Obwalden/ObwaldenBaseTestCase.php | 9 +++-- tests/Switzerland/Obwalden/ObwaldenTest.php | 9 +++-- .../Obwalden/PentecostMondayTest.php | 9 +++-- .../Obwalden/StStephensDayTest.php | 9 +++-- .../Schaffhausen/AscensionDayTest.php | 9 +++-- .../Schaffhausen/BerchtoldsTagTest.php | 11 ++++--- .../Schaffhausen/ChristmasDayTest.php | 9 +++-- .../Schaffhausen/EasterMondayTest.php | 9 +++-- .../Schaffhausen/GoodFridayTest.php | 9 +++-- .../Schaffhausen/NewYearsDayTest.php | 9 +++-- .../Schaffhausen/PentecostMondayTest.php | 9 +++-- .../Schaffhausen/SchaffhausenBaseTestCase.php | 9 +++-- .../Schaffhausen/SchaffhausenTest.php | 9 +++-- .../Schaffhausen/StStephensDayTest.php | 9 +++-- .../Schaffhausen/WorkersDayTest.php | 9 +++-- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Schwyz/AscensionDayTest.php | 9 +++-- .../Schwyz/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Schwyz/ChristmasDayTest.php | 9 +++-- .../Switzerland/Schwyz/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Schwyz/EasterMondayTest.php | 9 +++-- tests/Switzerland/Schwyz/EpiphanyTest.php | 9 +++-- tests/Switzerland/Schwyz/GoodFridayTest.php | 9 +++-- .../Schwyz/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Schwyz/NewYearsDayTest.php | 9 +++-- .../Schwyz/PentecostMondayTest.php | 9 +++-- .../Switzerland/Schwyz/SchwyzBaseTestCase.php | 9 +++-- tests/Switzerland/Schwyz/SchwyzTest.php | 9 +++-- tests/Switzerland/Schwyz/StJosephDayTest.php | 9 +++-- .../Switzerland/Schwyz/StStephensDayTest.php | 9 +++-- .../Solothurn/AscensionDayTest.php | 9 +++-- .../Solothurn/BerchtoldsTagTest.php | 11 ++++--- .../Solothurn/ChristmasDayTest.php | 9 +++-- .../Switzerland/Solothurn/GoodFridayTest.php | 9 +++-- .../Switzerland/Solothurn/NewYearsDayTest.php | 9 +++-- .../Solothurn/SolothurnBaseTestCase.php | 9 +++-- tests/Switzerland/Solothurn/SolothurnTest.php | 9 +++-- .../Switzerland/StGallen/AllSaintsDayTest.php | 9 +++-- .../Switzerland/StGallen/AscensionDayTest.php | 9 +++-- .../Switzerland/StGallen/ChristmasDayTest.php | 9 +++-- .../Switzerland/StGallen/EasterMondayTest.php | 9 +++-- tests/Switzerland/StGallen/GoodFridayTest.php | 9 +++-- .../Switzerland/StGallen/NewYearsDayTest.php | 9 +++-- .../StGallen/PentecostMondayTest.php | 9 +++-- .../StGallen/StGallenBaseTestCase.php | 9 +++-- tests/Switzerland/StGallen/StGallenTest.php | 9 +++-- .../StGallen/StStephensDayTest.php | 9 +++-- tests/Switzerland/SwissNationalDayTest.php | 9 +++-- tests/Switzerland/SwitzerlandBaseTestCase.php | 9 +++-- tests/Switzerland/SwitzerlandTest.php | 9 +++-- .../Switzerland/Thurgau/AscensionDayTest.php | 9 +++-- .../Switzerland/Thurgau/BerchtoldsTagTest.php | 11 ++++--- .../Switzerland/Thurgau/ChristmasDayTest.php | 9 +++-- .../Switzerland/Thurgau/EasterMondayTest.php | 9 +++-- tests/Switzerland/Thurgau/GoodFridayTest.php | 9 +++-- tests/Switzerland/Thurgau/NewYearsDayTest.php | 9 +++-- .../Thurgau/PentecostMondayTest.php | 9 +++-- .../Switzerland/Thurgau/StStephensDayTest.php | 9 +++-- .../Thurgau/ThurgauBaseTestCase.php | 9 +++-- tests/Switzerland/Thurgau/ThurgauTest.php | 9 +++-- tests/Switzerland/Thurgau/WorkersDayTest.php | 9 +++-- tests/Switzerland/Ticino/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Ticino/AscensionDayTest.php | 9 +++-- .../Ticino/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Ticino/ChristmasDayTest.php | 9 +++-- .../Switzerland/Ticino/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Ticino/EasterMondayTest.php | 9 +++-- tests/Switzerland/Ticino/EpiphanyTest.php | 9 +++-- .../Ticino/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Ticino/NewYearsDayTest.php | 9 +++-- .../Ticino/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Ticino/StJosephDayTest.php | 9 +++-- tests/Switzerland/Ticino/StPeterPaulTest.php | 9 +++-- .../Switzerland/Ticino/StStephensDayTest.php | 9 +++-- .../Switzerland/Ticino/TicinoBaseTestCase.php | 9 +++-- tests/Switzerland/Ticino/TicinoTest.php | 9 +++-- tests/Switzerland/Ticino/WorkersDayTest.php | 9 +++-- tests/Switzerland/Uri/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Uri/AscensionDayTest.php | 9 +++-- .../Switzerland/Uri/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Uri/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Uri/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Uri/EasterMondayTest.php | 9 +++-- tests/Switzerland/Uri/EpiphanyTest.php | 9 +++-- tests/Switzerland/Uri/GoodFridayTest.php | 9 +++-- .../Uri/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Uri/NewYearsDayTest.php | 9 +++-- tests/Switzerland/Uri/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Uri/StJosephDayTest.php | 9 +++-- tests/Switzerland/Uri/StStephensDayTest.php | 9 +++-- tests/Switzerland/Uri/UriBaseTestCase.php | 9 +++-- tests/Switzerland/Uri/UriTest.php | 9 +++-- tests/Switzerland/Valais/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Valais/AscensionDayTest.php | 9 +++-- .../Valais/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Valais/ChristmasDayTest.php | 9 +++-- .../Switzerland/Valais/CorpusChristiTest.php | 9 +++-- .../Valais/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Valais/NewYearsDayTest.php | 9 +++-- tests/Switzerland/Valais/StJosephDayTest.php | 9 +++-- .../Switzerland/Valais/ValaisBaseTestCase.php | 9 +++-- tests/Switzerland/Valais/ValaisTest.php | 9 +++-- tests/Switzerland/Vaud/AscensionDayTest.php | 9 +++-- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Vaud/BettagsMontagTest.php | 11 ++++--- tests/Switzerland/Vaud/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Vaud/EasterMondayTest.php | 9 +++-- tests/Switzerland/Vaud/GoodFridayTest.php | 9 +++-- tests/Switzerland/Vaud/NewYearsDayTest.php | 9 +++-- .../Switzerland/Vaud/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Vaud/VaudBaseTestCase.php | 9 +++-- tests/Switzerland/Vaud/VaudTest.php | 9 +++-- tests/Switzerland/Zug/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Zug/AscensionDayTest.php | 9 +++-- .../Switzerland/Zug/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Zug/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Zug/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Zug/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Zug/EasterMondayTest.php | 9 +++-- tests/Switzerland/Zug/GoodFridayTest.php | 9 +++-- .../Zug/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Zug/NewYearsDayTest.php | 9 +++-- tests/Switzerland/Zug/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Zug/StStephensDayTest.php | 9 +++-- tests/Switzerland/Zug/ZugBaseTestCase.php | 9 +++-- tests/Switzerland/Zug/ZugTest.php | 9 +++-- tests/Switzerland/Zurich/AscensionDayTest.php | 9 +++-- tests/Switzerland/Zurich/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Zurich/EasterMondayTest.php | 9 +++-- tests/Switzerland/Zurich/GoodFridayTest.php | 9 +++-- tests/Switzerland/Zurich/NewYearsDayTest.php | 9 +++-- .../Zurich/PentecostMondayTest.php | 9 +++-- .../Switzerland/Zurich/StStephensDayTest.php | 9 +++-- tests/Switzerland/Zurich/WorkersDayTest.php | 9 +++-- .../Switzerland/Zurich/ZurichBaseTestCase.php | 9 +++-- tests/Switzerland/Zurich/ZurichTest.php | 9 +++-- tests/Turkey/CommemorationOfAtaturkTest.php | 9 +++-- tests/Turkey/DemocracyDayTest.php | 9 +++-- tests/Turkey/LabourDayTest.php | 9 +++-- tests/Turkey/NationalSovereigntyDayTest.php | 9 +++-- tests/Turkey/NewYearsDayTest.php | 9 +++-- tests/Turkey/RepublicDayTest.php | 9 +++-- tests/Turkey/TurkeyBaseTestCase.php | 9 +++-- tests/Turkey/TurkeyTest.php | 8 +++-- tests/Turkey/VictoryDayTest.php | 9 +++-- tests/USA/ChristmasDayTest.php | 9 +++-- tests/USA/ColumbusDayTest.php | 9 +++-- tests/USA/IndependenceDayTest.php | 9 +++-- tests/USA/JuneteenthTest.php | 9 +++-- tests/USA/LabourDayTest.php | 9 +++-- tests/USA/MartinLutherKingDayTest.php | 9 +++-- tests/USA/MemorialDayTest.php | 9 +++-- tests/USA/NewYearsDayTest.php | 9 +++-- tests/USA/ThanksgivingDayTest.php | 9 +++-- tests/USA/USABaseTestCase.php | 9 +++-- tests/USA/USATest.php | 9 +++-- tests/USA/VeteransDayTest.php | 9 +++-- tests/USA/WashingtonsBirthdayTest.php | 9 +++-- tests/Ukraine/CatholicChristmasDayTest.php | 8 +++-- tests/Ukraine/ChristmasDayTest.php | 9 +++-- tests/Ukraine/ConstitutionDayTest.php | 9 +++-- tests/Ukraine/DefenderOfUkraineDayTest.php | 9 +++-- tests/Ukraine/EasterTest.php | 9 +++-- tests/Ukraine/IndependenceDayTest.php | 9 +++-- tests/Ukraine/InternationalWomensDayTest.php | 9 +++-- tests/Ukraine/InternationalWorkersDayTest.php | 9 +++-- tests/Ukraine/NewYearsDayTest.php | 9 +++-- tests/Ukraine/PentecostTest.php | 9 +++-- .../SecondInternationalWorkersDayTest.php | 8 +++-- tests/Ukraine/SubstitutedHolidayTest.php | 10 +++--- tests/Ukraine/UkraineBaseTestCase.php | 9 +++-- tests/Ukraine/UkraineTest.php | 8 +++-- tests/Ukraine/VictoryDayTest.php | 9 +++-- tests/UnitedKingdom/BoxingDayTest.php | 13 +++++--- tests/UnitedKingdom/ChristmasDayTest.php | 13 +++++--- tests/UnitedKingdom/EasterMondayTest.php | 9 +++-- tests/UnitedKingdom/England/BoxingDayTest.php | 13 +++++--- .../England/ChristmasDayTest.php | 13 +++++--- .../England/EasterMondayTest.php | 9 +++-- .../England/EnglandBaseTestCase.php | 9 +++-- tests/UnitedKingdom/England/EnglandTest.php | 9 +++-- .../UnitedKingdom/England/GoodFridayTest.php | 9 +++-- .../England/MayDayBankHolidayTest.php | 9 +++-- .../UnitedKingdom/England/NewYearsDayTest.php | 9 +++-- .../England/SpringBankHolidayTest.php | 9 +++-- .../England/SummerBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/GoodFridayTest.php | 9 +++-- .../KingCharlesCoronationBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/MayDayBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/MotheringSundayTest.php | 8 +++-- tests/UnitedKingdom/NewYearsDayTest.php | 9 +++-- .../NorthernIreland/BattleOfTheBoyneTest.php | 11 ++++--- .../NorthernIreland/BoxingDayTest.php | 13 +++++--- .../NorthernIreland/ChristmasDayTest.php | 13 +++++--- .../NorthernIreland/EasterMondayTest.php | 9 +++-- .../NorthernIreland/GoodFridayTest.php | 9 +++-- .../NorthernIreland/MayDayBankHolidayTest.php | 9 +++-- .../NorthernIreland/NewYearsDayTest.php | 9 +++-- .../NorthernIrelandBaseTestCase.php | 9 +++-- .../NorthernIreland/NorthernIrelandTest.php | 9 +++-- .../NorthernIreland/SpringBankHolidayTest.php | 9 +++-- .../NorthernIreland/StPatricksDayTest.php | 11 ++++--- .../NorthernIreland/SummerBankHolidayTest.php | 9 +++-- .../PlatinumJubileeBankHolidayTest.php | 9 +++-- .../QueenElizabethFuneralBankHolidayTest.php | 9 +++-- .../UnitedKingdom/Scotland/BoxingDayTest.php | 13 +++++--- .../Scotland/ChristmasDayTest.php | 13 +++++--- .../UnitedKingdom/Scotland/GoodFridayTest.php | 9 +++-- .../Scotland/MayDayBankHolidayTest.php | 9 +++-- .../Scotland/NewYearsDayTest.php | 11 ++++--- .../Scotland/ScotlandBaseTestCase.php | 9 +++-- tests/UnitedKingdom/Scotland/ScotlandTest.php | 9 +++-- .../Scotland/SecondNewYearsDayTest.php | 11 ++++--- .../Scotland/SpringBankHolidayTest.php | 9 +++-- .../Scotland/StAndrewsDayTest.php | 11 ++++--- .../Scotland/SummerBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/SummerBankHolidayTest.php | 9 +++-- .../UnitedKingdomBaseTestCase.php | 9 +++-- tests/UnitedKingdom/UnitedKingdomTest.php | 11 ++++--- tests/UnitedKingdom/Wales/BoxingDayTest.php | 13 +++++--- .../UnitedKingdom/Wales/ChristmasDayTest.php | 13 +++++--- .../UnitedKingdom/Wales/EasterMondayTest.php | 9 +++-- tests/UnitedKingdom/Wales/GoodFridayTest.php | 9 +++-- .../Wales/MayDayBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 9 +++-- .../Wales/SpringBankHolidayTest.php | 9 +++-- .../Wales/SummerBankHolidayTest.php | 9 +++-- .../UnitedKingdom/Wales/WalesBaseTestCase.php | 9 +++-- tests/UnitedKingdom/Wales/WalesTest.php | 9 +++-- tests/YasumiBase.php | 12 ++++--- 1692 files changed, 10157 insertions(+), 5281 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index b84347c26..206439d0d 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,9 +1,11 @@ */ -$config = new AzuyaLabs\PhpCsFixerConfig\Config(); +$config = new AzuyaLabs\PhpCsFixerConfig\Config('2015', null, 'Yasumi'); $config->getFinder()->in(__DIR__)->notPath('var'); +$defaults = $config->getRules(); + +$config->setRules(array_merge($defaults, [ + 'php_unit_method_casing' => ['case' => 'camel_case'], +])); + return $config; diff --git a/composer.json b/composer.json index 1b06f3622..8db19a93d 100644 --- a/composer.json +++ b/composer.json @@ -40,8 +40,7 @@ }, "require-dev": { "ext-intl": "*", - "azuyalabs/php-cs-fixer-config": "^0.1", - "friendsofphp/php-cs-fixer": "^2.19 || 3.48", + "azuyalabs/php-cs-fixer-config": "^0.3", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", diff --git a/examples/basic.php b/examples/basic.php index 4407f7351..9cf5b8f98 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -2,7 +2,20 @@ // This file demonstrates the general use of Yasumi and its basic methods. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -10,20 +23,20 @@ $holidays = Yasumi\Yasumi::create('USA', (int) date('Y')); // Show the number of defined holidays -echo 'Number of defined holidays: '.$holidays->count().PHP_EOL; +echo 'Number of defined holidays: ' . $holidays->count() . PHP_EOL; echo PHP_EOL; // Display a list all of the holiday names (short names) -echo 'List of all the holiday names: '.PHP_EOL; +echo 'List of all the holiday names: ' . PHP_EOL; foreach ($holidays->getHolidayNames() as $name) { - echo $name.PHP_EOL; + echo $name . PHP_EOL; } echo PHP_EOL; // Display a list all of the holiday dates -echo 'List of all the holiday dates:'.PHP_EOL; +echo 'List of all the holiday dates:' . PHP_EOL; foreach ($holidays->getHolidayDates() as $date) { - echo $date.PHP_EOL; + echo $date . PHP_EOL; } echo PHP_EOL; @@ -31,17 +44,17 @@ $independenceDay = $holidays->getHoliday('independenceDay'); // Show the localized name -echo 'Name of the holiday : '.$independenceDay->getName().PHP_EOL; +echo 'Name of the holiday : ' . $independenceDay->getName() . PHP_EOL; // Show the date -echo 'Date of the holiday : '.$independenceDay.PHP_EOL; +echo 'Date of the holiday : ' . $independenceDay . PHP_EOL; // Show the type of holiday -echo 'Type of holiday : '.$independenceDay->getType().PHP_EOL; +echo 'Type of holiday : ' . $independenceDay->getType() . PHP_EOL; echo PHP_EOL; // Dump the holiday as a JSON object -echo 'Holiday as a JSON object:'.PHP_EOL; +echo 'Holiday as a JSON object:' . PHP_EOL; echo json_encode($independenceDay, JSON_PRETTY_PRINT); echo PHP_EOL; diff --git a/examples/between_filter.php b/examples/between_filter.php index 4b1358c9a..4b8b46f7c 100644 --- a/examples/between_filter.php +++ b/examples/between_filter.php @@ -3,7 +3,20 @@ // This file demonstrates the use of the `between` filter, selecting only a number of holidays // that fall in the given date range. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -12,16 +25,16 @@ // Use the factory to create a new holiday provider instance $holidays = Yasumi\Yasumi::create('Italy', $year); $holidaysInDecember = $holidays->between( - new DateTime('12/01/'.$year), - new DateTime('12/31/'.$year) + new DateTime('12/01/' . $year), + new DateTime('12/31/' . $year) ); // Show all holidays in Italy for December -echo 'List of all the holidays in December: '.PHP_EOL; +echo 'List of all the holidays in December: ' . PHP_EOL; foreach ($holidaysInDecember as $holiday) { - echo $holiday.' - '.$holiday->getName().PHP_EOL; + echo $holiday . ' - ' . $holiday->getName() . PHP_EOL; } echo PHP_EOL; // Show the number of filtered holidays -echo 'Number of filtered holidays: '.$holidaysInDecember->count().PHP_EOL; +echo 'Number of filtered holidays: ' . $holidaysInDecember->count() . PHP_EOL; diff --git a/examples/custom_provider.php b/examples/custom_provider.php index 773f93cc3..57f514d63 100644 --- a/examples/custom_provider.php +++ b/examples/custom_provider.php @@ -4,7 +4,20 @@ // those scenarios where you would need only a subset of holidays of an existing provider. Or, if you you like to // extend an existing provider with additional, non-standard holidays. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -33,11 +46,11 @@ public function initialize(): void $NYSEHolidays = Yasumi\Yasumi::create(NYSE::class, (int) date('Y')); // We then can retrieve the NYSE observed holidays in the usual manner: -echo 'List of all the holiday names: '.PHP_EOL; +echo 'List of all the holiday names: ' . PHP_EOL; foreach ($NYSEHolidays->getHolidayNames() as $day) { - echo $day.PHP_EOL; + echo $day . PHP_EOL; } echo PHP_EOL; // Use the count() method to show how many holidays are returned -echo 'Number of defined holidays: '.$NYSEHolidays->count().PHP_EOL; +echo 'Number of defined holidays: ' . $NYSEHolidays->count() . PHP_EOL; diff --git a/examples/filters.php b/examples/filters.php index 3a82af460..5e85543ab 100644 --- a/examples/filters.php +++ b/examples/filters.php @@ -4,7 +4,20 @@ // based on certain conditions. In this examples we show only the holidays that are // marked as 'official'. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -14,7 +27,7 @@ // Create a filter instance for the official holidays $official = new Yasumi\Filters\OfficialHolidaysFilter($holidays->getIterator()); -echo 'List of all official holidays: '.PHP_EOL; +echo 'List of all official holidays: ' . PHP_EOL; foreach ($official as $day) { - echo $day->getName().PHP_EOL; + echo $day->getName() . PHP_EOL; } diff --git a/phpinsights.php b/phpinsights.php index 4b5520d8b..9dbda25a8 100644 --- a/phpinsights.php +++ b/phpinsights.php @@ -1,6 +1,19 @@ + */ return [ /* diff --git a/rector.php b/rector.php index a75a58ab8..112903d93 100644 --- a/rector.php +++ b/rector.php @@ -1,6 +1,19 @@ + */ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; @@ -8,8 +21,8 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ - __DIR__.'/src', - __DIR__.'/tests', + __DIR__ . '/src', + __DIR__ . '/tests', ]); // single rules diff --git a/src/Yasumi/Exception/Exception.php b/src/Yasumi/Exception/Exception.php index fe9254e73..4faee05ea 100644 --- a/src/Yasumi/Exception/Exception.php +++ b/src/Yasumi/Exception/Exception.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -190,10 +192,10 @@ protected function calculateReconciliationDay(): void return; } - $date = new \DateTime($this->year.'-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $day = (int) $date->format('w'); if (1 !== $day) { - $date = $date->add(0 === $day ? new \DateInterval('P1D') : new \DateInterval('P'.(8 - $day).'D')); + $date = $date->add(0 === $day ? new \DateInterval('P1D') : new \DateInterval('P' . (8 - $day) . 'D')); } $this->addHoliday(new Holiday('reconciliationDay', ['en' => 'Reconciliation Day'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 54366a841..eb72ded0a 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -138,7 +140,7 @@ protected function calculateBankHoliday(): void $this->addHoliday(new Holiday( 'bankHoliday', ['en' => 'Bank Holiday'], - new \DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index 55c69d125..b9c88d4c0 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -139,7 +141,7 @@ protected function calculatePicnicDay(): void $this->addHoliday(new Holiday( 'picnicDay', ['en' => 'Picnic Day'], - new \DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 0c6e38dc7..6becbfd38 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -1,9 +1,11 @@ year; + $birthDay = 'first monday of october ' . $this->year; if ($this->year < 2012 || 2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $birthDay = 'second monday of june '.$this->year; + $birthDay = 'second monday of june ' . $this->year; } $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index b63d8f2dd..96c6c66be 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first friday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($date->format('d') < 5) { $date = $date->add(new \DateInterval('P7D')); } diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index a08713fc0..d27e69f33 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -145,10 +147,10 @@ protected function calculateLabourDay(): void protected function calculateAdelaideCupDay(): void { if ($this->year >= 1973) { - $cupDay = 'second monday of march '.$this->year; + $cupDay = 'second monday of march ' . $this->year; if ($this->year < 2006) { - $cupDay = 'third monday of may '.$this->year; + $cupDay = 'third monday of may ' . $this->year; } $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 7d97aa80f..9dce59344 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -100,7 +102,7 @@ protected function calculateRecreationDay(): void $this->addHoliday(new Holiday( 'recreationDay', ['en' => 'Recreation Day'], - new \DateTime('first monday of november '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of november ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 3701c94b9..5134add2f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -1,9 +1,11 @@ year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); if (! $date instanceof \DateTime) { diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index 7f50e4579..91f9d227b 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('third saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday('flindersIslandShow', ['en' => 'Flinders Island Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index 78e4abc43..1916b3ce2 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'kingIslandShow', ['en' => 'King Island Show'], - new \DateTime('first tuesday of march '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first tuesday of march ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index b2aca1fd9..46fcf2dce 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('second saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); $this->addHoliday(new Holiday('launcestonShow', ['en' => 'Royal Launceston Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index be6fe7582..395204930 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday('burnieShow', ['en' => 'Burnie Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 160e966a0..e6da79a16 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first thursday of may ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday('agfest', ['en' => 'AGFEST'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index 512815daa..ee54acd74 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('fourth saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); $this->addHoliday(new Holiday('hobartShow', ['en' => 'Royal Hobart Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index b489e4c53..08b73d70f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'hobartRegatta', ['en' => 'Royal Hobart Regatta'], - new \DateTime('second monday of february '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of february ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index e0784de43..1757a0a85 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -167,7 +169,7 @@ protected function calculateQueensBirthday(): void */ protected function calculateMelbourneCupDay(): void { - $date = new \DateTime('first Tuesday of November'." {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first Tuesday of November' . " {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index 6727b2609..ffe2fd801 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -1,9 +1,11 @@ year; + $birthDay = 'last monday of september ' . $this->year; if (2011 === $this->year) { $birthDay = '2011-10-28'; } @@ -109,7 +111,7 @@ protected function calculateWesternAustraliaDay(): void $this->addHoliday(new Holiday( 'westernAustraliaDay', ['en' => 'Western Australia Day'], - new \DateTime('first monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 1e3c5516b..37898e399 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stLeopoldsDay', [], - new \DateTime($this->year.'-11-15', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-15', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -125,7 +127,7 @@ protected function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', ['de' => 'Nationalfeiertag'], - new \DateTime($this->year.'-10-26', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-10-26', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Burgenland.php b/src/Yasumi/Provider/Austria/Burgenland.php index d9cf6c577..864c3314e 100644 --- a/src/Yasumi/Provider/Austria/Burgenland.php +++ b/src/Yasumi/Provider/Austria/Burgenland.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'plebisciteDay', [], - new \DateTime($this->year.'-10-10', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-10-10', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/LowerAustria.php b/src/Yasumi/Provider/Austria/LowerAustria.php index 68696edc5..765ab054e 100644 --- a/src/Yasumi/Provider/Austria/LowerAustria.php +++ b/src/Yasumi/Provider/Austria/LowerAustria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stRupertsDay', [], - new \DateTime($this->year.'-9-24', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-9-24', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Styria.php b/src/Yasumi/Provider/Austria/Styria.php index bc88f2c0c..81b10f2fa 100644 --- a/src/Yasumi/Provider/Austria/Styria.php +++ b/src/Yasumi/Provider/Austria/Styria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stFloriansDay', [], - new \DateTime($this->year.'-5-4', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-5-4', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Vienna.php b/src/Yasumi/Provider/Austria/Vienna.php index 18f83e2a9..6cbc1f219 100644 --- a/src/Yasumi/Provider/Austria/Vienna.php +++ b/src/Yasumi/Provider/Austria/Vienna.php @@ -1,9 +1,11 @@ year < 1983) { return; } - $date = new \DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (7 === (int) $date->format('N')) { - $date = new \DateTime($this->year.'-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday( 'canadaDay', diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index ef982cfa1..b827f8007 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -1,9 +1,11 @@ 'St. Patrick’s Day'], - new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -122,7 +124,7 @@ protected function calculateOrangemensDay(): void $holiday = new Holiday( 'orangemensDay', [], - new \DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php index ec1802d76..25662fa73 100644 --- a/src/Yasumi/Provider/Canada/NorthwestTerritories.php +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -1,9 +1,11 @@ add(new \DateInterval('P'.$easterDays.'D')); + $easter->add(new \DateInterval('P' . $easterDays . 'D')); return $easter; } diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index e4006fb5f..762e84897 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -1,9 +1,11 @@ 'Den obnovy samostatného českého státu', 'en' => 'Day of renewal of the independent Czech state', ], - new \DateTime($this->year.'-01-01', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -121,7 +123,7 @@ protected function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new \DateTime($this->year.'-07-5', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-07-5', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -145,7 +147,7 @@ protected function calculateJanHusDay(): void $this->addHoliday(new Holiday( 'janHusDay', ['cs' => 'Den upálení mistra Jana Husa', 'en' => 'Jan Hus Day'], - new \DateTime($this->year.'-07-6', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-07-6', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -175,7 +177,7 @@ protected function calculateCzechStatehoodDay(): void 'cs' => 'Den české státnosti', 'en' => 'St. Wenceslas Day (Czech Statehood Day)', ], - new \DateTime($this->year.'-09-28', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-28', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -194,7 +196,7 @@ protected function calculateIndependentCzechoslovakStateDay(): void $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs' => 'Den vzniku samostatného československého státu', 'en' => 'Independent Czechoslovak State Day', - ], new \DateTime($this->year.'-10-28', new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime($this->year . '-10-28', new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -214,7 +216,7 @@ protected function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new \DateTime($this->year.'-11-17', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-17', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php index 537828770..f09ea23f8 100644 --- a/src/Yasumi/Provider/DateTimeZoneFactory.php +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'germanUnityDay', ['de' => 'Tag der Deutschen Einheit'], - new \DateTime($this->year.'-10-3', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-10-3', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 678710d4e..57eec668c 100644 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -1,9 +1,11 @@ 'Christmas Day', 'ga' => 'Lá Nollag'], - new \DateTime($this->year.'-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -198,7 +200,7 @@ protected function calculateStStephensDay(): void $holiday = new Holiday( 'stStephensDay', [], - new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -241,7 +243,7 @@ protected function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day', 'ga' => 'Lá Fhéile Pádraig'], - new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 8266fd9ab..fa1521b7b 100644 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -1,9 +1,11 @@ add(new \DateInterval('P1D')); - $this->addHoliday(new Holiday('bridgeDay'.$counter, [ + $this->addHoliday(new Holiday('bridgeDay' . $counter, [ 'en' => 'Bridge Public holiday', 'ja' => '国民の休日', ], $bridgeDate, $this->locale)); diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 9afe8d51e..fde07e6d2 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -1,9 +1,11 @@ */ -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Mexico.php b/src/Yasumi/Provider/Mexico.php index d4bbffaff..971f59078 100644 --- a/src/Yasumi/Provider/Mexico.php +++ b/src/Yasumi/Provider/Mexico.php @@ -1,11 +1,11 @@ year < 1910 ? 'second wednesday of october' : 'fourth monday of october')." {$this->year}", + ($this->year < 1910 ? 'second wednesday of october' : 'fourth monday of october') . " {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone) ); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 894d5dc74..82c79806b 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stAndrewsDay', [], - new \DateTime($this->year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -222,7 +224,7 @@ protected function calculateStJohnsDay(): void $this->addHoliday(new Holiday( 'stJohnsDay', [], - new \DateTime($this->year.'-01-07', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-07', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 8f9b94f13..90146706f 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -1,9 +1,11 @@ addHoliday(new Holiday('newYearHolidaysDay'.$day, [ + $this->addHoliday(new Holiday('newYearHolidaysDay' . $day, [ 'en' => 'New Year’s holidays', 'ru' => 'Новогодние каникулы', ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 62406f4d5..603d6eda1 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -1,9 +1,11 @@ 'Deň vzniku Slovenskej republiky', 'en' => 'Day of the Establishment of the Slovak Republic', ], - new \DateTime($this->year.'-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -154,7 +156,7 @@ protected function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new \DateTime($this->year.'-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -177,7 +179,7 @@ protected function calculateSlovakNationalUprisingDay(): void 'sk' => 'Výročie Slovenského národného povstania', 'en' => 'Slovak National Uprising Day', ], - new \DateTime($this->year.'-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -200,7 +202,7 @@ protected function calculateSlovakConstitutionDay(): void 'sk' => 'Deň Ústavy Slovenskej republiky', 'en' => 'Day of the Constitution of the Slovak Republic', ], - new \DateTime($this->year.'-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -224,7 +226,7 @@ protected function calculateOurLadyOfSorrowsDay(): void $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', 'en' => 'Our Lady of Sorrows Day', - ], new \DateTime($this->year.'-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); + ], new \DateTime($this->year . '-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } /** @@ -245,7 +247,7 @@ protected function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new \DateTime($this->year.'-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 42e14b406..5ce3d446c 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'humanRightsDay', ['en' => 'Human Rights Day'], - new \DateTime($this->year.'-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -149,7 +151,7 @@ protected function calculateFreedomDay(): void $this->addHoliday(new Holiday( 'freedomDay', ['en' => 'Freedom Day'], - new \DateTime($this->year.'-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -175,7 +177,7 @@ protected function calculateYouthDay(): void $this->addHoliday(new Holiday( 'youthDay', ['en' => 'Youth Day'], - new \DateTime($this->year.'-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -225,7 +227,7 @@ protected function calculateNationalWomensDay(): void $this->addHoliday(new Holiday( 'nationalWomensDay', ['en' => 'National Women’s Day'], - new \DateTime($this->year.'-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -249,7 +251,7 @@ protected function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'heritageDay', ['en' => 'Heritage Day'], - new \DateTime($this->year.'-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -275,7 +277,7 @@ protected function calculateDayOfReconciliation(): void $this->addHoliday(new Holiday( 'reconciliationDay', ['en' => 'Day of Reconciliation'], - new \DateTime($this->year.'-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 4315758fc..c32ac9084 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -1,9 +1,11 @@ format('w'); if (\in_array($dayOfWeek, $acceptedHolidays[$name], true)) { - $dates[$day]['weekend:'.$day] = $name; + $dates[$day]['weekend:' . $day] = $name; } } diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index d5cf10c35..2a1007d17 100644 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -1,9 +1,11 @@ 'Jour de la Saint-Berthold', 'en' => 'Berchtoldstag', ], - new \DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -101,7 +103,7 @@ protected function calculateBettagsMontag(): void { if ($this->year >= 1832) { // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$this->year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('Third Sunday of ' . $this->year . '-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday $date->add(new \DateInterval('P1D')); @@ -139,7 +141,7 @@ protected function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new \DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -147,7 +149,7 @@ protected function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new \DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); diff --git a/src/Yasumi/Provider/Switzerland/Aargau.php b/src/Yasumi/Provider/Switzerland/Aargau.php index 00a46c444..419415503 100644 --- a/src/Yasumi/Provider/Switzerland/Aargau.php +++ b/src/Yasumi/Provider/Switzerland/Aargau.php @@ -1,8 +1,11 @@ 'December 26th', 'fr' => '26 décembre', ], - new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 44f97125a..d09489768 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -1,8 +1,11 @@ year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('First Sunday of ' . $this->year . '-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday $date->add(new \DateInterval('P4D')); @@ -115,7 +118,7 @@ protected function calculateRestaurationGenevoise(): void [ 'fr' => 'Restauration de la République', ], - new \DateTime($this->year.'-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index a364d9516..2f81a2495 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -1,8 +1,11 @@ year >= 1389) { - $date = new \DateTime('First Thursday of '.$this->year.'-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('First Thursday of ' . $this->year . '-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ 'de' => 'Näfelser Fahrt', ], $date, $this->locale, Holiday::TYPE_OTHER)); diff --git a/src/Yasumi/Provider/Switzerland/Grisons.php b/src/Yasumi/Provider/Switzerland/Grisons.php index 36ffbeb69..6c33268fb 100644 --- a/src/Yasumi/Provider/Switzerland/Grisons.php +++ b/src/Yasumi/Provider/Switzerland/Grisons.php @@ -1,8 +1,11 @@ 'Commémoration du plébiscite jurassien', ], - new \DateTime($this->year.'-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Lucerne.php b/src/Yasumi/Provider/Switzerland/Lucerne.php index 30352ca47..a2ae96b48 100644 --- a/src/Yasumi/Provider/Switzerland/Lucerne.php +++ b/src/Yasumi/Provider/Switzerland/Lucerne.php @@ -1,8 +1,11 @@ 'Instauration de la République', ], - new \DateTime($this->year.'-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -116,7 +119,7 @@ protected function calculateJanuary2nd(): void 'en' => 'January 2nd', 'fr' => '2 janvier', ], - new \DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -137,7 +140,7 @@ protected function calculateDecember26th(): void 'en' => 'December 26th', 'fr' => '26 décembre', ], - new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Nidwalden.php b/src/Yasumi/Provider/Switzerland/Nidwalden.php index 0d0a42a73..d147fcce3 100644 --- a/src/Yasumi/Provider/Switzerland/Nidwalden.php +++ b/src/Yasumi/Provider/Switzerland/Nidwalden.php @@ -1,8 +1,11 @@ 'Bruder-Klausen-Fest', ], - new \DateTime($this->year.'-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -94,7 +97,7 @@ protected function calculateBruderKlausenFest(): void [ 'de' => 'Bruder-Klausen-Fest', ], - new \DateTime($this->year.'-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Schaffhausen.php b/src/Yasumi/Provider/Switzerland/Schaffhausen.php index c15f4f638..0ffcc885c 100644 --- a/src/Yasumi/Provider/Switzerland/Schaffhausen.php +++ b/src/Yasumi/Provider/Switzerland/Schaffhausen.php @@ -1,8 +1,11 @@ 'Solennité des saints Pierre et Paul', 'de' => 'St. Peter und Paul', ], - new \DateTime($this->year.'-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Uri.php b/src/Yasumi/Provider/Switzerland/Uri.php index 49358abc6..2b6f630e6 100644 --- a/src/Yasumi/Provider/Switzerland/Uri.php +++ b/src/Yasumi/Provider/Switzerland/Uri.php @@ -1,8 +1,11 @@ addHoliday(new SubstituteHoliday( $holiday, [ - 'en' => $label.' (observed)', + 'en' => $label . ' (observed)', ], $date, $this->locale diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index d08cb4cc3..2c37405f3 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -1,9 +1,11 @@ 'St. Patrick’s Day'], - new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -120,7 +123,7 @@ protected function calculateBattleOfTheBoyne(): void $holiday = new Holiday( 'battleOfTheBoyne', ['en' => 'Battle of the Boyne'], - new \DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 258d26b93..e0b14b02f 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -1,8 +1,11 @@ year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/UnitedKingdom/Wales.php b/src/Yasumi/Provider/UnitedKingdom/Wales.php index 21a6bc1f9..a59defc64 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Wales.php +++ b/src/Yasumi/Provider/UnitedKingdom/Wales.php @@ -1,8 +1,11 @@ substitutedHoliday = $substitutedHoliday; - $key = 'substituteHoliday:'.$substitutedHoliday->getKey(); + $key = 'substituteHoliday:' . $substitutedHoliday->getKey(); if ($date == $substitutedHoliday) { throw new \InvalidArgumentException('Date must differ from the substituted holiday'); diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 7d1f93ca8..e7ec9a248 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -1,9 +1,11 @@ getFilename(); - $key = $file->getBasename('.'.$extension); + $key = $file->getBasename('.' . $extension); - $translations = require $directoryPath.$filename; + $translations = require $directoryPath . $filename; if (\is_array($translations)) { foreach (array_keys($translations) as $locale) { diff --git a/src/Yasumi/TranslationsInterface.php b/src/Yasumi/TranslationsInterface.php index 717d848fd..4adfe4b50 100644 --- a/src/Yasumi/TranslationsInterface.php +++ b/src/Yasumi/TranslationsInterface.php @@ -1,9 +1,11 @@ loadTranslations(__DIR__.'/data/translations'); + self::$globalTranslations->loadTranslations(__DIR__ . '/data/translations'); } // Assert locale input @@ -158,7 +160,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, */ public static function getAvailableLocales(): array { - return require __DIR__.'/data/locales.php'; + return require __DIR__ . '/data/locales.php'; } /** @@ -212,7 +214,7 @@ public static function getProviders(): array $providers = []; $filesIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator( - __DIR__.\DIRECTORY_SEPARATOR.'Provider', + __DIR__ . \DIRECTORY_SEPARATOR . 'Provider', \FilesystemIterator::SKIP_DOTS ), \RecursiveIteratorIterator::SELF_FIRST); diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index 35917a5d4..9e465b29e 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -1,8 +1,11 @@ between( new \DateTime('03/25/2011', new \DateTimeZone($timezone)), - new \DateTime('05/17/'.$year, new \DateTimeZone($timezone)) + new \DateTime('05/17/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -232,7 +235,7 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void $holidays = Yasumi::create('Italy', $year); $between = $holidays->between( - new \DateTime('03/25/'.$year, new \DateTimeZone($timezone)), + new \DateTime('03/25/' . $year, new \DateTimeZone($timezone)), new \DateTime('09/21/2021', new \DateTimeZone($timezone)) ); @@ -269,8 +272,8 @@ public function testWrongDates(): void $holidays = Yasumi::create('USA', $year); $holidays->between( - new \DateTime('12/31/'.$year, new \DateTimeZone($timezone)), - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)) + new \DateTime('12/31/' . $year, new \DateTimeZone($timezone)), + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)) ); } @@ -289,8 +292,8 @@ public function testCountBetweenWithSubstitutes(): void $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('12/31/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('12/31/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -329,8 +332,8 @@ public function testCountBetweenExcludingSubstituteHoliday(): void $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('03/20/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('03/20/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -373,8 +376,8 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('03/18/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('03/18/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -418,8 +421,8 @@ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('03/16/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('03/16/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index 3fbcd82fa..b9ce89597 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -1,8 +1,11 @@ getName()); - self::assertEquals('substituteHoliday:'.$name, $substitute->getName()); + self::assertEquals('substituteHoliday:' . $name, $substitute->getName()); } /** @throws \Exception */ diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 0ef705eab..cd3640482 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -1,8 +1,11 @@ [$key.'.php' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.php' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -181,7 +184,7 @@ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void ]; FILE; - vfsStream::setup('root', null, ['lang' => [$key.'.translation' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.translation' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -203,7 +206,7 @@ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException() ]; FILE; - vfsStream::setup('root', null, ['lang' => [$key.'.php' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.php' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -242,8 +245,8 @@ public function testLoadingMultipleTranslationsFromDirectory(): void vfsStream::setup('root', null, [ 'lang' => [ - $firstIdentifier.'.php' => $firstFileContents, - $secondIdentifier.'.php' => $secondFileContents, + $firstIdentifier . '.php' => $firstFileContents, + $secondIdentifier . '.php' => $secondFileContents, ], ]); diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 913bdbb6d..bcf9d3321 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -1,9 +1,11 @@ isHoliday(new \DateTime($date)); @@ -296,7 +299,7 @@ public function testIsNotHoliday(): void { $year = 5220; $provider = 'Japan'; - $date = $year.'-06-10'; + $date = $year . '-06-10'; // Assertion using a DateTime instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTime($date)); @@ -323,7 +326,7 @@ public function testIsWorkingDay(): void { $year = 2020; $provider = 'Netherlands'; - $date = $year.'-06-02'; + $date = $year . '-06-02'; // Assertion using a DateTime instance $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTime($date)); @@ -350,7 +353,7 @@ public function testIsNotWorkingDay(): void { $year = 2016; $provider = 'Japan'; - $date = $year.'-01-11'; + $date = $year . '-01-11'; // Assertion using a DateTime instance $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTime($date)); diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index c4a971d5c..e83fc34b9 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -1,8 +1,11 @@ + */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/GeorgiaBaseTestCase.php b/tests/Georgia/GeorgiaBaseTestCase.php index 98bbcde79..aba2854b9 100644 --- a/tests/Georgia/GeorgiaBaseTestCase.php +++ b/tests/Georgia/GeorgiaBaseTestCase.php @@ -1,9 +1,11 @@ generateRandomYear(); $time_stamp = strtotime( - $year.'-03-21'.easter_days($year).' day + 49 day' + $year . '-03-21' . easter_days($year) . ' day + 49 day' ); $date = date('Y-m-d', $time_stamp); diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index 52a876dfd..64f5d767c 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next tuesday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index a5865fdd2..f035aeebb 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index f1bb56ad7..1921bea4e 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index d3598fe28..7bacde176 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index ab6356079..49ccfaaef 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index b41d4864c..86a017c5a 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 46891f10d..da3d5fb82 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-11-4", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index ccd57d219..068e8dab1 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-12-24", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index b7d9cafce..8a3c7b79b 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); @@ -92,7 +95,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void $year = 2001; $this->assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/JapanBaseTestCase.php b/tests/Japan/JapanBaseTestCase.php index 4e1de357c..2f3632964 100644 --- a/tests/Japan/JapanBaseTestCase.php +++ b/tests/Japan/JapanBaseTestCase.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-11-24", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 7cecbe5a5..ff800ba81 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-7-21", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 82dff86e3..3e78396c1 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-8-12", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 9b44ebac1..f2c44dd7e 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-2-12", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 20ee8384d..de73f3880 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-1-2", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index 57888876a..ee83c4bd9 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::HOLIDAY.'1', + self::HOLIDAY . '1', $this->year, new \DateTime("{$this->year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, - self::HOLIDAY.'2', + self::HOLIDAY . '2', $this->year, new \DateTime("{$this->year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); @@ -66,7 +69,7 @@ public function testPublicBridgeDay(): void */ public function testTranslation(): void { - $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY.'1', $this->year, [self::LOCALE => '国民の休日']); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY . '1', $this->year, [self::LOCALE => '国民の休日']); } /** @@ -74,6 +77,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY.'1', $this->year, Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY . '1', $this->year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 3e22e866a..6049e054b 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-9-16", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index eab7e362f..0c81b4d1c 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 5fc299a8b..a0310a248 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-10-11", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 9eb842e8e..afb09dade 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -1,8 +1,11 @@ + */ namespace Yasumi\tests\Mexico; diff --git a/tests/Mexico/ChristmasTest.php b/tests/Mexico/ChristmasTest.php index 50d1f97de..2805ea2b9 100644 --- a/tests/Mexico/ChristmasTest.php +++ b/tests/Mexico/ChristmasTest.php @@ -1,8 +1,11 @@ + */ namespace Yasumi\tests\Mexico; diff --git a/tests/Mexico/VirginOfGuadalupeTest.php b/tests/Mexico/VirginOfGuadalupeTest.php index c8aa40089..f3ef2408e 100644 --- a/tests/Mexico/VirginOfGuadalupeTest.php +++ b/tests/Mexico/VirginOfGuadalupeTest.php @@ -1,6 +1,19 @@ + */ namespace Yasumi\tests\Mexico; diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 7cd8a3195..fbd50b71f 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new \DateTime( - (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october')." {$year}", + (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october') . " {$year}", new \DateTimeZone(self::TIMEZONE) ); diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 0235227af..fcfd109f8 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -1,8 +1,11 @@ add(new \DateInterval('P'.$easter_days.'D')); + $easter->add(new \DateInterval('P' . $easter_days . 'D')); return $easter; } diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 62b6e71a7..8ec922302 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 3ba096b5a..909f05e58 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 60148fabe..9b35b3aaf 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index 140196022..05bd17211 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 45ba0b67a..84513dfe5 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index f37033346..20f989c6c 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 47199f0a9..9e9f1561c 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 44f9f09a0..ba97fa6b1 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/SouthAfricaBaseTestCase.php b/tests/SouthAfrica/SouthAfricaBaseTestCase.php index eee3b1b57..e98efa0d5 100644 --- a/tests/SouthAfrica/SouthAfricaBaseTestCase.php +++ b/tests/SouthAfrica/SouthAfricaBaseTestCase.php @@ -1,9 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index a38271a88..1e8dd5e9a 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index c93ff92a4..9cdf7f4dc 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -1,9 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Bern/BernBaseTestCase.php b/tests/Switzerland/Bern/BernBaseTestCase.php index 16b755b95..526a7c5b9 100644 --- a/tests/Switzerland/Bern/BernBaseTestCase.php +++ b/tests/Switzerland/Bern/BernBaseTestCase.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index b403b28c2..189ecd63e 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(1870, 1965); // Find first Sunday of September - $date = new \DateTime('First Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P4D')); @@ -54,7 +57,7 @@ public function testJeuneGenevoisBetween1840And1869(): void { $year = $this->generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); // Find first Sunday of September - $date = new \DateTime('First Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P4D')); diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 7c02946a7..e17861f8b 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index f492a03b9..9a99a5b39 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime('First Thursday of '.$year.'-04', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Thursday of ' . $year . '-04', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 590e512c3..eef7dc1c9 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index 3064c4486..101d0c521 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -1,8 +1,11 @@ generateRandomYear(1832); // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P1D')); diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index 12b6cbc4b..497d27546 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 286c4de51..902103361 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(1832); // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P1D')); diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 55702460a..7a67c3d84 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -1,8 +1,11 @@ assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 5c7b1eeb6..b866834be 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -1,8 +1,11 @@ assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php index f801e056c..85406b8d5 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php +++ b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index a7b8811cf..d3d5befea 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -1,8 +1,11 @@ generateRandomYear(1947); - $date = new \DateTime($year.'-09-25', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-09-25', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -49,7 +52,7 @@ public function testBruderKlausenFestOnAfter1947(): void public function testBruderKlausenFestBetween1649And1946(): void { $year = $this->generateRandomYear(1649, 1946); - $date = new \DateTime($year.'-09-21', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-09-21', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 7467fec14..224330c64 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index 9d4edda92..a44947a49 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 599f801c3..dd0d43ed4 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index 908fb1e04..3c5c99fc9 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 8b0e91909..368a363e3 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -1,8 +1,11 @@ generateRandomYear(1832); // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P1D')); diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 9301bd460..8a3637139 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 0c4be41fe..8efb9e1b2 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -1,8 +1,11 @@ isHoliday($holidayOfficial)); self::assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); - $holidaySubstitution = $holidays->getHoliday('substituteHoliday:'.$holidayOfficial->getKey()); + $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->getKey()); if (! $expectedSubstitution instanceof \DateTimeInterface) { // without substitution diff --git a/tests/Ukraine/UkraineBaseTestCase.php b/tests/Ukraine/UkraineBaseTestCase.php index b9ad9b170..8dbd4567d 100644 --- a/tests/Ukraine/UkraineBaseTestCase.php +++ b/tests/Ukraine/UkraineBaseTestCase.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index d28c1e02f..93827c0ae 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index c8e6f51a2..309d2082f 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index ccb38f337..3cd366bca 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 9f71c5ea2..53ddde421 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 9af416e6c..6dfeac991 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index e8e7fbaf0..e54f944cc 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index ab46f8a46..912e35572 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index fe912a8c3..a9198c914 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index b089a2ba3..2a12100b7 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index caf8d596f..7369c6a8d 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php index b62cb9b0c..c76e60658 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php +++ b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 5ea15793a..df7799ba9 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index 3d24bb8e2..c7c1c959d 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 2fd34f441..9f770fcb6 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 83ef0087d..1a4114773 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index 5154f67d5..1c825e6b6 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -1,8 +1,11 @@ getHoliday('substituteHoliday:'.$key); + $holiday = $holidays->getHoliday('substituteHoliday:' . $key); self::assertInstanceOf(SubstituteHoliday::class, $holiday); $this->assertDateTime($expected, $holiday); @@ -152,7 +154,7 @@ public function assertNotSubstituteHoliday( ): void { $this->assertNotHoliday( $provider, - 'substituteHoliday:'.$key, + 'substituteHoliday:' . $key, $year ); } From 97e60a9c835072c9d90ca992f0cff6b9fea12c1b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Apr 2024 00:20:36 +0900 Subject: [PATCH 553/687] test(portugal): fix issue with Republic Day failing for the restored years between 2013 and 2016 The generator for the years on or after the establishment of the Portuguese Republic Day did not honor the fact that this holiday was suspended in 2013, resulting in tests to fail for years between 2013 and 2016 (when it was restored again). Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugueseRepublicDayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index c9088055c..ee52961a3 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -138,7 +138,7 @@ private function randomYearsBeforeEstablishment(): \Generator */ private function randomYearsOnAfterEstablishment(): \Generator { - yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); yield self::ESTABLISHMENT_YEAR; } From b0314bfad824bb0058e04532937c5bfe5f99999e Mon Sep 17 00:00:00 2001 From: fbett Date: Fri, 12 Apr 2024 13:48:28 +0200 Subject: [PATCH 554/687] test: increase memory_limit, to be able to run all tests on MacOS --- phpunit.xml.dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fcf8aea40..62403f3bd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,6 +18,10 @@ verbose="true" > + + + + ./src/Yasumi From fc7869b6a5607e7f53798894cdbef45264fe9239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Hamr=C3=A1k?= Date: Tue, 11 Jun 2024 16:47:16 +0200 Subject: [PATCH 555/687] fix(slovakia): update rules for Anniversary of the Declaration of the Slovak Nation (#340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One-time holiday was added on 30.11.2018 and removed 1.9. since 2024, because our Slovak government has officially decided that we don't need so many days to rest 🤦🏼 --- src/Yasumi/Provider/Slovakia.php | 53 ++++++++--- .../DeclarationOfTheSlovakNationTest.php | 88 +++++++++++++++++++ tests/Slovakia/SlovakConstitutionDayTest.php | 10 ++- tests/Slovakia/SlovakiaTest.php | 9 +- 4 files changed, 145 insertions(+), 15 deletions(-) create mode 100644 tests/Slovakia/DeclarationOfTheSlovakNationTest.php diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 603d6eda1..f6b0474d0 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -86,10 +86,12 @@ public function initialize(): void $this->calculateSaintsCyrilAndMethodiusDay(); // 29.8. $this->calculateSlovakNationalUprisingDay(); - // 1.9. + // 1.9.(<2024) $this->calculateSlovakConstitutionDay(); // 15.9. $this->calculateOurLadyOfSorrowsDay(); + // 30.10.2018 + $this->calculateDeclarationOfTheSlovakNation(); // 1.11. $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); // 17.11. @@ -114,6 +116,31 @@ public function getSources(): array ]; } + /** + * Anniversary of the Declaration of the Slovak Nation. + * In 2018, October 30 was a one-time public holiday. For this reason, it was not a commemorative day in 2018. + * + * @see https://sk.wikipedia.org/wiki/Zoznam_sviatkov_na_Slovensku#endnote_pozn-01 + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateDeclarationOfTheSlovakNation(): void + { + if (2018 === $this->year) { + $this->addHoliday(new Holiday( + 'declarationOfTheSlovakNation', + [ + 'sk' => 'Výročie Deklarácie slovenského národa', + 'en' => 'Anniversary of the Declaration of the Slovak Nation', + ], + new \DateTime($this->year . '-10-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + /** * New Year's Day. * @@ -189,6 +216,8 @@ protected function calculateSlovakNationalUprisingDay(): void * Day of the Constitution of the Slovak Republic. * * @see https://en.wikipedia.org/wiki/Constitution_of_Slovakia + * Removed since 2024 + * @see https://www.slov-lex.sk/pravne-predpisy/SK/ZZ/1993/241/ * * @throws \InvalidArgumentException * @throws UnknownLocaleException @@ -196,16 +225,18 @@ protected function calculateSlovakNationalUprisingDay(): void */ protected function calculateSlovakConstitutionDay(): void { - $this->addHoliday(new Holiday( - 'slovakConstitutionDay', - [ - 'sk' => 'Deň Ústavy Slovenskej republiky', - 'en' => 'Day of the Constitution of the Slovak Republic', - ], - new \DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale, - Holiday::TYPE_OFFICIAL - )); + if ($this->year < 2024) { + $this->addHoliday(new Holiday( + 'slovakConstitutionDay', + [ + 'sk' => 'Deň Ústavy Slovenskej republiky', + 'en' => 'Day of the Constitution of the Slovak Republic', + ], + new \DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } } /** diff --git a/tests/Slovakia/DeclarationOfTheSlovakNationTest.php b/tests/Slovakia/DeclarationOfTheSlovakNationTest.php new file mode 100644 index 000000000..bfb397fc1 --- /dev/null +++ b/tests/Slovakia/DeclarationOfTheSlovakNationTest.php @@ -0,0 +1,88 @@ + + */ + +namespace Yasumi\tests\Slovakia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing an official holiday in Slovakia. + * + * @author Jan Hamrak + */ +class DeclarationOfTheSlovakNationTest extends SlovakiaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'declarationOfTheSlovakNation'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + if (2018 === $year) { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } else { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(10, 30, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + 2018, + [self::LOCALE => 'Výročie Deklarácie slovenského národa'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, 2018, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 73a6749aa..5b0f68fa2 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -42,7 +42,11 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayT */ public function testHoliday(int $year, \DateTimeInterface $expected): void { - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + if ($year < 2024) { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } else { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } } /** @@ -67,7 +71,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $this->generateRandomYear(null, 2013), [self::LOCALE => 'Deň Ústavy Slovenskej republiky'] ); } @@ -79,6 +83,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(null, 2013), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 26b4259eb..2638a42e4 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -50,11 +50,18 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'slovakIndependenceDay', - 'slovakConstitutionDay', 'slovakNationalUprisingDay', 'saintsCyrilAndMethodiusDay', 'struggleForFreedomAndDemocracyDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + + $this->assertDefinedHolidays([ + 'slovakConstitutionDay', + ], self::REGION, 2013, Holiday::TYPE_OFFICIAL); + + $this->assertDefinedHolidays([ + 'declarationOfTheSlovakNation', + ], self::REGION, 2018, Holiday::TYPE_OFFICIAL); } /** From 8abe19f302e819e536ea9d70e9b8caf2b6fe494c Mon Sep 17 00:00:00 2001 From: Reza Rabbani <50789773+thrashzone13@users.noreply.github.com> Date: Sat, 6 Jul 2024 06:54:04 +0200 Subject: [PATCH 556/687] feat: add Iran provider (#341) Implement provider for Iran --- src/Yasumi/Provider/Iran.php | 152 ++++++++++++++++++ .../AnniversaryOfIslamicRevolutionTest.php | 76 +++++++++ tests/Iran/DeathOfKhomeiniTest.php | 76 +++++++++ tests/Iran/IranBaseTestCase.php | 32 ++++ tests/Iran/IranTest.php | 93 +++++++++++ tests/Iran/IslamicRepublicDayTest.php | 110 +++++++++++++ ...onalizationOfTheIranianOilIndustryTest.php | 76 +++++++++ tests/Iran/Nowruz1Test.php | 64 ++++++++ tests/Iran/Nowruz2Test.php | 64 ++++++++ tests/Iran/Nowruz3Test.php | 64 ++++++++ tests/Iran/Nowruz4Test.php | 64 ++++++++ tests/Iran/RevoltOfKhordad15Test.php | 76 +++++++++ tests/Iran/SizdahBedarTest.php | 64 ++++++++ 13 files changed, 1011 insertions(+) create mode 100644 src/Yasumi/Provider/Iran.php create mode 100644 tests/Iran/AnniversaryOfIslamicRevolutionTest.php create mode 100644 tests/Iran/DeathOfKhomeiniTest.php create mode 100644 tests/Iran/IranBaseTestCase.php create mode 100644 tests/Iran/IranTest.php create mode 100644 tests/Iran/IslamicRepublicDayTest.php create mode 100644 tests/Iran/NationalizationOfTheIranianOilIndustryTest.php create mode 100644 tests/Iran/Nowruz1Test.php create mode 100644 tests/Iran/Nowruz2Test.php create mode 100644 tests/Iran/Nowruz3Test.php create mode 100644 tests/Iran/Nowruz4Test.php create mode 100644 tests/Iran/RevoltOfKhordad15Test.php create mode 100644 tests/Iran/SizdahBedarTest.php diff --git a/src/Yasumi/Provider/Iran.php b/src/Yasumi/Provider/Iran.php new file mode 100644 index 000000000..8ead12ac2 --- /dev/null +++ b/src/Yasumi/Provider/Iran.php @@ -0,0 +1,152 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Note: Any Islamic holidays are not part of this provider yet. Islamic holidays are quite complex and at first, + * only Jalali holidays are implemented. + */ +class Iran extends AbstractProvider +{ + /** {@inheritdoc} */ + public const ID = 'IR'; + + /** + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Asia/Tehran'; + + $this->addNowruz(); + $this->addIslamicRepublicDay(); + $this->addSizdahBedar(); + $this->addDeathOfKhomeini(); + $this->addRevoltOfKhordad15(); + $this->addAnniversaryOfIslamicRevolution(); + $this->addNationalizationOfTheIranianOilIndustry(); + } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Iran', + 'https://fa.wikipedia.org/wiki/%D8%AA%D8%B9%D8%B7%DB%8C%D9%84%D8%A7%D8%AA_%D8%B1%D8%B3%D9%85%DB%8C_%D8%AF%D8%B1_%D8%A7%DB%8C%D8%B1%D8%A7%D9%86', + ]; + } + + protected function addNowruz(): void + { + foreach ([21, 22, 23, 24] as $index => $day) { + ++$index; + $this->addHoliday(new Holiday("nowruz{$index}", [ + 'en' => 'Nowruz', + 'fa' => 'نوروز', + ], new \DateTime("{$this->year}-03-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * The day usually falls on 1 April, however, as it is determined by the vernal equinox, the date can change if the equinox does not fall on 21 March. + * In 2016, it was on 31 March, and in 2017, 2019, 2021, 2022 and 2023 the date was back to 1 April. + * + * @see https://en.wikipedia.org/wiki/Iranian_Islamic_Republic_Day + * + * @throws \Exception + */ + protected function addIslamicRepublicDay(): void + { + if (1979 > $this->year) { + return; + } + + $month = '04'; + $day = '01'; + + if (2016 === $this->year) { + $month = '03'; + $day = '31'; + } + + $this->addHoliday(new Holiday('islamicRepublicDay', [ + 'en' => 'Ruz e Jomhuri ye Eslami', + 'fa' => 'روز جمهوری اسلامی', + ], new \DateTime("{$this->year}-{$month}-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addSizdahBedar(): void + { + $this->addHoliday(new Holiday('sizdahBedar', [ + 'en' => 'Sizdah be dar', + 'fa' => 'سیزده بدر', + ], new \DateTime("{$this->year}-04-02", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addDeathOfKhomeini(): void + { + if (1989 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('deathOfKhomeini', [ + 'en' => 'Marg e Khomeini', + 'fa' => 'مرگ خمینی', + ], new \DateTime("{$this->year}-06-04", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addRevoltOfKhordad15(): void + { + if (1979 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('revoltOfKhordad15', [ + 'en' => 'Qiam e Panzdah e Khordad', + 'fa' => 'قیام ۱۵ خرداد', + ], new \DateTime("{$this->year}-06-05", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addAnniversaryOfIslamicRevolution(): void + { + if (1979 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('anniversaryOfIslamicRevolution', [ + 'en' => 'Enqelab e Eslami', + 'fa' => 'انقلاب اسلامی پنجاه و هفت', + ], new \DateTime("{$this->year}-02-11", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addNationalizationOfTheIranianOilIndustry(): void + { + if (1951 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('nationalizationOfTheIranianOilIndustry', [ + 'en' => 'Melli Shodan e Saneat e Naft', + 'fa' => 'ملی شدن صنعت نفت', + ], new \DateTime("{$this->year}-03-20", new \DateTimeZone($this->timezone)), $this->locale)); + } +} diff --git a/tests/Iran/AnniversaryOfIslamicRevolutionTest.php b/tests/Iran/AnniversaryOfIslamicRevolutionTest.php new file mode 100644 index 000000000..0734ff3ef --- /dev/null +++ b/tests/Iran/AnniversaryOfIslamicRevolutionTest.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class AnniversaryOfIslamicRevolutionTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'anniversaryOfIslamicRevolution'; + + public const ESTABLISHMENT_YEAR = 1979; + + public function testAnniversaryOfIslamicRevolutionBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testAnniversaryOfIslamicRevolutionAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-02-11", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'انقلاب اسلامی پنجاه و هفت', + 'en' => 'Enqelab e Eslami', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/DeathOfKhomeiniTest.php b/tests/Iran/DeathOfKhomeiniTest.php new file mode 100644 index 000000000..9e5229172 --- /dev/null +++ b/tests/Iran/DeathOfKhomeiniTest.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class DeathOfKhomeiniTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'deathOfKhomeini'; + + public const ESTABLISHMENT_YEAR = 1989; + + public function testDeathOfKhomeiniBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testDeathOfKhomeiniAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-06-04", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'مرگ خمینی', + 'en' => 'Marg e Khomeini', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/IranBaseTestCase.php b/tests/Iran/IranBaseTestCase.php new file mode 100644 index 000000000..b2afb67ba --- /dev/null +++ b/tests/Iran/IranBaseTestCase.php @@ -0,0 +1,32 @@ + + */ + +namespace Yasumi\tests\Iran; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +class IranBaseTestCase extends TestCase +{ + use YasumiBase; + + public const REGION = 'Iran'; + + public const TIMEZONE = 'Asia/Tehran'; + + public const LOCALE = 'fa'; +} diff --git a/tests/Iran/IranTest.php b/tests/Iran/IranTest.php new file mode 100644 index 000000000..6c6f0b8fe --- /dev/null +++ b/tests/Iran/IranTest.php @@ -0,0 +1,93 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +class IranTest extends IranBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected int $year; + + /** + * @throws \Exception + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(); + } + + public function testOfficialHolidays(): void + { + $holidays = [ + 'nowruz1', + 'nowruz2', + 'nowruz3', + 'nowruz4', + 'sizdahBedar', + ]; + + if (1979 <= $this->year) { + $holidays[] = 'islamicRepublicDay'; + $holidays[] = 'revoltOfKhordad15'; + $holidays[] = 'anniversaryOfIslamicRevolution'; + } + + if (1989 <= $this->year) { + $holidays[] = 'deathOfKhomeini'; + } + + if (1951 <= $this->year) { + $holidays[] = 'nationalizationOfTheIranianOilIndustry'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws \ReflectionException + * @throws \Exception + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Iran/IslamicRepublicDayTest.php b/tests/Iran/IslamicRepublicDayTest.php new file mode 100644 index 000000000..c030a24ee --- /dev/null +++ b/tests/Iran/IslamicRepublicDayTest.php @@ -0,0 +1,110 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class IslamicRepublicDayTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'islamicRepublicDay'; + + public const ESTABLISHMENT_YEAR = 1979; + + public const EQUINOX_YEAR = 2016; + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayBeforeEquinoxYear(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR - 1); + var_dump($year); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-01", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayOnEquinoxYear(): void + { + $year = $this->generateRandomYear(self::EQUINOX_YEAR, self::EQUINOX_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-31", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayAfterEquinoxYear(): void + { + $year = $this->generateRandomYear(self::EQUINOX_YEAR + 1); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-01", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), + [ + self::LOCALE => 'روز جمهوری اسلامی', + 'en' => 'Ruz e Jomhuri ye Eslami', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php b/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php new file mode 100644 index 000000000..94f34bb07 --- /dev/null +++ b/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class NationalizationOfTheIranianOilIndustryTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nationalizationOfTheIranianOilIndustry'; + + public const ESTABLISHMENT_YEAR = 1951; + + public function testNationalizationOfTheIranianOilIndustryBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testNationalizationOfTheIranianOilIndustryAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-20", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'ملی شدن صنعت نفت', + 'en' => 'Melli Shodan e Saneat e Naft', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz1Test.php b/tests/Iran/Nowruz1Test.php new file mode 100644 index 000000000..31926b82e --- /dev/null +++ b/tests/Iran/Nowruz1Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz1Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz1'; + + /** + * @throws \Exception + */ + public function testNowruz1(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-21", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz2Test.php b/tests/Iran/Nowruz2Test.php new file mode 100644 index 000000000..e1487c75f --- /dev/null +++ b/tests/Iran/Nowruz2Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz2Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz2'; + + /** + * @throws \Exception + */ + public function testNowruz2(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-22", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz3Test.php b/tests/Iran/Nowruz3Test.php new file mode 100644 index 000000000..51df83842 --- /dev/null +++ b/tests/Iran/Nowruz3Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz3Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz3'; + + /** + * @throws \Exception + */ + public function testNowruz3(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-23", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz4Test.php b/tests/Iran/Nowruz4Test.php new file mode 100644 index 000000000..9b27e6741 --- /dev/null +++ b/tests/Iran/Nowruz4Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz4Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz4'; + + /** + * @throws \Exception + */ + public function testNowruz4(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-24", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/RevoltOfKhordad15Test.php b/tests/Iran/RevoltOfKhordad15Test.php new file mode 100644 index 000000000..7d3b7b07f --- /dev/null +++ b/tests/Iran/RevoltOfKhordad15Test.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class RevoltOfKhordad15Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'revoltOfKhordad15'; + + public const ESTABLISHMENT_YEAR = 1979; + + public function testRevoltOfKhordad15BeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testRevoltOfKhordad15AfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-06-05", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'قیام ۱۵ خرداد', + 'en' => 'Qiam e Panzdah e Khordad', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/SizdahBedarTest.php b/tests/Iran/SizdahBedarTest.php new file mode 100644 index 000000000..84209f767 --- /dev/null +++ b/tests/Iran/SizdahBedarTest.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class SizdahBedarTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'sizdahBedar'; + + /** + * @throws \Exception + */ + public function testSizdahBedar(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-02", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'سیزده بدر', + 'en' => 'Sizdah be dar', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} From 1c64419239fd0775593e62721127decc53ccd3bf Mon Sep 17 00:00:00 2001 From: fbett Date: Sat, 6 Jul 2024 06:55:35 +0200 Subject: [PATCH 557/687] fix(germany): Pentecost is not an official holiday - except in Brandenburg (#337) * fix(Provider\Germany): pentecost is not an official holiday - except in Brandenburg (see #100) --- src/Yasumi/Provider/Germany.php | 2 +- tests/Germany/GermanyTest.php | 5 ++++- tests/Germany/PentecostTest.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index a2b3a7aae..2fb294a58 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -55,7 +55,7 @@ public function initialize(): void $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); - $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 2577a4780..fb9a939c8 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -87,7 +87,10 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([ + 'newYearsEve', + 'pentecost', + ], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 6b415e8c6..8277dd7b7 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -73,6 +73,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER); } } From 7afb8e4dc8567319830c9c21d836a51536561a25 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 9 Jul 2024 08:43:11 +0900 Subject: [PATCH 558/687] refactor: remove astray var_dump use Signed-off-by: Sacha Telgenhof --- tests/Iran/IslamicRepublicDayTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Iran/IslamicRepublicDayTest.php b/tests/Iran/IslamicRepublicDayTest.php index c030a24ee..1aee7ee8b 100644 --- a/tests/Iran/IslamicRepublicDayTest.php +++ b/tests/Iran/IslamicRepublicDayTest.php @@ -47,7 +47,6 @@ public function testIslamicRepublicDayBeforeEstablishment(): void public function testIslamicRepublicDayBeforeEquinoxYear(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR - 1); - var_dump($year); $this->assertHoliday( self::REGION, self::HOLIDAY, From a7a2e7932056c00d9fd75e8a93a8408dfa8bfc69 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 9 Jul 2024 08:47:53 +0900 Subject: [PATCH 559/687] feat(germany): add Assumption of Mary holiday to Bavaria Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Germany/Bavaria.php | 1 + .../Germany/Bavaria/AssumptionOfMaryTest.php | 82 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 tests/Germany/Bavaria/AssumptionOfMaryTest.php diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index 210ce52d1..aaea61e20 100644 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -50,5 +50,6 @@ public function initialize(): void $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/tests/Germany/Bavaria/AssumptionOfMaryTest.php b/tests/Germany/Bavaria/AssumptionOfMaryTest.php new file mode 100644 index 000000000..5bf174ccb --- /dev/null +++ b/tests/Germany/Bavaria/AssumptionOfMaryTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Germany\Bavaria; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing the day of the Assumption of Mary in Bavaria (Germany). + */ +class AssumptionOfMaryTest extends BavariaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(8, 15, self::TIMEZONE); + } + + /** + * Tests translated name of the Assumption of Mary. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Mariä Himmelfahrt'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER); + } +} From f600b3f934d449eda0ed86155791551366bd443a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 21 Oct 2024 22:30:42 +0900 Subject: [PATCH 560/687] style: fix code styling issues Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 2 +- src/Yasumi/Filters/OnFilter.php | 2 +- src/Yasumi/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 4 +- .../Australia/AustralianCapitalTerritory.php | 4 +- .../Provider/Australia/NewSouthWales.php | 2 +- .../Provider/Australia/NorthernTerritory.php | 2 +- .../Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 4 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 44 +++++++++---------- src/Yasumi/Provider/CommonHolidays.php | 28 ++++++------ src/Yasumi/Provider/Germany/Berlin.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 38 ++++++++-------- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Yasumi.php | 6 +-- tests/Randomizer.php | 20 ++++----- tests/Ukraine/SubstitutedHolidayTest.php | 2 +- tests/YasumiBase.php | 16 +++---- 20 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 48e9ba949..e2d9431bb 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -50,7 +50,7 @@ public function __construct( \Iterator $iterator, \DateTimeInterface $startDate, \DateTimeInterface $endDate, - private bool $equal = true + private bool $equal = true, ) { parent::__construct($iterator); $this->startDate = $startDate->format(self::DATE_FORMAT); diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 6bdc258fc..3d8d182b7 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -41,7 +41,7 @@ class OnFilter extends AbstractFilter */ public function __construct( \Iterator $iterator, - \DateTimeInterface $date + \DateTimeInterface $date, ) { parent::__construct($iterator); $this->date = $date->format(self::DATE_FORMAT); diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 622cd82f5..a6f99c005 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -99,7 +99,7 @@ public function __construct( public array $translations, \DateTimeInterface $date, string $displayLocale = self::DEFAULT_LOCALE, - protected string $type = self::TYPE_OFFICIAL + protected string $type = self::TYPE_OFFICIAL, ) { // Validate if key is not empty if ('' === $key) { diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index aec92c9fd..35cc36b47 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -97,7 +97,7 @@ abstract class AbstractProvider implements \Countable, ProviderInterface, \Itera public function __construct( int $year, ?string $locale = null, - private ?TranslationsInterface $globalTranslations = null + private ?TranslationsInterface $globalTranslations = null, ) { $this->clearHolidays(); @@ -217,7 +217,7 @@ public function previous(string $key): ?Holiday public function between( \DateTimeInterface $startDate, \DateTimeInterface $endDate, - ?bool $equals = null + ?bool $equals = null, ): BetweenFilter { if ($startDate > $endDate) { throw new \InvalidArgumentException('Start date must be a date before the end date.'); diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index e14dabe78..a4956abfd 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -75,7 +75,7 @@ protected function easterSunday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { return new Holiday( 'easter', @@ -107,7 +107,7 @@ protected function easterSaturday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index eb72ded0a..9e9490b88 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -74,7 +74,7 @@ protected function easterSaturday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index b9c88d4c0..6e01ff139 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -73,7 +73,7 @@ protected function easterSaturday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index d27e69f33..11266ca00 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -81,7 +81,7 @@ protected function easterSaturday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 1757a0a85..4c52e627c 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -75,7 +75,7 @@ protected function easterSunday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { return new Holiday( 'easter', @@ -107,7 +107,7 @@ protected function easterSaturday( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): Holiday { $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index 82fa8ef52..76123c05e 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -79,7 +79,7 @@ protected function saintJeanBaptisteDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'saintJeanBaptisteDay', diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index bf982546c..a9ef033c3 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -50,7 +50,7 @@ protected function corpusChristi( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OTHER + string $type = Holiday::TYPE_OTHER, ): Holiday { return new Holiday( 'corpusChristi', @@ -85,7 +85,7 @@ protected function allSaintsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('allSaintsDay', [], new \DateTime("{$year}-11-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -113,7 +113,7 @@ protected function assumptionOfMary( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'assumptionOfMary', @@ -145,7 +145,7 @@ protected function goodFriday( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { $holiday = 'goodFriday'; $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P2D')); @@ -182,7 +182,7 @@ protected function epiphany( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('epiphany', [], new \DateTime("{$year}-1-6", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -212,7 +212,7 @@ protected function stJosephsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('stJosephsDay', [], new \DateTime("{$year}-3-19", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -241,7 +241,7 @@ protected function stGeorgesDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('stGeorgesDay', [], new \DateTime("{$year}-4-23", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -301,7 +301,7 @@ protected function reformationDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'reformationDay', @@ -412,7 +412,7 @@ protected function easter( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('easter', [], $this->calculateEaster($year, $timezone), $locale, $type); } @@ -437,7 +437,7 @@ protected function pentecost( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'pentecost', @@ -471,7 +471,7 @@ protected function easterMonday( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'easterMonday', @@ -505,7 +505,7 @@ protected function ascensionDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'ascensionDay', @@ -536,7 +536,7 @@ protected function pentecostMonday( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'pentecostMonday', @@ -571,7 +571,7 @@ protected function christmasEve( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OBSERVANCE + string $type = Holiday::TYPE_OBSERVANCE, ): Holiday { return new Holiday( 'christmasEve', @@ -603,7 +603,7 @@ protected function christmasDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'christmasDay', @@ -635,7 +635,7 @@ protected function secondChristmasDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'secondChristmasDay', @@ -669,7 +669,7 @@ protected function ashWednesday( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { $holiday = 'ashWednesday'; $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P46D')); @@ -705,7 +705,7 @@ protected function immaculateConception( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'immaculateConception', @@ -741,7 +741,7 @@ protected function stStephensDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'stStephensDay', @@ -776,7 +776,7 @@ protected function maundyThursday( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { $holiday = 'maundyThursday'; $date = $this->calculateEaster($year, $timezone)->sub(new \DateInterval('P3D')); @@ -813,7 +813,7 @@ protected function stJohnsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('stJohnsDay', [], new \DateTime("{$year}-06-24", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -843,7 +843,7 @@ protected function annunciation( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'annunciation', diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 762e84897..1914c4a65 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -53,7 +53,7 @@ protected function newYearsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('newYearsDay', [], new \DateTime("{$year}-1-1", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -83,7 +83,7 @@ protected function internationalWorkersDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'internationalWorkersDay', @@ -119,7 +119,7 @@ protected function stMartinsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'stMartinsDay', @@ -151,7 +151,7 @@ protected function internationalWomensDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'internationalWomensDay', @@ -186,7 +186,7 @@ protected function newYearsEve( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday('newYearsEve', [], new \DateTime("{$year}-12-31", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type); } @@ -216,7 +216,7 @@ protected function valentinesDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'valentinesDay', @@ -250,7 +250,7 @@ protected function worldAnimalDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'worldAnimalDay', @@ -285,7 +285,7 @@ protected function fathersDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'fathersDay', @@ -320,7 +320,7 @@ protected function mothersDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'mothersDay', @@ -355,7 +355,7 @@ protected function victoryInEuropeDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'victoryInEuropeDay', @@ -392,7 +392,7 @@ protected function armisticeDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'armisticeDay', @@ -420,7 +420,7 @@ protected function summerTime( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, true); @@ -454,7 +454,7 @@ protected function winterTime( int $year, string $timezone, string $locale, - ?string $type = null + ?string $type = null, ): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, false); @@ -496,7 +496,7 @@ protected function winterTime( private function calculateSummerWinterTime( int $year, string $timezone, - bool $summer + bool $summer, ): ?\DateTimeImmutable { $zone = DateTimeZoneFactory::getDateTimeZone($timezone); diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 033a7e001..f3db82ae0 100644 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -80,7 +80,7 @@ public function initialize(): void protected function dayOfLiberation( string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'dayOfLiberation', diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index c32ac9084..2947d5067 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -250,7 +250,7 @@ protected function dayAfterNewYearsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'dayAfterNewYearsDay', @@ -269,7 +269,7 @@ protected function twoDaysLaterNewYearsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'twoDaysLaterNewYearsDay', @@ -292,7 +292,7 @@ protected function seollal( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['seollal'][$year])) { return null; @@ -321,7 +321,7 @@ protected function dayBeforeSeollal( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['seollal'][$year])) { return null; @@ -350,7 +350,7 @@ protected function dayAfterSeollal( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['seollal'][$year])) { return null; @@ -377,7 +377,7 @@ protected function independenceMovementDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'independenceMovementDay', @@ -398,7 +398,7 @@ protected function arborDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { $datetime = 1960 === $year ? "{$year}-3-21" : "{$year}-4-5"; @@ -421,7 +421,7 @@ protected function buddhasBirthday( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$year])) { return null; @@ -448,7 +448,7 @@ protected function childrensDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'childrensDay', @@ -469,7 +469,7 @@ protected function memorialDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'memorialDay', @@ -493,7 +493,7 @@ protected function constitutionDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'constitutionDay', @@ -514,7 +514,7 @@ protected function liberationDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'liberationDay', @@ -538,7 +538,7 @@ protected function chuseok( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['chuseok'][$year])) { return null; @@ -568,7 +568,7 @@ protected function dayBeforeChuseok( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['chuseok'][$year])) { return null; @@ -598,7 +598,7 @@ protected function dayAfterChuseok( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): ?Holiday { if (! isset(self::LUNAR_HOLIDAY['chuseok'][$year])) { return null; @@ -628,7 +628,7 @@ protected function armedForcesDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'armedForcesDay', @@ -649,7 +649,7 @@ protected function nationalFoundationDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'nationalFoundationDay', @@ -672,7 +672,7 @@ protected function hangulDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'hangulDay', @@ -695,7 +695,7 @@ protected function unitedNationsDay( int $year, string $timezone, string $locale, - string $type = Holiday::TYPE_OFFICIAL + string $type = Holiday::TYPE_OFFICIAL, ): Holiday { return new Holiday( 'unitedNationsDay', diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 1e6278021..7e5121a47 100644 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -209,7 +209,7 @@ public function previous(string $key): ?Holiday; public function between( \DateTimeInterface $startDate, \DateTimeInterface $endDate, - ?bool $equals = null + ?bool $equals = null, ): BetweenFilter; /** diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index eccec5939..97c755be7 100644 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -66,7 +66,7 @@ public function __construct( array $names, \DateTimeInterface $date, string $displayLocale = self::DEFAULT_LOCALE, - string $type = self::TYPE_OFFICIAL + string $type = self::TYPE_OFFICIAL, ) { $this->substitutedHoliday = $substitutedHoliday; diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index e9238c973..870f99873 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -73,7 +73,7 @@ class Yasumi public static function nextWorkingDay( string $class, \DateTimeInterface $startDate, - int $workingDays = 1 + int $workingDays = 1, ): \DateTimeInterface { $date = $startDate instanceof \DateTime ? \DateTimeImmutable::createFromMutable($startDate) : $startDate; $provider = null; @@ -186,7 +186,7 @@ public static function getAvailableLocales(): array public static function createByISO3166_2( string $isoCode, int $year = self::YEAR_LOWER_BOUND, - string $locale = self::DEFAULT_LOCALE + string $locale = self::DEFAULT_LOCALE, ): ProviderInterface { $availableProviders = self::getProviders(); @@ -277,7 +277,7 @@ public static function getProviders(): array public static function prevWorkingDay( string $class, \DateTimeInterface $startDate, - int $workingDays = 1 + int $workingDays = 1, ): \DateTimeInterface { $date = $startDate instanceof \DateTime ? \DateTimeImmutable::createFromMutable($startDate) : $startDate; $provider = null; diff --git a/tests/Randomizer.php b/tests/Randomizer.php index d851fe42e..8bdfa5b7a 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -42,7 +42,7 @@ public function generateRandomDates( int $day, ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { $data = []; $range ??= 1000; @@ -68,7 +68,7 @@ public function generateRandomDates( public function generateRandomEasterDates( ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { $data = []; $range ??= 1000; @@ -97,7 +97,7 @@ public function generateRandomEasterDates( public function generateRandomEasterMondayDates( ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { $range ??= 1000; @@ -122,7 +122,7 @@ public function generateRandomModifiedEasterDates( callable $cb, ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { $data = []; $range ??= 1000; @@ -152,7 +152,7 @@ public function generateRandomModifiedEasterDates( public function generateRandomGoodFridayDates( ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { $range ??= 1000; @@ -175,7 +175,7 @@ public function generateRandomGoodFridayDates( public function generateRandomPentecostDates( ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { $range ??= 1000; @@ -203,7 +203,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( int $day, ?string $timezone = null, ?int $iterations = null, - ?int $range = null + ?int $range = null, ): array { return $this->generateRandomDatesWithModifier($month, $day, function ($range, \DateTime $date): void { if ($this->isWeekend($date)) { @@ -232,7 +232,7 @@ public function generateRandomDatesWithModifier( callable $callback, int $iterations, int $range, - ?string $timezone = null + ?string $timezone = null, ): array { $data = []; @@ -260,7 +260,7 @@ public function generateRandomDatesWithModifier( */ public function generateRandomYear( ?int $lowerLimit = null, - ?int $upperLimit = null + ?int $upperLimit = null, ): int { return self::numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } @@ -275,7 +275,7 @@ public function generateRandomYear( */ public function isWeekend( \DateTimeInterface $dateTime, - array $weekendDays = [0, 6] + array $weekendDays = [0, 6], ): bool { return \in_array((int) $dateTime->format('w'), $weekendDays, true); } diff --git a/tests/Ukraine/SubstitutedHolidayTest.php b/tests/Ukraine/SubstitutedHolidayTest.php index 176fa7870..84573ce32 100644 --- a/tests/Ukraine/SubstitutedHolidayTest.php +++ b/tests/Ukraine/SubstitutedHolidayTest.php @@ -64,7 +64,7 @@ public function assertHolidayWithSubstitution( string $key, int $year, \DateTimeInterface $expectedOfficial, - ?\DateTimeInterface $expectedSubstitution = null + ?\DateTimeInterface $expectedSubstitution = null, ): void { $holidays = Yasumi::create($provider, $year); diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 2f83f16b2..cfbe336bc 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -53,7 +53,7 @@ public function assertDefinedHolidays( array $expectedHolidays, string $provider, int $year, - string $type + string $type, ): void { $holidays = Yasumi::create($provider, $year); @@ -98,7 +98,7 @@ public function assertHoliday( string $provider, string $key, int $year, - \DateTimeInterface $expected + \DateTimeInterface $expected, ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); @@ -125,7 +125,7 @@ public function assertSubstituteHoliday( string $provider, string $key, int $year, - \DateTimeInterface $expected + \DateTimeInterface $expected, ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday('substituteHoliday:' . $key); @@ -150,7 +150,7 @@ public function assertSubstituteHoliday( public function assertNotSubstituteHoliday( string $provider, string $key, - int $year + int $year, ): void { $this->assertNotHoliday( $provider, @@ -174,7 +174,7 @@ public function assertNotSubstituteHoliday( public function assertNotHoliday( string $provider, string $key, - int $year + int $year, ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); @@ -199,7 +199,7 @@ public function assertTranslatedHolidayName( string $provider, string $key, int $year, - array $translations + array $translations, ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); @@ -244,7 +244,7 @@ public function assertHolidayType( string $provider, string $key, int $year, - string $type + string $type, ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); @@ -270,7 +270,7 @@ public function assertDayOfWeek( string $provider, string $key, int $year, - string $expectedDayOfWeek + string $expectedDayOfWeek, ): void { $holidays = Yasumi::create($provider, $year); $holiday = $holidays->getHoliday($key); From 029e80ee14c17d711861666530970d0964bfc5a7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 25 Oct 2024 22:29:51 +0900 Subject: [PATCH 561/687] doc: Add initial git-cliff configuration Updating the changelog always has been very time-consuming. Using git-cliff will help tremendously cutting down the time to update it. It, however, relies on the git commits using the conventional commits convention, which likely going to introduce as of version 2.8.0. Signed-off-by: Sacha Telgenhof --- cliff.toml | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 cliff.toml diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 000000000..9d3cd5766 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,121 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration +# +# Lines starting with "#" are comments. +# Configuration options are organized into tables and keys. +# See documentation for more information on available options. + +[remote.github] +owner = "azuyalabs" +repo = "yasumi" + +[changelog] + +# changelog header +header = """ +# Changelog\n +All notable changes to this project will be documented in this file. + +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and +[Conventional Commits](https://conventionalcommits.org) for commit conventions. + +Changes related to the logic of the holidays or their providers are listed first, +followed by any architectural or technical changes.\n +""" + +# template for the changelog body +# https://keats.github.io/tera/docs/#introduction +body = """ +{% if version -%} + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else -%} + ## [Unreleased] +{% endif -%} + +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | striptags | trim | upper_first }} + {% for commit in commits %} + - {% if commit.scope %}({{ commit.scope | upper_first }}) {% endif%}{{ commit.message | split(pat="\n") | first | split(pat=": ") | last | trim | upper_first }}\ + {% endfor %} +{% endfor %} + +{%- if github -%} +{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} + ## New Contributors ❤️ +{% endif %}\ +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + * @{{ contributor.username }} made their first contribution +{%- endfor -%} +{%- endif %}\n\n +""" + +# template for the changelog footer +footer = """ +{% for release in releases -%} + {% if release.version -%} + {% if release.previous.version -%} + [{{ release.version | trim_start_matches(pat="v") }}]: \ + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\ + /compare/{{ release.previous.version }}..{{ release.version }} + {% endif -%} + {% else -%} + [unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\ + /compare/{{ release.previous.version }}..HEAD + {% endif -%} +{% endfor %} +""" + +# remove the leading and trailing whitespace from the templates +trim = true + +[git] + +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = true + +# filter out the commits that are not conventional +filter_unconventional = true + +# process each line of a commit as an individual commit +split_commits = false + +# preprocessors for manipulating the commit messages before parsing/grouping them +commit_preprocessors = [ + { pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/azuyalabs/yasumi/issues/${1}))"} +] + +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Fixes" }, + { message = "^refactor", group = "Refactor" }, + { message = "^perf", group = "Performance" }, + { message = "^doc", group = "Documentation" }, + { message = "^style", group = "Code Style" }, + { message = "^test", group = "Testing" }, + { message = "^chore|^ci|^build", group = "Other" }, + + # skip merge commits + { message = "^[Mm]erge", skip = true }, +] + +# protect breaking changes from being skipped due to matching a skipping commit_parser +protect_breaking_commits = false + +# filter out the commits that are not matched by commit parsers +filter_commits = true + +# regex for matching git tags +tag_pattern = "[0-9].*" + +# regex for skipping tags +skip_tags = "beta|alpha" + +# regex for ignoring tags +ignore_tags = "" + +# sort the tags topologically +topo_order = true + +# sort the commits inside sections by oldest/newest order +sort_commits = "newest" From 3af14279172552ddec8bd563498a18bd52812996 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 25 Oct 2024 23:41:18 +0900 Subject: [PATCH 562/687] feat(germany): Day of Liberation is celebrated in Berlin in 2025 too. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Germany/Berlin.php | 8 ++-- ...on2020Test.php => DayOfLiberationTest.php} | 38 ++++++++++++------- 2 files changed, 29 insertions(+), 17 deletions(-) rename tests/Germany/Berlin/{DayOfLiberation2020Test.php => DayOfLiberationTest.php} (69%) diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index f3db82ae0..04e85d1af 100644 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -55,8 +55,8 @@ public function initialize(): void $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); } - if (2020 === $this->year) { - $this->addHoliday($this->dayOfLiberation($this->timezone, $this->locale)); + if (2020 === $this->year || 2025 === $this->year) { + $this->addHoliday($this->dayOfLiberation($this->year, $this->timezone, $this->locale)); } } @@ -68,6 +68,7 @@ public function initialize(): void * * @see https://de.wikipedia.org/wiki/Tag_der_Befreiung * + * @param int $year the year in which Day of Liberation is celebrated * @param string $timezone the timezone in which Day of Liberation is celebrated * @param string $locale the locale for which Day of Liberation needs to be displayed in * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, @@ -78,6 +79,7 @@ public function initialize(): void * @throws \Exception */ protected function dayOfLiberation( + int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL, @@ -85,7 +87,7 @@ protected function dayOfLiberation( return new Holiday( 'dayOfLiberation', [], - new \DateTime('2020-05-08', DateTimeZoneFactory::getDateTimeZone($timezone)), + new \DateTime("{$year}-05-08", DateTimeZoneFactory::getDateTimeZone($timezone)), $locale, $type ); diff --git a/tests/Germany/Berlin/DayOfLiberation2020Test.php b/tests/Germany/Berlin/DayOfLiberationTest.php similarity index 69% rename from tests/Germany/Berlin/DayOfLiberation2020Test.php rename to tests/Germany/Berlin/DayOfLiberationTest.php index 835beef9a..c1c94d377 100644 --- a/tests/Germany/Berlin/DayOfLiberation2020Test.php +++ b/tests/Germany/Berlin/DayOfLiberationTest.php @@ -21,9 +21,9 @@ use Yasumi\tests\HolidayTestCase; /** - * Class for testing Day of Liberation 2020 in Berlin (Germany). + * Class for testing Day of Liberation in Berlin (Germany). */ -class DayOfLiberation2020Test extends BerlinBaseTestCase implements HolidayTestCase +class DayOfLiberationTest extends BerlinBaseTestCase implements HolidayTestCase { /** * The name of the holiday to be tested. @@ -31,9 +31,9 @@ class DayOfLiberation2020Test extends BerlinBaseTestCase implements HolidayTestC public const HOLIDAY = 'dayOfLiberation'; /** - * The year in which the holiday takes place. + * The years in which the holiday takes place. */ - public const YEAR = 2020; + public static array $years = [2020, 2025]; /** * Test the holiday defined in this test. @@ -42,12 +42,14 @@ class DayOfLiberation2020Test extends BerlinBaseTestCase implements HolidayTestC */ public function testHolidayInYear(): void { - $this->assertHoliday( - self::REGION, - self::HOLIDAY, - self::YEAR, - new \DateTime(self::YEAR . '-05-08', new \DateTimeZone(self::TIMEZONE)) - ); + foreach (self::$years as $year) { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime($year . '-05-08', new \DateTimeZone(self::TIMEZONE)) + ); + } } /** @@ -57,10 +59,12 @@ public function testHolidayInYear(): void */ public function testHolidayBeforeYear(): void { + reset(self::$years); + $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::YEAR - 1) + $this->generateRandomYear(1000, current(self::$years) - 1) ); } @@ -71,10 +75,12 @@ public function testHolidayBeforeYear(): void */ public function testHolidayAfterYear(): void { + end(self::$years); + $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::YEAR + 1) + $this->generateRandomYear(current(self::$years) + 1) ); } @@ -83,10 +89,12 @@ public function testHolidayAfterYear(): void */ public function testTranslation(): void { + reset(self::$years); + $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - self::YEAR, + current(self::$years), [self::LOCALE => 'Tag der Befreiung'] ); } @@ -96,10 +104,12 @@ public function testTranslation(): void */ public function testHolidayType(): void { + reset(self::$years); + $this->assertHolidayType( self::REGION, self::HOLIDAY, - self::YEAR, + current(self::$years), Holiday::TYPE_OFFICIAL ); } From 8dab11043de454f5ff6838001e7dc43d0c974db8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 25 Oct 2024 23:45:49 +0900 Subject: [PATCH 563/687] docs: Sort the first time contributors alphabetically (a-z) Signed-off-by: Sacha Telgenhof --- cliff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cliff.toml b/cliff.toml index 9d3cd5766..f7cee6dd0 100644 --- a/cliff.toml +++ b/cliff.toml @@ -43,7 +43,7 @@ body = """ {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} ## New Contributors ❤️ {% endif %}\ -{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) | sort(attribute="username") %} * @{{ contributor.username }} made their first contribution {%- endfor -%} {%- endif %}\n\n From 65cc0f2ae326fe41c6dabbc18540b5b4e00d36bc Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 25 Oct 2024 23:54:16 +0900 Subject: [PATCH 564/687] chore: Exclude phpactor configuration file from Git Signed-off-by: Sacha Telgenhof --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 00cc7cd98..10ea067ab 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .idea/ .php-cs-fixer.cache .php_cs.cache +.phpactor.json .phpunit.result.cache bin/_* composer.lock From 631fb0c5df91b577a3cb9b22f3ce07ea46ece690 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 1 Nov 2024 00:54:31 +0900 Subject: [PATCH 565/687] build: add dependabot configuration file Signed-off-by: Sacha Telgenhof --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..2eff6b978 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From 9589e85158c3ec3b4935c9aa6b78f98842f33342 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 01:04:14 +0900 Subject: [PATCH 566/687] build(deps): bump actions/checkout from 3 to 4 (#347) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 48ad3efde..d54c10460 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 96b1f49e8..90dbeb924 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1cec88931..68913f96c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 From df1f5e749f563e40fdd6da960d1c526469679701 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 01:11:13 +0900 Subject: [PATCH 567/687] build(deps): bump actions/cache from 3 to 4 (#348) Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index d54c10460..19a1a5cb1 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -35,7 +35,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache Composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 90dbeb924..481611107 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -35,7 +35,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache Composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 68913f96c..7e8d04270 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -35,7 +35,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache Composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} From fa2efa4cf74d653f16a5cea4e32486b32c06f63c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 01:16:26 +0900 Subject: [PATCH 568/687] build(deps): bump actions/stale from 3.0.14 to 9.0.0 (#349) Bumps [actions/stale](https://github.com/actions/stale) from 3.0.14 to 9.0.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v3.0.14...v9.0.0) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 93f0cd096..6bb1de147 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: steps: - name: "Prune stale issues and pull requests" - uses: "actions/stale@v3.0.14" + uses: "actions/stale@v9.0.0" with: repo-token: "${{ secrets.GITHUB_TOKEN }}" days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}" From 2070bdab6116daade296ba138dd460308e601a03 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 23 Nov 2024 22:33:01 +0900 Subject: [PATCH 569/687] build: replace deprecated PHPstan configuration option The configuration option 'checkGenericClassInNonGenericObjectType' was deprecated. Replaced it with the recommended ignoreErrors option 'identifier: missingType.generics'. Signed-off-by: Sacha Telgenhof --- phpstan.neon.dist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index f9ac466cf..b14e98e42 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,7 +7,8 @@ parameters: - message: '#Comparison operation "<=" between [0-9]+ and int<[0-9]+, max> is always true.#' path: src/Yasumi/Provider/Turkey.php - checkGenericClassInNonGenericObjectType: false + - + identifier: missingType.generics reportUnmatchedIgnoredErrors: true # Do not allow outdated errors in the baseline treatPhpDocTypesAsCertain: false tipsOfTheDay: false From 074fe08b5e48cea705943f5d77d0fc8956aa3be8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 13 Dec 2024 19:02:12 +0900 Subject: [PATCH 570/687] style: fix code styling issues Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Luxembourg.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 7f2393880..541ff84a6 100644 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -1,4 +1,5 @@ Date: Fri, 13 Dec 2024 20:57:52 +0900 Subject: [PATCH 571/687] test: fix test for the previous function The unit test for the `previous` function uses an example holiday that has a lower limit. If the randomized year is exactly the same as the lower limit, the test fails as there is no previous date. Increased the lower limit to avoid this situation. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 08db7b5a1..76a114f63 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -145,7 +145,7 @@ public function testPrevious(): void { $country = 'Netherlands'; $name = 'liberationDay'; - $year_lower_limit = 1949; + $year_lower_limit = 1950; $year = self::numberBetween($year_lower_limit, self::YEAR_UPPER_BOUND); $holidays = Yasumi::create($country, $year); From 46ec931cdf0a72e2bca21ed41f20eedba2a92c41 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 13 Dec 2024 21:20:10 +0900 Subject: [PATCH 572/687] test(portugal): fix official holidays tests All Saints Day was incorrectly set to be present between 2013 and 2015. This is incorrect as between 2013 and 2015 (inclusive) this holiday did not happen due to government deliberation. Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugalTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index 0e9ddc178..e452b042e 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -51,7 +51,6 @@ public function testOfficialHolidays(): void 'easter', 'goodFriday', 'assumptionOfMary', - 'allSaintsDay', 'immaculateConception', 'christmasDay', '25thApril', @@ -59,6 +58,10 @@ public function testOfficialHolidays(): void 'portugalDay', ]; + if ($this->year <= 2012 || $this->year >= 2016) { + $holidays[] = 'allSaintsDay'; + } + if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { $holidays[] = 'portugueseRepublic'; } From 96653c074bc70065e83d5faa8332c90beab6234e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 23 Dec 2024 17:59:54 +0900 Subject: [PATCH 573/687] refactor: make the Holiday class implement the Stringable interface The 'Holiday' class already includes the '__toString' method, so good to have it implement the Stringable interface. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Holiday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index a6f99c005..273284fb7 100644 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -23,7 +23,7 @@ /** * Class Holiday. */ -class Holiday extends \DateTime implements \JsonSerializable +class Holiday extends \DateTime implements \JsonSerializable, \Stringable { /** * Type definition for Official (i.e. National/Federal) holidays. From 9309835393ab2fb5492ef475878cc5c96c4fcef1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 23 Dec 2024 18:23:32 +0900 Subject: [PATCH 574/687] build: upgrade PHPStan to v2.0 Additionally bumped the Psalm package version to the latest installed one. Signed-off-by: Sacha Telgenhof --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 8db19a93d..41ca3a96c 100644 --- a/composer.json +++ b/composer.json @@ -43,9 +43,10 @@ "azuyalabs/php-cs-fixer-config": "^0.3", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^5.20" + "vimeo/psalm": "^5.26" }, "suggest": { "ext-calendar": "For calculating the date of Easter" From 724aa44fd583dd8d361b1f904cb1801f34c47042 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 23 Dec 2024 19:45:24 +0900 Subject: [PATCH 575/687] test(portugal): fix official holidays tests The Restoration of Independence Day was considered to be observed at any time, however it is only observed between 1850 and 2012, and since 2016. Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugalTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index e452b042e..161823a60 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -54,7 +54,6 @@ public function testOfficialHolidays(): void 'immaculateConception', 'christmasDay', '25thApril', - 'restorationOfIndependence', 'portugalDay', ]; @@ -66,6 +65,10 @@ public function testOfficialHolidays(): void $holidays[] = 'portugueseRepublic'; } + if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) { + $holidays[] = 'restorationOfIndependence'; + } + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } From 26c3455953c8c777432571f9146226416cff6484 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 8 Jan 2025 00:48:11 +0900 Subject: [PATCH 576/687] docs: update copyright year Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 2 +- LICENSE | 4 ++-- examples/basic.php | 2 +- examples/between_filter.php | 2 +- examples/custom_provider.php | 2 +- examples/filters.php | 2 +- phpinsights.php | 2 +- phpunit.xml.dist | 2 +- psalm.xml.dist | 2 +- rector.php | 2 +- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- .../Exception/MissingTranslationException.php | 2 +- src/Yasumi/Exception/ProviderNotFoundException.php | 2 +- src/Yasumi/Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 2 +- 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/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Argentina.php | 2 +- src/Yasumi/Provider/Australia.php | 2 +- .../Australia/AustralianCapitalTerritory.php | 2 +- src/Yasumi/Provider/Australia/NewSouthWales.php | 2 +- src/Yasumi/Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- .../Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- .../Provider/Australia/Tasmania/CentralNorth.php | 2 +- .../Provider/Australia/Tasmania/FlindersIsland.php | 2 +- .../Provider/Australia/Tasmania/KingIsland.php | 2 +- .../Provider/Australia/Tasmania/Northeast.php | 2 +- .../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 | 2 +- src/Yasumi/Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Canada.php | 2 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/BritishColumbia.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NewBrunswick.php | 2 +- .../Provider/Canada/NewfoundlandAndLabrador.php | 2 +- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Ontario.php | 2 +- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/CommonHolidays.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 2 +- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Provider/Denmark.php | 2 +- src/Yasumi/Provider/Estonia.php | 2 +- src/Yasumi/Provider/Finland.php | 2 +- 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/Georgia.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/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 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Iran.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 13 +------------ src/Yasumi/Provider/Mexico.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 2 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/Melilla.php | 2 +- src/Yasumi/Provider/Spain/Navarre.php | 3 ++- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- .../Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- .../Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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/Turkey.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- .../Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.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/allSoulsDay.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 +- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- src/Yasumi/data/translations/canadaDay.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/civicHoliday.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- .../data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/data/translations/dayOfLiberation.php | 2 +- src/Yasumi/data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/discoveryDay.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/familyDay.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goldCupParadeDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- src/Yasumi/data/translations/heritageDay.php | 2 +- .../data/translations/immaculateConception.php | 2 +- .../data/translations/internationalWomensDay.php | 2 +- .../data/translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/islanderDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/louisRielDay.php | 2 +- src/Yasumi/data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/natalHoliday.php | 2 +- .../translations/nationalIndigenousPeoplesDay.php | 2 +- .../data/translations/nationalPatriotsDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- .../data/translations/novaScotiaHeritageDay.php | 2 +- src/Yasumi/data/translations/orangemensDay.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/plebisciteDay.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- .../data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/queensBirthday.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- src/Yasumi/data/translations/remembranceDay.php | 2 +- .../data/translations/restorationOfIndepence.php | 2 +- .../data/translations/saintJeanBaptisteDay.php | 2 +- src/Yasumi/data/translations/saskatchewanDay.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stFloriansDay.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/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/terryFoxDay.php | 2 +- src/Yasumi/data/translations/thanksgivingDay.php | 2 +- .../data/translations/truthAndReconciliationDay.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- src/Yasumi/data/translations/victoriaDay.php | 2 +- src/Yasumi/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 +- src/Yasumi/data/translations/yukonHeritageDay.php | 2 +- tests/Argentina/ArgentinaBaseTestCase.php | 2 +- tests/Argentina/ArgentinaTest.php | 2 +- tests/Argentina/CarnavalMondayTest.php | 2 +- tests/Argentina/CarnavalTuesdayTest.php | 2 +- tests/Argentina/ChristmasDayTest.php | 2 +- tests/Argentina/EasterTest.php | 2 +- tests/Argentina/FlagDayTest.php | 2 +- tests/Argentina/GeneralJoseSanMartinDayTest.php | 2 +- .../GeneralMartinMigueldeGuemesDayTest.php | 2 +- tests/Argentina/GoodFridayTest.php | 2 +- tests/Argentina/ImmaculateConceptionDayTest.php | 2 +- tests/Argentina/IndependenceDayTest.php | 2 +- tests/Argentina/InternationalWorkersDayTest.php | 2 +- tests/Argentina/MalvinasDayTest.php | 2 +- tests/Argentina/MayRevolutionTest.php | 2 +- tests/Argentina/NationalSovereigntyDayTest.php | 2 +- tests/Argentina/NewYearsDayTest.php | 2 +- tests/Argentina/RaceDayTest.php | 2 +- tests/Argentina/RemembranceDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- .../AustralianCapitalTerritory/AnzacDayTest.php | 2 +- .../AustralianCapitalTerritory/AustraliaDayTest.php | 2 +- .../AustralianCapitalTerritoryBaseTestCase.php | 2 +- .../AustralianCapitalTerritoryTest.php | 2 +- .../AustralianCapitalTerritory/BoxingDayTest.php | 2 +- .../AustralianCapitalTerritory/CanberraDayTest.php | 2 +- .../AustralianCapitalTerritory/ChristmasDayTest.php | 2 +- .../AustralianCapitalTerritory/EasterMondayTest.php | 2 +- .../EasterSaturdayTest.php | 2 +- .../AustralianCapitalTerritory/EasterSundayTest.php | 2 +- .../AustralianCapitalTerritory/GoodFridayTest.php | 2 +- .../AustralianCapitalTerritory/LabourDayTest.php | 2 +- .../NationalDayOfMourningTest.php | 2 +- .../AustralianCapitalTerritory/NewYearsDayTest.php | 2 +- .../QueensBirthdayTest.php | 2 +- .../ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NationalDayOfMourningTest.php | 2 +- tests/Australia/NewSouthWales/AnzacDayTest.php | 2 +- tests/Australia/NewSouthWales/AustraliaDayTest.php | 2 +- tests/Australia/NewSouthWales/BankHolidayTest.php | 2 +- tests/Australia/NewSouthWales/BoxingDayTest.php | 2 +- tests/Australia/NewSouthWales/ChristmasDayTest.php | 2 +- tests/Australia/NewSouthWales/EasterMondayTest.php | 2 +- .../Australia/NewSouthWales/EasterSaturdayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSundayTest.php | 2 +- tests/Australia/NewSouthWales/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/LabourDayTest.php | 2 +- .../NewSouthWales/NationalDayOfMourningTest.php | 2 +- .../NewSouthWales/NewSouthWalesBaseTestCase.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 2 +- tests/Australia/NewSouthWales/NewYearsDayTest.php | 2 +- .../Australia/NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/NorthernTerritory/AnzacDayTest.php | 2 +- .../NorthernTerritory/AustraliaDayTest.php | 2 +- tests/Australia/NorthernTerritory/BoxingDayTest.php | 2 +- .../NorthernTerritory/ChristmasDayTest.php | 2 +- .../NorthernTerritory/EasterMondayTest.php | 2 +- .../NorthernTerritory/EasterSaturdayTest.php | 2 +- .../Australia/NorthernTerritory/GoodFridayTest.php | 2 +- tests/Australia/NorthernTerritory/MayDayTest.php | 2 +- .../NorthernTerritory/NationalDayOfMourningTest.php | 2 +- .../Australia/NorthernTerritory/NewYearsDayTest.php | 2 +- .../NorthernTerritoryBaseTestCase.php | 2 +- .../NorthernTerritory/NorthernTerritoryTest.php | 2 +- tests/Australia/NorthernTerritory/PicnicDayTest.php | 2 +- .../NorthernTerritory/QueensBirthdayTest.php | 2 +- tests/Australia/Queensland/AnzacDayTest.php | 2 +- tests/Australia/Queensland/AustraliaDayTest.php | 2 +- tests/Australia/Queensland/BoxingDayTest.php | 2 +- .../Australia/Queensland/Brisbane/AnzacDayTest.php | 2 +- .../Queensland/Brisbane/AustraliaDayTest.php | 2 +- .../Australia/Queensland/Brisbane/BoxingDayTest.php | 2 +- .../Queensland/Brisbane/BrisbaneBaseTestCase.php | 2 +- .../Australia/Queensland/Brisbane/BrisbaneTest.php | 2 +- .../Queensland/Brisbane/ChristmasDayTest.php | 2 +- .../Queensland/Brisbane/EasterMondayTest.php | 2 +- .../Queensland/Brisbane/GoodFridayTest.php | 2 +- .../Australia/Queensland/Brisbane/LabourDayTest.php | 2 +- .../Brisbane/NationalDayOfMourningTest.php | 2 +- .../Queensland/Brisbane/NewYearsDayTest.php | 2 +- .../Queensland/Brisbane/PeoplesDayTest.php | 2 +- .../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 +- .../Queensland/NationalDayOfMourningTest.php | 2 +- tests/Australia/Queensland/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/QueensBirthdayTest.php | 2 +- .../Australia/Queensland/QueenslandBaseTestCase.php | 2 +- tests/Australia/Queensland/QueenslandTest.php | 2 +- .../Australia/SouthAustralia/AdelaideCupDayTest.php | 2 +- tests/Australia/SouthAustralia/AnzacDayTest.php | 2 +- tests/Australia/SouthAustralia/AustraliaDayTest.php | 2 +- tests/Australia/SouthAustralia/ChristmasDayTest.php | 2 +- tests/Australia/SouthAustralia/EasterMondayTest.php | 2 +- .../Australia/SouthAustralia/EasterSaturdayTest.php | 2 +- tests/Australia/SouthAustralia/GoodFridayTest.php | 2 +- tests/Australia/SouthAustralia/LabourDayTest.php | 2 +- .../SouthAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/SouthAustralia/NewYearsDayTest.php | 2 +- .../SouthAustralia/ProclamationDayTest.php | 2 +- .../Australia/SouthAustralia/QueensBirthdayTest.php | 2 +- .../SouthAustralia/SouthAustraliaBaseTestCase.php | 2 +- .../Australia/SouthAustralia/SouthAustraliaTest.php | 2 +- tests/Australia/Tasmania/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/AnzacDayTest.php | 2 +- .../Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- .../Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../CentralNorth/CentralNorthBaseTestCase.php | 2 +- .../Tasmania/CentralNorth/CentralNorthTest.php | 2 +- .../Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- .../Tasmania/CentralNorth/DevonportShowTest.php | 2 +- .../Tasmania/CentralNorth/EasterMondayTest.php | 2 +- .../Tasmania/CentralNorth/EightHourDayTest.php | 2 +- .../Tasmania/CentralNorth/GoodFridayTest.php | 2 +- .../CentralNorth/NationalDayOfMourningTest.php | 2 +- .../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 +- .../Tasmania/FlindersIsland/AnzacDayTest.php | 2 +- .../Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- .../Tasmania/FlindersIsland/BoxingDayTest.php | 2 +- .../Tasmania/FlindersIsland/ChristmasDayTest.php | 2 +- .../Tasmania/FlindersIsland/EasterMondayTest.php | 2 +- .../Tasmania/FlindersIsland/EightHourDayTest.php | 2 +- .../FlindersIsland/FlindersIslandBaseTestCase.php | 2 +- .../FlindersIsland/FlindersIslandShowTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandTest.php | 2 +- .../Tasmania/FlindersIsland/GoodFridayTest.php | 2 +- .../FlindersIsland/NationalDayOfMourningTest.php | 2 +- .../Tasmania/FlindersIsland/NewYearsDayTest.php | 2 +- .../Tasmania/FlindersIsland/QueensBirthdayTest.php | 2 +- .../Tasmania/FlindersIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/GoodFridayTest.php | 2 +- .../Australia/Tasmania/KingIsland/AnzacDayTest.php | 2 +- .../Tasmania/KingIsland/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/KingIsland/BoxingDayTest.php | 2 +- .../Tasmania/KingIsland/ChristmasDayTest.php | 2 +- .../Tasmania/KingIsland/EasterMondayTest.php | 2 +- .../Tasmania/KingIsland/EightHourDayTest.php | 2 +- .../Tasmania/KingIsland/GoodFridayTest.php | 2 +- .../Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- .../Tasmania/KingIsland/KingIslandShowTest.php | 2 +- .../Tasmania/KingIsland/KingIslandTest.php | 2 +- .../KingIsland/NationalDayOfMourningTest.php | 2 +- .../Tasmania/KingIsland/NewYearsDayTest.php | 2 +- .../Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- .../Tasmania/KingIsland/RecreationDayTest.php | 2 +- .../Tasmania/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 2 +- .../Tasmania/Northeast/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/Northeast/BoxingDayTest.php | 2 +- .../Tasmania/Northeast/ChristmasDayTest.php | 2 +- .../Tasmania/Northeast/EasterMondayTest.php | 2 +- .../Tasmania/Northeast/EightHourDayTest.php | 2 +- .../Australia/Tasmania/Northeast/GoodFridayTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Northeast/NationalDayOfMourningTest.php | 2 +- .../Tasmania/Northeast/NewYearsDayTest.php | 2 +- .../Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- .../Australia/Tasmania/Northeast/NortheastTest.php | 2 +- .../Tasmania/Northeast/QueensBirthdayTest.php | 2 +- .../Tasmania/Northeast/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 2 +- .../Tasmania/Northwest/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/Northwest/BoxingDayTest.php | 2 +- .../Australia/Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Tasmania/Northwest/ChristmasDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Northwest/CircularHead/BoxingDayTest.php | 2 +- .../Northwest/CircularHead/BurnieShowTest.php | 2 +- .../Northwest/CircularHead/ChristmasDayTest.php | 2 +- .../CircularHead/CircularHeadBaseTestCase.php | 2 +- .../Northwest/CircularHead/CircularHeadTest.php | 2 +- .../Northwest/CircularHead/EasterMondayTest.php | 2 +- .../Northwest/CircularHead/EightHourDayTest.php | 2 +- .../Northwest/CircularHead/GoodFridayTest.php | 2 +- .../CircularHead/NationalDayOfMourningTest.php | 2 +- .../Northwest/CircularHead/NewYearsDayTest.php | 2 +- .../Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Northwest/CircularHead/RecreationDayTest.php | 2 +- .../Tasmania/Northwest/EasterMondayTest.php | 2 +- .../Tasmania/Northwest/EightHourDayTest.php | 2 +- .../Australia/Tasmania/Northwest/GoodFridayTest.php | 2 +- .../Northwest/NationalDayOfMourningTest.php | 2 +- .../Tasmania/Northwest/NewYearsDayTest.php | 2 +- .../Tasmania/Northwest/NorthwestBaseTestCase.php | 2 +- .../Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- .../Tasmania/Northwest/QueensBirthdayTest.php | 2 +- .../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 +- .../Tasmania/South/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/South/NewYearsDayTest.php | 2 +- .../Australia/Tasmania/South/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/South/RecreationDayTest.php | 2 +- .../Australia/Tasmania/South/SouthBaseTestCase.php | 2 +- tests/Australia/Tasmania/South/SouthTest.php | 2 +- .../Tasmania/South/Southeast/AnzacDayTest.php | 2 +- .../Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- .../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 +- .../South/Southeast/NationalDayOfMourningTest.php | 2 +- .../Tasmania/South/Southeast/NewYearsDayTest.php | 2 +- .../Tasmania/South/Southeast/QueensBirthdayTest.php | 2 +- .../South/Southeast/SoutheastBaseTestCase.php | 2 +- .../Tasmania/South/Southeast/SoutheastTest.php | 2 +- tests/Australia/Tasmania/TasmaniaBaseTestCase.php | 2 +- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- .../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 +- .../Victoria/NationalDayOfMourningTest.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/WesternAustralia/AnzacDayTest.php | 2 +- .../Australia/WesternAustralia/AustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/BoxingDayTest.php | 2 +- .../Australia/WesternAustralia/ChristmasDayTest.php | 2 +- .../Australia/WesternAustralia/EasterMondayTest.php | 2 +- tests/Australia/WesternAustralia/GoodFridayTest.php | 2 +- tests/Australia/WesternAustralia/LabourDayTest.php | 2 +- .../WesternAustralia/NationalDayOfMourningTest.php | 2 +- .../Australia/WesternAustralia/NewYearsDayTest.php | 2 +- .../WesternAustralia/QueensBirthdayTest.php | 2 +- .../WesternAustraliaBaseTestCase.php | 2 +- .../WesternAustralia/WesternAustraliaDayTest.php | 2 +- .../WesternAustralia/WesternAustraliaTest.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/Burgenland/BurgenlandBaseTestCase.php | 2 +- tests/Austria/Burgenland/BurgenlandTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 2 +- tests/Austria/Carinthia/CarinthiaTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.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 +- .../LowerAustria/LowerAustriaBaseTestCase.php | 2 +- tests/Austria/LowerAustria/LowerAustriaTest.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 2 +- tests/Austria/Salzburg/SalzburgTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 2 +- tests/Austria/Styria/StyriaTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 2 +- tests/Austria/Tyrol/TyrolTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- .../UpperAustria/UpperAustriaBaseTestCase.php | 2 +- tests/Austria/UpperAustria/UpperAustriaTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 2 +- tests/Austria/Vienna/ViennaTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 2 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 2 +- tests/Base/TypographyTest.php | 2 +- tests/Base/WeekendTest.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/Canada/Alberta/AlbertaBaseTestCase.php | 2 +- tests/Canada/Alberta/AlbertaTest.php | 2 +- .../BritishColumbia/BritishColumbiaBaseTestCase.php | 2 +- .../Canada/BritishColumbia/BritishColumbiaTest.php | 2 +- tests/Canada/CanadaBaseTestCase.php | 2 +- tests/Canada/CanadaDayTest.php | 2 +- tests/Canada/CanadaTest.php | 2 +- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 2 +- tests/Canada/Manitoba/ManitobaBaseTestCase.php | 2 +- tests/Canada/Manitoba/ManitobaTest.php | 2 +- .../NewBrunswick/NewBrunswickBaseTestCase.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickTest.php | 2 +- tests/Canada/NewYearsDayTest.php | 2 +- .../NewfoundlandAndLabradorBaseTestCase.php | 2 +- .../NewfoundlandAndLabradorTest.php | 2 +- .../NorthwestTerritoriesBaseTestCase.php | 2 +- .../NorthwestTerritoriesTest.php | 2 +- tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php | 2 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 2 +- tests/Canada/Nunavut/NunavutBaseTestCase.php | 2 +- tests/Canada/Nunavut/NunavutTest.php | 2 +- tests/Canada/Ontario/OntarioBaseTestCase.php | 2 +- tests/Canada/Ontario/OntarioTest.php | 2 +- .../PrinceEdwardIslandBaseTestCase.php | 2 +- .../PrinceEdwardIsland/PrinceEdwardIslandTest.php | 2 +- tests/Canada/Quebec/QuebecBaseTestCase.php | 2 +- tests/Canada/Quebec/QuebecTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 2 +- .../Saskatchewan/SaskatchewanBaseTestCase.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanTest.php | 2 +- tests/Canada/ThanksgivingDayTest.php | 2 +- tests/Canada/TruthAndReconciliationDayTest.php | 2 +- tests/Canada/Yukon/YukonBaseTestCase.php | 2 +- tests/Canada/Yukon/YukonTest.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/CroatiaTest.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/RemembranceDayTest.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 +- .../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/DaylightSavingTime.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/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/Georgia/EasterTest.php | 2 +- tests/Georgia/GeorgiaBaseTestCase.php | 2 +- tests/Georgia/GeorgiaTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 2 +- tests/Georgia/MtskhetobaDayTest.php | 2 +- tests/Georgia/NewYearsDayTest.php | 2 +- tests/Georgia/OrthodoxChristmasDayTest.php | 2 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 2 +- tests/Georgia/SecondNewYearDayTest.php | 2 +- tests/Georgia/StAndrewsDayTest.php | 2 +- tests/Georgia/StGeorgesDayTest.php | 2 +- tests/Georgia/StMarysDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Georgia/VictoryDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- .../BadenWurttembergBaseTestCase.php | 2 +- .../BadenWurttemberg/BadenWurttembergTest.php | 2 +- .../Germany/BadenWurttemberg/CorpusChristiTest.php | 2 +- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- .../Germany/BadenWurttemberg/GermanUnityDayTest.php | 2 +- .../BadenWurttemberg/ReformationDay2017Test.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/AssumptionOfMaryTest.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/DayOfLiberationTest.php | 2 +- tests/Germany/Berlin/GermanUnityDayTest.php | 2 +- .../Berlin/InternationalWomensDay2019Test.php | 2 +- tests/Germany/Berlin/ReformationDay2017Test.php | 2 +- .../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 +- .../Germany/LowerSaxony/LowerSaxonyBaseTestCase.php | 2 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 2 +- .../Germany/LowerSaxony/ReformationDay2017Test.php | 2 +- tests/Germany/LowerSaxony/ReformationDayTest.php | 2 +- .../GermanUnityDayTest.php | 2 +- .../InternationalWomensDayTest.php | 2 +- .../MecklenburgWesternPomeraniaBaseTestCase.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../NorthRhineWestphalia/CorpusChristiTest.php | 2 +- .../NorthRhineWestphalia/GermanUnityDayTest.php | 2 +- .../NorthRhineWestphaliaBaseTestCase.php | 2 +- .../NorthRhineWestphaliaTest.php | 2 +- .../NorthRhineWestphalia/ReformationDay2017Test.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/PentecostTest.php | 2 +- tests/Germany/ReformationDay2017Test.php | 2 +- .../RhinelandPalatinate/AllSaintsDayTest.php | 2 +- .../RhinelandPalatinate/CorpusChristiTest.php | 2 +- .../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 +- .../SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- .../SchleswigHolstein/GermanUnityDayTest.php | 2 +- .../SchleswigHolstein/ReformationDay2017Test.php | 2 +- .../SchleswigHolstein/ReformationDayTest.php | 2 +- .../SchleswigHolsteinBaseTestCase.php | 2 +- .../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/Germany/Thuringia/WorldChildrensDayTest.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/IndependenceDayTest.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/HolidayTestCase.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/Iran/AnniversaryOfIslamicRevolutionTest.php | 2 +- tests/Iran/DeathOfKhomeiniTest.php | 2 +- tests/Iran/IranBaseTestCase.php | 2 +- tests/Iran/IranTest.php | 2 +- tests/Iran/IslamicRepublicDayTest.php | 2 +- .../NationalizationOfTheIranianOilIndustryTest.php | 2 +- tests/Iran/Nowruz1Test.php | 2 +- tests/Iran/Nowruz2Test.php | 2 +- tests/Iran/Nowruz3Test.php | 2 +- tests/Iran/Nowruz4Test.php | 2 +- tests/Iran/RevoltOfKhordad15Test.php | 2 +- tests/Iran/SizdahBedarTest.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 +- .../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 +- .../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/AllSoulsDayTest.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/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/LuxembourgBaseTestCase.php | 2 +- tests/Luxembourg/LuxembourgTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Mexico/AllSaintsDayTest.php | 2 +- tests/Mexico/AssumptionOfMaryTest.php | 2 +- tests/Mexico/BenitoJuarezBirthdayTest.php | 2 +- tests/Mexico/ChristmasTest.php | 2 +- tests/Mexico/EasterMondayTest.php | 2 +- tests/Mexico/EpiphanyTest.php | 2 +- tests/Mexico/GoodFridayTest.php | 2 +- tests/Mexico/ImmaculateConceptionTest.php | 2 +- tests/Mexico/IndependenceDayTest.php | 2 +- tests/Mexico/InternationalWorkersDayTest.php | 2 +- tests/Mexico/MexicoBaseTestCase.php | 2 +- tests/Mexico/NewYearsDayTest.php | 2 +- tests/Mexico/VirginOfGuadalupeTest.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/DaylightSavingTime.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/ValentinesDayTest.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/ProviderTestCase.php | 2 +- tests/Randomizer.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/EpiphanyTest.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/StAndrewsDayTest.php | 2 +- tests/Romania/StJohnsDayTest.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/DeclarationOfTheSlovakNationTest.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/SlovakIndependenceDayTest.php | 2 +- tests/Slovakia/SlovakNationalUprisingDayTest.php | 2 +- tests/Slovakia/SlovakiaBaseTestCase.php | 2 +- tests/Slovakia/SlovakiaTest.php | 2 +- .../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/SouthKorea/UnitedNationsDayTest.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 +- .../BalearicIslands/BalearicIslandsDayTest.php | 2 +- tests/Spain/BalearicIslands/BalearicIslandsTest.php | 2 +- .../BasqueCountry/BasqueCountryBaseTestCase.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryDayTest.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryTest.php | 2 +- .../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 +- .../CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- .../Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- .../CastillaLaManchaBaseTestCase.php | 2 +- .../CastillaLaMancha/CastillaLaManchaDayTest.php | 2 +- .../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 +- .../CommunityOfMadridBaseTestCase.php | 2 +- .../CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- .../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 +- .../RegionOfMurcia/RegionOfMurciaBaseTestCase.php | 2 +- .../Spain/RegionOfMurcia/RegionOfMurciaDayTest.php | 2 +- tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php | 2 +- tests/Spain/SpainBaseTestCase.php | 2 +- tests/Spain/SpainTest.php | 2 +- .../ValencianCommunityBaseTestCase.php | 2 +- .../ValencianCommunityDayTest.php | 2 +- .../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 +- .../AppenzellAusserrhodenTest.php | 2 +- .../AppenzellAusserrhoden/AscensionDayTest.php | 2 +- .../AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/EasterMondayTest.php | 2 +- .../AppenzellAusserrhoden/GoodFridayTest.php | 2 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhoden/PentecostMondayTest.php | 2 +- .../AppenzellAusserrhoden/StStephensDayTest.php | 2 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhodenBaseTestCase.php | 2 +- .../AppenzellInnerrhodenTest.php | 2 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 2 +- .../AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- .../AppenzellInnerrhoden/CorpusChristiTest.php | 2 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 2 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- .../AppenzellInnerrhoden/StStephensDayTest.php | 2 +- .../BaselLandschaft/AscensionDayTest.php | 2 +- .../BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- .../BaselLandschaft/BaselLandschaftTest.php | 2 +- .../BaselLandschaft/ChristmasDayTest.php | 2 +- .../BaselLandschaft/EasterMondayTest.php | 2 +- .../Switzerland/BaselLandschaft/GoodFridayTest.php | 2 +- .../Switzerland/BaselLandschaft/NewYearsDayTest.php | 2 +- .../BaselLandschaft/PentecostMondayTest.php | 2 +- .../BaselLandschaft/StStephensDayTest.php | 2 +- .../Switzerland/BaselLandschaft/WorkersDayTest.php | 2 +- tests/Switzerland/BaselStadt/AscensionDayTest.php | 2 +- .../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 +- .../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/AllSaintsDayTest.php | 2 +- tests/Switzerland/Fribourg/AscensionDayTest.php | 2 +- tests/Switzerland/Fribourg/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Fribourg/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/CorpusChristiTest.php | 2 +- tests/Switzerland/Fribourg/December26thTest.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 +- .../Fribourg/ImmaculateConceptionTest.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 +- .../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/BettagsMontagTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/CorpusChristiTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/EasterTest.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/PentecostTest.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 +- .../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/BettagsMontagTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/December26thTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- .../Neuchatel/InstaurationRepubliqueTest.php | 2 +- tests/Switzerland/Neuchatel/January2ndTest.php | 2 +- .../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 +- .../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 +- .../Nidwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Nidwalden/NewYearsDayTest.php | 2 +- .../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 +- .../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 +- .../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 +- .../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 +- .../Schaffhausen/PentecostMondayTest.php | 2 +- .../Schaffhausen/SchaffhausenBaseTestCase.php | 2 +- tests/Switzerland/Schaffhausen/SchaffhausenTest.php | 2 +- .../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 +- .../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 +- .../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 +- .../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 +- .../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/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/Turkey/CommemorationOfAtaturkTest.php | 2 +- tests/Turkey/DemocracyDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NationalSovereigntyDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Turkey/RepublicDayTest.php | 2 +- tests/Turkey/TurkeyBaseTestCase.php | 2 +- tests/Turkey/TurkeyTest.php | 2 +- tests/Turkey/VictoryDayTest.php | 2 +- tests/USA/ChristmasDayTest.php | 2 +- tests/USA/ColumbusDayTest.php | 2 +- tests/USA/IndependenceDayTest.php | 2 +- tests/USA/JuneteenthTest.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/CatholicChristmasDayTest.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/SubstitutedHolidayTest.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/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 +- .../UnitedKingdom/England/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- .../UnitedKingdom/England/SpringBankHolidayTest.php | 2 +- .../UnitedKingdom/England/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- .../KingCharlesCoronationBankHolidayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/MotheringSundayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 2 +- .../UnitedKingdom/NorthernIreland/BoxingDayTest.php | 2 +- .../NorthernIreland/ChristmasDayTest.php | 2 +- .../NorthernIreland/EasterMondayTest.php | 2 +- .../NorthernIreland/GoodFridayTest.php | 2 +- .../NorthernIreland/MayDayBankHolidayTest.php | 2 +- .../NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- .../NorthernIreland/NorthernIrelandTest.php | 2 +- .../NorthernIreland/SpringBankHolidayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- .../NorthernIreland/SummerBankHolidayTest.php | 2 +- .../PlatinumJubileeBankHolidayTest.php | 2 +- .../QueenElizabethFuneralBankHolidayTest.php | 2 +- tests/UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- tests/UnitedKingdom/Scotland/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/Scotland/GoodFridayTest.php | 2 +- .../Scotland/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/Scotland/NewYearsDayTest.php | 2 +- .../UnitedKingdom/Scotland/ScotlandBaseTestCase.php | 2 +- tests/UnitedKingdom/Scotland/ScotlandTest.php | 2 +- .../Scotland/SecondNewYearsDayTest.php | 2 +- .../Scotland/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Scotland/StAndrewsDayTest.php | 2 +- .../Scotland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.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 | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- tests/YasumiBase.php | 2 +- 1711 files changed, 1713 insertions(+), 1723 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 206439d0d..9e107d373 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2024 AzuyaLabs + * Copyright (c) 2015 - 2025 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index 3e5247433..37ab31127 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2024 AzuyaLabs +Copyright (c) 2015 - 2025 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -44,4 +44,4 @@ By making a contribution to this project, I certify that: are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. \ No newline at end of file + this project or the open source license(s) involved. diff --git a/examples/basic.php b/examples/basic.php index 9cf5b8f98..0d897c409 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -9,7 +9,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2024 AzuyaLabs + * Copyright (c) 2015 - 2025 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/between_filter.php b/examples/between_filter.php index 4b8b46f7c..83862b163 100644 --- a/examples/between_filter.php +++ b/examples/between_filter.php @@ -10,7 +10,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2024 AzuyaLabs + * Copyright (c) 2015 - 2025 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/custom_provider.php b/examples/custom_provider.php index 57f514d63..e6ea1a0a0 100644 --- a/examples/custom_provider.php +++ b/examples/custom_provider.php @@ -11,7 +11,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2024 AzuyaLabs + * Copyright (c) 2015 - 2025 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/filters.php b/examples/filters.php index 5e85543ab..0327219a8 100644 --- a/examples/filters.php +++ b/examples/filters.php @@ -11,7 +11,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2024 AzuyaLabs + * Copyright (c) 2015 - 2025 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/phpinsights.php b/phpinsights.php index 9dbda25a8..d16976b1f 100644 --- a/phpinsights.php +++ b/phpinsights.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2024 AzuyaLabs + * Copyright (c) 2015 - 2025 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 62403f3bd..6b1ffb198 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ Features" }, { message = "^fix", group = "Fixes" }, { message = "^refactor", group = "Refactor" }, @@ -94,28 +121,28 @@ commit_parsers = [ { message = "^style", group = "Code Style" }, { message = "^test", group = "Testing" }, { message = "^chore|^ci|^build", group = "Other" }, - - # skip merge commits - { message = "^[Mm]erge", skip = true }, ] -# protect breaking changes from being skipped due to matching a skipping commit_parser +# Prevent commits that are breaking from being excluded by commit parsers. protect_breaking_commits = false -# filter out the commits that are not matched by commit parsers +# Exclude commits that are not matched by any commit parser. filter_commits = true -# regex for matching git tags +# Regex to select git tags that represent releases. tag_pattern = "[0-9].*" -# regex for skipping tags +# Regex to select git tags that do not represent proper releases. +# Takes precedence over `tag_pattern`. +# Changes belonging to these releases will be included in the next release. skip_tags = "beta|alpha" -# regex for ignoring tags +# Regex to exclude git tags after applying the tag_pattern. ignore_tags = "" -# sort the tags topologically -topo_order = true +# Order releases topologically instead of chronologically. +topo_order = false -# sort the commits inside sections by oldest/newest order +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest sort_commits = "newest" From c747552d74e36643ed23a784106289c7b5cfcb88 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Jun 2025 20:06:36 +0900 Subject: [PATCH 618/687] build: bump composer package versions to latest installed versions Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1f953e0f0..ce7f9b129 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "phpstan/phpstan": "^2.1", "phpstan/phpstan-deprecation-rules": "^2.0", "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^6.10" + "vimeo/psalm": "^6.12" }, "suggest": { "ext-calendar": "For calculating the date of Easter" From 46250725aeca3370ef069ec7915c417b716d6420 Mon Sep 17 00:00:00 2001 From: Mateus Ribeiro Bossa Date: Tue, 8 Jul 2025 11:47:36 -0300 Subject: [PATCH 619/687] fix(brazil): add passing $this->locale for calculateProclamationOfRepublicDay() (#376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, the holiday's name won't be translated. All other calculateHoliday() methods properly provide this argument, thus being translated. If you try this code: ```php $holiday = Yasumi::create(Brazil::class, 2025, 'pt_BR'); $this->assertEquals( 'Dia da Proclamação da República', $holiday->getHoliday(self::HOLIDAY)->getName() ); ``` It'll fail. Signed-off-by: Mateus Ribeiro Bossa --- src/Yasumi/Provider/Brazil.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 92b835a65..a4e38ec03 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -89,6 +89,7 @@ protected function calculateProclamationOfRepublicDay(): void 'proclamationOfRepublicDay', ['pt' => 'Dia da Proclamação da República'], new \DateTime("{$this->year}-11-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale )); } } From 1fdabfd02f975dec98ba0885bd54a37dff59b7ec Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 13 Jul 2025 23:09:24 +0900 Subject: [PATCH 620/687] chore(changelog): limit the number of commits Limit the number of commits to be processed in order to keep the changelog manageable. Signed-off-by: Sacha Telgenhof --- cliff.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cliff.toml b/cliff.toml index f9f46d8a2..1581f1afb 100644 --- a/cliff.toml +++ b/cliff.toml @@ -11,6 +11,9 @@ repo = "yasumi" [changelog] +# limit the number of commits processed to keep changelog manageable +limit_commits = 200 + header = """ # Changelog\n All notable changes to this project will be documented in this file. From 8a66777670e961f8c85281f5fe6b93b4a49bf56f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 13 Jul 2025 23:18:00 +0900 Subject: [PATCH 621/687] chore(changelog): add changelog archive With the use of git-cliff and conventional commits going forward, automatically generating a changelog for past versions deemed quite a challenge. Thus opted to keep these in a separate 'archived' file, while newer releases will be documented in the usual CHANGELOG.md file. Signed-off-by: Sacha Telgenhof --- CHANGELOG-ARCHIVE.md | 816 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 816 insertions(+) create mode 100644 CHANGELOG-ARCHIVE.md diff --git a/CHANGELOG-ARCHIVE.md b/CHANGELOG-ARCHIVE.md new file mode 100644 index 000000000..79e22c986 --- /dev/null +++ b/CHANGELOG-ARCHIVE.md @@ -0,0 +1,816 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Changes related to the business logic of the holidays or their providers are listed first, followed by any technical or architectural +changes. + +## [2.7.0] - 2024-01-02 + +### Added + +- Mexico Provider [\#329](https://github.com/azuyalabs/yasumi/pull/329) ([Luis Gonzalez](https://github.com/gogl92)). +- From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). + [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) +- For the German state of Mecklenburg-Western Pomerania, International Women's Day is considered to be officially + observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](https://github.com/ihmels)) +- Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day + and Christmas Day. + [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- Extra checks in case date subtraction fails for some holiday providers. +- PHP 8.3 support for the unit test CI pipeline. [#328](https://github.com/azuyalabs/yasumi/pull/328) ([fezfez](https://github.com/fezfez)) +- Add code styling rules to have a space after the `NOT` operator and mark parameters with a default null value as nullable. + +### Changed + +- Refactor the rules for calculating holidays in South Korea based on the history of holiday changes. + ([#314](https://github.com/azuyalabs/yasumi/issues/314)) [barami](https://github.com/barams@gmail.com) +- Update links to related documentation in the South Korea provider's note and added links to conversion utilities. + [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- Optimize the method for the Emperor's birthday calculation in Japan. +- For Croatia, extract Day of Antifascist Struggle calculation to a private method and simplify Statehood Day calculation + to make it more concise. +- Simplify the conditions for the Coming of Age day (Japan) calculation. +- Simplify the calculation of Carnival in Argentina, Brazil and the Netherlands to reduce duplication. +- Avoid silent exceptions by throwing a new one from the previous exception. + +### Fixed + +- For South Korea, some of the past dates for Buddha's Day, Chuseok, Armed Forces Day + and United Nations Day were incorrectly calculated during for certain periods. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) +- The holiday `twoDaysLaterNewYearsDay` of South Korea has been removed from 1990, however the unit test for the name + and holiday type allowed the possible testing range to include the year 1990. +- New Years Day tests for South Korea were failing due to incorrect date checks. +- The Easter Date calculation resulted in wrong values for the year 2025, due to an incorrect rounding for the lunar + correction when the calendar extension is not used. [#326](https://github.com/azuyalabs/yasumi/pull/326) ([rChassat](https://github.com/rChassat)) + +### Removed + +- Denmark will abolish Great Prayer Day ('store bededag') from 2024. [#308](https://github.com/azuyalabs/yasumi/pull/308) ([c960657](https://github.com/c960657)) +- Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and + aren't true holidays in the context of Yasumi. Refer to this [discussion](https://github.com/azuyalabs/yasumi/discussions/321) + for further details and rationale. [#322](https://github.com/azuyalabs/yasumi/pull/322) +- PHP 7.4 support. +- The PHP [Infection](https://infection.github.io/) test package as it was hardly used. +- Unit tests from a Git export to reduce the export size. [#323](https://github.com/azuyalabs/yasumi/pull/323) ([fezfez](https://github.com/fezfez)) +- Checks for superfluous naming as we follow PER which supports such convention. +- MacOS from testing matrix as it returns errors (requires further investigation). + +## [2.6.0] - 2023-04-27 + +### Added + +- Bank holiday for King Charles III’s Coronation in the United Kingdom. [\#305](https://github.com/azuyalabs/yasumi/pull/305) ([Freshleaf Media](https://www.github.com/freshleafmedia)) +- Bank holiday for Queen Elizabeth II’s State Funeral on September 19, 2022, for the United Kingdom. [\#287](https://github.com/azuyalabs/yasumi/pull/287) ([Freshleaf Media](https://www.github.com/freshleafmedia)) +- National Day of Mourning for Australia. [\#288](https://github.com/azuyalabs/yasumi/pull/288) ([FuzzyWuzzyFraggle](https://www.github.com/FuzzyWuzzyFraggle)). +- In Japan, Marine Day was rescheduled to July 23 as the 2020 Tokyo Olympics took place. The rescheduled Marine Day for + 2021 was included, but not the original rescheduled day for 2020. +- Slovak translations for a couple of popular holidays. [\#298](https://github.com/azuyalabs/yasumi/pull/298) ([Jozef Grencik](https://www.github.com/jozefgrencik)) +- All examples as shown on the documentation site as a convenience to developers who like to have all information in a + single place. +- Included an `.editorconfig` file to maintain a consistent style for developers using different text editors. +- The `ext-intl` extension as a required extension. [\#306](https://github.com/azuyalabs/yasumi/pull/306) ([Freshleaf Media](https://www.github.com/freshleafmedia)) +- An exception is thrown in case the time stamp of the start and end date in the `dateTimeBetween` method can't be established. +- Checks in case getting transition details or a date interval subtraction fails. + +### Changed + +- Adjusted the visibility of the `calculateSummerWinterTime` method to `private` as it is an internal method and + shouldn't be accessible directly. +- Made the calculation for summer/winter time more defensive by adding a check that the timestamps are successfully created. +- Changed to use the `strtotime` function as `mktime` does not generate timestamps before 1970-01-01 (negative values), + which is needed to determine winter/summertime before that. +- Refactored summer and winter time tests for Denmark and The Netherlands by introducing a base class holding the domain + logic. +- Switched from `getShortName()` to `getName()` for the `ReflectionClass` created by the method `anotherTime()` in the + `AbstractProvider` class. Using `getShortName` could result in a `ProviderNotFoundException` for some custom holiday + providers, since the namespace is not fully qualified. This can happen, if you create a custom holiday provider. + [\#292](https://github.com/azuyalabs/yasumi/pull/292) ([SupraSmooth](https://github.com/SupraSmooth)). +- Replaced the use of the `DateTime` class with `DateTimeInterface` (always use interface where possible). +- Use the preferred/idiomatic way of getting an immutable date from a mutable one. Added extra checks if modifying date + methods are not successful. +- Split functions that generate random dates/years into a new trait to slim down the overgrown base trait. +- Code styling fixes and improvements. +- Upgraded dependencies to latest working versions. +- Improved and cleaned up numerous unit tests. + +### Fixed + +- Liberation Day for The Netherlands is only an official holiday every 5 years [\#280](https://github.com/azuyalabs/yasumi/pull/280) ([Daan Roet](https://github.com/droet)). +- Pentecost Monday in France was only recognized as an official holiday until 2004. Since 2004, it is considered a + special holiday, a so called 'working holiday'. Hence, it is therefore classified as an observed holiday in Yasumi + from 2004 and forward. [\#281](https://github.com/azuyalabs/yasumi/issues/281). +- The holiday of Epiphany (6th of January) was incorrectly categorized as `other` and changed to an official holiday in + Baden-Württemberg, Bavaria and SaxonyAnhalt. [\#296](https://github.com/azuyalabs/yasumi/issues/296) ([Anna Damm](https://github.com/AnnaDamm)). +- The year 1988 was incorrectly omitted from observing the Emperor's birthday in Japan. +- The tests for Remembrance Day, Malvina's Day and National Sovereignty Day in Argentina were considered for all years; + however, these have only been celebrated since their establishment. +- Tests for New Year's Day, Spring Bank Holiday, and May Day Holiday in the United Kingdom (England, Wales, Northern + Ireland, and Scotland), as well as Battle of the Boyne in Northern Ireland, were considered for any calendar year; + however, these are celebrated only since a particular calendar year. +- In version 2022f of the `tz` db, a correction for 1947 was made for the summertime transition in Denmark to April + the 6th. Various corrections have been made to accommodate for change. +- The `ProviderInterface::getHolidays` has been re-added after it was erroneously removed. [\#277](https://github.com/azuyalabs/yasumi/pull/277) ([Jakub Wojtyra](https://github.com/jwojtyra-aterian)). +- Created the interface methods of the `ProviderInterface` that the abstract provider class implements. Since the return + type of the Yasumi factory methods is now `ProviderInterface`, those missing methods generated errors, especially by + static analysers. +- Changed the visibility of various class methods back to `protected`. The visibility was accidentally reduced during a clean-up + of code. This caused these methods not being accessible any more when extending a provider class. + +### Removed + +- The `count` method from the `ProviderInterface` as the `AbstractProvider` class already implements the Countable interface. +- Unused `InvalidDateException` class and other unused imported classes. +- `tests` folder from analysis by PHPStan (the large number of files makes the analysis needlessly long). +- Redundant checks for empty arrays and types. +- Mutation testing from GitHub Actions, as currently the outcome is not actively used. Running mutation tests locally + should be sufficient. + +## [2.5.0] - 2022-01-30 + +### Added + +- Argentina Provider [\#264](https://github.com/azuyalabs/yasumi/pull/264) ([Nader Safadi](https://github.com/nedSaf)). +- Turkey Provider [\#250](https://github.com/azuyalabs/yasumi/pull/250). +- World Children's Day for Thuringia (Germany) [\#260](https://github.com/azuyalabs/yasumi/issues/260). +- New National Day for Truth and Reconciliation to + Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)). +- New Juneteenth National Independence Day to + USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)). +- The Korea Tourism Organization's holiday guide link was added to the source of South Korea + Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). +- Mothering Day for the United Kingdom [\#266](https://github.com/azuyalabs/yasumi/issues/266). + +- All holiday providers now include a method that returns a list of external sources (i.e. references to websites, + books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. + +### Changed + +- Revised rules to calculate substitution holidays of South Korea to apply the newly enacted law on June 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). +- Separate `calculateSubstituteHolidays` method of South Korea Provider to `calculateSubstituteHolidays` + and `calculateOldSubstituteHolidays` + . [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) +- Refactored the tests of South Korea provider to testing substitution + holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). +- Moved the United Kingdom Spring Bank Holiday to June 2nd and added Platinum Jubilee bank holiday on June 3rd + for [\#270](https://github.com/azuyalabs/yasumi/issues/270) ([Dan](https://github.com/dch-dev)). + +- Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. +- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` + interface. +- Updated codebase using PHP7.4 syntax features. +- Upgraded PHP CS Fixer to v3. + +### Fixed + +- All Saints Day (German: 'AllerHeiligen') was classified as `Other` for states celebrating this day. This was + incorrect (or officially changed) and has been altered to `Official` + . [\#263](https://github.com/azuyalabs/yasumi/issues/263) +- Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was + incorrect (or officially changed) + and has been altered to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252). +- The test for the USA in that juneteenthDay was considered for all years: it is only celebrated since 2021. +- Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 + if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)). + +- Reverted the visibility of the `AbstractProvider->getHolidaDates()` method as it incorrectly was set to `protectecd`. + +### Removed + +- PHP7.3 Support as it is End of Life. + +## [2.4.0] - 2021-05-09 + +### Added + +- Georgia + Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) +- Pentecost (Sunday) to + Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) + +- PHP8 Support [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) +- Infection PHP to perform mutation testing. +- PHPStan to the dependencies allowing for local analysis. +- `.gitattributes` file to reduce the size of a release + package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) + +### Changed + +- Rescheduled exceptional Japanese holidays for Olympic Games 2020 after + COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) +- Some improvements/refactoring of the Swiss holiday providers (including source + references) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) + +- Allow the `WEEKEND_DATA` constant in provider classes to be + overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) +- Upgraded PHPUnit's XML configuration. +- Refactored removing the magic numbers for the lower and upper limits of the calendar year. +- Reformatted code using new/updated Code Styling rules. +- Hardened error handling of json functions. +- Updated Copyright year. + +### Fixed + +- The test for North West Territories (Canada) in that the National Indigenous Peoples Day was considered for all years: + it is only celebrated since 1996. +- The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated + since 2015. +- The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009. +- The test for Marine Day (Japan) as the rescheduled day was moved to 2021 (due to the COVID-19 pandemic). +- Typo for Estonian Day of Restoration of + Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) + +- The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. +- Incorrect invocation of `Fribourg::calculateBerchtoldsTag()` and `Fribourg::calculateDecember26th` (Switzerland) +- Use proper parameter and return type hinting +- Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. +- Some static functions were used as if they are object functions. + +### Removed + +- Travis/StyleCI/Scrutinizer services replaced by GitHub Actions. +- PHP 7.2 Support (PHP 7.2 is EOL) +- Faker library as it has been + sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) +- Native function invocations. +- Various undefined class references, unused imports, etc. +- Unnecessary curly braces in strings, `continue` keyword in while loops, typecasting. + +## [2.3.0] - 2020-06-22 + +### Added + +- Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) +- Added Luxembourg + Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) +- Holiday providers for states of + Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) +- Added All Souls Day to + Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) ([norkunas](https://github.com/norkunas)) +- Catholic Christmas Day is a new official holiday since 2017 in the + Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Additional Dates for Australia/Victoria:AFL Grand Final + Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) +- Substituted holidays (holidays that fall in the weekend) for + Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) +- Added New Years Eve to + Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) ([Patrick-Root](https://github.com/Patrick-Root)) +- Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). +- Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and + Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) +- Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) +- Added French translation for Second Christmas + Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) + +- Added accessor methods Holiday::getKey() and SubstituteHoliday:: + getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220)+[\#221](https://github.com/azuyalabs/yasumi/pull/221) ([c960657](https://github.com/c960657)) +- Added missing return (correct) and parameter types in various methods. + +### Changed + +- Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday + Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) +- Statehood Day is celebrated at a new date since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Independence Day is no longer an official holiday since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian + Defenders" since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official + holiday since 2020 in + Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) +- Second International Workers' Day in Ukraine was an official holiday only until 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Holiday names in Danish, Dutch, and Norwegian are no longer + capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) + +- Changed the fallback from DEFAULT_LANGUAGE to ' + en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) +- Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated + DateTimezone, thus saving + resources. [\#213](https://github.com/azuyalabs/yasumi/pull/213) ([pvgnd](https://github.com/pvgn)) +- Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) +- Explicitly set nullable parameters as such. +- Refactored various conditional structures. +- Changed signature of some methods as parameters with defaults should come after required parameters. +- Updated third party dependencies. + +### Fixed + +- Fixed Ukraine holidays on weekends. These days need to be + substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) +- Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi + instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) +- Fix locale fallback for substitute + holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) +- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi + instance) + +- Fixed compound conditions that are always true by simplifying the condition steps. + +### Deprecated + +- Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor + of accessor methods [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) + +### Removed + +- PHP 7.1 Support, as it has reached its end of life. +- Removed the assertion of the instance type in some functions as it is already defined by the return type. +- Removed unused variables, namespaces, brackets, empty tests, etc. + +## [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)) +- 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 the 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)) +- Created a 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. + +### 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)) +- 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)) +- 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. +- 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 is 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)) +- 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) ([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)) +- 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. + +## [2.1.0] - 2019-03-29 + +### Added + +- As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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/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 + +- 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 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 + +- Upgraded entirely to PHP version 7 with PHP 7.1 being the minimum required version. Base code and all unit tests have + been reworked to compatibility with PHP 7. +- Upgraded to PHPUnit to version 7.5. +- Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports + Day. [\#113](https://github.com/azuyalabs/yasumi/pull/113) ([cookie-maker](https://github.com/cookie-maker)) +- Summer/winter time is now fetched from PHP's tz + database. [\#103](https://github.com/azuyalabs/yasumi/pull/103) ([c960657](https://github.com/c960657)) +- Changed translation for Norway's national + day. [\#98](https://github.com/azuyalabs/yasumi/pull/98) ([c960657](https://github.com/c960657)) +- Applied proper null checks in the summer time and wintertime calculations for Denmark and The Netherlands. +- Corrected some namespaces for Australia and Germany. +- Updated copyright year. +- Upgraded various dependency packages. +- Internal locale list updated based on CLDR v34. +- Refactored the Japan and USA Holiday Provider by moving the holiday calculations to private methods. This reduced the + complexity of the initialize method. +- Changed individual added International Women's Day for Ukraine and Russia to common + holiday. [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) + +### Fixed + +- Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place. +- Fixed issue for summertime in Denmark in 1980. By default, summertime in Denmark is set for the last day of March + since 1980, however in 1980 itself, it started on April, 6th. +- Fixed spelling issue in the Swedish + translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) +- Fixed spelling issues in the Danish + translation. [\#96](https://github.com/azuyalabs/yasumi/pull/96) ([c960657](https://github.com/c960657)) +- Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg) + . [\#100](https://github.com/azuyalabs/yasumi/pull/100) ([TalonTR](https://github.com/TalonTR)) +- Fixed BetweenFilter to ignore time part and + timezone. [\#101](https://github.com/azuyalabs/yasumi/pull/101) ([c960657](https://github.com/c960657)) +- Fixed bug in provider list generation related to variable order of files returned by the + filesystem [\#107](https://github.com/azuyalabs/yasumi/pull/107) ([leafnode](https://github.com/leafnode)) + +### Removed + +## [1.8.0] - 2018-02-21 + +### Added + +- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This + function can be helpful in cases where an existing holiday provider class can be extended, but some holidays are not + part of the original (extended) provider. +- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and + objects of the DateTimeImmutable type. +- Added support for countries where the weekend definition (start and end day) differs from the global definition ( + Saturday and Sunday). +- Holiday Provider for + Russia. [\#72](https://github.com/azuyalabs/yasumi/pull/72) ([lukosius](https://github.com/lukosius)) +- Holiday Provider for + Estonia. [\#71](https://github.com/azuyalabs/yasumi/pull/71) ([lukosius](https://github.com/lukosius)) +- Added Scrutinizer integration. + +### Changed + +- Locale List updated based on CLDR version 32. +- Added PHPStan static analysis tool to Travis + CI [\#88](https://github.com/azuyalabs/yasumi/pull/88) ([lukosius](https://github.com/lukosius)) +- Various inline documentation + enhancements. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) +- Removed unnecessary typecasts and + if-construct. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) +- Updated inline documentation to include correction Exception throws. +- Removed unnecessary NULL checks. + +### Fixed + +- Fixed Brazilian Carnival Day and added Ash Wednesday to Brazilian + Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) +- Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix + made that recognizes Easter Sunday as being observed (in all regions) + . [\#86](https://github.com/azuyalabs/yasumi/pull/86) ([Bastian Konetzny](https://github.com/bkonetzny)) +- Corrected reference to the Holiday Provider's ID to be static. +- Changed weekend data property into constant as it is not dynamic (runtime). +- Corrected the name translation test for the Restoration of Independence Day (Portugal). The test didn't account for + the fact that this holiday was abolished and reinstated at some time. +- Corrected unit test for Geneva (Switzerland) as the jeune Genevois day was incorrectly asserted as a regional holiday. +- Corrected the count logic so that in case a holiday is substituted (or observed), it is only counted once. +- Dropped unnecessary arguments of some methods in various Holiday Providers. +- Corrected Japanese "Green Day" and "Children's Day" to use "Hiragana" instead of + Kanji. [\#80](https://github.com/azuyalabs/yasumi/pull/80) ([cookie-maker](https://github.com/cookie-maker)) + +## [1.7.0] - 2017-12-11 + +### Added + +- 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)) +- Missing translations (de_DE) for Easter Sunday and + Whitsunday. [\#60](https://github.com/azuyalabs/yasumi/pull/60) ([IceShack](https://github.com/IceShack)) +- Holiday Provider for + Hungary. [\#57](https://github.com/azuyalabs/yasumi/pull/57) ([AronNovak](https://github.com/AronNovak)) +- Holiday Provider for + Switzerland. [\#56](https://github.com/azuyalabs/yasumi/pull/56) ([qligier](https://github.com/qligier)) + +### Changed + +- Made `calculate` method public and use of proper camel + casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) +- Upgraded Faker Library to version 1.7 +- Renamed the holiday type NATIONAL to OFFICIAL. Sub-regions may have official holidays, and the name NATIONAL doesn't + suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) +- Upgraded PHP-CS-Fixer to version 2.6 + +### Fixed + +- Corrected Geneva (Switzerland) unit test to ensure some holidays that are established at a particular year are handled + as such. +- Repentance Day is an official holiday in Saxony (Germany) [\#63](https://github.com/azuyalabs/yasumi/issues/63) +- Corrected the Easter Sunday translation for Austria (de_AT) [\#66](https://github.com/azuyalabs/yasumi/issues/66) +- Corrected Hungary unit test to ensure holidays that are established at a particular year are handled as such. +- Added missing Summer Bank Holiday for the United Kingdom. [\#64](https://github.com/azuyalabs/yasumi/issues/64) + +## [1.6.1] - 2017-02-07 + +### Added + +- Added missing unit tests for Reformation Day as in 2017 it is celebrated in all German states for its 500th + anniversary. +- Added missing unit tests for the German Unit Day for each German state. +- Created fallback calculation of the easter_days function in case the PHP extension 'calendar' is not + loaded. [\#55](https://github.com/azuyalabs/yasumi/pull/55) ([stelgenhof](https://github.com/stelgenhof)) + +### Changed + +- Moved Reformation Day to Christian Holidays as it is not only celebrated in Germany. +- Changed Travis configuration to use Composer-installed phpunit to avoid if any issues arise with globally installed + phpunit. + +### Fixed + +- Fixed Christmas Day and Boxing Day for the United Kingdom. A substitute bank holiday is now created for both Christmas + and Boxing Day when either of those days fall on a + weekend. [\#48](https://github.com/azuyalabs/yasumi/issues/48) ([joshuabaker](https://github.com/joshuabaker)) +- Renamed 'en_US' translation for the Second Christmas Day (from ‘Boxing Day’ to ‘Second Christmas Day’: Boxing Day + concept does not exist in the US) + . [\#53](https://github.com/azuyalabs/yasumi/pull/53) ([AngelinCalu](https://github.com/AngelinCalu)) + +## [1.6.0] - 2017-01-06 + +### Added + +- Added Holiday Provider for + Romania. [\#52](https://github.com/azuyalabs/yasumi/pull/52) ([AngelinCalu](https://github.com/AngelinCalu)) +- Added Holiday Provider for Ireland. [stelgenhof](https://github.com/stelgenhof) +- Added Holiday Provider for South Africa. [stelgenhof](https://github.com/stelgenhof) +- Added Holiday Provider for Austria. [stelgenhof](https://github.com/stelgenhof) +- Added 'en_US' translations for the Polish Independence Day and Constitution + Day. [\#45](https://github.com/azuyalabs/yasumi/pull/45) ([AngelinCalu](https://github.com/AngelinCalu)) + +### Changed + +- Refactored the calculation of Orthodox Easter using the function from + ChristianHolidays.php. [\#47](https://github.com/azuyalabs/yasumi/pull/47) ([AngelinCalu](https://github.com/AngelinCalu)) + +### Fixed + +- The parameters of the `isHoliday` and `isWorkingDay` methods now allow for classes that derive from DateTime (like the + very popular Carbon class) + . [\#49](https://github.com/azuyalabs/yasumi/issues/49) ([stelgenhof](https://github.com/stelgenhof)) + +## [1.5.0] - 2016-11-25 + +### Added + +- Added Holiday Provider for Australia (and the sub-region of Victoria) + . [\#38](https://github.com/azuyalabs/yasumi/pull/38) ([brucealdridge](https://github.com/brucealdridge)) +- You can now also use your own holiday providers in addition to the included holiday providers. A very helpful + improvement if Yasumi does not include your provider (yet), but you want to use + yours! [\#29](https://github.com/azuyalabs/yasumi/pull/29) ([navarr](https://github.com/navarr)) +- Added Holiday Provider for + Portugal. [\#44](https://github.com/azuyalabs/yasumi/pull/44) ([rvelhote](https://github.com/rvelhote)) +- Added Holiday Provider for + Ukraine. [\#41](https://github.com/azuyalabs/yasumi/pull/41) ([madmis](https://github.com/madmis)) +- Possibility to retrieve the next or previous working day within a defined number of days from + today [\#39](https://github.com/azuyalabs/yasumi/pull/39) ([brucealdridge](https://github.com/brucealdridge)) +- Added Holiday Providers for all 16 German + States. [\#34](https://github.com/azuyalabs/yasumi/pull/34) ([stelgenhof](https://github.com/stelgenhof)) +- Added Holiday Provider for + Croatia. [\#32](https://github.com/azuyalabs/yasumi/pull/32) ([karlomikus](https://github.com/karlomikus)) + +### Fixed + +- Carnival Day in Brazil was incorrectly set to be 47 days after Easter. Carnival Day begins Friday before Ash + Wednesday (51 days to Easter) + . [\#36](https://github.com/azuyalabs/yasumi/pull/36) ([icaroce](https://github.com/icaroce)) +- All Saints Day for Finland was incorrectly set for November 1st. The correct date is Saturday between 31 Oct and 6 + Nov, similar to + Sweden. [\#43](https://github.com/azuyalabs/yasumi/issues/43) ([stelgenhof](https://github.com/stelgenhof)) + +## [1.4.0] - 2016-06-04 + +### Added + +- Added Holiday Provider for + Brazil. [\#21](https://github.com/azuyalabs/yasumi/pull/21) ([dorianneto](https://github.com/dorianneto)) +- Added Holiday Provider for the Czech + Republic. [\#26](https://github.com/azuyalabs/yasumi/pull/26) ([dfridrich](https://github.com/dfridrich)) +- Added Holiday Provider for the United + Kingdom. [\#23](https://github.com/azuyalabs/yasumi/pull/23) ([stelgenhof](https://github.com/stelgenhof)) +- Add Welsh language (spoken in Wales, UK) translations for the holidays in the United + Kingdom [\#25](https://github.com/azuyalabs/yasumi/pull/25) ([meigwilym](https://github.com/meigwilym)) +- To determine a set of holidays between two dates you can now use the aptly named 'between()' method. + +### Changed + +- All Holiday Provider must now implement a code that will identify it. Typically, this is the ISO3166 code + corresponding to the respective country or sub-region. This can help for purposes such as translations or interfacing + with other API's for example. + +### Fixed + +- Fixed an issue with the unit test for the 'getProviders' method failing on Windows. Hardcoded unix-style directory + separators have been replaced by + DIRECTORY_SEPARATOR. [\#30](https://github.com/azuyalabs/yasumi/pull/30) ([navarr](https://github.com/navarr)) +- Corrected a typo in the English translation for 敬老の日 ( + Japan) [\#22](https://github.com/azuyalabs/yasumi/pull/22) ([navarr](https://github.com/navarr)) +- Fixed issue that the unit tests in 'YasumiTest' (methods 'next' and 'previous') did not cover the situations that the + limits are exceeded. [\#28](https://github.com/azuyalabs/yasumi/issues/28) + +## [1.3.0] - 2016-05-02 + +### Added + +- Added Holiday Provider for + Poland. [\#18](https://github.com/azuyalabs/yasumi/pull/18) ([mpdx](https://github.com/mpdx)) +- Added Holiday Provider for New + Zealand. [\#13](https://github.com/azuyalabs/yasumi/pull/13) ([badams](https://github.com/badams)) +- Added Holiday Provider for + Greece. [\#10](https://github.com/azuyalabs/yasumi/pull/10) ([sebdesign](https://github.com/sebdesign)) +- Added Holiday Provider for + Germany. [\#9](https://github.com/azuyalabs/yasumi/pull/9) ([eaglefsd](https://github.com/eaglefsd)) +- Added translations (`fr_FR`, `fr_BE`) for Belgium National + day [\#864d250](https://github.com/azuyalabs/yasumi/commit/864d25097abbeedbee15bcc37702a34c36a5b696) ([R2c](https://github.com/R2c)) +- Added missing English (`en_US`) translations for the Christian holidays 'Immaculate Conception', 'Maundy Thursday', + 'St. Georges Day', 'St. John's Day', 'St. Josephs Day' and 'St. Stephens Day'. +- Added Test Interface class to ensure the unit tests contain a some minimal assertions. + +### Changed + +- Sorted all translations in the translation files alphabetically (descending). +- Refactoring and cleanup of all unit tests. + +### Fixed + +- Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However, the holiday has always + been celebrated on a Saturday (between October 31 and November 6th). +- Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) + regions [\#5879133](https://github.com/azuyalabs/yasumi/commit/58791330ccf5c13b1626885921534c32866b7faf) ([R2c](https://github.com/R2c)) +- Fixed issue that it was possible for the AbstractProvider class to be loaded as a Holiday + Provider [\#9678bc4](https://github.com/azuyalabs/yasumi/commit/9678bc490e34980404ad5dc5b3d45a3c76a3ca0f) ([R2c](https://github.com/R2c)) +- Corrected incorrect pathname reference \*BaseTestCase.php files ("Test" -> "test). +- Fixed issue for France as Good Friday and St. Stephens Day were defined as official holidays. These aren't national + holidays and are only observed in the French departments Moselle, Bas-Rhin and Haut-Rhin. With this fix, these + holidays have been removed from the France Holiday providers and new providers for the departments Moselle, Bas-Rhin + and Haut-Rhin are added. [\#17](https://github.com/azuyalabs/yasumi/issues/17) ([R2c](https://github.com/R2c)) +- Updated locales list based on CLDR version 29. Removed locales of which the region identifier is not specified. +- Fixed issue for Sweden as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, the + holiday has always been celebrated on a Saturday (between June 20 and June 26). +- Fixed base test for some Spain/LaRioja as some holidays have been established only in a particular year, causing false + failures in the unit tests. +- Running php-cs-fixer fix . --level=psr2 generated a massive list of changes, and broke unit tests. Added a custom + .php_cs config file to adhere to the PSR-2 Coding Standards and resolve this issue. In addition, the php-cs-fixer + command has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be PSR2 + compliant before they can be merged. If any files do not pass, the build + fails. [\#15](https://github.com/azuyalabs/yasumi/issues/15) [\#16](https://github.com/azuyalabs/yasumi/pull/16) ([badams](https://github.com/badams)) +- Accidentally the timezone for Norway was set to "Europe/Copenhagen". This has been corrected to "Europe/Oslo" + . [\#11](https://github.com/azuyalabs/yasumi/issues/11) [\#12](https://github.com/azuyalabs/yasumi/pull/12) ([badams](https://github.com/badams)) +- Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, since + 1955, the holiday has always been celebrated on a Saturday (between June 20 and June 26). + +## [1.2.0] - 2016-04-04 + +### Added + +- Added Holiday Provider for Denmark +- Added Holiday Provider for Norway +- Added Holiday Provider for Sweden +- Added Holiday Provider for Finland +- New function 'isWorkingDay' added that determines whether a date represents a working day or not. A working day is a + date that is neither a holiday nor falls into the weekend. + +### Changed + +- Refactoring and cleanup of unit tests + +### Fixed + +- The Vernal Equinox Day and Autumnal Equinox Day in Japan were excluded from having it substituted for another day in + case these days would fall on the weekend. +- Fixed tests for some holiday providers as some holidays have been established only in a particular year, causing false + failures in the unit tests. + +## [1.1.0] - 2016-03-10 + +### Added + +- Added Spain Holiday Provider (including the autonomous communities Andalusia, Aragon, Asturias, Balearic Islands, + Basque Country, Canary Islands, Cantabria, Castile and León, Castilla-La Mancha, Ceuta, Community of Madrid, + Extremadura, Galicia, La Rioja, Melilla, Navarre, Region of Murcia, Valencian Community) +- Added Corpus Christi, St. Joseph's Day, Maundy Thursday, St. George's Day, St. John's Day to the common Christian + Holidays. +- Created separate tests for holidays that are substituted on different days. +- Allow for namespaced holiday providers. +- Added test for translation of Ash Wednesday and Valentine's Day in the Netherlands. +- Added test to check whether all holidays for a Holiday Provider are defined by the respective provider class. + +### Changed + +- Updated some English, Italian, French and Dutch translations. +- Moved all other holiday calculations in the Netherlands and France to individual methods. + +### Fixed + +- For Japan substituted holidays had the same date as the original holidays. + +### Removed + +- Removed support for PHP 5.4. The minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still + allowed to fail. + +## [1.0.0] - 2015-04-21 + +- Initial Release + +[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.7.0...HEAD +[2.7.0]: https://github.com/azuyalabs/yasumi/compare/2.6.0...2.7.0 +[2.6.0]: https://github.com/azuyalabs/yasumi/compare/2.5.0...2.6.0 +[2.5.0]: https://github.com/azuyalabs/yasumi/compare/2.4.0...2.5.0 +[2.4.0]: https://github.com/azuyalabs/yasumi/compare/2.3.0...2.4.0 +[2.3.0]: https://github.com/azuyalabs/yasumi/compare/2.2.0...2.3.0 +[2.2.0]: https://github.com/azuyalabs/yasumi/compare/2.1.0...2.2.0 +[2.1.0]: https://github.com/azuyalabs/yasumi/compare/2.0.0...2.1.0 +[2.0.0]: https://github.com/azuyalabs/yasumi/compare/1.8.0...2.0.0 +[1.8.0]: https://github.com/azuyalabs/yasumi/compare/1.7.0...1.8.0 +[1.7.0]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.7.0 +[1.6.1]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.6.0 +[1.6.0]: https://github.com/azuyalabs/yasumi/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/azuyalabs/yasumi/compare/1.4.0...1.5.0 +[1.4.0]: https://github.com/azuyalabs/yasumi/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/azuyalabs/yasumi/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/azuyalabs/yasumi/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/azuyalabs/yasumi/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/azuyalabs/yasumi/releases/tag/1.0.0 From 882d04783781ddfb556cfaf2bbebd953f8993ce4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 13 Jul 2025 23:32:05 +0900 Subject: [PATCH 622/687] chore(changelog): include git-cliff ignore file Signed-off-by: Sacha Telgenhof --- .cliffignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .cliffignore diff --git a/.cliffignore b/.cliffignore new file mode 100644 index 000000000..882753204 --- /dev/null +++ b/.cliffignore @@ -0,0 +1,5 @@ +# skip commits by their SHA1 + +# 2.8.0 release +074fe08b5e48cea705943f5d77d0fc8956aa3be8 +4049db27e2dc197865aa857531d6baaa4e76be04 From cc07874da062070fdc201a4297a7724f7d6aafb2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 14 Jul 2025 00:40:05 +0900 Subject: [PATCH 623/687] chore(release): prepare for 2.8.0 --- CHANGELOG.md | 1011 ++++++++------------------------------------------ 1 file changed, 151 insertions(+), 860 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cf7743ec..6754c1230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,869 +2,160 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -Changes related to the business logic of the holidays or their providers are listed first, followed by any technical or architectural -changes. - -## [Unreleased] - -### Added - -- Black Consciousness Day ('Dia Nacional de Zumbi e da Consciência Negra') is public holiday in Brazil. [\#365](https://github.com/azuyalabs/yasumi/pull/365) ([c960657](https://github.com/c960657)) -- Mother's Day and Father's Day are public holidays in Lithuania. [\#370](https://github.com/azuyalabs/yasumi/pull/370) ([c960657](https://github.com/c960657)) -- Christmas Eve is a public holiday in Poland from 2025. [\#371](https://github.com/azuyalabs/yasumi/pull/371) ([c960657](https://github.com/c960657)) -- Saint Brigid's Day is a public holiday in Ireland since 2023. [\#374](https://github.com/azuyalabs/yasumi/pull/374) ([c960657](https://github.com/c960657)) -- Pentecost and Mother's Day are public holidays in Latvia. [\#368](https://github.com/azuyalabs/yasumi/pull/368) ([c960657](https://github.com/c960657)) - -### Changed - -- Holiday calculation methods in providers are now protected instead of private - to allow use in [custom providers](https://www.yasumi.dev/docs/cookbook/custom_provider/). - [\#331](https://github.com/azuyalabs/yasumi/issues/331) -- For Mexico, add the Day of Transmission of Federal Executive Power in election years. [\#361](https://github.com/azuyalabs/yasumi/pull/361) ([c960657](https://github.com/c960657)) -- For Mexico, Constitution Day, Benito Juárez’s birthday, and Revolution Day are considered official holidays. [\#359](https://github.com/azuyalabs/yasumi/pull/359) ([c960657](https://github.com/c960657)) -- For Argentina, Carneval Monday and Tuesday, and Good Friday are considered official holidays. [\#360](https://github.com/azuyalabs/yasumi/pull/360) ([c960657](https://github.com/c960657)) -- For the Czech Republic, Christmas Eve is considered an official holiday. [\#366](https://github.com/azuyalabs/yasumi/pull/366) ([c960657](https://github.com/c960657)) -- For Mexico, several holidays are not considered official holidays. [\#362](https://github.com/azuyalabs/yasumi/pull/362) ([c960657](https://github.com/c960657)) -- For Portual, Corpus Christi is considered an official holiday. [\#363](https://github.com/azuyalabs/yasumi/pull/363) ([c960657](https://github.com/c960657)) -- For Ireland, Easter Sunday is not an official holiday. [\#373](https://github.com/azuyalabs/yasumi/pull/373) ([c960657](https://github.com/c960657)) -- For Argentina, four holidays are movable. [\#367](https://github.com/azuyalabs/yasumi/pull/367) ([c960657](https://github.com/c960657)) -- For Ukraine, Victory Day, Day of Ukrainian Statehood, Day of Defenders of Ukraine changed dates in 2023. [\#369](https://github.com/azuyalabs/yasumi/pull/369) ([c960657](https://github.com/c960657)) - -### Fixed -- For Ireland, New Year's Day has same substitute holidays rules as other holidays. [\#375](https://github.com/azuyalabs/yasumi/pull/375) ([c960657](https://github.com/c960657)) -- For United Kingdom, Easter Monday is not a bank holiday in Scotland. [\#372](https://github.com/azuyalabs/yasumi/pull/372) ([c960657](https://github.com/c960657)) - -### Removed -- For Ukraine, Orthodox Christmas was abolished in 2023. [\#369](https://github.com/azuyalabs/yasumi/pull/369) ([c960657](https://github.com/c960657)) - -## [2.7.0] - 2024-01-02 - -### Added - -- Mexico Provider [\#329](https://github.com/azuyalabs/yasumi/pull/329) ([Luis Gonzalez](https://github.com/gogl92)). -- From 2024, Romania will officially include the holidays of St. Johns ('Sfântul Ioan Botezătorul') and Epiphany ('Bobotează'). - [#310](https://github.com/azuyalabs/yasumi/pull/310) ([AngelinCalu](https://github.com/AngelinCalu) ) -- For the German state of Mecklenburg-Western Pomerania, International Women's Day is considered to be officially - observed. [#311](https://github.com/azuyalabs/yasumi/pull/311) ([ihmels](https://github.com/ihmels)) -- Recently, the South Korean government announced a bill to apply alternative public holidays to Buddha's Day - and Christmas Day. - [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) -- Extra checks in case date subtraction fails for some holiday providers. -- PHP 8.3 support for the unit test CI pipeline. [#328](https://github.com/azuyalabs/yasumi/pull/328) ([fezfez](https://github.com/fezfez)) -- Add code styling rules to have a space after the `NOT` operator and mark parameters with a default null value as nullable. - -### Changed - -- Refactor the rules for calculating holidays in South Korea based on the history of holiday changes. - ([#314](https://github.com/azuyalabs/yasumi/issues/314)) [barami](https://github.com/barams@gmail.com) -- Update links to related documentation in the South Korea provider's note and added links to conversion utilities. - [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) -- Optimize the method for the Emperor's birthday calculation in Japan. -- For Croatia, extract Day of Antifascist Struggle calculation to a private method and simplify Statehood Day calculation - to make it more concise. -- Simplify the conditions for the Coming of Age day (Japan) calculation. -- Simplify the calculation of Carnival in Argentina, Brazil and the Netherlands to reduce duplication. -- Avoid silent exceptions by throwing a new one from the previous exception. - -### Fixed - -- For South Korea, some of the past dates for Buddha's Day, Chuseok, Armed Forces Day - and United Nations Day were incorrectly calculated during for certain periods. [\#314](https://github.com/azuyalabs/yasumi/pull/314) ([barami](https://github.com/barami)) -- The holiday `twoDaysLaterNewYearsDay` of South Korea has been removed from 1990, however the unit test for the name - and holiday type allowed the possible testing range to include the year 1990. -- New Years Day tests for South Korea were failing due to incorrect date checks. -- The Easter Date calculation resulted in wrong values for the year 2025, due to an incorrect rounding for the lunar - correction when the calendar extension is not used. [#326](https://github.com/azuyalabs/yasumi/pull/326) ([rChassat](https://github.com/rChassat)) - -### Removed - -- Denmark will abolish Great Prayer Day ('store bededag') from 2024. [#308](https://github.com/azuyalabs/yasumi/pull/308) ([c960657](https://github.com/c960657)) -- Summertime and Wintertime in the Netherlands and Denmark as these can't be reliably established for historical dates and - aren't true holidays in the context of Yasumi. Refer to this [discussion](https://github.com/azuyalabs/yasumi/discussions/321) - for further details and rationale. [#322](https://github.com/azuyalabs/yasumi/pull/322) -- PHP 7.4 support. -- The PHP [Infection](https://infection.github.io/) test package as it was hardly used. -- Unit tests from a Git export to reduce the export size. [#323](https://github.com/azuyalabs/yasumi/pull/323) ([fezfez](https://github.com/fezfez)) -- Checks for superfluous naming as we follow PER which supports such convention. -- MacOS from testing matrix as it returns errors (requires further investigation). - -## [2.6.0] - 2023-04-27 - -### Added - -- Bank holiday for King Charles III’s Coronation in the United Kingdom. [\#305](https://github.com/azuyalabs/yasumi/pull/305) ([Freshleaf Media](https://www.github.com/freshleafmedia)) -- Bank holiday for Queen Elizabeth II’s State Funeral on September 19, 2022, for the United Kingdom. [\#287](https://github.com/azuyalabs/yasumi/pull/287) ([Freshleaf Media](https://www.github.com/freshleafmedia)) -- National Day of Mourning for Australia. [\#288](https://github.com/azuyalabs/yasumi/pull/288) ([FuzzyWuzzyFraggle](https://www.github.com/FuzzyWuzzyFraggle)). -- In Japan, Marine Day was rescheduled to July 23 as the 2020 Tokyo Olympics took place. The rescheduled Marine Day for - 2021 was included, but not the original rescheduled day for 2020. -- Slovak translations for a couple of popular holidays. [\#298](https://github.com/azuyalabs/yasumi/pull/298) ([Jozef Grencik](https://www.github.com/jozefgrencik)) -- All examples as shown on the documentation site as a convenience to developers who like to have all information in a - single place. -- Included an `.editorconfig` file to maintain a consistent style for developers using different text editors. -- The `ext-intl` extension as a required extension. [\#306](https://github.com/azuyalabs/yasumi/pull/306) ([Freshleaf Media](https://www.github.com/freshleafmedia)) -- An exception is thrown in case the time stamp of the start and end date in the `dateTimeBetween` method can't be established. -- Checks in case getting transition details or a date interval subtraction fails. - -### Changed - -- Adjusted the visibility of the `calculateSummerWinterTime` method to `private` as it is an internal method and - shouldn't be accessible directly. -- Made the calculation for summer/winter time more defensive by adding a check that the timestamps are successfully created. -- Changed to use the `strtotime` function as `mktime` does not generate timestamps before 1970-01-01 (negative values), - which is needed to determine winter/summertime before that. -- Refactored summer and winter time tests for Denmark and The Netherlands by introducing a base class holding the domain - logic. -- Switched from `getShortName()` to `getName()` for the `ReflectionClass` created by the method `anotherTime()` in the - `AbstractProvider` class. Using `getShortName` could result in a `ProviderNotFoundException` for some custom holiday - providers, since the namespace is not fully qualified. This can happen, if you create a custom holiday provider. - [\#292](https://github.com/azuyalabs/yasumi/pull/292) ([SupraSmooth](https://github.com/SupraSmooth)). -- Replaced the use of the `DateTime` class with `DateTimeInterface` (always use interface where possible). -- Use the preferred/idiomatic way of getting an immutable date from a mutable one. Added extra checks if modifying date - methods are not successful. -- Split functions that generate random dates/years into a new trait to slim down the overgrown base trait. -- Code styling fixes and improvements. -- Upgraded dependencies to latest working versions. -- Improved and cleaned up numerous unit tests. - -### Fixed - -- Liberation Day for The Netherlands is only an official holiday every 5 years [\#280](https://github.com/azuyalabs/yasumi/pull/280) ([Daan Roet](https://github.com/droet)). -- Pentecost Monday in France was only recognized as an official holiday until 2004. Since 2004, it is considered a - special holiday, a so called 'working holiday'. Hence, it is therefore classified as an observed holiday in Yasumi - from 2004 and forward. [\#281](https://github.com/azuyalabs/yasumi/issues/281). -- The holiday of Epiphany (6th of January) was incorrectly categorized as `other` and changed to an official holiday in - Baden-Württemberg, Bavaria and SaxonyAnhalt. [\#296](https://github.com/azuyalabs/yasumi/issues/296) ([Anna Damm](https://github.com/AnnaDamm)). -- The year 1988 was incorrectly omitted from observing the Emperor's birthday in Japan. -- The tests for Remembrance Day, Malvina's Day and National Sovereignty Day in Argentina were considered for all years; - however, these have only been celebrated since their establishment. -- Tests for New Year's Day, Spring Bank Holiday, and May Day Holiday in the United Kingdom (England, Wales, Northern - Ireland, and Scotland), as well as Battle of the Boyne in Northern Ireland, were considered for any calendar year; - however, these are celebrated only since a particular calendar year. -- In version 2022f of the `tz` db, a correction for 1947 was made for the summertime transition in Denmark to April - the 6th. Various corrections have been made to accommodate for change. -- The `ProviderInterface::getHolidays` has been re-added after it was erroneously removed. [\#277](https://github.com/azuyalabs/yasumi/pull/277) ([Jakub Wojtyra](https://github.com/jwojtyra-aterian)). -- Created the interface methods of the `ProviderInterface` that the abstract provider class implements. Since the return - type of the Yasumi factory methods is now `ProviderInterface`, those missing methods generated errors, especially by - static analysers. -- Changed the visibility of various class methods back to `protected`. The visibility was accidentally reduced during a clean-up - of code. This caused these methods not being accessible any more when extending a provider class. - -### Removed - -- The `count` method from the `ProviderInterface` as the `AbstractProvider` class already implements the Countable interface. -- Unused `InvalidDateException` class and other unused imported classes. -- `tests` folder from analysis by PHPStan (the large number of files makes the analysis needlessly long). -- Redundant checks for empty arrays and types. -- Mutation testing from GitHub Actions, as currently the outcome is not actively used. Running mutation tests locally - should be sufficient. - -## [2.5.0] - 2022-01-30 - -### Added - -- Argentina Provider [\#264](https://github.com/azuyalabs/yasumi/pull/264) ([Nader Safadi](https://github.com/nedSaf)). -- Turkey Provider [\#250](https://github.com/azuyalabs/yasumi/pull/250). -- World Children's Day for Thuringia (Germany) [\#260](https://github.com/azuyalabs/yasumi/issues/260). -- New National Day for Truth and Reconciliation to - Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) ([Owen V. Gray](https://github.com/adrx)). -- New Juneteenth National Independence Day to - USA [\#253](https://github.com/azuyalabs/yasumi/pull/253) ([Mark Heintz](https://github.com/mheintz)). -- The Korea Tourism Organization's holiday guide link was added to the source of South Korea - Provider. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). -- Mothering Day for the United Kingdom [\#266](https://github.com/azuyalabs/yasumi/issues/266). - -- All holiday providers now include a method that returns a list of external sources (i.e. references to websites, - books, scientific papers, etc.) that are used for determining the calculation logic of the providers' holidays. - -### Changed - -- Revised rules to calculate substitution holidays of South Korea to apply the newly enacted law on June - 2021. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). -- Separate `calculateSubstituteHolidays` method of South Korea Provider to `calculateSubstituteHolidays` - and `calculateOldSubstituteHolidays` - . [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)) -- Refactored the tests of South Korea provider to testing substitution - holidays. [\#255](https://github.com/azuyalabs/yasumi/pull/255) ([barami](https://github.com/barami)). -- Moved the United Kingdom Spring Bank Holiday to June 2nd and added Platinum Jubilee bank holiday on June 3rd - for [\#270](https://github.com/azuyalabs/yasumi/issues/270) ([Dan](https://github.com/dch-dev)). - -- Provider tests must implement the `ProviderTestCase` interface to ensure all required test methods are defined. -- `YasumiTestCaseInterface` was renamed to `HolidayTestCase` to better match the newly added `ProviderTestCase` - interface. -- Updated codebase using PHP7.4 syntax features. -- Upgraded PHP CS Fixer to v3. - -### Fixed - -- All Saints Day (German: 'AllerHeiligen') was classified as `Other` for states celebrating this day. This was - incorrect (or officially changed) and has been altered to `Official` - . [\#263](https://github.com/azuyalabs/yasumi/issues/263) -- Corpus Christi (German: 'Fronleichnam') was classified as `Other` for states celebrating this day. This was - incorrect (or officially changed) - and has been altered to `Official`. [\#252](https://github.com/azuyalabs/yasumi/issues/252). -- The test for the USA in that juneteenthDay was considered for all years: it is only celebrated since 2021. -- Definition of Canada Day in Canada [\#257](https://github.com/azuyalabs/yasumi/pull/257) in that, Canada Day is July 1 - if that day is not Sunday, and July 2 if July 1 is a Sunday.([Owen V. Gray](https://github.com/adrx)). - -- Reverted the visibility of the `AbstractProvider->getHolidaDates()` method as it incorrectly was set to `protectecd`. - -### Removed - -- PHP7.3 Support as it is End of Life. - -## [2.4.0] - 2021-05-09 - -### Added - -- Georgia - Provider [\#245](https://github.com/azuyalabs/yasumi/pull/245) ([Zurab Sardarov](https://github.com/zsardarov)) -- Pentecost (Sunday) to - Germany [\#225](https://github.com/azuyalabs/yasumi/pull/225) ([Patrick-Root](https://github.com/Patrick-Root)) - -- PHP8 Support [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) -- Infection PHP to perform mutation testing. -- PHPStan to the dependencies allowing for local analysis. -- `.gitattributes` file to reduce the size of a release - package [\#237](https://github.com/azuyalabs/yasumi/pull/237) ([Stéphane](https://github.com/fezfez)) - -### Changed - -- Rescheduled exceptional Japanese holidays for Olympic Games 2020 after - COVID-19 [\#240](https://github.com/azuyalabs/yasumi/pull/240) ([tanakahisateru](https://github.com/tanakahisateru)) -- Some improvements/refactoring of the Swiss holiday providers (including source - references) [\#233](https://github.com/azuyalabs/yasumi/pull/233) ([Quentin Ligier](https://github.com/qligier)) - -- Allow the `WEEKEND_DATA` constant in provider classes to be - overridden. [\#235](https://github.com/azuyalabs/yasumi/pull/235) ([Mahmood Dhia](https://github.com/mdhia)) -- Upgraded PHPUnit's XML configuration. -- Refactored removing the magic numbers for the lower and upper limits of the calendar year. -- Reformatted code using new/updated Code Styling rules. -- Hardened error handling of json functions. -- Updated Copyright year. - -### Fixed - -- The test for North West Territories (Canada) in that the National Indigenous Peoples Day was considered for all years: - it is only celebrated since 1996. -- The test for NovaScotia (Canada) in that novaScotiaHeritageDay was considered for all years: it is only celebrated - since 2015. -- The test for Ontario (Canada) in that IslanderDay was considered for all years: it is only celebrated since 2009. -- The test for Marine Day (Japan) as the rescheduled day was moved to 2021 (due to the COVID-19 pandemic). -- Typo for Estonian Day of Restoration of - Independence [\#228](https://github.com/azuyalabs/yasumi/pull/228) ([Reijo Vosu](https://github.com/reijovosu)) - -- The substitute holiday unit test as the use of the `at()` method will be deprecated in PHPUnit 10. -- Incorrect invocation of `Fribourg::calculateBerchtoldsTag()` and `Fribourg::calculateDecember26th` (Switzerland) -- Use proper parameter and return type hinting -- Replaced the `mt_rand` function with the `random_int` function as it is cryptographically insecure. -- Some static functions were used as if they are object functions. - -### Removed - -- Travis/StyleCI/Scrutinizer services replaced by GitHub Actions. -- PHP 7.2 Support (PHP 7.2 is EOL) -- Faker library as it has been - sunset [\#238](https://github.com/azuyalabs/yasumi/pull/238) ([Stéphane](https://github.com/fezfez)) -- Native function invocations. -- Various undefined class references, unused imports, etc. -- Unnecessary curly braces in strings, `continue` keyword in while loops, typecasting. - -## [2.3.0] - 2020-06-22 - -### Added - -- Added Canada Provider [\#215](https://github.com/azuyalabs/yasumi/pull/215) ([lux](https://github.com/lux)) -- Added Luxembourg - Provider [\#205](https://github.com/azuyalabs/yasumi/pull/205) ([Arkounay](https://github.com/Arkounay)) -- Holiday providers for states of - Austria. [\#182](https://github.com/azuyalabs/yasumi/pull/182) ([aprog](https://github.com/aprog)) -- Added All Souls Day to - Lithuania [\#227](https://github.com/azuyalabs/yasumi/pull/227) ([norkunas](https://github.com/norkunas)) -- Catholic Christmas Day is a new official holiday since 2017 in the - Ukraine. [\#202](https://github.com/azuyalabs/yasumi/pull/202) -- Additional Dates for Australia/Victoria:AFL Grand Final - Friday [\#190](https://github.com/azuyalabs/yasumi/pull/190) ([brucealdridge](https://github.com/brucealdridge)) -- Substituted holidays (holidays that fall in the weekend) for - Australia. [\#201](https://github.com/azuyalabs/yasumi/pull/201) ([c960657](https://github.com/c960657)) -- Added New Years Eve to - Germany [\#226](https://github.com/azuyalabs/yasumi/pull/226) ([Patrick-Root](https://github.com/Patrick-Root)) -- Day of Liberation (Tag der Befreiung) is a one-time official holiday in 2020 in Berlin (Germany). -- Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and - Aragon [\#189](https://github.com/azuyalabs/yasumi/pull/189) ([c960657](https://github.com/c960657)) -- Added American English spelling for Labour Day [\#216](https://github.com/azuyalabs/yasumi/issues/216) -- Added French translation for Second Christmas - Day [\#188](https://github.com/azuyalabs/yasumi/pull/188) ([Arkounay](https://github.com/Arkounay)) - -- Added accessor methods Holiday::getKey() and SubstituteHoliday:: - getSubstitutedHoliday() [\#220](https://github.com/azuyalabs/yasumi/pull/220)+[\#221](https://github.com/azuyalabs/yasumi/pull/221) ([c960657](https://github.com/c960657)) -- Added missing return (correct) and parameter types in various methods. - -### Changed - -- Renamed the Australian states to be full names instead of abbreviations to be in line with other Holiday - Providers [\#214](https://github.com/azuyalabs/yasumi/pull/214) -- Statehood Day is celebrated at a new date since 2020 in - Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Independence Day is no longer an official holiday since 2020 in - Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Homeland Thanksgiving Day has been renamed to "Victory and Homeland Thanksgiving Day and the Day of Croatian - Defenders" since 2020 in - Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Remembrance Day for Homeland War Victims and Remembrance Day for the Victims of Vukovar and Skabrnja is a new official - holiday since 2020 in - Croatia. [\#203](https://github.com/azuyalabs/yasumi/pull/203) ([krukru](https://github.com/krukru)) -- Second International Workers' Day in Ukraine was an official holiday only until - 2018. [\#202](https://github.com/azuyalabs/yasumi/pull/202) -- Holiday names in Danish, Dutch, and Norwegian are no longer - capitalized. [\#185](https://github.com/azuyalabs/yasumi/pull/185) ([c960657](https://github.com/c960657)) - -- Changed the fallback from DEFAULT_LANGUAGE to ' - en'. [\#183](https://github.com/azuyalabs/yasumi/pull/183) ([c960657](https://github.com/c960657)) -- Introduced a DateTimeZoneFactory class to improve performance. This will keep a static reference to the instantiated - DateTimezone, thus saving - resources. [\#213](https://github.com/azuyalabs/yasumi/pull/213) ([pvgnd](https://github.com/pvgn)) -- Changed DateTime to DateTimeImmutable as dates should be that: immutable (by default) -- Explicitly set nullable parameters as such. -- Refactored various conditional structures. -- Changed signature of some methods as parameters with defaults should come after required parameters. -- Updated third party dependencies. - -### Fixed - -- Fixed Ukraine holidays on weekends. These days need to be - substituted. [\#202](https://github.com/azuyalabs/yasumi/pull/202) -- Fixed issue if the next working day happens to be in the next year (i.e. not in the year of the Yasumi - instance) [\#192](https://github.com/azuyalabs/yasumi/issues/192) ([tniemann](https://github.com/tniemann)) -- Fix locale fallback for substitute - holidays [\#180](https://github.com/azuyalabs/yasumi/pull/180) ([c960657](https://github.com/c960657)) -- Fixed issue if the previous working day happens to be in the previous year (i.e. not in the year of the Yasumi - instance) - -- Fixed compound conditions that are always true by simplifying the condition steps. - -### Deprecated - -- Deprecated direct access to public properties Holiday::$shortName and SubstituteHoliday::$substitutedHoliday in favor - of accessor methods [\#220](https://github.com/azuyalabs/yasumi/pull/220) ([c960657](https://github.com/c960657)) - -### Removed - -- PHP 7.1 Support, as it has reached its end of life. -- Removed the assertion of the instance type in some functions as it is already defined by the return type. -- Removed unused variables, namespaces, brackets, empty tests, etc. - -## [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)) -- 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 the 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)) -- Created a 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. - -### 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)) -- 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)) -- 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. -- 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 is 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)) -- 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) ([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)) -- 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. - -## [2.1.0] - 2019-03-29 - -### Added - -- As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emperors 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/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 - -- 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 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 - -- Upgraded entirely to PHP version 7 with PHP 7.1 being the minimum required version. Base code and all unit tests have - been reworked to compatibility with PHP 7. -- Upgraded to PHPUnit to version 7.5. -- Changed Japanese holiday for the 2020 Olympic Games. Marine Day, Mountain Day and Health And Sports - Day. [\#113](https://github.com/azuyalabs/yasumi/pull/113) ([cookie-maker](https://github.com/cookie-maker)) -- Summer/winter time is now fetched from PHP's tz - database. [\#103](https://github.com/azuyalabs/yasumi/pull/103) ([c960657](https://github.com/c960657)) -- Changed translation for Norway's national - day. [\#98](https://github.com/azuyalabs/yasumi/pull/98) ([c960657](https://github.com/c960657)) -- Applied proper null checks in the summer time and wintertime calculations for Denmark and The Netherlands. -- Corrected some namespaces for Australia and Germany. -- Updated copyright year. -- Upgraded various dependency packages. -- Internal locale list updated based on CLDR v34. -- Refactored the Japan and USA Holiday Provider by moving the holiday calculations to private methods. This reduced the - complexity of the initialize method. -- Changed individual added International Women's Day for Ukraine and Russia to common - holiday. [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) - -### Fixed - -- Translation for Russia showed in English (except New Year's Day) as the proper locale was not in place. -- Fixed issue for summertime in Denmark in 1980. By default, summertime in Denmark is set for the last day of March - since 1980, however in 1980 itself, it started on April, 6th. -- Fixed spelling issue in the Swedish - translation. [\#97](https://github.com/azuyalabs/yasumi/pull/97) ([c960657](https://github.com/c960657)) -- Fixed spelling issues in the Danish - translation. [\#96](https://github.com/azuyalabs/yasumi/pull/96) ([c960657](https://github.com/c960657)) -- Fixed German Easter Sunday and Pentecost Sunday holidays (not nationwide, only in Brandenburg) - . [\#100](https://github.com/azuyalabs/yasumi/pull/100) ([TalonTR](https://github.com/TalonTR)) -- Fixed BetweenFilter to ignore time part and - timezone. [\#101](https://github.com/azuyalabs/yasumi/pull/101) ([c960657](https://github.com/c960657)) -- Fixed bug in provider list generation related to variable order of files returned by the - filesystem [\#107](https://github.com/azuyalabs/yasumi/pull/107) ([leafnode](https://github.com/leafnode)) - -### Removed - -## [1.8.0] - 2018-02-21 - -### Added - -- Added a function that can remove a holiday from the holidays providers (i.e. country/state) list of holidays. This - function can be helpful in cases where an existing holiday provider class can be extended, but some holidays are not - part of the original (extended) provider. -- Changed various functions that have a date parameter to support now objects implementing the DateTimeInterface and - objects of the DateTimeImmutable type. -- Added support for countries where the weekend definition (start and end day) differs from the global definition ( - Saturday and Sunday). -- Holiday Provider for - Russia. [\#72](https://github.com/azuyalabs/yasumi/pull/72) ([lukosius](https://github.com/lukosius)) -- Holiday Provider for - Estonia. [\#71](https://github.com/azuyalabs/yasumi/pull/71) ([lukosius](https://github.com/lukosius)) -- Added Scrutinizer integration. - -### Changed - -- Locale List updated based on CLDR version 32. -- Added PHPStan static analysis tool to Travis - CI [\#88](https://github.com/azuyalabs/yasumi/pull/88) ([lukosius](https://github.com/lukosius)) -- Various inline documentation - enhancements. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) -- Removed unnecessary typecasts and - if-construct. [\#87](https://github.com/azuyalabs/yasumi/pull/87) ([lukosius](https://github.com/lukosius)) -- Updated inline documentation to include correction Exception throws. -- Removed unnecessary NULL checks. - -### Fixed - -- Fixed Brazilian Carnival Day and added Ash Wednesday to Brazilian - Holidays. [\#92](https://github.com/azuyalabs/yasumi/pull/92) ([glauberm](https://github.com/glauberm)) -- Yasumi listed 01.04.2018 (Easter Sunday) for Spain as an official holiday, however it is not recognized as such. Fix - made that recognizes Easter Sunday as being observed (in all regions) - . [\#86](https://github.com/azuyalabs/yasumi/pull/86) ([Bastian Konetzny](https://github.com/bkonetzny)) -- Corrected reference to the Holiday Provider's ID to be static. -- Changed weekend data property into constant as it is not dynamic (runtime). -- Corrected the name translation test for the Restoration of Independence Day (Portugal). The test didn't account for - the fact that this holiday was abolished and reinstated at some time. -- Corrected unit test for Geneva (Switzerland) as the jeune Genevois day was incorrectly asserted as a regional holiday. -- Corrected the count logic so that in case a holiday is substituted (or observed), it is only counted once. -- Dropped unnecessary arguments of some methods in various Holiday Providers. -- Corrected Japanese "Green Day" and "Children's Day" to use "Hiragana" instead of - Kanji. [\#80](https://github.com/azuyalabs/yasumi/pull/80) ([cookie-maker](https://github.com/cookie-maker)) - -## [1.7.0] - 2017-12-11 - -### Added - -- 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)) -- Missing translations (de_DE) for Easter Sunday and - Whitsunday. [\#60](https://github.com/azuyalabs/yasumi/pull/60) ([IceShack](https://github.com/IceShack)) -- Holiday Provider for - Hungary. [\#57](https://github.com/azuyalabs/yasumi/pull/57) ([AronNovak](https://github.com/AronNovak)) -- Holiday Provider for - Switzerland. [\#56](https://github.com/azuyalabs/yasumi/pull/56) ([qligier](https://github.com/qligier)) - -### Changed - -- Made `calculate` method public and use of proper camel - casing. [\#73](https://github.com/azuyalabs/yasumi/pull/73) ([patrickreck](https://github.com/patrickreck)) -- Upgraded Faker Library to version 1.7 -- Renamed the holiday type NATIONAL to OFFICIAL. Sub-regions may have official holidays, and the name NATIONAL doesn't - suit these situations. [\#65](https://github.com/azuyalabs/yasumi/pull/65) -- Upgraded PHP-CS-Fixer to version 2.6 - -### Fixed - -- Corrected Geneva (Switzerland) unit test to ensure some holidays that are established at a particular year are handled - as such. -- Repentance Day is an official holiday in Saxony (Germany) [\#63](https://github.com/azuyalabs/yasumi/issues/63) -- Corrected the Easter Sunday translation for Austria (de_AT) [\#66](https://github.com/azuyalabs/yasumi/issues/66) -- Corrected Hungary unit test to ensure holidays that are established at a particular year are handled as such. -- Added missing Summer Bank Holiday for the United Kingdom. [\#64](https://github.com/azuyalabs/yasumi/issues/64) - -## [1.6.1] - 2017-02-07 - -### Added - -- Added missing unit tests for Reformation Day as in 2017 it is celebrated in all German states for its 500th - anniversary. -- Added missing unit tests for the German Unit Day for each German state. -- Created fallback calculation of the easter_days function in case the PHP extension 'calendar' is not - loaded. [\#55](https://github.com/azuyalabs/yasumi/pull/55) ([stelgenhof](https://github.com/stelgenhof)) - -### Changed - -- Moved Reformation Day to Christian Holidays as it is not only celebrated in Germany. -- Changed Travis configuration to use Composer-installed phpunit to avoid if any issues arise with globally installed - phpunit. - -### Fixed - -- Fixed Christmas Day and Boxing Day for the United Kingdom. A substitute bank holiday is now created for both Christmas - and Boxing Day when either of those days fall on a - weekend. [\#48](https://github.com/azuyalabs/yasumi/issues/48) ([joshuabaker](https://github.com/joshuabaker)) -- Renamed 'en_US' translation for the Second Christmas Day (from ‘Boxing Day’ to ‘Second Christmas Day’: Boxing Day - concept does not exist in the US) - . [\#53](https://github.com/azuyalabs/yasumi/pull/53) ([AngelinCalu](https://github.com/AngelinCalu)) - -## [1.6.0] - 2017-01-06 - -### Added - -- Added Holiday Provider for - Romania. [\#52](https://github.com/azuyalabs/yasumi/pull/52) ([AngelinCalu](https://github.com/AngelinCalu)) -- Added Holiday Provider for Ireland. [stelgenhof](https://github.com/stelgenhof) -- Added Holiday Provider for South Africa. [stelgenhof](https://github.com/stelgenhof) -- Added Holiday Provider for Austria. [stelgenhof](https://github.com/stelgenhof) -- Added 'en_US' translations for the Polish Independence Day and Constitution - Day. [\#45](https://github.com/azuyalabs/yasumi/pull/45) ([AngelinCalu](https://github.com/AngelinCalu)) - -### Changed - -- Refactored the calculation of Orthodox Easter using the function from - ChristianHolidays.php. [\#47](https://github.com/azuyalabs/yasumi/pull/47) ([AngelinCalu](https://github.com/AngelinCalu)) - -### Fixed - -- The parameters of the `isHoliday` and `isWorkingDay` methods now allow for classes that derive from DateTime (like the - very popular Carbon class) - . [\#49](https://github.com/azuyalabs/yasumi/issues/49) ([stelgenhof](https://github.com/stelgenhof)) - -## [1.5.0] - 2016-11-25 - -### Added - -- Added Holiday Provider for Australia (and the sub-region of Victoria) - . [\#38](https://github.com/azuyalabs/yasumi/pull/38) ([brucealdridge](https://github.com/brucealdridge)) -- You can now also use your own holiday providers in addition to the included holiday providers. A very helpful - improvement if Yasumi does not include your provider (yet), but you want to use - yours! [\#29](https://github.com/azuyalabs/yasumi/pull/29) ([navarr](https://github.com/navarr)) -- Added Holiday Provider for - Portugal. [\#44](https://github.com/azuyalabs/yasumi/pull/44) ([rvelhote](https://github.com/rvelhote)) -- Added Holiday Provider for - Ukraine. [\#41](https://github.com/azuyalabs/yasumi/pull/41) ([madmis](https://github.com/madmis)) -- Possibility to retrieve the next or previous working day within a defined number of days from - today [\#39](https://github.com/azuyalabs/yasumi/pull/39) ([brucealdridge](https://github.com/brucealdridge)) -- Added Holiday Providers for all 16 German - States. [\#34](https://github.com/azuyalabs/yasumi/pull/34) ([stelgenhof](https://github.com/stelgenhof)) -- Added Holiday Provider for - Croatia. [\#32](https://github.com/azuyalabs/yasumi/pull/32) ([karlomikus](https://github.com/karlomikus)) - -### Fixed - -- Carnival Day in Brazil was incorrectly set to be 47 days after Easter. Carnival Day begins Friday before Ash - Wednesday (51 days to Easter) - . [\#36](https://github.com/azuyalabs/yasumi/pull/36) ([icaroce](https://github.com/icaroce)) -- All Saints Day for Finland was incorrectly set for November 1st. The correct date is Saturday between 31 Oct and 6 - Nov, similar to - Sweden. [\#43](https://github.com/azuyalabs/yasumi/issues/43) ([stelgenhof](https://github.com/stelgenhof)) - -## [1.4.0] - 2016-06-04 - -### Added - -- Added Holiday Provider for - Brazil. [\#21](https://github.com/azuyalabs/yasumi/pull/21) ([dorianneto](https://github.com/dorianneto)) -- Added Holiday Provider for the Czech - Republic. [\#26](https://github.com/azuyalabs/yasumi/pull/26) ([dfridrich](https://github.com/dfridrich)) -- Added Holiday Provider for the United - Kingdom. [\#23](https://github.com/azuyalabs/yasumi/pull/23) ([stelgenhof](https://github.com/stelgenhof)) -- Add Welsh language (spoken in Wales, UK) translations for the holidays in the United - Kingdom [\#25](https://github.com/azuyalabs/yasumi/pull/25) ([meigwilym](https://github.com/meigwilym)) -- To determine a set of holidays between two dates you can now use the aptly named 'between()' method. - -### Changed - -- All Holiday Provider must now implement a code that will identify it. Typically, this is the ISO3166 code - corresponding to the respective country or sub-region. This can help for purposes such as translations or interfacing - with other API's for example. - -### Fixed - -- Fixed an issue with the unit test for the 'getProviders' method failing on Windows. Hardcoded unix-style directory - separators have been replaced by - DIRECTORY_SEPARATOR. [\#30](https://github.com/azuyalabs/yasumi/pull/30) ([navarr](https://github.com/navarr)) -- Corrected a typo in the English translation for 敬老の日 ( - Japan) [\#22](https://github.com/azuyalabs/yasumi/pull/22) ([navarr](https://github.com/navarr)) -- Fixed issue that the unit tests in 'YasumiTest' (methods 'next' and 'previous') did not cover the situations that the - limits are exceeded. [\#28](https://github.com/azuyalabs/yasumi/issues/28) - -## [1.3.0] - 2016-05-02 - -### Added - -- Added Holiday Provider for - Poland. [\#18](https://github.com/azuyalabs/yasumi/pull/18) ([mpdx](https://github.com/mpdx)) -- Added Holiday Provider for New - Zealand. [\#13](https://github.com/azuyalabs/yasumi/pull/13) ([badams](https://github.com/badams)) -- Added Holiday Provider for - Greece. [\#10](https://github.com/azuyalabs/yasumi/pull/10) ([sebdesign](https://github.com/sebdesign)) -- Added Holiday Provider for - Germany. [\#9](https://github.com/azuyalabs/yasumi/pull/9) ([eaglefsd](https://github.com/eaglefsd)) -- Added translations (`fr_FR`, `fr_BE`) for Belgium National - day [\#864d250](https://github.com/azuyalabs/yasumi/commit/864d25097abbeedbee15bcc37702a34c36a5b696) ([R2c](https://github.com/R2c)) -- Added missing English (`en_US`) translations for the Christian holidays 'Immaculate Conception', 'Maundy Thursday', - 'St. Georges Day', 'St. John's Day', 'St. Josephs Day' and 'St. Stephens Day'. -- Added Test Interface class to ensure the unit tests contain a some minimal assertions. - -### Changed - -- Sorted all translations in the translation files alphabetically (descending). -- Refactoring and cleanup of all unit tests. - -### Fixed - -- Fixed issue for Sweden as All Saints Day was always calculated to be on November 1st. However, the holiday has always - been celebrated on a Saturday (between October 31 and November 6th). -- Fixed the getProviders as it was not able to load Holiday Providers defined in (sub) - regions [\#5879133](https://github.com/azuyalabs/yasumi/commit/58791330ccf5c13b1626885921534c32866b7faf) ([R2c](https://github.com/R2c)) -- Fixed issue that it was possible for the AbstractProvider class to be loaded as a Holiday - Provider [\#9678bc4](https://github.com/azuyalabs/yasumi/commit/9678bc490e34980404ad5dc5b3d45a3c76a3ca0f) ([R2c](https://github.com/R2c)) -- Corrected incorrect pathname reference \*BaseTestCase.php files ("Test" -> "test). -- Fixed issue for France as Good Friday and St. Stephens Day were defined as official holidays. These aren't national - holidays and are only observed in the French departments Moselle, Bas-Rhin and Haut-Rhin. With this fix, these - holidays have been removed from the France Holiday providers and new providers for the departments Moselle, Bas-Rhin - and Haut-Rhin are added. [\#17](https://github.com/azuyalabs/yasumi/issues/17) ([R2c](https://github.com/R2c)) -- Updated locales list based on CLDR version 29. Removed locales of which the region identifier is not specified. -- Fixed issue for Sweden as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, the - holiday has always been celebrated on a Saturday (between June 20 and June 26). -- Fixed base test for some Spain/LaRioja as some holidays have been established only in a particular year, causing false - failures in the unit tests. -- Running php-cs-fixer fix . --level=psr2 generated a massive list of changes, and broke unit tests. Added a custom - .php_cs config file to adhere to the PSR-2 Coding Standards and resolve this issue. In addition, the php-cs-fixer - command has been added to composer to run the fixers and on the CI server (Travis), meaning PR’s will need to be PSR2 - compliant before they can be merged. If any files do not pass, the build - fails. [\#15](https://github.com/azuyalabs/yasumi/issues/15) [\#16](https://github.com/azuyalabs/yasumi/pull/16) ([badams](https://github.com/badams)) -- Accidentally the timezone for Norway was set to "Europe/Copenhagen". This has been corrected to "Europe/Oslo" - . [\#11](https://github.com/azuyalabs/yasumi/issues/11) [\#12](https://github.com/azuyalabs/yasumi/pull/12) ([badams](https://github.com/badams)) -- Fixed issue for Finland as Midsummer's Day (st. Johns Day) was always calculated to be on June 24th. However, since - 1955, the holiday has always been celebrated on a Saturday (between June 20 and June 26). - -## [1.2.0] - 2016-04-04 - -### Added - -- Added Holiday Provider for Denmark -- Added Holiday Provider for Norway -- Added Holiday Provider for Sweden -- Added Holiday Provider for Finland -- New function 'isWorkingDay' added that determines whether a date represents a working day or not. A working day is a - date that is neither a holiday nor falls into the weekend. - -### Changed - -- Refactoring and cleanup of unit tests - -### Fixed - -- The Vernal Equinox Day and Autumnal Equinox Day in Japan were excluded from having it substituted for another day in - case these days would fall on the weekend. -- Fixed tests for some holiday providers as some holidays have been established only in a particular year, causing false - failures in the unit tests. - -## [1.1.0] - 2016-03-10 - -### Added - -- Added Spain Holiday Provider (including the autonomous communities Andalusia, Aragon, Asturias, Balearic Islands, - Basque Country, Canary Islands, Cantabria, Castile and León, Castilla-La Mancha, Ceuta, Community of Madrid, - Extremadura, Galicia, La Rioja, Melilla, Navarre, Region of Murcia, Valencian Community) -- Added Corpus Christi, St. Joseph's Day, Maundy Thursday, St. George's Day, St. John's Day to the common Christian - Holidays. -- Created separate tests for holidays that are substituted on different days. -- Allow for namespaced holiday providers. -- Added test for translation of Ash Wednesday and Valentine's Day in the Netherlands. -- Added test to check whether all holidays for a Holiday Provider are defined by the respective provider class. - -### Changed - -- Updated some English, Italian, French and Dutch translations. -- Moved all other holiday calculations in the Netherlands and France to individual methods. - -### Fixed - -- For Japan substituted holidays had the same date as the original holidays. - -### Removed - -- Removed support for PHP 5.4. The minimum version is now 5.5. PHP 7.0 is known to work however in Travis CI still - allowed to fail. +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and +[Conventional Commits](https://conventionalcommits.org) for commit conventions. + +Changes related to the logic of the holidays or their providers are listed first, +followed by any architectural or technical changes. + +## [2.8.0] - 2025-07-13 + +### Features + +- (Canada) Nunavut Day for the Nunavut province +- Add Bulgaria provider +- (Latvia) Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) +- (Argentina) Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) +- (Poland) Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) +- (Ireland) Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) +- (Lithuania) Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) +- (Mexico) Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) +- (Brazil) Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) +- (Germany) Day of Liberation is celebrated in Berlin in 2025 too. +- (Germany) Add Assumption of Mary holiday to Bavaria +- Add Iran provider ([#341](https://github.com/azuyalabs/yasumi/issues/341)) + +### Fixes + +- (Brazil) Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) +- (Scotland) Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) +- (Ireland) New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) +- (Ukraine) Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) +- (Ireland) Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) +- (Mexico) Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) +- (Mexico) Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) +- (Portugal) Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) +- (Czech-republic) Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) +- (Germany) Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) +- (Slovakia) Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) + +### Refactor + +- (South korea) Simplify code by using early returns +- Fix use of concatenation with mixed types +- Make the Holiday class implement the Stringable interface +- Remove astray var_dump use +- Update methods visibility in multiple Providers ([#332](https://github.com/azuyalabs/yasumi/issues/332)) + +### Documentation + +- Include supported PHP versions with security updates +- Move DCO fulltext to its own file +- Clean up examples and correct spelling mistakes +- Fix parameter types that do not match signature +- Add announcement of new documentation site +- Remove duplicate commit messages from the changelog +- Sort the first time contributors alphabetically (a-z) +- Add initial git-cliff configuration + +### Code Style + +- Fix code styling issues +- Fix code styling and formatting issues ([#338](https://github.com/azuyalabs/yasumi/issues/338)) + +### Testing + +- (Portugal) Fix official holidays tests +- Fix test for the previous function +- Increase memory_limit, to be able to run all tests on MacOS +- (Portugal) Fix issue with Republic Day failing for the restored years between 2013 and 2016 + +### Other + +- Bump composer package versions to latest installed versions +- Remove phpinsights config +- Remove Phan static analysis tool +- Update maintainer information in composer.json +- Disable enforcing the Override attribute by Psalm +- Report unused classes, etc by Psalm as informational +- Drop PHP 8.0 support and add support for PHP 8.4 +- Bump package versions to latest working versions +- Upgrade PHPStan to v2.0 +- Replace deprecated PHPstan configuration option +- Add dependabot configuration file +- Exclude phpactor configuration file from Git +- Use shared PHP CS Fixer config +- Pin version of PHP CS Fixer to 3.46 as latest (3.47) release produces undesired changes + +## New Contributors ❤️ + +* @attepulkkinen made their first contribution +* @dependabot[bot] made their first contribution +* @fbett made their first contribution +* @hamrak made their first contribution +* @mtbossa made their first contribution +* @thrashzone13 made their first contribution + +## [2.7.0] - 2024-01-07 + +### Refactor + +- Update copyright year +- Simplify foreach loop in order to remove unused variables. +- Check for type rather than null value to be more explicit. Untangle nested ifs to early returns allowing for quick exit. +- Change nested ifs to early return as it is best to exit early. Change to array spread instead of array_merge for simplicity. +- Extract Day of Antifascist Struggle calculation to a private method. Simplify Statehood Day calculation to make it more concise. +- Add check in case date subtraction fails. +- Add check for the Australia provider in case date subtraction fails. +- Simplify the conditions for the Coming of Age day calculation. +- Simplify the calculation of Carnival in Argentina to reduce duplication. Add check in case date subtraction fails. +- Simplify the calculation of Carnival in Brazil to reduce duplication. Add check in case date subtraction fails. +- Introduced private methods for each holiday to eliminate complexity. +- Simplify the calculation of the three Carnival Days in the Netherlands to reduce duplication. Add check in case date subtraction fails. +- Optimize some if/then statements and other parts to be more succinct. +- Remove unnecessary method argument as method accepts none and change switch block to a simple check as it only has one scenario. +- Replaced the anonymous function inside array_map with arrow function syntax to make it more concise and readable. +- Extract constant representing the date format (avoid 'magic' constants). + +### Documentation + +- Update the changelog to reflect changes for the 2.7.0 release + +### Code Style + +- Fix naming of fully qualified class names +- Simplify the code for selecting holidays before and after 2013 making it more concise +- Fix indentation +- Add a few more PHPStan settings and fix indentation +- Fix code style issues. +- Remove redundant parentheses and fix array indentation. +- Avoid use of the empty() function. +- Convert implicit variables into explicit ones in double-quoted strings. +- Remove unnecessary blank lines in doc blocks. +- Remove unnecessary intermediate variable. +- Add expected newline between different annotations. +- Simplify the code making it more concise and readable. +- Simplify the code and remove useless doc blocks/annotations. + +### Other + +- Remove unused infections Composer script entry +- Remove checks for Superfluous naming as we follow PER which supports such convention. +- Include PHPInsights configuration for additional code analysis. + +## New Contributors ❤️ + +* @gogl92 made their first contribution +* @ihmels made their first contribution +* @rChassat made their first contribution ## [1.0.0] - 2015-04-21 -- Initial Release +## New Contributors ❤️ -[Unreleased]: https://github.com/azuyalabs/yasumi/compare/2.7.0...HEAD +* @Furgas made their first contribution +* @stelgenhof made their first contribution -[2.7.0]: https://github.com/azuyalabs/yasumi/compare/2.6.0...2.7.0 +[2.8.0]: https://github.com/azuyalabs/yasumi/compare/2.7.0..2.8.0 +[2.7.0]: https://github.com/azuyalabs/yasumi/compare/2.6.0..2.7.0 -[2.6.0]: https://github.com/azuyalabs/yasumi/compare/2.5.0...2.6.0 - -[2.5.0]: https://github.com/azuyalabs/yasumi/compare/2.4.0...2.5.0 - -[2.4.0]: https://github.com/azuyalabs/yasumi/compare/2.3.0...2.4.0 - -[2.3.0]: https://github.com/azuyalabs/yasumi/compare/2.2.0...2.3.0 - -[2.2.0]: https://github.com/azuyalabs/yasumi/compare/2.1.0...2.2.0 - -[2.1.0]: https://github.com/azuyalabs/yasumi/compare/2.0.0...2.1.0 - -[2.0.0]: https://github.com/azuyalabs/yasumi/compare/1.8.0...2.0.0 - -[1.8.0]: https://github.com/azuyalabs/yasumi/compare/1.7.0...1.8.0 - -[1.7.0]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.7.0 - -[1.6.1]: https://github.com/azuyalabs/yasumi/compare/1.6.1...1.6.0 - -[1.6.0]: https://github.com/azuyalabs/yasumi/compare/1.5.0...1.6.0 - -[1.5.0]: https://github.com/azuyalabs/yasumi/compare/1.4.0...1.5.0 - -[1.4.0]: https://github.com/azuyalabs/yasumi/compare/1.3.0...1.4.0 - -[1.3.0]: https://github.com/azuyalabs/yasumi/compare/1.2.0...1.3.0 - -[1.2.0]: https://github.com/azuyalabs/yasumi/compare/1.1.0...1.2.0 - -[1.1.0]: https://github.com/azuyalabs/yasumi/compare/1.0.0...1.1.0 - -[1.0.0]: https://github.com/azuyalabs/yasumi/releases/tag/1.0.0 From 94903d016edf9925d6b05c1cdfd1c496e47a98e2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 14 Jul 2025 20:45:26 +0900 Subject: [PATCH 624/687] chore(composer): update dependencies Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ce7f9b129..627136af9 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "phpstan/phpstan": "^2.1", "phpstan/phpstan-deprecation-rules": "^2.0", "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^6.12" + "vimeo/psalm": "^6.13" }, "suggest": { "ext-calendar": "For calculating the date of Easter" From 069da331e72b1465bb005b10607934b77b158c73 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 14 Jul 2025 20:47:47 +0900 Subject: [PATCH 625/687] chore(changelog): remove versions prior to 2.8.0 git-cliff included the changelogs for 2.7.0 and 1.0.0 for some reason. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 76 +++++----------------------------------------------- 1 file changed, 7 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6754c1230..4381168b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,75 +87,13 @@ followed by any architectural or technical changes. - Use shared PHP CS Fixer config - Pin version of PHP CS Fixer to 3.46 as latest (3.47) release produces undesired changes -## New Contributors ❤️ +## New Contributors -* @attepulkkinen made their first contribution -* @dependabot[bot] made their first contribution -* @fbett made their first contribution -* @hamrak made their first contribution -* @mtbossa made their first contribution -* @thrashzone13 made their first contribution - -## [2.7.0] - 2024-01-07 - -### Refactor - -- Update copyright year -- Simplify foreach loop in order to remove unused variables. -- Check for type rather than null value to be more explicit. Untangle nested ifs to early returns allowing for quick exit. -- Change nested ifs to early return as it is best to exit early. Change to array spread instead of array_merge for simplicity. -- Extract Day of Antifascist Struggle calculation to a private method. Simplify Statehood Day calculation to make it more concise. -- Add check in case date subtraction fails. -- Add check for the Australia provider in case date subtraction fails. -- Simplify the conditions for the Coming of Age day calculation. -- Simplify the calculation of Carnival in Argentina to reduce duplication. Add check in case date subtraction fails. -- Simplify the calculation of Carnival in Brazil to reduce duplication. Add check in case date subtraction fails. -- Introduced private methods for each holiday to eliminate complexity. -- Simplify the calculation of the three Carnival Days in the Netherlands to reduce duplication. Add check in case date subtraction fails. -- Optimize some if/then statements and other parts to be more succinct. -- Remove unnecessary method argument as method accepts none and change switch block to a simple check as it only has one scenario. -- Replaced the anonymous function inside array_map with arrow function syntax to make it more concise and readable. -- Extract constant representing the date format (avoid 'magic' constants). - -### Documentation - -- Update the changelog to reflect changes for the 2.7.0 release - -### Code Style - -- Fix naming of fully qualified class names -- Simplify the code for selecting holidays before and after 2013 making it more concise -- Fix indentation -- Add a few more PHPStan settings and fix indentation -- Fix code style issues. -- Remove redundant parentheses and fix array indentation. -- Avoid use of the empty() function. -- Convert implicit variables into explicit ones in double-quoted strings. -- Remove unnecessary blank lines in doc blocks. -- Remove unnecessary intermediate variable. -- Add expected newline between different annotations. -- Simplify the code making it more concise and readable. -- Simplify the code and remove useless doc blocks/annotations. - -### Other - -- Remove unused infections Composer script entry -- Remove checks for Superfluous naming as we follow PER which supports such convention. -- Include PHPInsights configuration for additional code analysis. - -## New Contributors ❤️ - -* @gogl92 made their first contribution -* @ihmels made their first contribution -* @rChassat made their first contribution - -## [1.0.0] - 2015-04-21 - -## New Contributors ❤️ - -* @Furgas made their first contribution -* @stelgenhof made their first contribution +- @attepulkkinen made their first contribution +- @dependabot[bot] made their first contribution +- @fbett made their first contribution +- @hamrak made their first contribution +- @mtbossa made their first contribution +- @thrashzone13 made their first contribution [2.8.0]: https://github.com/azuyalabs/yasumi/compare/2.7.0..2.8.0 -[2.7.0]: https://github.com/azuyalabs/yasumi/compare/2.6.0..2.7.0 - From ac2614cc9825396a0249692e4f8f5354f111de72 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 14 Jul 2025 20:59:52 +0900 Subject: [PATCH 626/687] doc: update list of supported versions Signed-off-by: Sacha Telgenhof --- SECURITY.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 7daeeb802..f21d712c2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,9 +6,10 @@ The following versions are supported with security updates: | Version | Supported | | ------- | ------------------ | +| 2.8.0 | :white_check_mark: | | 2.7.0 | :white_check_mark: | -| 2.6.0 | :white_check_mark: | -| 2.5.0 | :white_check_mark: | +| 2.6.0 | :x: | +| 2.5.0 | :x: | | <2.4 | :x: | As for supported PHP versions, this project only supports the actively supported versions of PHP and versions of PHP From be5e880ec30a6669ee85c3ea4353d4de44c895a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 20:32:27 +0900 Subject: [PATCH 627/687] build(deps): bump actions/checkout from 4 to 5 (#383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
Release notes

Sourced from actions/checkout's releases.

v5.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

Full Changelog: https://github.com/actions/checkout/compare/v4...v5.0.0

v4.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4...v4.3.0

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.2.0...v4.2.1

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

V5.0.0

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index c21c77a13..e2c0d07a7 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 280977796..78560eab1 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c13d19714..312a19b86 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP uses: shivammathur/setup-php@v2 From 5cd2c11ad2a1fce26cada21c2bf04d2d15b8ad01 Mon Sep 17 00:00:00 2001 From: Matt Gifford Date: Thu, 28 Aug 2025 02:38:50 +1200 Subject: [PATCH 628/687] feat(new zealand): Add Matariki public holiday (#378) Adds the Matariki public holiday that's been observed since 2022 Signed-off-by: Matt Gifford --- src/Yasumi/Provider/NewZealand.php | 66 ++++++++++ src/Yasumi/data/translations/matariki.php | 21 +++ tests/NewZealand/MatarikiTest.php | 148 ++++++++++++++++++++++ 3 files changed, 235 insertions(+) create mode 100644 src/Yasumi/data/translations/matariki.php create mode 100644 tests/NewZealand/MatarikiTest.php diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 8776ad7e7..9483c49f2 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -50,6 +50,7 @@ public function initialize(): void $this->calculateWaitangiDay(); $this->calculateAnzacDay(); $this->calculateQueensBirthday(); + $this->calculateMatariki(); $this->calculateLabourDay(); // Add Christian holidays @@ -194,6 +195,71 @@ protected function calculateQueensBirthday(): void )); } + /** + * Matariki – te Mātahi o te Tau + * Matariki – the Māori New Year + * + * The Matariki public holiday is based on the winter rising of the Matariki cluster in the early + * morning sky during the Tangaroa period of the lunar month of Pipiri. + * + * The dates are predetermined by the Matariki Advisory Committee, currently for the years 2022-2052 inclusive + * + * @see https://www.tepapa.govt.nz/discover-collections/read-watch-play/matariki-maori-new-year/dates-for-matariki-public-holiday + * @see https://www.mbie.govt.nz/business-and-employment/employment-and-skills/employment-legislation-reviews/matariki/matariki-public-holiday + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateMatariki(): void + { + if ($this->year < 2022 || 2052 < $this->year) { + return; + } + + $matarikiDates = [ + 2022 => ['month' => 6, 'day' => 24], + 2023 => ['month' => 7, 'day' => 14], + 2024 => ['month' => 6, 'day' => 28], + 2025 => ['month' => 6, 'day' => 20], + 2026 => ['month' => 7, 'day' => 10], + 2027 => ['month' => 6, 'day' => 25], + 2028 => ['month' => 7, 'day' => 14], + 2029 => ['month' => 7, 'day' => 6], + 2030 => ['month' => 6, 'day' => 21], + 2031 => ['month' => 7, 'day' => 11], + 2032 => ['month' => 7, 'day' => 2], + 2033 => ['month' => 6, 'day' => 24], + 2034 => ['month' => 7, 'day' => 7], + 2035 => ['month' => 6, 'day' => 29], + 2036 => ['month' => 7, 'day' => 18], + 2037 => ['month' => 7, 'day' => 10], + 2038 => ['month' => 6, 'day' => 25], + 2039 => ['month' => 7, 'day' => 15], + 2040 => ['month' => 7, 'day' => 6], + 2041 => ['month' => 7, 'day' => 19], + 2042 => ['month' => 7, 'day' => 11], + 2043 => ['month' => 7, 'day' => 3], + 2044 => ['month' => 6, 'day' => 24], + 2045 => ['month' => 7, 'day' => 7], + 2046 => ['month' => 6, 'day' => 29], + 2047 => ['month' => 7, 'day' => 19], + 2048 => ['month' => 7, 'day' => 3], + 2049 => ['month' => 6, 'day' => 25], + 2050 => ['month' => 7, 'day' => 15], + 2051 => ['month' => 6, 'day' => 30], + 2052 => ['month' => 6, 'day' => 21], + ]; + + $date = new \DateTime( + sprintf('%04d-%02d-%02d', $this->year, $matarikiDates[$this->year]['month'], + $matarikiDates[$this->year]['day']), + DateTimeZoneFactory::getDateTimeZone($this->timezone) + ); + + $this->addHoliday(new Holiday('matariki', [], $date, $this->locale)); + } + /** * During the 19th century, workers in New Zealand tried to claim the right for an 8-hour working day. * In 1840 carpenter Samuel Parnell fought for this right in Wellington, NZ, and won. diff --git a/src/Yasumi/data/translations/matariki.php b/src/Yasumi/data/translations/matariki.php new file mode 100644 index 000000000..604f170d9 --- /dev/null +++ b/src/Yasumi/data/translations/matariki.php @@ -0,0 +1,21 @@ + + */ + +// Translations for Matariki +return [ + 'en' => 'Matariki', +]; diff --git a/tests/NewZealand/MatarikiTest.php b/tests/NewZealand/MatarikiTest.php new file mode 100644 index 000000000..ce5c42c70 --- /dev/null +++ b/tests/NewZealand/MatarikiTest.php @@ -0,0 +1,148 @@ + + */ + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Matariki in the New Zealand. + */ +class MatarikiTest extends Yasumi\tests\NewZealand\NewZealandBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'matariki'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 2022; + + /** + * The year the Matariki Advisory Committee have calculated dates until + */ + public const CALCULATED_UNTIL_YEAR = 2052; + + /** + * Tests Matariki. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param DateTime $expected the expected date + */ + public function testHoliday(int $year, DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Tests that Holiday is not present before 2022. + */ + public function testNotHoliday(): void + { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR - 1); + } + + /** + * 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 = []; + + $matarikiDates = [ + 2022 => ['month' => 6, 'day' => 24], + 2023 => ['month' => 7, 'day' => 14], + 2024 => ['month' => 6, 'day' => 28], + 2025 => ['month' => 6, 'day' => 20], + 2026 => ['month' => 7, 'day' => 10], + 2027 => ['month' => 6, 'day' => 25], + 2028 => ['month' => 7, 'day' => 14], + 2029 => ['month' => 7, 'day' => 6], + 2030 => ['month' => 6, 'day' => 21], + 2031 => ['month' => 7, 'day' => 11], + 2032 => ['month' => 7, 'day' => 2], + 2033 => ['month' => 6, 'day' => 24], + 2034 => ['month' => 7, 'day' => 7], + 2035 => ['month' => 6, 'day' => 29], + 2036 => ['month' => 7, 'day' => 18], + 2037 => ['month' => 7, 'day' => 10], + 2038 => ['month' => 6, 'day' => 25], + 2039 => ['month' => 7, 'day' => 15], + 2040 => ['month' => 7, 'day' => 6], + 2041 => ['month' => 7, 'day' => 19], + 2042 => ['month' => 7, 'day' => 11], + 2043 => ['month' => 7, 'day' => 3], + 2044 => ['month' => 6, 'day' => 24], + 2045 => ['month' => 7, 'day' => 7], + 2046 => ['month' => 6, 'day' => 29], + 2047 => ['month' => 7, 'day' => 19], + 2048 => ['month' => 7, 'day' => 3], + 2049 => ['month' => 6, 'day' => 25], + 2050 => ['month' => 7, 'day' => 15], + 2051 => ['month' => 6, 'day' => 30], + 2052 => ['month' => 6, 'day' => 21], + ]; + + for ($y = 1; $y <= 100; ++$y) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR); + $expected = new DateTime( + sprintf('%04d-%02d-%02d', $year, $matarikiDates[$year]['month'], $matarikiDates[$year]['day']), + new DateTimeZone(self::TIMEZONE) + ); + $data[] = [$year, $expected]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR), + [self::LOCALE => 'Matariki'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} From bbe464a1e70334805fbf0945e73a4dc83b7f5003 Mon Sep 17 00:00:00 2001 From: Art Kurbakov Date: Mon, 1 Sep 2025 10:41:26 +0000 Subject: [PATCH 629/687] feat: Add New York Stock Exchange (NYSE) provider (#384) Added a holiday provider to track holidays and closures for the New York Stock Exchange. In addition to observed holidays, the closures include emergency, weather and presidential proclamation events since year 2000. Other US exchanges like NASDAQ and CBOE normally follow suit for holidays and closures. This PR supersedes PR #382. --------- Signed-off-by: Art Kurbakov Co-authored-by: Art Kurbakov --- phpunit.xml.dist | 4 + src/Yasumi/Provider/USA/NYSE.php | 114 +++++++++++++++++++++ tests/USA/NYSE/CarterMourningTest.php | 81 +++++++++++++++ tests/USA/NYSE/GRFordMourningTest.php | 81 +++++++++++++++ tests/USA/NYSE/GroundZeroTest.php | 138 ++++++++++++++++++++++++++ tests/USA/NYSE/HWBushMourningTest.php | 81 +++++++++++++++ tests/USA/NYSE/HurricaneSandyTest.php | 100 +++++++++++++++++++ tests/USA/NYSE/JuneteenthTest.php | 106 ++++++++++++++++++++ tests/USA/NYSE/NYSETest.php | 111 +++++++++++++++++++++ tests/USA/NYSE/ReaganMourningTest.php | 81 +++++++++++++++ 10 files changed, 897 insertions(+) create mode 100644 src/Yasumi/Provider/USA/NYSE.php create mode 100644 tests/USA/NYSE/CarterMourningTest.php create mode 100644 tests/USA/NYSE/GRFordMourningTest.php create mode 100644 tests/USA/NYSE/GroundZeroTest.php create mode 100644 tests/USA/NYSE/HWBushMourningTest.php create mode 100644 tests/USA/NYSE/HurricaneSandyTest.php create mode 100644 tests/USA/NYSE/JuneteenthTest.php create mode 100644 tests/USA/NYSE/NYSETest.php create mode 100644 tests/USA/NYSE/ReaganMourningTest.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6b1ffb198..000f65b29 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -199,5 +199,9 @@ ./tests/USA + + + ./tests/USA/NYSE +
diff --git a/src/Yasumi/Provider/USA/NYSE.php b/src/Yasumi/Provider/USA/NYSE.php new file mode 100644 index 000000000..cee19543f --- /dev/null +++ b/src/Yasumi/Provider/USA/NYSE.php @@ -0,0 +1,114 @@ + + */ + +namespace Yasumi\Provider\USA; + +use Yasumi\Holiday; +use Yasumi\Provider\USA; + +/** + * Class NYSE in addition to regular holidays observed by the New York Stock + * Exchange (NYSE), includes full day special closure events due to: + * weather, national emergencies and presidential proclamations. + * All trading closure events are included from year 2000. + * + * @author Art Kurbakov + */ +class NYSE extends USA +{ + /** + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'US-NYSE'; + + /** + * Initialize holidays for the NYSE. + * + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'America/New_York'; + + // Add exhange-specific holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->calculateMartinLutherKingday(); + $this->calculateWashingtonsBirthday(); + $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); + $this->calculateMemorialDay(); + if (2021 < $this->year) { + $this->calculateJuneteenth(); + } + $this->calculateIndependenceDay(); + $this->calculateLabourDay(); + $this->calculateThanksgivingDay(); + $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); + + $this->calculateSubstituteHolidays(); + + // Add other full-day closure events + $this->addWeatherEvents(); + $this->addEmergencies(); + $this->addProclamations(); + } + + public function getSources(): array + { + return [ + 'https://www.nyse.com/trader-update/history#11507', + 'https://s3.amazonaws.com/armstrongeconomics-wp/2013/07/NYSE-Closings.pdf', + 'https://ir.theice.com/press/news-details/2018/New-York-Stock-Exchange-to-Honor-President-George-H-W-Bush/default.aspx', + 'https://ir.theice.com/press/news-details/2024/The-New-York-Stock-Exchange-Will-Close-Markets-on-January-9-to-Honor-the-Passing-of-Former-President-Jimmy-Carter-on-National-Day-of-Mourning/default.aspx', + 'https://www.thecorporatecounsel.net/blog/2021/10/nyse-makes-juneteenth-a-new-market-holiday.html', + ]; + } + + private function addWeatherEvents(): void + { + if (2012 == $this->year) { + $this->addHoliday(new Holiday('hurricaneSandy1', [], new \DateTime('2012-10-29', new \DateTimeZone($this->timezone)))); + $this->addHoliday(new Holiday('hurricaneSandy2', [], new \DateTime('2012-10-30', new \DateTimeZone($this->timezone)))); + } + } + + private function addEmergencies(): void + { + if (2001 == $this->year) { + $this->addHoliday(new Holiday('groundZero1', [], new \DateTime('2001-09-11', new \DateTimeZone($this->timezone)))); + $this->addHoliday(new Holiday('groundZero2', [], new \DateTime('2001-09-12', new \DateTimeZone($this->timezone)))); + $this->addHoliday(new Holiday('groundZero3', [], new \DateTime('2001-09-13', new \DateTimeZone($this->timezone)))); + $this->addHoliday(new Holiday('groundZero4', [], new \DateTime('2001-09-14', new \DateTimeZone($this->timezone)))); + } + } + + private function addProclamations(): void + { + if (2004 == $this->year) { + $this->addHoliday(new Holiday('ReaganMourning', [], new \DateTime('2004-06-11', new \DateTimeZone($this->timezone)))); + } + if (2007 == $this->year) { + $this->addHoliday(new Holiday('GRFordMourning', [], new \DateTime('2007-01-02', new \DateTimeZone($this->timezone)))); + } + if (2018 == $this->year) { + $this->addHoliday(new Holiday('HWBushMourning', [], new \DateTime('2018-12-05', new \DateTimeZone($this->timezone)))); + } + if (2025 == $this->year) { + $this->addHoliday(new Holiday('CarterMourning', [], new \DateTime('2025-01-09', new \DateTimeZone($this->timezone)))); + } + } +} diff --git a/tests/USA/NYSE/CarterMourningTest.php b/tests/USA/NYSE/CarterMourningTest.php new file mode 100644 index 000000000..0d4c82162 --- /dev/null +++ b/tests/USA/NYSE/CarterMourningTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test day of closure of NYSE due to Jimmy Carter mourning proclamation + * + * @author Art Kurbakov + */ +class CarterMourningTest extends USABaseTestCase +{ + /** + * Name of provider to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The year when the closure was observed. + */ + public const OBSERVED_YEAR = 2025; + + /** + * Tests day of closure on January 9th 2025 + * + * @throws \Exception + */ + public function testCarterMourning(): void + { + $this->assertHoliday( + self::REGION, + 'CarterMourning', + self::OBSERVED_YEAR, + new \DateTime('2025-01-09', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests years before 2025 + * + * @throws \Exception + */ + public function testCarterMourningBefore2025(): void + { + $this->assertNotHoliday( + self::REGION, + 'CarterMourning', + self::OBSERVED_YEAR - 1 + ); + } + + /** + * Tests years after 2025 + * + * @throws \Exception + */ + public function testCarterMourningAfter2025(): void + { + $this->assertNotHoliday( + self::REGION, + 'CarterMourning', + self::OBSERVED_YEAR + 1 + ); + } +} diff --git a/tests/USA/NYSE/GRFordMourningTest.php b/tests/USA/NYSE/GRFordMourningTest.php new file mode 100644 index 000000000..6011b7382 --- /dev/null +++ b/tests/USA/NYSE/GRFordMourningTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test day of closure of NYSE due to G.R. Ford Mourning proclamation + * + * @author Art Kurbakov + */ +class GRFordMourningTest extends USABaseTestCase +{ + /** + * Name of provider to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The year when the closure was observed. + */ + public const OBSERVED_YEAR = 2007; + + /** + * Tests day of closure on January 2nd 2007 + * + * @throws \Exception + */ + public function testGRFordMourning(): void + { + $this->assertHoliday( + self::REGION, + 'GRFordMourning', + self::OBSERVED_YEAR, + new \DateTime('2007-01-02', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests years before 2007 + * + * @throws \Exception + */ + public function testGRFordMourningBefore2007(): void + { + $this->assertNotHoliday( + self::REGION, + 'GRFordMourning', + self::OBSERVED_YEAR - 1 + ); + } + + /** + * Tests years after 2007 + * + * @throws \Exception + */ + public function testGRFordMourningAfter2007(): void + { + $this->assertNotHoliday( + self::REGION, + 'GRFordMourning', + self::OBSERVED_YEAR + 1 + ); + } +} diff --git a/tests/USA/NYSE/GroundZeroTest.php b/tests/USA/NYSE/GroundZeroTest.php new file mode 100644 index 000000000..3a6a6a984 --- /dev/null +++ b/tests/USA/NYSE/GroundZeroTest.php @@ -0,0 +1,138 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test 4 days of closure of NYSE due to September 11th attacks + * + * @author Art Kurbakov + */ +class GroundZeroTest extends USABaseTestCase +{ + /** + * Name of provider to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The year when the closure was observed. + */ + public const OBSERVED_YEAR = 2001; + + /** + * Tests 4 days of closure on September 11th 2001 + * + * @throws \Exception + */ + public function testGroundZero(): void + { + $this->assertHoliday( + self::REGION, + 'groundZero1', + self::OBSERVED_YEAR, + new \DateTime('2001-09-11', new \DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + 'groundZero2', + self::OBSERVED_YEAR, + new \DateTime('2001-09-12', new \DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + 'groundZero3', + self::OBSERVED_YEAR, + new \DateTime('2001-09-13', new \DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + 'groundZero4', + self::OBSERVED_YEAR, + new \DateTime('2001-09-14', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests years before 2001 + * + * @throws \Exception + */ + public function testGroundZeroBefore2001(): void + { + $this->assertNotHoliday( + self::REGION, + 'groundZero1', + self::OBSERVED_YEAR - 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'groundZero2', + self::OBSERVED_YEAR - 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'groundZero3', + self::OBSERVED_YEAR - 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'groundZero4', + self::OBSERVED_YEAR - 1 + ); + } + + /** + * Tests years after 2001 + * + * @throws \Exception + */ + public function testGroundZeroAfter2001(): void + { + $this->assertNotHoliday( + self::REGION, + 'groundZero1', + self::OBSERVED_YEAR + 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'groundZero2', + self::OBSERVED_YEAR + 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'groundZero3', + self::OBSERVED_YEAR + 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'groundZero4', + self::OBSERVED_YEAR + 1 + ); + } +} diff --git a/tests/USA/NYSE/HWBushMourningTest.php b/tests/USA/NYSE/HWBushMourningTest.php new file mode 100644 index 000000000..16740043e --- /dev/null +++ b/tests/USA/NYSE/HWBushMourningTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test day of closure of NYSE due to H.W. Bush Mourning proclamation + * + * @author Art Kurbakov + */ +class HWBushMourningTest extends USABaseTestCase +{ + /** + * Name of provider to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The year when the closure was observed. + */ + public const OBSERVED_YEAR = 2018; + + /** + * Tests day of closure on December 5th 2018 + * + * @throws \Exception + */ + public function testHWBushMourning(): void + { + $this->assertHoliday( + self::REGION, + 'HWBushMourning', + self::OBSERVED_YEAR, + new \DateTime('2018-12-05', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests years before 2018 + * + * @throws \Exception + */ + public function testHWBushMourningBefore2018(): void + { + $this->assertNotHoliday( + self::REGION, + 'HWBushMourning', + self::OBSERVED_YEAR - 1 + ); + } + + /** + * Tests years after 2018 + * + * @throws \Exception + */ + public function testHWBushMourningAfter2018(): void + { + $this->assertNotHoliday( + self::REGION, + 'HWBushMourning', + self::OBSERVED_YEAR + 1 + ); + } +} diff --git a/tests/USA/NYSE/HurricaneSandyTest.php b/tests/USA/NYSE/HurricaneSandyTest.php new file mode 100644 index 000000000..0aa821e3a --- /dev/null +++ b/tests/USA/NYSE/HurricaneSandyTest.php @@ -0,0 +1,100 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test 2 days of closure of NYSE due to Hurricane Sandy + * + * @author Art Kurbakov + */ +class HurricaneSandyTest extends USABaseTestCase +{ + /** + * Name of provider to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The year when the closure was observed. + */ + public const OBSERVED_YEAR = 2012; + + /** + * Tests both days of closure of October 29-30th, 2012 + * + * @throws \Exception + */ + public function testHurricaneSandyDays(): void + { + $this->assertHoliday( + self::REGION, + 'hurricaneSandy1', + self::OBSERVED_YEAR, + new \DateTime('2012-10-29', new \DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + 'hurricaneSandy2', + self::OBSERVED_YEAR, + new \DateTime('2012-10-30', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests years before 2012 + * + * @throws \Exception + */ + public function testHurricaneSandyBefore2012(): void + { + $this->assertNotHoliday( + self::REGION, + 'hurricaneSandy1', + self::OBSERVED_YEAR - 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'hurricaneSandy2', + self::OBSERVED_YEAR - 1 + ); + } + + /** + * Tests years after 2012 + * + * @throws \Exception + */ + public function testHurricaneSandyAfter2012(): void + { + $this->assertNotHoliday( + self::REGION, + 'hurricaneSandy1', + self::OBSERVED_YEAR + 1 + ); + + $this->assertNotHoliday( + self::REGION, + 'hurricaneSandy2', + self::OBSERVED_YEAR + 1 + ); + } +} diff --git a/tests/USA/NYSE/JuneteenthTest.php b/tests/USA/NYSE/JuneteenthTest.php new file mode 100644 index 000000000..dbf05966a --- /dev/null +++ b/tests/USA/NYSE/JuneteenthTest.php @@ -0,0 +1,106 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\Holiday; +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test Juneteenth holiday + * + * @author Art Kurbakov + */ +class JuneteenthTest extends USABaseTestCase +{ + /** + * Country (name) to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The name of the holiday. + */ + public const HOLIDAY = 'juneteenth'; + + /** + * The year in which the holiday was first established for NYSE. + */ + public const ESTABLISHMENT_YEAR = 2022; + + /** + * Tests Juneteenth on or after 2022. For NYSE Juneteenth is celebrated since 2022 on June 19th. + * + * @throws \Exception + */ + public function testJuneteenthOnAfter2022(): void + { + $year = 2023; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-6-19", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Juneteenth on or after 2022 when substituted on Monday (when Juneteenth falls on Sunday). + * + * @throws \Exception + */ + public function testJuneteenthOnAfter2022SubstitutedMonday(): void + { + $year = 2022; + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-6-20", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Juneteenth on or after 2022 when substituted on Friday (when Juneteenth falls on Saturday). + * + * @throws \Exception + */ + public function testJuneteenthOnAfter2022SubstitutedFriday(): void + { + $year = 2027; + $this->assertSubstituteHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-6-18", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Juneteenth before 2022. For NYSE Juneteenth is celebrated since 2022 on June 19th. + * + * @throws \Exception + */ + public function testJuneteenthBefore2022(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + self::ESTABLISHMENT_YEAR - 1 + ); + } +} diff --git a/tests/USA/NYSE/NYSETest.php b/tests/USA/NYSE/NYSETest.php new file mode 100644 index 000000000..58f04d88f --- /dev/null +++ b/tests/USA/NYSE/NYSETest.php @@ -0,0 +1,111 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class for testing closure days for NYSE + * + * @author Art Kurbakov + */ +class NYSETest extends USABaseTestCase implements ProviderTestCase +{ + /** + * Country (name) to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * @var int year random year number used for all tests in this Test Case + */ + protected int $year; + + /** + * Initial setup of this Test Case. + * + * @throws \Exception + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(2000); + } + + /** + * Tests if all official holidays in the USA are defined by the provider class. + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'newYearsDay', + 'martinLutherKingDay', + 'washingtonsBirthday', + 'goodFriday', + 'memorialDay', + 'independenceDay', + 'labourDay', + 'thanksgivingDay', + 'christmasDay', + ]; + + if (2001 == $this->year) { + $holidays[] = 'WTCAttack1'; + $holidays[] = 'WTCAttack2'; + $holidays[] = 'WTCAttack3'; + $holidays[] = 'WTCAttack4'; + } + + if (2004 == $this->year) { + $holidays[] = 'ReaganMourning'; + } + + if (2007 == $this->year) { + $holidays[] = 'GRFordMourning'; + } + + if (2012 == $this->year) { + $holidays[] = 'hurricaneSandy1'; + $holidays[] = 'hurricaneSandy2'; + } + + if (2018 == $this->year) { + $holidays[] = 'HWBushMourning'; + } + + if (2021 > $this->year) { + $holidays[] = 'juneteenth'; + } + + if (2025 > $this->year) { + $holidays[] = 'CarterMourning'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * @throws \ReflectionException + * @throws \Exception + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 5); + } +} diff --git a/tests/USA/NYSE/ReaganMourningTest.php b/tests/USA/NYSE/ReaganMourningTest.php new file mode 100644 index 000000000..c275d2a38 --- /dev/null +++ b/tests/USA/NYSE/ReaganMourningTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\USA\NYSE; + +use Yasumi\tests\USA\USABaseTestCase; + +/** + * Class to test day of closure of NYSE due to Reagan Mourning proclamation + * + * @author Art Kurbakov + */ +class ReaganMourningTest extends USABaseTestCase +{ + /** + * Name of provider to be tested. + */ + public const REGION = 'USA/NYSE'; + + /** + * The year when the closure was observed. + */ + public const OBSERVED_YEAR = 2004; + + /** + * Tests day of closure on June 11th 2004 + * + * @throws \Exception + */ + public function testReaganMourning(): void + { + $this->assertHoliday( + self::REGION, + 'ReaganMourning', + self::OBSERVED_YEAR, + new \DateTime('2004-06-11', new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests years before 2004 + * + * @throws \Exception + */ + public function testReaganMourningBefore2004(): void + { + $this->assertNotHoliday( + self::REGION, + 'ReaganMourning', + self::OBSERVED_YEAR - 1 + ); + } + + /** + * Tests years after 2004 + * + * @throws \Exception + */ + public function testReaganMourningAfter2004(): void + { + $this->assertNotHoliday( + self::REGION, + 'ReaganMourning', + self::OBSERVED_YEAR + 1 + ); + } +} From 8116887ed78cb172bd6d37db76758af7ee360008 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 1 Sep 2025 20:05:10 +0900 Subject: [PATCH 630/687] fix: typo Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/USA/NYSE.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/USA/NYSE.php b/src/Yasumi/Provider/USA/NYSE.php index cee19543f..4aaa59148 100644 --- a/src/Yasumi/Provider/USA/NYSE.php +++ b/src/Yasumi/Provider/USA/NYSE.php @@ -45,7 +45,7 @@ public function initialize(): void { $this->timezone = 'America/New_York'; - // Add exhange-specific holidays + // Add exchange-specific holidays $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); $this->calculateMartinLutherKingday(); $this->calculateWashingtonsBirthday(); From 56e4cc6f241bd1edac5aee0150d5927a30974d29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 07:49:00 +0900 Subject: [PATCH 631/687] build(deps): bump actions/stale from 9.1.0 to 10.0.0 (#385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.0.0.
Release notes

Sourced from actions/stale's releases.

v10.0.0

What's Changed

Breaking Changes

Enhancement

Dependency Upgrades

Documentation changes

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v9...v10.0.0

Changelog

Sourced from actions/stale's changelog.

Changelog

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=9.1.0&new-version=10.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8c8c90d14..8cc9dbce2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: steps: - name: "Prune stale issues and pull requests" - uses: "actions/stale@v9.1.0" + uses: "actions/stale@v10.0.0" with: repo-token: "${{ secrets.GITHUB_TOKEN }}" days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}" From fd8a630e3495833f3c19bf31203efba60615c00a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 20 Sep 2025 17:41:22 +0900 Subject: [PATCH 632/687] fix(new zealand): add missing namespace in the MatarikiTest The appropriate namespace was missing in the MatarikiTest class. Additionally, removed the unnecessary FQ namespace of the extended class and added a leading slash to native classes. Signed-off-by: Sacha Telgenhof --- tests/NewZealand/MatarikiTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/NewZealand/MatarikiTest.php b/tests/NewZealand/MatarikiTest.php index ce5c42c70..ecdf55feb 100644 --- a/tests/NewZealand/MatarikiTest.php +++ b/tests/NewZealand/MatarikiTest.php @@ -15,13 +15,15 @@ * @author Sacha Telgenhof */ +namespace Yasumi\tests\NewZealand; + use Yasumi\Holiday; use Yasumi\tests\HolidayTestCase; /** - * Class for testing Matariki in the New Zealand. + * Class for testing Matariki in New Zealand. */ -class MatarikiTest extends Yasumi\tests\NewZealand\NewZealandBaseTestCase implements HolidayTestCase +class MatarikiTest extends NewZealandBaseTestCase implements HolidayTestCase { /** * The name of the holiday. @@ -46,7 +48,7 @@ class MatarikiTest extends Yasumi\tests\NewZealand\NewZealandBaseTestCase implem * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date */ - public function testHoliday(int $year, DateTimeInterface $expected): void + public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -106,9 +108,9 @@ public function HolidayDataProvider(): array for ($y = 1; $y <= 100; ++$y) { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR); - $expected = new DateTime( + $expected = new \DateTime( sprintf('%04d-%02d-%02d', $year, $matarikiDates[$year]['month'], $matarikiDates[$year]['day']), - new DateTimeZone(self::TIMEZONE) + new \DateTimeZone(self::TIMEZONE) ); $data[] = [$year, $expected]; } From e486b6e584fe2155804cb2f7d6203ebcc2a258d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 22:33:16 +0900 Subject: [PATCH 633/687] build(deps): bump actions/stale from 10.0.0 to 10.1.0 (#386) Bumps [actions/stale](https://github.com/actions/stale) from 10.0.0 to 10.1.0. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8cc9dbce2..f340e3a1f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: steps: - name: "Prune stale issues and pull requests" - uses: "actions/stale@v10.0.0" + uses: "actions/stale@v10.1.0" with: repo-token: "${{ secrets.GITHUB_TOKEN }}" days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}" From 3fee43eef205f9e8efa9333caf3edfec2f982e4d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 7 Oct 2025 23:06:32 +0900 Subject: [PATCH 634/687] chore(changelog): update git-cliff config Added preprocessors to strip HTML content from commit messages. Especially dependabot creates commit message with expanded details in HTML cause git cliff to include that. The commit scope is set to be first character upper cased, however that causes some scope names (such as country names) not have the proper casing. Included preprocessors to override specific cases/nouns. Signed-off-by: Sacha Telgenhof --- cliff.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cliff.toml b/cliff.toml index 1581f1afb..03b7d414f 100644 --- a/cliff.toml +++ b/cliff.toml @@ -91,6 +91,18 @@ split_commits = false commit_preprocessors = [ { pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](/issues/${1}))"}, + # Strip HTML tags and content from commit messages + { pattern = "<[^>]*>.*?]*>", replace = "" }, + { pattern = "<[^>]*>", replace = "" }, + + # Fix proper nouns in commit scopes before upper_first is applied + { pattern = "\\(czech republic\\)", replace = "(Czech Republic)" }, + { pattern = "\\(new zealand\\)", replace = "(New Zealand)" }, + { pattern = "\\(south africa\\)", replace = "(South Africa)" }, + { pattern = "\\(south korea\\)", replace = "(South Korea)" }, + { pattern = "\\(united kingdom\\)", replace = "(United Kingdom)" }, + { pattern = "\\(united states\\)", replace = "(United States)" }, + # Check spelling of the commit message using https://github.com/crate-ci/typos. # If the spelling is incorrect, it will be fixed automatically. { pattern = '.*', replace_command = 'typos --write-changes -' } From e59894c7f853db03981a0c1f588cd214e9428405 Mon Sep 17 00:00:00 2001 From: Petr Soukup Date: Thu, 6 Nov 2025 13:46:38 +0100 Subject: [PATCH 635/687] feat: Add Slovenia holiday provider (#387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a new holiday provider for Slovenia (SI) with complete support for all 15 public holidays, test coverage, and Slovenian locale translations. - **Slovenia** (`src/Yasumi/Provider/Slovenia.php`) - ISO 3166 code: `SI` - Timezone: `Europe/Ljubljana` - 15 public holidays with proper year constraints | Holiday | Date | Since Year | Type | |---------|------|------------|------| | New Year's Day | January 1 | - | Official | | Second New Year's Day | January 2 | - | Official | | Prešeren Day | February 8 | 1991 | Official | | Day of Uprising Against Occupation | April 27 | 1945 | Official | | International Workers' Day | May 1 | - | Official | | Labour Day | May 2 | - | Official | | Easter | Variable | - | Official | | Easter Monday | Variable | - | Official | | Pentecost | Variable | - | Official | | Statehood Day | June 25 | 1991 | Official | | Assumption of Mary | August 15 | - | Official | | Reformation Day | October 31 | 1992 | Official | | Day of Remembrance for the Dead | November 1 | - | Official | | Christmas Day | December 25 | - | Official | | Independence and Unity Day | December 26 | 1991 | Official | - ✅ 119 tests with 345 assertions - 17 test files (base test case + provider test + 15 individual holiday tests) - All tests passing with proper year constraint validation - Added Slovenian (`sl`) translations for all holidays - 4 new translation files for Slovenia-specific holidays - Updated 11 existing translation files with Slovenian locale Implementation based on official sources: - [Public holidays in Slovenia - Wikipedia](https://en.wikipedia.org/wiki/Public_holidays_in_Slovenia) - [Public holidays - Government of Slovenia](https://www.gov.si/en/topics/public-holidays/) Historical context verified through: - [Slovenian independence movement history](https://en.wikipedia.org/wiki/Slovenian_independence_referendum,_1990) - [Reformation Day in Slovenia](https://en.wikipedia.org/wiki/Reformation_Day) **Code Quality:** - ✅ PSR-12 compliant (0 violations) - ✅ PHPStan analysis passed (level 8) - ✅ All tests passing - ✅ Proper year constraints for historically established holidays - ✅ Uses `CommonHolidays` and `ChristianHolidays` traits appropriately **Key Implementation Features:** - Year constraints for post-independence holidays (1991-1992) - Historical accuracy for WWII commemorations (1945) - Two consecutive Labour Days (May 1-2) unique to Slovenia - Proper timezone handling (Europe/Ljubljana) Run tests with: ```bash composer test -- --testsuite=Slovenia ``` Verify specific holiday for a year: ```php use Yasumi\Yasumi; $holidays = Yasumi::create('Slovenia', 2024); echo $holidays->getHoliday('statehoodDay')->format('Y-m-d'); // 2024-06-25 ``` - [x] Provider class implemented with all holidays - [x] All tests passing (119/119) - [x] PHPUnit test suite registered - [x] Code style check passed (PSR-12) - [x] Static analysis passed (PHPStan) - [x] Year constraints properly implemented - [x] Translations added for Slovenian locale - [x] Documentation and sources included - [x] Follows established provider patterns This provider follows the same patterns as neighboring countries: - Croatia (similar structure and complexity) - Austria (similar Christian holidays) Signed-off-by: Petr Soukup --- phpunit.xml.dist | 4 + src/Yasumi/Provider/Slovenia.php | 198 ++++++++++++++++++ .../data/translations/assumptionOfMary.php | 1 + src/Yasumi/data/translations/christmasDay.php | 1 + src/Yasumi/data/translations/easter.php | 1 + src/Yasumi/data/translations/easterMonday.php | 1 + .../data/translations/independenceDay.php | 23 ++ .../translations/internationalWorkersDay.php | 1 + src/Yasumi/data/translations/labourDay.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + src/Yasumi/data/translations/pentecost.php | 1 + src/Yasumi/data/translations/preserenDay.php | 22 ++ .../data/translations/reformationDay.php | 1 + .../data/translations/remembranceDay.php | 1 + .../data/translations/secondNewYearsDay.php | 1 + src/Yasumi/data/translations/statehoodDay.php | 23 ++ .../uprisingAgainstOccupation.php | 22 ++ tests/Slovenia/AssumptionOfMaryTest.php | 82 ++++++++ tests/Slovenia/ChristmasDayTest.php | 82 ++++++++ tests/Slovenia/EasterMondayTest.php | 73 +++++++ tests/Slovenia/EasterTest.php | 73 +++++++ tests/Slovenia/IndependenceDayTest.php | 97 +++++++++ .../Slovenia/InternationalWorkersDayTest.php | 82 ++++++++ tests/Slovenia/LabourDayTest.php | 82 ++++++++ tests/Slovenia/NewYearsDayTest.php | 82 ++++++++ tests/Slovenia/PentecostTest.php | 73 +++++++ tests/Slovenia/PreserenDayTest.php | 97 +++++++++ tests/Slovenia/ReformationDayTest.php | 97 +++++++++ tests/Slovenia/RemembranceDayTest.php | 82 ++++++++ tests/Slovenia/SecondNewYearsDayTest.php | 82 ++++++++ tests/Slovenia/SloveniaBaseTestCase.php | 40 ++++ tests/Slovenia/SloveniaTest.php | 118 +++++++++++ tests/Slovenia/StatehoodDayTest.php | 97 +++++++++ .../UprisingAgainstOccupationTest.php | 97 +++++++++ 34 files changed, 1739 insertions(+) create mode 100644 src/Yasumi/Provider/Slovenia.php create mode 100644 src/Yasumi/data/translations/independenceDay.php create mode 100644 src/Yasumi/data/translations/preserenDay.php create mode 100644 src/Yasumi/data/translations/statehoodDay.php create mode 100644 src/Yasumi/data/translations/uprisingAgainstOccupation.php create mode 100644 tests/Slovenia/AssumptionOfMaryTest.php create mode 100644 tests/Slovenia/ChristmasDayTest.php create mode 100644 tests/Slovenia/EasterMondayTest.php create mode 100644 tests/Slovenia/EasterTest.php create mode 100644 tests/Slovenia/IndependenceDayTest.php create mode 100644 tests/Slovenia/InternationalWorkersDayTest.php create mode 100644 tests/Slovenia/LabourDayTest.php create mode 100644 tests/Slovenia/NewYearsDayTest.php create mode 100644 tests/Slovenia/PentecostTest.php create mode 100644 tests/Slovenia/PreserenDayTest.php create mode 100644 tests/Slovenia/ReformationDayTest.php create mode 100644 tests/Slovenia/RemembranceDayTest.php create mode 100644 tests/Slovenia/SecondNewYearsDayTest.php create mode 100644 tests/Slovenia/SloveniaBaseTestCase.php create mode 100644 tests/Slovenia/SloveniaTest.php create mode 100644 tests/Slovenia/StatehoodDayTest.php create mode 100644 tests/Slovenia/UprisingAgainstOccupationTest.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 000f65b29..ded13ed3c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -163,6 +163,10 @@ ./tests/Slovakia + + + ./tests/Slovenia + ./tests/SouthAfrica diff --git a/src/Yasumi/Provider/Slovenia.php b/src/Yasumi/Provider/Slovenia.php new file mode 100644 index 000000000..da74d3c05 --- /dev/null +++ b/src/Yasumi/Provider/Slovenia.php @@ -0,0 +1,198 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Provider for all holidays in Slovenia. + */ +class Slovenia extends AbstractProvider +{ + use CommonHolidays; + use ChristianHolidays; + + /** + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'SI'; + + /** + * Initialize holidays for Slovenia. + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Europe/Ljubljana'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); + + // Add Christian holidays + $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->pentecost($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)); + + // Add Slovenia-specific holidays + $this->calculateSecondNewYearsDay(); + $this->calculatePreserenDay(); + $this->calculateUprisingAgainstOccupation(); + $this->calculateLabourDay(); + $this->calculateStatehoodDay(); + $this->calculateReformationDay(); + $this->calculateRemembranceDay(); + $this->calculateIndependenceDay(); + } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Slovenia', + 'https://www.gov.si/en/topics/public-holidays/', + ]; + } + + /** + * Second New Year's Day (January 2). + * + * @throws \Exception + */ + protected function calculateSecondNewYearsDay(): void + { + $this->addHoliday(new Holiday('secondNewYearsDay', [ + 'en' => 'Second New Year’s Day', + 'sl' => 'Novo leto (2. dan)', + ], new \DateTime("{$this->year}-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + + /** + * Prešeren Day, the Slovenian Cultural Holiday (February 8). + * Established in 1945, became a work-free holiday in 1991. + * + * @throws \Exception + */ + protected function calculatePreserenDay(): void + { + if ($this->year >= 1991) { + $this->addHoliday(new Holiday('preserenDay', [ + 'en' => 'Prešeren Day, Slovenian Cultural Holiday', + 'sl' => 'Prešernov dan, slovenski kulturni praznik', + ], new \DateTime("{$this->year}-2-8", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * Day of Uprising Against Occupation (April 27). + * Commemorates the Slovenian resistance against the Axis occupation in 1941. + * + * @throws \Exception + */ + protected function calculateUprisingAgainstOccupation(): void + { + if ($this->year >= 1945) { + $this->addHoliday(new Holiday('uprisingAgainstOccupation', [ + 'en' => 'Day of Uprising Against Occupation', + 'sl' => 'Dan upora proti okupatorju', + ], new \DateTime("{$this->year}-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * Labour Day (May 2). + * Slovenia celebrates two consecutive Labour Days (May 1 and May 2). + * + * @throws \Exception + */ + protected function calculateLabourDay(): void + { + $this->addHoliday(new Holiday('labourDay', [ + 'en' => 'Labour Day', + 'sl' => 'Praznik dela (2. dan)', + ], new \DateTime("{$this->year}-5-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + + /** + * Statehood Day (June 25). + * Commemorates Slovenia's declaration of independence from Yugoslavia in 1991. + * + * @throws \Exception + */ + protected function calculateStatehoodDay(): void + { + if ($this->year >= 1991) { + $this->addHoliday(new Holiday('statehoodDay', [ + 'en' => 'Statehood Day', + 'sl' => 'Dan državnosti', + ], new \DateTime("{$this->year}-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * Reformation Day (October 31). + * Added as a public holiday in 1992 to commemorate the Protestant Reformation. + * + * @throws \Exception + */ + protected function calculateReformationDay(): void + { + if ($this->year >= 1992) { + $this->addHoliday(new Holiday('reformationDay', [ + 'en' => 'Reformation Day', + 'sl' => 'Dan reformacije', + ], new \DateTime("{$this->year}-10-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * Day of Remembrance for the Dead (November 1). + * Slovenia's version of All Saints' Day. + * + * @throws \Exception + */ + protected function calculateRemembranceDay(): void + { + $this->addHoliday(new Holiday('remembranceDay', [ + 'en' => 'Day of Remembrance for the Dead', + 'sl' => 'Dan spomina na mrtve', + ], new \DateTime("{$this->year}-11-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + + /** + * Independence and Unity Day (December 26). + * Commemorates the 1990 plebiscite results and the 1991 formal independence. + * + * @throws \Exception + */ + protected function calculateIndependenceDay(): void + { + if ($this->year >= 1991) { + $this->addHoliday(new Holiday('independenceDay', [ + 'en' => 'Independence and Unity Day', + 'sl' => 'Dan samostojnosti in enotnosti', + ], new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale)); + } + } +} diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index f5d93378e..9b2ef7363 100644 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -32,4 +32,5 @@ 'pt' => 'Assunção de Nossa Senhora', 'ro' => 'Adormirea Maicii Domnului', 'sk' => 'Nanebovzatie Panny Márie', + 'sl' => 'Marijino vnebovzetje', ]; diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index ddfba2276..f98672c0a 100644 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -47,6 +47,7 @@ 'ro' => 'Crăciunul', 'ru' => 'Рождество', 'sk' => 'Prvý sviatok vianočný', + 'sl' => 'Božič', 'sv' => 'juldagen', 'uk' => 'Різдво', ]; diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index 7b9273382..f7cd6b8c9 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -42,6 +42,7 @@ 'pt' => 'Páscoa', 'ro' => 'Paștele', 'ru' => 'Пасха', + 'sl' => 'Velika noč', 'sv' => 'påskdagen', 'uk' => 'Великдень', ]; diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 4cdfdeab1..4b0334834 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -40,5 +40,6 @@ 'pl' => 'Poniedziałek Wielkanocny', 'ro' => 'A doua zi de Paște', 'sk' => 'Veľkonočný pondelok', + 'sl' => 'Velikonočni ponedeljek', 'sv' => 'annandag påsk', ]; diff --git a/src/Yasumi/data/translations/independenceDay.php b/src/Yasumi/data/translations/independenceDay.php new file mode 100644 index 000000000..cb9f94044 --- /dev/null +++ b/src/Yasumi/data/translations/independenceDay.php @@ -0,0 +1,23 @@ + + */ + +// Translations for Independence Day +return [ + 'en' => 'Independence Day', + 'hr' => 'Dan neovisnosti', + 'sl' => 'Dan samostojnosti in enotnosti', +]; diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index ce448a672..0255cd87e 100644 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -47,6 +47,7 @@ 'ro' => 'Ziua internațională a muncii', 'ru' => 'День международной солидарности трудящихся', 'sk' => 'Sviatok práce', + 'sl' => 'Praznik dela', 'sv' => 'första maj', 'uk' => 'День міжнародної солідарності трудящих', ]; diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 4aff80162..de2e92320 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -24,5 +24,6 @@ 'ko' => '노동절', 'nl' => 'Dag van de arbeid', 'sk' => 'Sviatok práce', + 'sl' => 'Praznik dela (2. dan)', 'tr' => 'Emek ve Dayanışma Günü', ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 018876d30..e129ef0e4 100644 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -49,6 +49,7 @@ 'ro' => 'Anul Nou', 'ru' => 'Новый год', 'sk' => 'Nový rok', + 'sl' => 'Novo leto', 'sv' => 'nyårsdagen', 'tr' => 'Yılbaşı', 'uk' => 'Новий Рік', diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index d322614e6..7473c580a 100644 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -35,6 +35,7 @@ 'pl' => 'Zielone Świątki', 'ro' => 'Rusaliile', 'ru' => 'Троица', + 'sl' => 'Binkoštna nedelja', 'sv' => 'pingstdagen', 'uk' => 'Трійця', ]; diff --git a/src/Yasumi/data/translations/preserenDay.php b/src/Yasumi/data/translations/preserenDay.php new file mode 100644 index 000000000..cc7021833 --- /dev/null +++ b/src/Yasumi/data/translations/preserenDay.php @@ -0,0 +1,22 @@ + + */ + +// Translations for Prešeren Day +return [ + 'en' => 'Prešeren Day, Slovenian Cultural Holiday', + 'sl' => 'Prešernov dan, slovenski kulturni praznik', +]; diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php index 7024e6ec4..66e6cfa3b 100644 --- a/src/Yasumi/data/translations/reformationDay.php +++ b/src/Yasumi/data/translations/reformationDay.php @@ -19,4 +19,5 @@ return [ 'de' => 'Reformationstag', 'en' => 'Reformation Day', + 'sl' => 'Dan reformacije', ]; diff --git a/src/Yasumi/data/translations/remembranceDay.php b/src/Yasumi/data/translations/remembranceDay.php index e18fffc08..bd1de39b7 100644 --- a/src/Yasumi/data/translations/remembranceDay.php +++ b/src/Yasumi/data/translations/remembranceDay.php @@ -19,4 +19,5 @@ return [ 'en' => 'Remembrance Day', 'fr' => 'Jour du souvenir', + 'sl' => 'Dan spomina na mrtve', ]; diff --git a/src/Yasumi/data/translations/secondNewYearsDay.php b/src/Yasumi/data/translations/secondNewYearsDay.php index 8fac2b818..20c89fca2 100644 --- a/src/Yasumi/data/translations/secondNewYearsDay.php +++ b/src/Yasumi/data/translations/secondNewYearsDay.php @@ -19,4 +19,5 @@ return [ 'da' => '2. nytårsdag', 'en' => '2nd January', + 'sl' => 'Novo leto (2. dan)', ]; diff --git a/src/Yasumi/data/translations/statehoodDay.php b/src/Yasumi/data/translations/statehoodDay.php new file mode 100644 index 000000000..3691a0fe8 --- /dev/null +++ b/src/Yasumi/data/translations/statehoodDay.php @@ -0,0 +1,23 @@ + + */ + +// Translations for Statehood Day +return [ + 'en' => 'Statehood Day', + 'hr' => 'Dan državnosti', + 'sl' => 'Dan državnosti', +]; diff --git a/src/Yasumi/data/translations/uprisingAgainstOccupation.php b/src/Yasumi/data/translations/uprisingAgainstOccupation.php new file mode 100644 index 000000000..c3972e80c --- /dev/null +++ b/src/Yasumi/data/translations/uprisingAgainstOccupation.php @@ -0,0 +1,22 @@ + + */ + +// Translations for Day of Uprising Against Occupation +return [ + 'en' => 'Day of Uprising Against Occupation', + 'sl' => 'Dan upora proti okupatorju', +]; diff --git a/tests/Slovenia/AssumptionOfMaryTest.php b/tests/Slovenia/AssumptionOfMaryTest.php new file mode 100644 index 000000000..a51f5e9b2 --- /dev/null +++ b/tests/Slovenia/AssumptionOfMaryTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Assumption of Mary in Slovenia. + */ +class AssumptionOfMaryTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(8, 15, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Marijino vnebovzetje'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/ChristmasDayTest.php b/tests/Slovenia/ChristmasDayTest.php new file mode 100644 index 000000000..7ae60bda5 --- /dev/null +++ b/tests/Slovenia/ChristmasDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Christmas Day in Slovenia. + */ +class ChristmasDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + 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 \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(12, 25, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Božič'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/EasterMondayTest.php b/tests/Slovenia/EasterMondayTest.php new file mode 100644 index 000000000..67bc53513 --- /dev/null +++ b/tests/Slovenia/EasterMondayTest.php @@ -0,0 +1,73 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Easter Monday in Slovenia. + */ +class EasterMondayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = 2024; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-1", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Velikonočni ponedeljek'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/EasterTest.php b/tests/Slovenia/EasterTest.php new file mode 100644 index 000000000..71a17a7a8 --- /dev/null +++ b/tests/Slovenia/EasterTest.php @@ -0,0 +1,73 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Easter in Slovenia. + */ +class EasterTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'easter'; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = 2024; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-3-31", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Velika noč'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/IndependenceDayTest.php b/tests/Slovenia/IndependenceDayTest.php new file mode 100644 index 000000000..59f2cf273 --- /dev/null +++ b/tests/Slovenia/IndependenceDayTest.php @@ -0,0 +1,97 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Independence and Unity Day in Slovenia. + */ +class IndependenceDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'independenceDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1991; + + /** + * Tests Independence Day. + * + * @throws \Exception + */ + public function testIndependenceDay(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Independence Day before 1991. + * + * @throws \Exception + */ + public function testIndependenceDayBefore1991(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Independence Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Dan samostojnosti in enotnosti'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Slovenia/InternationalWorkersDayTest.php b/tests/Slovenia/InternationalWorkersDayTest.php new file mode 100644 index 000000000..95d06af50 --- /dev/null +++ b/tests/Slovenia/InternationalWorkersDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing International Workers' Day in Slovenia. + */ +class InternationalWorkersDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'internationalWorkersDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(5, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Praznik dela'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/LabourDayTest.php b/tests/Slovenia/LabourDayTest.php new file mode 100644 index 000000000..cfd1ee037 --- /dev/null +++ b/tests/Slovenia/LabourDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Labour Day (May 2) in Slovenia. + */ +class LabourDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'labourDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(5, 2, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Praznik dela (2. dan)'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/NewYearsDayTest.php b/tests/Slovenia/NewYearsDayTest.php new file mode 100644 index 000000000..726a8bd50 --- /dev/null +++ b/tests/Slovenia/NewYearsDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing New Year's Day in Slovenia. + */ +class NewYearsDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Novo leto'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/PentecostTest.php b/tests/Slovenia/PentecostTest.php new file mode 100644 index 000000000..54ec10c7f --- /dev/null +++ b/tests/Slovenia/PentecostTest.php @@ -0,0 +1,73 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Pentecost in Slovenia. + */ +class PentecostTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'pentecost'; + + /** + * Tests the holiday defined in this test. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = 2024; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-5-19", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Binkoštna nedelja'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/PreserenDayTest.php b/tests/Slovenia/PreserenDayTest.php new file mode 100644 index 000000000..776b006d8 --- /dev/null +++ b/tests/Slovenia/PreserenDayTest.php @@ -0,0 +1,97 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Prešeren Day in Slovenia. + */ +class PreserenDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'preserenDay'; + + /** + * The year in which the holiday became work-free. + */ + public const ESTABLISHMENT_YEAR = 1991; + + /** + * Tests Prešeren Day. + * + * @throws \Exception + */ + public function testPreserenDay(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-2-8", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Prešeren Day before 1991. + * + * @throws \Exception + */ + public function testPreserenDayBefore1991(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Prešeren Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Prešernov dan, slovenski kulturni praznik'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Slovenia/ReformationDayTest.php b/tests/Slovenia/ReformationDayTest.php new file mode 100644 index 000000000..5810b81ee --- /dev/null +++ b/tests/Slovenia/ReformationDayTest.php @@ -0,0 +1,97 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Reformation Day in Slovenia. + */ +class ReformationDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'reformationDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1992; + + /** + * Tests Reformation Day. + * + * @throws \Exception + */ + public function testReformationDay(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Reformation Day before 1992. + * + * @throws \Exception + */ + public function testReformationDayBefore1992(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Reformation Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Dan reformacije'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Slovenia/RemembranceDayTest.php b/tests/Slovenia/RemembranceDayTest.php new file mode 100644 index 000000000..41ab622a1 --- /dev/null +++ b/tests/Slovenia/RemembranceDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Remembrance Day for the Dead in Slovenia. + */ +class RemembranceDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'remembranceDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(11, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Dan spomina na mrtve'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/SecondNewYearsDayTest.php b/tests/Slovenia/SecondNewYearsDayTest.php new file mode 100644 index 000000000..2e798840a --- /dev/null +++ b/tests/Slovenia/SecondNewYearsDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Second New Year's Day in Slovenia. + */ +class SecondNewYearsDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'secondNewYearsDay'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 2, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Novo leto (2. dan)'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovenia/SloveniaBaseTestCase.php b/tests/Slovenia/SloveniaBaseTestCase.php new file mode 100644 index 000000000..c00d308e8 --- /dev/null +++ b/tests/Slovenia/SloveniaBaseTestCase.php @@ -0,0 +1,40 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Slovenia holiday provider. + */ +abstract class SloveniaBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Country (name) to be tested. + */ + public const REGION = 'Slovenia'; + + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Europe/Ljubljana'; + + /** Locale that is considered common for this provider. */ + public const LOCALE = 'sl_SI'; +} diff --git a/tests/Slovenia/SloveniaTest.php b/tests/Slovenia/SloveniaTest.php new file mode 100644 index 000000000..da3efe644 --- /dev/null +++ b/tests/Slovenia/SloveniaTest.php @@ -0,0 +1,118 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Slovenia. + */ +class SloveniaTest extends SloveniaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected int $year; + + /** + * Initial setup of this Test Case. + * + * @throws \Exception + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1992); + } + + /** + * Tests if all official holidays in Slovenia are defined by the provider class. + */ + public function testOfficialHolidays(): void + { + $holidays = [ + 'newYearsDay', + 'secondNewYearsDay', + 'internationalWorkersDay', + 'labourDay', + 'easter', + 'easterMonday', + 'pentecost', + 'assumptionOfMary', + 'christmasDay', + 'remembranceDay', + ]; + + if ($this->year >= 1991) { + $holidays[] = 'preserenDay'; + $holidays[] = 'statehoodDay'; + $holidays[] = 'independenceDay'; + } + + if ($this->year >= 1945) { + $holidays[] = 'uprisingAgainstOccupation'; + } + + if ($this->year >= 1992) { + $holidays[] = 'reformationDay'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Slovenia are defined by the provider class. + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Slovenia are defined by the provider class. + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in Slovenia are defined by the provider class. + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in Slovenia are defined by the provider class. + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws \ReflectionException + * @throws \Exception + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Slovenia/StatehoodDayTest.php b/tests/Slovenia/StatehoodDayTest.php new file mode 100644 index 000000000..b51ca75c9 --- /dev/null +++ b/tests/Slovenia/StatehoodDayTest.php @@ -0,0 +1,97 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Statehood Day in Slovenia. + */ +class StatehoodDayTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'statehoodDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1991; + + /** + * Tests Statehood Day. + * + * @throws \Exception + */ + public function testStatehoodDay(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-6-25", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Statehood Day before 1991. + * + * @throws \Exception + */ + public function testStatehoodDayBefore1991(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Statehood Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Dan državnosti'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Slovenia/UprisingAgainstOccupationTest.php b/tests/Slovenia/UprisingAgainstOccupationTest.php new file mode 100644 index 000000000..7fecabd2f --- /dev/null +++ b/tests/Slovenia/UprisingAgainstOccupationTest.php @@ -0,0 +1,97 @@ + + */ + +namespace Yasumi\tests\Slovenia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Day of Uprising Against Occupation in Slovenia. + */ +class UprisingAgainstOccupationTest extends SloveniaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'uprisingAgainstOccupation'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1945; + + /** + * Tests Uprising Against Occupation Day. + * + * @throws \Exception + */ + public function testUprisingAgainstOccupation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-27", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Uprising Against Occupation Day before 1945. + * + * @throws \Exception + */ + public function testUprisingAgainstOccupationBefore1945(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests translated name of Uprising Against Occupation Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Dan upora proti okupatorju'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} From 7fda9e629ad9224bf77527d1842ba771bf618e51 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 6 Nov 2025 23:09:41 +0900 Subject: [PATCH 636/687] perf: fix needless sorting on every holiday insert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sorting after each insertion results in O(n² log n) complexity when adding n holidays. For a provider with 20 holidays, this means sorting 20 times instead of once. Using deferred sorting avoids this issue which could result in 10-20x faster initialization for providers with many holidays. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 34f07e8e2..18b2f4050 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -86,6 +86,11 @@ abstract class AbstractProvider implements \Countable, ProviderInterface, \Itera */ private array $holidays = []; + /** + * flag to track if holidays need to be sorted + */ + private bool $needSorting = false; + /** * Creates a new holiday provider (i.e. country/state). * @@ -114,7 +119,7 @@ public function addHoliday(Holiday $holiday): void } $this->holidays[$holiday->getKey()] = $holiday; - uasort($this->holidays, static fn (\DateTimeInterface $dateA, \DateTimeInterface $dateB): int => self::compareDates($dateA, $dateB)); + $this->needSorting = true; } public function removeHoliday(string $key): void @@ -182,6 +187,8 @@ public function count(): int public function getHolidays(): array { + $this->ensureSorted(); + return $this->holidays; } @@ -228,7 +235,9 @@ public function between( public function getIterator(): \ArrayIterator { - return new \ArrayIterator($this->getHolidays()); + $this->ensureSorted(); + + return new \ArrayIterator($this->holidays); } public function on(\DateTimeInterface $date): OnFilter @@ -238,6 +247,8 @@ public function on(\DateTimeInterface $date): OnFilter public function getHolidayDates(): array { + $this->ensureSorted(); + return array_map(static fn ($holiday): string => (string) $holiday, $this->holidays); } @@ -264,6 +275,18 @@ protected function isHolidayNameNotEmpty(string $key): bool private function clearHolidays(): void { $this->holidays = []; + $this->needSorting = false; + } + + /** + * Ensures holidays are sorted chronologically if needed. + */ + private function ensureSorted(): void + { + if ($this->needSorting) { + uasort($this->holidays, static fn (\DateTimeInterface $dateA, \DateTimeInterface $dateB): int => self::compareDates($dateA, $dateB)); + $this->needSorting = false; + } } /** From 637a3ca28d47a7b2e0353cb67e917e06c0eaea30 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 7 Nov 2025 00:05:06 +0900 Subject: [PATCH 637/687] perf: optimize filter count() Using the iterator_to_array entirely materializes the filtered result, consuming unnecessary extra memory. Using a straight-forward foreach loop will avoid the use of an iterator, avoiding duplicate storage and a slightly faster execution. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/AbstractFilter.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 2da2a668d..2e6db4b48 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -30,12 +30,16 @@ abstract class AbstractFilter extends \FilterIterator implements \Countable */ public function count(): int { - $names = array_map( - static fn ($holiday) => $holiday instanceof SubstituteHoliday ? - $holiday->getSubstitutedHoliday()->getKey() : $holiday->getKey(), - iterator_to_array($this) - ); + $names = []; - return count(array_unique($names)); + foreach ($this as $holiday) { + $key = $holiday instanceof SubstituteHoliday + ? $holiday->getSubstitutedHoliday()->getKey() + : $holiday->getKey(); + + $names[$key] = true; + } + + return count($names); } } From 69326249b1d5d90c10371c8c4e0906b258145300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Hamr=C3=A1k?= Date: Fri, 14 Nov 2025 12:28:42 +0100 Subject: [PATCH 638/687] feat(slovakia): Slovak State Consolidation Package for 2025 (#389) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some public holidays in Slovakia have been temporarily or permanently abolished. - May 8th - TEMPORARILY abolished (for 2025-2026) - September 15th - TEMPORARILY abolished (for 2025-2026) - November 17th - PERMANENTLY (completely) abolished from 2025 https://spravy.stvr.sk/2025/09/poslanci-definitivne-schvalili-zrusenie-niektorych-dni-pracovneho-pokoja-pozrite-si-ich-prehlad-na-rok-2026/ Signed-off-by: Ján Hamrák --- src/Yasumi/Provider/Slovakia.php | 45 +++++++++++-------- tests/Slovakia/SlovakiaTest.php | 17 +++++-- .../StruggleForFreedomAndDemocracyDayTest.php | 17 +++++-- 3 files changed, 54 insertions(+), 25 deletions(-) diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 7df661e16..9c6af2377 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -80,21 +80,23 @@ public function initialize(): void $this->locale, Holiday::TYPE_BANK )); - // 8.5. - $this->addHoliday($this->victoryInEuropeDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); + // 8.5. (<2025, >2026) + if ($this->year < 2025 || $this->year > 2026) { + $this->addHoliday($this->victoryInEuropeDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); + } // 5.7. $this->calculateSaintsCyrilAndMethodiusDay(); // 29.8. $this->calculateSlovakNationalUprisingDay(); // 1.9.(<2024) $this->calculateSlovakConstitutionDay(); - // 15.9. + // 15.9. (<2025, >2026) $this->calculateOurLadyOfSorrowsDay(); // 30.10.2018 $this->calculateDeclarationOfTheSlovakNation(); // 1.11. $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); - // 17.11. + // 17.11.(<2025) $this->calculateStruggleForFreedomAndDemocracyDay(); // 24.12. $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); @@ -247,6 +249,7 @@ protected 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 + * @see https://spravy.stvr.sk/2025/09/poslanci-definitivne-schvalili-zrusenie-niektorych-dni-pracovneho-pokoja-pozrite-si-ich-prehlad-na-rok-2026/ * * @throws \InvalidArgumentException * @throws UnknownLocaleException @@ -254,10 +257,12 @@ protected function calculateSlovakConstitutionDay(): void */ protected function calculateOurLadyOfSorrowsDay(): void { - $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ - 'sk' => 'Sviatok Sedembolestnej Panny Márie', - 'en' => 'Our Lady of Sorrows Day', - ], new \DateTime("{$this->year}-09-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); + if ($this->year < 2025 || $this->year > 2026) { + $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ + 'sk' => 'Sviatok Sedembolestnej Panny Márie', + 'en' => 'Our Lady of Sorrows Day', + ], new \DateTime("{$this->year}-09-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); + } } /** @@ -271,16 +276,18 @@ protected function calculateOurLadyOfSorrowsDay(): void */ protected function calculateStruggleForFreedomAndDemocracyDay(): void { - $this->addHoliday(new Holiday( - 'struggleForFreedomAndDemocracyDay', - [ - '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", DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale, - Holiday::TYPE_OFFICIAL - )); + if ($this->year < 2025) { + $this->addHoliday(new Holiday( + 'struggleForFreedomAndDemocracyDay', + [ + '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", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } } } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 34e9b9284..2ead79115 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -31,6 +31,10 @@ class SlovakiaTest extends SlovakiaBaseTestCase implements ProviderTestCase * @var int year random year number used for all tests in this Test Case */ protected int $year; + /** + * @var int year of Slovakia's consolidation + */ + protected int $yearOfConsolidation; /** * Initial setup of this Test Case. @@ -41,6 +45,7 @@ protected function setUp(): void { // NOTE: 1993 is the year Slovakia was founded as an independent state $this->year = $this->generateRandomYear(1993, 2100); + $this->yearOfConsolidation = $this->generateRandomYear(1993, 2024); } /** @@ -48,11 +53,14 @@ protected function setUp(): void */ public function testOfficialHolidays(): void { + $this->assertDefinedHolidays([ + 'struggleForFreedomAndDemocracyDay', + ], self::REGION, $this->yearOfConsolidation, Holiday::TYPE_OFFICIAL); + $this->assertDefinedHolidays([ 'slovakIndependenceDay', 'slovakNationalUprisingDay', 'saintsCyrilAndMethodiusDay', - 'struggleForFreedomAndDemocracyDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); $this->assertDefinedHolidays([ @@ -70,10 +78,13 @@ public function testOfficialHolidays(): void public function testBankHolidays(): void { $this->assertDefinedHolidays([ - 'epiphany', - 'internationalWorkersDay', 'victoryInEuropeDay', 'ourLadyOfSorrowsDay', + ], self::REGION, $this->yearOfConsolidation, Holiday::TYPE_BANK); + + $this->assertDefinedHolidays([ + 'epiphany', + 'internationalWorkersDay', 'allSaintsDay', 'christmasEve', 'christmasDay', diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 10b16be38..0944151a1 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -54,7 +54,18 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void */ public function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 17, self::TIMEZONE); + // Only use years between 1993 and 2024 + $years = range(1993, 2024); + $dates = []; + shuffle($years); + foreach (array_slice($years, 0, 10) as $year) { + $dates[] = [ + $year, + new \DateTime("{$year}-11-17", new \DateTimeZone(self::TIMEZONE)), + ]; + } + + return $dates; } /** @@ -67,7 +78,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $this->generateRandomYear(1993, 2024), [self::LOCALE => 'Deň boja za slobodu a demokraciu'] ); } @@ -79,6 +90,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(1993, 2024), Holiday::TYPE_OFFICIAL); } } From 487bd92ab4ddccf153c443ae9e8581b5329cbb61 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 14 Nov 2025 23:53:04 +0900 Subject: [PATCH 639/687] refactor: use strict comparison with equal types Additionally, added a readonly property where possible, and added missing parameter and return types in some closures. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 6 +++--- src/Yasumi/Filters/OnFilter.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 6 +++--- src/Yasumi/Provider/USA/NYSE.php | 12 ++++++------ src/Yasumi/Translations.php | 3 +-- src/Yasumi/Yasumi.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- .../AustralianCapitalTerritoryTest.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 2 +- .../NorthernTerritory/NorthernTerritoryTest.php | 2 +- tests/Australia/Queensland/Brisbane/BrisbaneTest.php | 2 +- tests/Australia/Queensland/QueenslandTest.php | 2 +- .../Australia/SouthAustralia/SouthAustraliaTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandTest.php | 2 +- .../Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- .../Northwest/CircularHead/CircularHeadTest.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- tests/Australia/Tasmania/South/SouthTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastTest.php | 2 +- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- tests/Australia/Victoria/VictoriaTest.php | 2 +- .../WesternAustralia/WesternAustraliaTest.php | 2 +- tests/Base/HolidayTest.php | 1 - tests/Mexico/TransmissionOfFederalPowerDayTest.php | 3 +-- tests/Randomizer.php | 2 +- tests/USA/NYSE/NYSETest.php | 10 +++++----- 28 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index ffae36558..1ef74b0ba 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -32,10 +32,10 @@ class BetweenFilter extends AbstractFilter private const DATE_FORMAT = 'Y-m-d'; /** start date of the time frame to check against. */ - private string $startDate; + private readonly string $startDate; /** end date of the time frame to check against */ - private string $endDate; + private readonly string $endDate; /** * Construct the Between FilterIterator Object. @@ -50,7 +50,7 @@ public function __construct( \Iterator $iterator, \DateTimeInterface $startDate, \DateTimeInterface $endDate, - private bool $equal = true, + private readonly bool $equal = true, ) { parent::__construct($iterator); $this->startDate = $startDate->format(self::DATE_FORMAT); diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 965263081..9f36ab431 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -31,7 +31,7 @@ class OnFilter extends AbstractFilter private const DATE_FORMAT = 'Y-m-d'; /** date to check for holidays */ - private string $date; + private readonly string $date; /** * Construct the On FilterIterator Object. diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 18b2f4050..edce65ecb 100644 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -102,7 +102,7 @@ abstract class AbstractProvider implements \Countable, ProviderInterface, \Itera public function __construct( int $year, ?string $locale = null, - private ?TranslationsInterface $globalTranslations = null, + private readonly ?TranslationsInterface $globalTranslations = null, ) { $this->clearHolidays(); @@ -174,7 +174,7 @@ public function whatWeekDayIs(string $key): int */ public function count(): int { - $names = array_map(static function ($holiday): string { + $names = array_map(static function (Holiday $holiday): string { if ($holiday instanceof SubstituteHoliday) { return $holiday->getSubstitutedHoliday()->getKey(); } @@ -249,7 +249,7 @@ public function getHolidayDates(): array { $this->ensureSorted(); - return array_map(static fn ($holiday): string => (string) $holiday, $this->holidays); + return array_map(static fn (Holiday $holiday): string => (string) $holiday, $this->holidays); } /** diff --git a/src/Yasumi/Provider/USA/NYSE.php b/src/Yasumi/Provider/USA/NYSE.php index 4aaa59148..254cd00d5 100644 --- a/src/Yasumi/Provider/USA/NYSE.php +++ b/src/Yasumi/Provider/USA/NYSE.php @@ -80,7 +80,7 @@ public function getSources(): array private function addWeatherEvents(): void { - if (2012 == $this->year) { + if (2012 === $this->year) { $this->addHoliday(new Holiday('hurricaneSandy1', [], new \DateTime('2012-10-29', new \DateTimeZone($this->timezone)))); $this->addHoliday(new Holiday('hurricaneSandy2', [], new \DateTime('2012-10-30', new \DateTimeZone($this->timezone)))); } @@ -88,7 +88,7 @@ private function addWeatherEvents(): void private function addEmergencies(): void { - if (2001 == $this->year) { + if (2001 === $this->year) { $this->addHoliday(new Holiday('groundZero1', [], new \DateTime('2001-09-11', new \DateTimeZone($this->timezone)))); $this->addHoliday(new Holiday('groundZero2', [], new \DateTime('2001-09-12', new \DateTimeZone($this->timezone)))); $this->addHoliday(new Holiday('groundZero3', [], new \DateTime('2001-09-13', new \DateTimeZone($this->timezone)))); @@ -98,16 +98,16 @@ private function addEmergencies(): void private function addProclamations(): void { - if (2004 == $this->year) { + if (2004 === $this->year) { $this->addHoliday(new Holiday('ReaganMourning', [], new \DateTime('2004-06-11', new \DateTimeZone($this->timezone)))); } - if (2007 == $this->year) { + if (2007 === $this->year) { $this->addHoliday(new Holiday('GRFordMourning', [], new \DateTime('2007-01-02', new \DateTimeZone($this->timezone)))); } - if (2018 == $this->year) { + if (2018 === $this->year) { $this->addHoliday(new Holiday('HWBushMourning', [], new \DateTime('2018-12-05', new \DateTimeZone($this->timezone)))); } - if (2025 == $this->year) { + if (2025 === $this->year) { $this->addHoliday(new Holiday('CarterMourning', [], new \DateTime('2025-01-09', new \DateTimeZone($this->timezone)))); } } diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index a96458a5e..b82bfe139 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -31,9 +31,8 @@ class Translations implements TranslationsInterface * * @param array $availableLocales list of all defined locales */ - public function __construct(private array $availableLocales) + public function __construct(private readonly array $availableLocales) { - $this->availableLocales = $availableLocales; } /** diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index b39a2a721..79b62be8c 100644 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -250,7 +250,7 @@ public static function getProviders(): array continue; } - $providers[strtoupper($class->getConstant($key))] = $provider; + $providers[strtoupper((string) $class->getConstant($key))] = $provider; } return $providers; diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 91ff86bce..30fb702db 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -55,7 +55,7 @@ public function testOfficialHolidays(): void 'anzacDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index e91b808b6..899214145 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -61,7 +61,7 @@ public function testOfficialHolidays(): void 'reconciliationDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index c06b8bed3..7574463cf 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -59,7 +59,7 @@ public function testOfficialHolidays(): void 'labourDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $holidays[] = 'nationalDayOfMourning'; } diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index 32d7cd936..a6b5d997b 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -59,7 +59,7 @@ public function testOfficialHolidays(): void 'picnicDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 11724d88f..b74ab2902 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -57,7 +57,7 @@ public function testOfficialHolidays(): void 'labourDay', 'peoplesDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 378dda951..3c23fb798 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -56,7 +56,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'labourDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index 9a7cb695b..7702bf3bd 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'labourDay', 'adelaideCup', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 0184c0894..2b5b19359 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'recreationDay', 'devonportShow', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index c5deed0f7..aa91afd4b 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'recreationDay', 'flindersIslandShow', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index be07df745..1b5495de9 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'recreationDay', 'kingIslandShow', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index a0a1eafe0..c4f4629ce 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'recreationDay', 'launcestonShow', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 639b6f3f4..17dfc0d05 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'burnieShow', 'agfest', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index fb917a84b..5d2f6fec2 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'recreationDay', 'burnieShow', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index b21ba507d..0d68262c6 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void 'recreationDay', 'hobartShow', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index 5331f00b8..cbdbfb318 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -57,7 +57,7 @@ public function testOfficialHolidays(): void 'hobartShow', 'hobartRegatta', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 65d8e5042..9ac30b695 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -57,7 +57,7 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 731088c5d..c4441f0b3 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -60,7 +60,7 @@ public function testOfficialHolidays(): void 'aflGrandFinalFriday', 'melbourneCup', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index eeb5629b7..5fcfbbf8a 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -57,7 +57,7 @@ public function testOfficialHolidays(): void 'labourDay', 'westernAustraliaDay', ]; - if (2022 == $this->year) { + if (2022 === $this->year) { $expectedHolidays[] = 'nationalDayOfMourning'; } $this->assertDefinedHolidays($expectedHolidays, $this->region, $this->year, Holiday::TYPE_OFFICIAL); diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 6c8cda0f3..45791d7a6 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -75,7 +75,6 @@ public function testHolidayGetLocales(): void { $holiday = new Holiday('testHoliday', [], new \DateTime(), 'ca_ES_VALENCIA'); $method = new \ReflectionMethod(Holiday::class, 'getLocales'); - $method->setAccessible(true); self::assertEquals(['ca_ES_VALENCIA', 'ca_ES', 'ca', 'en_US', 'en', Holiday::LOCALE_KEY], $method->invoke($holiday, null)); self::assertEquals(['de_DE', 'de', 'es_ES', 'es'], $method->invoke($holiday, ['de_DE', 'es_ES'])); diff --git a/tests/Mexico/TransmissionOfFederalPowerDayTest.php b/tests/Mexico/TransmissionOfFederalPowerDayTest.php index 78718d78a..0d49385bf 100644 --- a/tests/Mexico/TransmissionOfFederalPowerDayTest.php +++ b/tests/Mexico/TransmissionOfFederalPowerDayTest.php @@ -63,8 +63,7 @@ public function testNotHolidayOutsideElectionYear(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $year, - new \DateTime("{$year}-10-01", new \DateTimeZone(self::TIMEZONE)) + $year ); } diff --git a/tests/Randomizer.php b/tests/Randomizer.php index ff933f93a..7f7536607 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -310,7 +310,7 @@ public static function numberBetween(int $int1 = 0, int $int2 = 2_147_483_647): * * @example DateTime('1999-02-02 11:42:52') */ - public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null): \DateTimeInterface + public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', ?string $timezone = null): \DateTimeInterface { $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); diff --git a/tests/USA/NYSE/NYSETest.php b/tests/USA/NYSE/NYSETest.php index 58f04d88f..b3a785f65 100644 --- a/tests/USA/NYSE/NYSETest.php +++ b/tests/USA/NYSE/NYSETest.php @@ -65,27 +65,27 @@ public function testOfficialHolidays(): void 'christmasDay', ]; - if (2001 == $this->year) { + if (2001 === $this->year) { $holidays[] = 'WTCAttack1'; $holidays[] = 'WTCAttack2'; $holidays[] = 'WTCAttack3'; $holidays[] = 'WTCAttack4'; } - if (2004 == $this->year) { + if (2004 === $this->year) { $holidays[] = 'ReaganMourning'; } - if (2007 == $this->year) { + if (2007 === $this->year) { $holidays[] = 'GRFordMourning'; } - if (2012 == $this->year) { + if (2012 === $this->year) { $holidays[] = 'hurricaneSandy1'; $holidays[] = 'hurricaneSandy2'; } - if (2018 == $this->year) { + if (2018 === $this->year) { $holidays[] = 'HWBushMourning'; } From 656f04473653770e3bbda7c8bc99e0ecaa67e980 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 27 Nov 2025 01:24:41 +0900 Subject: [PATCH 640/687] test(slovakia): fix failing tests for the years 2025 and 2026 The generator for the random years did not honor that for the Victory In Europe Day and Our Lady Of Sorrows Day are not celebrated in 2025 and 2026. Signed-off-by: Sacha Telgenhof --- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 37 +++++++++++++++------- tests/Slovakia/VictoryInEuropeDayTest.php | 34 +++++++++++++++----- 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index e15816f69..e4c690571 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -21,15 +21,12 @@ use Yasumi\tests\HolidayTestCase; /** - * Class for testing a holiday in Slovakia. + * Class for testing the Our Lady of Sorrows holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase { - /** - * The name of the holiday. - */ public const HOLIDAY = 'ourLadyOfSorrowsDay'; /** @@ -37,12 +34,17 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param \DateTime $expected the expected date + * @param int $year the year for which this holiday needs to be tested + * @param string $expected the expected date */ - public function testHoliday(int $year, \DateTimeInterface $expected): void + public function testHoliday(int $year, $expected): void { - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + ); } /** @@ -54,7 +56,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void */ public function HolidayDataProvider(): array { - return $this->generateRandomDates(9, 15, self::TIMEZONE); + return $this->generateRandomDatesWithModifier(9, 15, function ($year, \DateTime $date): void { + // Our Lady of Sorrows Day is not observed in 2025 and 2026 + if (in_array($year, [2025, 2026])) { + return; + } + }, 5, 1000, self::TIMEZONE); } /** @@ -64,10 +71,14 @@ public function HolidayDataProvider(): array */ public function testTranslation(): void { + // Our Lady of Sorrows Day is not observed in 2025 and 2026 + $validYears = array_merge(range(1993, 2024), range(2027, 2100)); + $year = $this->randomYearFromArray($validYears); + $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $year, [self::LOCALE => 'Sviatok Sedembolestnej Panny Márie'] ); } @@ -79,6 +90,10 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + // Our Lady of Sorrows Day is not observed in 2025 and 2026 + $validYears = array_merge(range(1993, 2024), range(2027, 2100)); + $year = $this->randomYearFromArray($validYears); + + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 9b6a257b1..fb675bec9 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -21,7 +21,7 @@ use Yasumi\tests\HolidayTestCase; /** - * Class for testing a holiday in Slovakia. + * Class for testing Victory in Europe holiday in Slovakia. * * @author Andrej Rypak (dakujem) */ @@ -37,12 +37,17 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements HolidayTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested - * @param \DateTime $expected the expected date + * @param int $year the year for which this holiday needs to be tested + * @param string $expected the expected date */ - public function testHoliday(int $year, \DateTimeInterface $expected): void + public function testHoliday(int $year, string $expected): void { - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + ); } /** @@ -54,7 +59,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void */ public function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 8, self::TIMEZONE); + return $this->generateRandomDatesWithModifier(5, 8, function ($year, \DateTime $date): void { + // Victory in Europe Day is not observed in 2025 and 2026 + if (in_array($year, [2025, 2026])) { + return; + } + }, 5, 1000, self::TIMEZONE); } /** @@ -64,10 +74,14 @@ public function HolidayDataProvider(): array */ public function testTranslation(): void { + // Victory in Europe Day is not observed in 2025 and 2026 + $validYears = array_merge(range(1993, 2024), range(2027, 2100)); + $year = $this->randomYearFromArray($validYears); + $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $year, [self::LOCALE => 'Deň víťazstva nad fašizmom'] ); } @@ -79,6 +93,10 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + // Victory in Europe Day is not observed in 2025 and 2026 + $validYears = array_merge(range(1993, 2024), range(2027, 2100)); + $year = $this->randomYearFromArray($validYears); + + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_BANK); } } From 81bb7a31929f99506d7bd2e420e26c02b7ece496 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Nov 2025 01:41:03 +0900 Subject: [PATCH 641/687] build(deps): bump actions/checkout from 5 to 6 (#390) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
Release notes

Sourced from actions/checkout's releases.

v6.0.0

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config.

This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.

v5.0.1

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v5...v5.0.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

V6.0.0

V5.0.1

V5.0.0

V4.3.1

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index e2c0d07a7..21b63ad07 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 78560eab1..f98dbc651 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 312a19b86..d312b89ed 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: git config --global core.eol lf - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install PHP uses: shivammathur/setup-php@v2 From 4960a96ce774c3ad15b3426c57d1fab2dc08f61c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 27 Nov 2025 23:11:16 +0900 Subject: [PATCH 642/687] build: fix deprecated 'set-output' command The `set-output` command is deprecated and will be disabled soon. See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Additionally removed the coverage setting as it is not used. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 4 ++-- .github/workflows/static-analysis.yml | 4 ++-- .github/workflows/testing.yml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 21b63ad07..cf75a3d33 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -27,12 +27,12 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - coverage: pcov extensions: intl - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + shell: bash + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer dependencies uses: actions/cache@v4 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index f98dbc651..df463e18e 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -27,12 +27,12 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - coverage: pcov extensions: intl - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + shell: bash + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer dependencies uses: actions/cache@v4 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d312b89ed..c52a84594 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -27,12 +27,12 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - coverage: pcov extensions: intl, calendar - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + shell: bash + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer dependencies uses: actions/cache@v4 @@ -48,4 +48,4 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Run unit tests - run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml + run: vendor/bin/phpunit From 556e5c12a244dcab2163d8fe9f466e2d766481e3 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 7 Dec 2025 20:54:58 +0900 Subject: [PATCH 643/687] build: remove Psalm static analysis tool Using both Psalm and PHPStan introduced redundant and sometimes conflicting checks, duplicate configuration, and extra overhead to maintain two rule sets. Although Psalm has been stricter in some areas, it always lagged in supporting the latest PHP version, making testing Yasumi on all supported PHP versions cumbersome. With PHPStan alone, static analysis remains reliable and benefits from a more active ecosystem of plugins and ongoing maintenance. Configuration and CI scripts have been updated to reflect PHPStan as the sole static-analysis tool. Signed-off-by: Sacha Telgenhof --- .github/workflows/static-analysis.yml | 3 --- composer.json | 8 +------ psalm.xml.dist | 31 --------------------------- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 psalm.xml.dist diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index df463e18e..a5e6e8462 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -49,6 +49,3 @@ jobs: - name: Run static analysis - PHPStan run: composer phpstan - - - name: Run static analysis - Psalm - run: vendor/bin/psalm diff --git a/composer.json b/composer.json index 627136af9..401fe4231 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,7 @@ "mikey179/vfsstream": "^1.6", "phpstan/phpstan": "^2.1", "phpstan/phpstan-deprecation-rules": "^2.0", - "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^6.13" + "phpunit/phpunit": "^8.5 || ^9.6" }, "suggest": { "ext-calendar": "For calculating the date of Easter" @@ -69,14 +68,9 @@ "sort-packages": true }, "scripts": { - "analyse": [ - "@phpstan", - "@psalm" - ], "cs": "vendor/bin/php-cs-fixer fix -v --diff --dry-run", "cs-fix": "vendor/bin/php-cs-fixer fix -v", "phpstan": "vendor/bin/phpstan analyse", - "psalm": "vendor/bin/psalm --threads=2", "test": "vendor/bin/phpunit" } } diff --git a/psalm.xml.dist b/psalm.xml.dist deleted file mode 100644 index 163a67019..000000000 --- a/psalm.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - From 1c7ef41e0d7f70550ae2fcb6cd4664230f5f9371 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 27 Nov 2025 22:49:46 +0900 Subject: [PATCH 644/687] build: add support for PHP 8.5 PHP 8.5 was released in November 2025 and this commit will add 8.5 to the list of PHP versions to be used in the CI pipelines. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index cf75a3d33..984386734 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest] - php-versions: ["8.1", "8.2", "8.3", "8.4"] + php-versions: ["8.1", "8.2", "8.3", "8.4", "8.5"] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index a5e6e8462..cb9f777ed 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest] - php-versions: ["8.1", "8.2", "8.3", "8.4"] + php-versions: ["8.1", "8.2", "8.3", "8.4", "8.5"] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c52a84594..d222f44bb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest] - php-versions: ["8.1", "8.2", "8.3", "8.4"] + php-versions: ["8.1", "8.2", "8.3", "8.4", "8.5"] steps: - name: Set git to use LF From cc553d06dd0bca0633ccd04f2ce3a9c0beef536f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 7 Dec 2025 21:38:36 +0900 Subject: [PATCH 645/687] doc: add requirements and installation/quick start sections Although the documentation site includes everything that is needed to install and use Yasumi, it is also helpful to include this in the README file. Signed-off-by: Sacha Telgenhof --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 022b12e0e..0dbb9c68b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,51 @@ information. In addition, no exhaustive PHP library exists today covering a wide countries. [PEAR's Date_Holidays](https://pear.php.net/package/Date_Holidays) library was a similar attempt, however it hasn't been updated for a long time. +## Requirements + +Yasumi requires **PHP 8.1** or higher. The library supports PHP 8.1, 8.2, 8.3, 8.4, and 8.5. + +For detailed information about supported PHP versions and security updates, please refer to +the [SECURITY.md](SECURITY.md) file. + +## Installation + +Install Yasumi using [Composer](https://getcomposer.org): + +```shell ++composer require azuyalabs/yasumi +``` + +## Quick Start + +Here's a simple example to get you started: + +```php +getName() . ': ' . $holiday->format('Y-m-d') . PHP_EOL; +} + +// Get a specific holiday +$independenceDay = $holidays->getHoliday('independenceDay'); +echo $independenceDay->getName() . ' is on ' . $independenceDay->format('F j, Y') . PHP_EOL; + +// Check if a date is a holiday +$newYearsDay = $holidays->getHoliday('newYearsDay'); +if ($newYearsDay !== null) { + echo 'New Year\'s Day is a holiday!' . PHP_EOL; +} +``` + +For more examples, check the [examples](examples/) directory in the repository. + ## Highlights The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. @@ -27,7 +72,7 @@ calculate holidays. - Pure PHP with a straightforward API - Framework-agnostic - Use of Providers to easily extend and expand new Holidays -- Common Holiday Providers +- Common Holiday Providers (e.g. Christian Holidays) - Accounts for the date/time when holidays have been officially established and/or abolished - Filters enabling to easily select certain holiday types (Official, Observed, Bank, Seasonal or Other) - Global Translations From 98b83d94fbec841eb24dbe06a7b61f8e9e74ecf0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 08:59:52 +0900 Subject: [PATCH 646/687] build(deps): bump actions/stale from 10.1.0 to 10.1.1 (#391) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/stale](https://github.com/actions/stale) from 10.1.0 to 10.1.1.
Release notes

Sourced from actions/stale's releases.

v10.1.1

What's Changed

Bug Fix

Improvement

Dependency Upgrades

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v10...v10.1.1

Changelog

Sourced from actions/stale's changelog.

Changelog

Commits
  • 9971854 build(deps): bump actions/checkout from 4 to 6 (#1306)
  • 5611b9d build(deps): bump actions/publish-action from 0.3.0 to 0.4.0 (#1291)
  • fad0de8 Improves error handling when rate limiting is disabled on GHES. (#1300)
  • 39bea7d Add Missing Input Reading for only-issue-types (#1298)
  • e46bbab build(deps-dev): bump @​types/node from 20.10.3 to 24.2.0 and document breakin...
  • 65d1d48 build(deps-dev): bump eslint-config-prettier from 8.10.0 to 10.1.8 (#1276)
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=10.1.0&new-version=10.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f340e3a1f..a489da7d0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: steps: - name: "Prune stale issues and pull requests" - uses: "actions/stale@v10.1.0" + uses: "actions/stale@v10.1.1" with: repo-token: "${{ secrets.GITHUB_TOKEN }}" days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}" From 1a5c206c2a5df373d3389f64cd5a3eba2274d5a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:51:37 +0900 Subject: [PATCH 647/687] build(deps): bump actions/cache from 4 to 5 (#392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
Release notes

Sourced from actions/cache's releases.

v5.0.0

[!IMPORTANT] actions/cache@v5 runs on the Node.js 24 runtime and requires a minimum Actions Runner version of 2.327.1.

If you are using self-hosted runners, ensure they are updated before upgrading.


What's Changed

Full Changelog: https://github.com/actions/cache/compare/v4.3.0...v5.0.0

v4.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v4...v4.3.0

v4.2.4

What's Changed

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v4...v4.2.4

v4.2.3

What's Changed

  • Update to use @​actions/cache 4.0.3 package & prepare for new release by @​salmanmkc in actions/cache#1577 (SAS tokens for cache entries are now masked in debug logs)

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v4.2.2...v4.2.3

... (truncated)

Changelog

Sourced from actions/cache's changelog.

Releases

Changelog

5.0.1

  • Update @azure/storage-blob to ^12.29.1 via @actions/cache@5.0.1 #1685

5.0.0

[!IMPORTANT] actions/cache@v5 runs on the Node.js 24 runtime and requires a minimum Actions Runner version of 2.327.1. If you are using self-hosted runners, ensure they are updated before upgrading.

4.3.0

  • Bump @actions/cache to v4.1.0

4.2.4

  • Bump @actions/cache to v4.0.5

4.2.3

  • Bump @actions/cache to v4.0.3 (obfuscates SAS token in debug logs for cache entries)

4.2.2

  • Bump @actions/cache to v4.0.2

4.2.1

  • Bump @actions/cache to v4.0.1

4.2.0

TLDR; The cache backend service has been rewritten from the ground up for improved performance and reliability. actions/cache now integrates with the new cache service (v2) APIs.

The new service will gradually roll out as of February 1st, 2025. The legacy service will also be sunset on the same date. Changes in these release are fully backward compatible.

We are deprecating some versions of this action. We recommend upgrading to version v4 or v3 as soon as possible before February 1st, 2025. (Upgrade instructions below).

If you are using pinned SHAs, please use the SHAs of versions v4.2.0 or v3.4.0

If you do not upgrade, all workflow runs using any of the deprecated actions/cache will fail.

Upgrading to the recommended versions will not break your workflows.

4.1.2

... (truncated)

Commits
  • 9255dc7 Merge pull request #1686 from actions/cache-v5.0.1-release
  • 8ff5423 chore: release v5.0.1
  • 9233019 Merge pull request #1685 from salmanmkc/node24-storage-blob-fix
  • b975f2b fix: add peer property to package-lock.json for dependencies
  • d0a0e18 fix: update license files for @​actions/cache, fast-xml-parser, and strnum
  • 74de208 fix: update @​actions/cache to ^5.0.1 for Node.js 24 punycode fix
  • ac7f115 peer
  • b0f846b fix: update @​actions/cache with storage-blob fix for Node.js 24 punycode depr...
  • a783357 Merge pull request #1684 from actions/prepare-cache-v5-release
  • 3bb0d78 docs: highlight v5 runner requirement in releases
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 984386734..37bcf77bc 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -35,7 +35,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer dependencies - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index cb9f777ed..bfd4174e8 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -35,7 +35,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer dependencies - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d222f44bb..ab3d6f0a6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -35,7 +35,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer dependencies - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} From 2756fa261d0aba28591f6d299cffce485378000a Mon Sep 17 00:00:00 2001 From: Remco Raaijmakers Date: Wed, 24 Dec 2025 13:40:01 +0100 Subject: [PATCH 648/687] feat(netherlands): add new holiday-equivalent days 2026 till 2028 (#393) There are some new days (holiday-equivalent) for the Netherlands to be added. These days are needed when for example calculating the number of days some has to pay their bill or days you cannot contact some about their open debt. See: - https://wetten.overheid.nl/BWBR0051300/2025-07-22 - https://nvi.nl/nieuws/de-wki-en-de-algemene-termijnenwet Signed-off-by: Remco Co-authored-by: Remco Raaijmakers --- src/Yasumi/Provider/Netherlands.php | 54 +++++++++++++++++++++++++++ tests/Netherlands/NetherlandsTest.php | 14 +++++++ 2 files changed, 68 insertions(+) diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 208243299..dca06e50a 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -84,6 +84,7 @@ public function initialize(): void $this->calculateQueensday(); $this->calculateKingsday(); $this->calculateCommemorationLiberationDay(); + $this->addEquivalentDays(); } public function getSources(): array @@ -283,4 +284,57 @@ protected function calculateCommemorationLiberationDay(): void )); } } + + /** + * Extra days that are added for the "Algemene termijnenwet". + * These extra days are in the current cases the Friday after an official holiday, but these "day after" + * are not official and just administrative. + * + * @see https://wetten.overheid.nl/BWBR0002448/2010-10-10/ + * @see https://wetten.overheid.nl/BWBR0051300/2025-07-22 + */ + protected function addEquivalentDays(): void + { + if (2026 == $this->year) { + $this->addHoliday(new Holiday( + 'dayAfterNewYearsDay', + [], + new \DateTime("{$this->year}-1-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + $this->addHoliday(new Holiday( + 'dayAfterAscensionDay', + ['en' => 'Day after Ascension Day', 'nl' => 'Dag na Hemelvaart'], + new \DateTime("{$this->year}-5-15", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + } + if (2027 == $this->year) { + $this->addHoliday(new Holiday( + 'dayAfterAscensionDay', + ['en' => 'Day after Ascension Day', 'nl' => 'Dag na Hemelvaart'], + new \DateTime("{$this->year}-5-7", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + } + if (2028 == $this->year) { + $this->addHoliday(new Holiday( + 'dayAfterKingsDay', + ['en' => 'Day after Kings Day', 'nl' => 'Dag na Koningsdag'], + new \DateTime("{$this->year}-4-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + $this->addHoliday(new Holiday( + 'dayAfterAscensionDay', + ['en' => 'Day after Ascension Day', 'nl' => 'Dag na Hemelvaart'], + new \DateTime("{$this->year}-5-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OTHER + )); + } + } } diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 1d245c81c..f36e94636 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -105,6 +105,20 @@ public function testOtherHolidays(): void 'epiphany', 'princesDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); + + $this->assertDefinedHolidays([ + 'dayAfterNewYearsDay', + 'dayAfterAscensionDay', + ], self::REGION, 2026, Holiday::TYPE_OTHER); + + $this->assertDefinedHolidays([ + 'dayAfterAscensionDay', + ], self::REGION, 2027, Holiday::TYPE_OTHER); + + $this->assertDefinedHolidays([ + 'dayAfterKingsDay', + 'dayAfterAscensionDay', + ], self::REGION, 2028, Holiday::TYPE_OTHER); } /** From 654cf3805a80af94237e3bafef8415c3efe6170d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 25 Dec 2025 23:55:53 +0900 Subject: [PATCH 649/687] test(poland): fix Christmas Eve test The test to check if Christmas Eve is not a holiday before it was established failed as the random test year could include the year of establishment. Signed-off-by: Sacha Telgenhof --- tests/Poland/ChristmasEveTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Poland/ChristmasEveTest.php b/tests/Poland/ChristmasEveTest.php index 716fe29d5..8ee8f88ed 100644 --- a/tests/Poland/ChristmasEveTest.php +++ b/tests/Poland/ChristmasEveTest.php @@ -51,7 +51,7 @@ public function testHoliday(): void */ public function testNotHoliday(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } From c32430294b0f694016d9e08461b4b9f87459ac63 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 27 Dec 2025 22:46:40 +0900 Subject: [PATCH 650/687] chore(changelog): replace simple typo message Always replace simple commit messages that concern typo fixes with an improved text for the changelog so it reads a bit better. Signed-off-by: Sacha Telgenhof --- cliff.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cliff.toml b/cliff.toml index 03b7d414f..14cb41e6a 100644 --- a/cliff.toml +++ b/cliff.toml @@ -103,6 +103,8 @@ commit_preprocessors = [ { pattern = "\\(united kingdom\\)", replace = "(United Kingdom)" }, { pattern = "\\(united states\\)", replace = "(United States)" }, + { pattern = "typo", replace = "Various typos" }, + # Check spelling of the commit message using https://github.com/crate-ci/typos. # If the spelling is incorrect, it will be fixed automatically. { pattern = '.*', replace_command = 'typos --write-changes -' } From 9f206aebfc38e35341f10930c1bd5c8afdb94415 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 30 Dec 2025 00:57:40 +0900 Subject: [PATCH 651/687] chore(changelog): update git-cliff config Fixed issue where the regexp pattern to strip unwanted HTML affected the generation of the hyperlink to the respective GitHub issue. Created a macro for printing the commit message for convenience (and readability), and improved the pattern for replacing the issue number with the link to GitHub. Signed-off-by: Sacha Telgenhof --- cliff.toml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cliff.toml b/cliff.toml index 14cb41e6a..414e5eebd 100644 --- a/cliff.toml +++ b/cliff.toml @@ -26,6 +26,16 @@ followed by any architectural or technical changes.\n """ body = """ +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} + +{% macro print_commit(commit) -%} + - {% if commit.scope %}*({{ commit.scope | upper_first }})* {% endif %}\ + {% if commit.breaking %}[**breaking**] {% endif %}\ + {{ commit.message | split(pat="\n") | first | split(pat=":") | last | trim | upper_first }}\ +{% endmacro -%} + {% if version -%} ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} {% else -%} @@ -35,7 +45,7 @@ body = """ {% for group, commits in commits | unique(attribute="message") | filter(attribute="merge_commit", value=false) | group_by(attribute="group") %} ### {{ group | striptags | trim | upper_first }} {% for commit in commits %} - - {% if commit.scope %}({{ commit.scope | upper_first }}) {% endif%}{{ commit.message | split(pat="\n") | first | split(pat=": ") | last | trim | upper_first }} + {{ self::print_commit(commit=commit) }} {%- endfor %} {% endfor %}\n @@ -89,11 +99,11 @@ split_commits = false # An array of regex based parsers to modify commit messages prior to further processing. commit_preprocessors = [ - { pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](/issues/${1}))"}, + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))" }, # Strip HTML tags and content from commit messages { pattern = "<[^>]*>.*?]*>", replace = "" }, - { pattern = "<[^>]*>", replace = "" }, # Fix proper nouns in commit scopes before upper_first is applied { pattern = "\\(czech republic\\)", replace = "(Czech Republic)" }, @@ -107,7 +117,7 @@ commit_preprocessors = [ # Check spelling of the commit message using https://github.com/crate-ci/typos. # If the spelling is incorrect, it will be fixed automatically. - { pattern = '.*', replace_command = 'typos --write-changes -' } + { pattern = '.*', replace_command = 'typos --write-changes -' }, ] # An array of regex based parsers for extracting data from the commit message. From 36005a0796b64bc07257f39c11c42f147fe5320f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 30 Dec 2025 01:13:54 +0900 Subject: [PATCH 652/687] chore(release): prepare for 2.9.0 --- CHANGELOG.md | 114 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4381168b2..88b212069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,40 +8,90 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm Changes related to the logic of the holidays or their providers are listed first, followed by any architectural or technical changes. +## [2.9.0] - 2025-12-29 + +### Features + +- *(Netherlands)* Add new holiday-equivalent days 2026 till 2028 ([#393](https://github.com/azuyalabs/yasumi/issues/393)) +- *(Slovakia)* Slovak State Consolidation Package for 2025 ([#389](https://github.com/azuyalabs/yasumi/issues/389)) +- Add Slovenia holiday provider ([#387](https://github.com/azuyalabs/yasumi/issues/387)) +- Add New York Stock Exchange (NYSE) provider ([#384](https://github.com/azuyalabs/yasumi/issues/384)) +- *(New Zealand)* Add Matariki public holiday ([#378](https://github.com/azuyalabs/yasumi/issues/378)) + +### Fixes + +- *(New Zealand)* Add missing namespace in the MatarikiTest +- Various typos + +### Refactor + +- Use strict comparison with equal types + +### Performance + +- Optimize filter count() +- Fix needless sorting on every holiday insert + +### Documentation + +- Add requirements and installation/quick start sections +- Update list of supported versions + +### Testing + +- *(Poland)* Fix Christmas Eve test +- *(Slovakia)* Fix failing tests for the years 2025 and 2026 + +### Other + +- *(Deps)* Bump actions/stale from 10.1.0 to 10.1.1 ([#391](https://github.com/azuyalabs/yasumi/issues/391)) +- Add support for PHP 8.5 +- Remove Psalm static analysis tool +- Fix deprecated 'set-output' command +- *(Deps)* Bump actions/stale from 10.0.0 to 10.1.0 ([#386](https://github.com/azuyalabs/yasumi/issues/386)) +- *(Deps)* Bump actions/stale from 9.1.0 to 10.0.0 ([#385](https://github.com/azuyalabs/yasumi/issues/385)) + +## New Contributors ❤️ + +* @Stollie made their first contribution +* @mgwebgroup made their first contribution +* @soukicz made their first contribution +* @timeshifting made their first contribution + ## [2.8.0] - 2025-07-13 ### Features -- (Canada) Nunavut Day for the Nunavut province +- *(Canada)* Nunavut Day for the Nunavut province - Add Bulgaria provider -- (Latvia) Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) -- (Argentina) Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) -- (Poland) Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) -- (Ireland) Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) -- (Lithuania) Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) -- (Mexico) Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) -- (Brazil) Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) -- (Germany) Day of Liberation is celebrated in Berlin in 2025 too. -- (Germany) Add Assumption of Mary holiday to Bavaria +- *(Latvia)* Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) +- *(Argentina)* Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) +- *(Poland)* Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) +- *(Ireland)* Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) +- *(Lithuania)* Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) +- *(Mexico)* Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) +- *(Brazil)* Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) +- *(Germany)* Day of Liberation is celebrated in Berlin in 2025 too. +- *(Germany)* Add Assumption of Mary holiday to Bavaria - Add Iran provider ([#341](https://github.com/azuyalabs/yasumi/issues/341)) ### Fixes -- (Brazil) Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) -- (Scotland) Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) -- (Ireland) New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) -- (Ukraine) Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) -- (Ireland) Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) -- (Mexico) Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) -- (Mexico) Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) -- (Portugal) Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) -- (Czech-republic) Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) -- (Germany) Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) -- (Slovakia) Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) +- *(Brazil)* Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) +- *(Scotland)* Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) +- *(Ireland)* New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) +- *(Ukraine)* Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) +- *(Ireland)* Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) +- *(Mexico)* Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) +- *(Mexico)* Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) +- *(Portugal)* Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) +- *(Czech-republic)* Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) +- *(Germany)* Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) +- *(Slovakia)* Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) ### Refactor -- (South korea) Simplify code by using early returns +- *(South Korea)* Simplify code by using early returns - Fix use of concatenation with mixed types - Make the Holiday class implement the Stringable interface - Remove astray var_dump use @@ -65,10 +115,10 @@ followed by any architectural or technical changes. ### Testing -- (Portugal) Fix official holidays tests +- *(Portugal)* Fix official holidays tests - Fix test for the previous function - Increase memory_limit, to be able to run all tests on MacOS -- (Portugal) Fix issue with Republic Day failing for the restored years between 2013 and 2016 +- *(Portugal)* Fix issue with Republic Day failing for the restored years between 2013 and 2016 ### Other @@ -87,13 +137,15 @@ followed by any architectural or technical changes. - Use shared PHP CS Fixer config - Pin version of PHP CS Fixer to 3.46 as latest (3.47) release produces undesired changes -## New Contributors +## New Contributors ❤️ -- @attepulkkinen made their first contribution -- @dependabot[bot] made their first contribution -- @fbett made their first contribution -- @hamrak made their first contribution -- @mtbossa made their first contribution -- @thrashzone13 made their first contribution +* @attepulkkinen made their first contribution +* @dependabot[bot] made their first contribution +* @fbett made their first contribution +* @hamrak made their first contribution +* @mtbossa made their first contribution +* @thrashzone13 made their first contribution +[2.9.0]: https://github.com/azuyalabs/yasumi/compare/2.8.0..2.9.0 [2.8.0]: https://github.com/azuyalabs/yasumi/compare/2.7.0..2.8.0 + From 871f4bc33adf07513052cd9dc253330cd51b2bd5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 30 Dec 2025 01:53:11 +0900 Subject: [PATCH 653/687] doc: update list of supported versions Signed-off-by: Sacha Telgenhof --- SECURITY.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index f21d712c2..6fdc745cb 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,6 +6,7 @@ The following versions are supported with security updates: | Version | Supported | | ------- | ------------------ | +| 2.9.0 | :white_check_mark: | | 2.8.0 | :white_check_mark: | | 2.7.0 | :white_check_mark: | | 2.6.0 | :x: | @@ -13,7 +14,7 @@ The following versions are supported with security updates: | <2.4 | :x: | As for supported PHP versions, this project only supports the actively supported versions of PHP and versions of PHP -that only receive critical security updates. Currently, that is PHP 8.1, 8.2, 8.3 and 8.4. +that only receive critical security updates. Currently, that is PHP 8.1, 8.2, 8.3, 8.4 and 8.5. Please refer to the [supported versions](https://www.php.net/supported-versions.php) page, to find more details. When a version of PHP becomes EOL, generally a new release of this project will be issued that sunsets the support of that retired PHP version. From 5f2ef406f9c64229b98aeecc67446dd0db500f50 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 15 Jan 2026 21:38:21 +0900 Subject: [PATCH 654/687] build: drop PHP 8.1 support As per https://www.php.net/supported-versions.php, PHP 8.1 is EOL. Signed-off-by: Sacha Telgenhof --- .github/workflows/coding-standard.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/testing.yml | 2 +- README.md | 4 ++-- SECURITY.md | 2 +- composer.json | 2 +- rector.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 37bcf77bc..cdc6bc00b 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest] - php-versions: ["8.1", "8.2", "8.3", "8.4", "8.5"] + php-versions: ["8.2", "8.3", "8.4", "8.5"] steps: - name: Set git to use LF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index bfd4174e8..8e5d5c40c 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest] - php-versions: ["8.1", "8.2", "8.3", "8.4", "8.5"] + php-versions: ["8.2", "8.3", "8.4", "8.5"] steps: - name: Set git to use LF diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ab3d6f0a6..3ad1ead67 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest] - php-versions: ["8.1", "8.2", "8.3", "8.4", "8.5"] + php-versions: ["8.2", "8.3", "8.4", "8.5"] steps: - name: Set git to use LF diff --git a/README.md b/README.md index 0dbb9c68b..41c953a86 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ hasn't been updated for a long time. ## Requirements -Yasumi requires **PHP 8.1** or higher. The library supports PHP 8.1, 8.2, 8.3, 8.4, and 8.5. +Yasumi requires **PHP 8.2** or higher. The library supports PHP 8.2, 8.3, 8.4, and 8.5. For detailed information about supported PHP versions and security updates, please refer to the [SECURITY.md](SECURITY.md) file. @@ -43,7 +43,7 @@ Here's a simple example to get you started: require 'vendor/autoload.php'; // Create a holiday provider for a specific country and year -$holidays = Yasumi\Yasumi::create('USA', 2025); +$holidays = Yasumi\Yasumi::create('USA', 2026); // Get all holidays for the year foreach ($holidays as $holiday) { diff --git a/SECURITY.md b/SECURITY.md index 6fdc745cb..0e6494d6c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,7 +14,7 @@ The following versions are supported with security updates: | <2.4 | :x: | As for supported PHP versions, this project only supports the actively supported versions of PHP and versions of PHP -that only receive critical security updates. Currently, that is PHP 8.1, 8.2, 8.3, 8.4 and 8.5. +that only receive critical security updates. Currently, that is PHP 8.2, 8.3, 8.4 and 8.5. Please refer to the [supported versions](https://www.php.net/supported-versions.php) page, to find more details. When a version of PHP becomes EOL, generally a new release of this project will be issued that sunsets the support of that retired PHP version. diff --git a/composer.json b/composer.json index 401fe4231..7c949aa78 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-json": "*" }, "require-dev": { diff --git a/rector.php b/rector.php index 634334c88..1a52ff2f8 100644 --- a/rector.php +++ b/rector.php @@ -33,7 +33,7 @@ SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::EARLY_RETURN, - SetList::PHP_81, + SetList::PHP_82, SetList::TYPE_DECLARATION, ]); }; From f5b9b0d9c9aab23d3e4b6cedd2a59b9a50e29667 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 15 Jan 2026 22:00:59 +0900 Subject: [PATCH 655/687] docs: update copyright year Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 2 +- LICENSE | 2 +- examples/basic.php | 2 +- examples/between_filter.php | 2 +- examples/custom_provider.php | 2 +- examples/filters.php | 2 +- phpunit.xml.dist | 2 +- rector.php | 2 +- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- src/Yasumi/Exception/MissingTranslationException.php | 2 +- src/Yasumi/Exception/ProviderNotFoundException.php | 2 +- src/Yasumi/Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/AbstractFilter.php | 2 +- 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/Holiday.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Argentina.php | 2 +- src/Yasumi/Provider/Australia.php | 2 +- .../Provider/Australia/AustralianCapitalTerritory.php | 2 +- src/Yasumi/Provider/Australia/NewSouthWales.php | 2 +- src/Yasumi/Provider/Australia/NorthernTerritory.php | 2 +- src/Yasumi/Provider/Australia/Queensland.php | 2 +- src/Yasumi/Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SouthAustralia.php | 2 +- src/Yasumi/Provider/Australia/Tasmania.php | 2 +- .../Provider/Australia/Tasmania/CentralNorth.php | 2 +- .../Provider/Australia/Tasmania/FlindersIsland.php | 2 +- src/Yasumi/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 | 2 +- src/Yasumi/Provider/Australia/WesternAustralia.php | 2 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Burgenland.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/LowerAustria.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/Styria.php | 2 +- src/Yasumi/Provider/Austria/Tyrol.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Austria/Vienna.php | 2 +- src/Yasumi/Provider/Austria/Vorarlberg.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/Bulgaria.php | 2 +- src/Yasumi/Provider/Canada.php | 2 +- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/BritishColumbia.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- src/Yasumi/Provider/Canada/NewBrunswick.php | 2 +- src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php | 2 +- src/Yasumi/Provider/Canada/NorthwestTerritories.php | 2 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- src/Yasumi/Provider/Canada/Nunavut.php | 2 +- src/Yasumi/Provider/Canada/Ontario.php | 2 +- src/Yasumi/Provider/Canada/PrinceEdwardIsland.php | 2 +- src/Yasumi/Provider/Canada/Quebec.php | 2 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/CommonHolidays.php | 2 +- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 2 +- src/Yasumi/Provider/DateTimeZoneFactory.php | 2 +- src/Yasumi/Provider/Denmark.php | 2 +- src/Yasumi/Provider/Estonia.php | 2 +- src/Yasumi/Provider/Finland.php | 2 +- 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/Georgia.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/Provider/Germany/BadenWurttemberg.php | 2 +- src/Yasumi/Provider/Germany/Bavaria.php | 10 ++++++---- 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 +- .../Provider/Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/NorthRhineWestphalia.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 2 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Iran.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 2 +- src/Yasumi/Provider/Latvia.php | 2 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Luxembourg.php | 2 +- src/Yasumi/Provider/Mexico.php | 2 +- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/Slovenia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 2 +- 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 +- 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 | 2 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/Melilla.php | 2 +- src/Yasumi/Provider/Spain/Navarre.php | 10 ++++++---- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- .../Provider/Switzerland/AppenzellAusserrhoden.php | 2 +- .../Provider/Switzerland/AppenzellInnerrhoden.php | 2 +- src/Yasumi/Provider/Switzerland/BaselLandschaft.php | 2 +- src/Yasumi/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 +- src/Yasumi/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/Turkey.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- src/Yasumi/Provider/USA/NYSE.php | 2 +- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Provider/UnitedKingdom.php | 2 +- src/Yasumi/Provider/UnitedKingdom/England.php | 2 +- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 2 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/SubstituteHoliday.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.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/allSoulsDay.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 +- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- src/Yasumi/data/translations/canadaDay.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/civicHoliday.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- src/Yasumi/data/translations/dayAfterNewYearsDay.php | 2 +- src/Yasumi/data/translations/dayOfLiberation.php | 2 +- src/Yasumi/data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/discoveryDay.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/familyDay.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goldCupParadeDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- src/Yasumi/data/translations/heritageDay.php | 2 +- src/Yasumi/data/translations/immaculateConception.php | 2 +- src/Yasumi/data/translations/independenceDay.php | 2 +- .../data/translations/internationalWomensDay.php | 2 +- .../data/translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/islanderDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/louisRielDay.php | 2 +- src/Yasumi/data/translations/matariki.php | 2 +- src/Yasumi/data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/natalHoliday.php | 2 +- .../data/translations/nationalIndigenousPeoplesDay.php | 2 +- src/Yasumi/data/translations/nationalPatriotsDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/novaScotiaHeritageDay.php | 2 +- src/Yasumi/data/translations/orangemensDay.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/plebisciteDay.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- src/Yasumi/data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/preserenDay.php | 2 +- src/Yasumi/data/translations/queensBirthday.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- src/Yasumi/data/translations/remembranceDay.php | 2 +- .../data/translations/restorationOfIndepence.php | 2 +- src/Yasumi/data/translations/saintJeanBaptisteDay.php | 2 +- src/Yasumi/data/translations/saskatchewanDay.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stFloriansDay.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/stLeopoldsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stRupertsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/statehoodDay.php | 2 +- src/Yasumi/data/translations/substituteHoliday.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/terryFoxDay.php | 2 +- src/Yasumi/data/translations/thanksgivingDay.php | 2 +- .../data/translations/truthAndReconciliationDay.php | 2 +- .../data/translations/uprisingAgainstOccupation.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- src/Yasumi/data/translations/victoriaDay.php | 2 +- src/Yasumi/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 +- src/Yasumi/data/translations/yukonHeritageDay.php | 2 +- tests/Argentina/ArgentinaBaseTestCase.php | 2 +- tests/Argentina/ArgentinaTest.php | 2 +- tests/Argentina/CarnavalMondayTest.php | 2 +- tests/Argentina/CarnavalTuesdayTest.php | 2 +- tests/Argentina/ChristmasDayTest.php | 2 +- tests/Argentina/EasterTest.php | 2 +- tests/Argentina/FlagDayTest.php | 2 +- tests/Argentina/GeneralJoseSanMartinDayTest.php | 2 +- tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php | 2 +- tests/Argentina/GoodFridayTest.php | 2 +- tests/Argentina/ImmaculateConceptionDayTest.php | 2 +- tests/Argentina/IndependenceDayTest.php | 2 +- tests/Argentina/InternationalWorkersDayTest.php | 2 +- tests/Argentina/MalvinasDayTest.php | 2 +- tests/Argentina/MayRevolutionTest.php | 2 +- tests/Argentina/NationalSovereigntyDayTest.php | 2 +- tests/Argentina/NewYearsDayTest.php | 2 +- tests/Argentina/RaceDayTest.php | 2 +- tests/Argentina/RemembranceDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- .../AustralianCapitalTerritory/AnzacDayTest.php | 2 +- .../AustralianCapitalTerritory/AustraliaDayTest.php | 2 +- .../AustralianCapitalTerritoryBaseTestCase.php | 2 +- .../AustralianCapitalTerritoryTest.php | 2 +- .../AustralianCapitalTerritory/BoxingDayTest.php | 2 +- .../AustralianCapitalTerritory/CanberraDayTest.php | 2 +- .../AustralianCapitalTerritory/ChristmasDayTest.php | 2 +- .../AustralianCapitalTerritory/EasterMondayTest.php | 2 +- .../AustralianCapitalTerritory/EasterSaturdayTest.php | 2 +- .../AustralianCapitalTerritory/EasterSundayTest.php | 2 +- .../AustralianCapitalTerritory/GoodFridayTest.php | 2 +- .../AustralianCapitalTerritory/LabourDayTest.php | 2 +- .../NationalDayOfMourningTest.php | 2 +- .../AustralianCapitalTerritory/NewYearsDayTest.php | 2 +- .../AustralianCapitalTerritory/QueensBirthdayTest.php | 2 +- .../ReconciliationDayTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NationalDayOfMourningTest.php | 2 +- tests/Australia/NewSouthWales/AnzacDayTest.php | 2 +- tests/Australia/NewSouthWales/AustraliaDayTest.php | 2 +- tests/Australia/NewSouthWales/BankHolidayTest.php | 2 +- tests/Australia/NewSouthWales/BoxingDayTest.php | 2 +- tests/Australia/NewSouthWales/ChristmasDayTest.php | 2 +- tests/Australia/NewSouthWales/EasterMondayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSaturdayTest.php | 2 +- tests/Australia/NewSouthWales/EasterSundayTest.php | 2 +- tests/Australia/NewSouthWales/GoodFridayTest.php | 2 +- tests/Australia/NewSouthWales/LabourDayTest.php | 2 +- .../NewSouthWales/NationalDayOfMourningTest.php | 2 +- .../NewSouthWales/NewSouthWalesBaseTestCase.php | 2 +- tests/Australia/NewSouthWales/NewSouthWalesTest.php | 2 +- tests/Australia/NewSouthWales/NewYearsDayTest.php | 2 +- tests/Australia/NewSouthWales/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/NorthernTerritory/AnzacDayTest.php | 2 +- tests/Australia/NorthernTerritory/AustraliaDayTest.php | 2 +- tests/Australia/NorthernTerritory/BoxingDayTest.php | 2 +- tests/Australia/NorthernTerritory/ChristmasDayTest.php | 2 +- tests/Australia/NorthernTerritory/EasterMondayTest.php | 2 +- .../Australia/NorthernTerritory/EasterSaturdayTest.php | 2 +- tests/Australia/NorthernTerritory/GoodFridayTest.php | 2 +- tests/Australia/NorthernTerritory/MayDayTest.php | 2 +- .../NorthernTerritory/NationalDayOfMourningTest.php | 2 +- tests/Australia/NorthernTerritory/NewYearsDayTest.php | 2 +- .../NorthernTerritoryBaseTestCase.php | 2 +- .../NorthernTerritory/NorthernTerritoryTest.php | 2 +- tests/Australia/NorthernTerritory/PicnicDayTest.php | 2 +- .../Australia/NorthernTerritory/QueensBirthdayTest.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 +- .../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 +- .../Australia/Queensland/Brisbane/ChristmasDayTest.php | 2 +- .../Australia/Queensland/Brisbane/EasterMondayTest.php | 2 +- tests/Australia/Queensland/Brisbane/GoodFridayTest.php | 2 +- tests/Australia/Queensland/Brisbane/LabourDayTest.php | 2 +- .../Queensland/Brisbane/NationalDayOfMourningTest.php | 2 +- .../Australia/Queensland/Brisbane/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 2 +- .../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 +- .../Australia/Queensland/NationalDayOfMourningTest.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/SouthAustralia/AdelaideCupDayTest.php | 2 +- tests/Australia/SouthAustralia/AnzacDayTest.php | 2 +- tests/Australia/SouthAustralia/AustraliaDayTest.php | 2 +- tests/Australia/SouthAustralia/ChristmasDayTest.php | 2 +- tests/Australia/SouthAustralia/EasterMondayTest.php | 2 +- tests/Australia/SouthAustralia/EasterSaturdayTest.php | 2 +- tests/Australia/SouthAustralia/GoodFridayTest.php | 2 +- tests/Australia/SouthAustralia/LabourDayTest.php | 2 +- .../SouthAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/SouthAustralia/NewYearsDayTest.php | 2 +- tests/Australia/SouthAustralia/ProclamationDayTest.php | 2 +- tests/Australia/SouthAustralia/QueensBirthdayTest.php | 2 +- .../SouthAustralia/SouthAustraliaBaseTestCase.php | 2 +- tests/Australia/SouthAustralia/SouthAustraliaTest.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 +- .../Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthBaseTestCase.php | 2 +- .../Tasmania/CentralNorth/CentralNorthTest.php | 2 +- .../Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- .../Tasmania/CentralNorth/DevonportShowTest.php | 2 +- .../Tasmania/CentralNorth/EasterMondayTest.php | 2 +- .../Tasmania/CentralNorth/EightHourDayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/GoodFridayTest.php | 2 +- .../CentralNorth/NationalDayOfMourningTest.php | 2 +- .../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 +- .../Australia/Tasmania/FlindersIsland/AnzacDayTest.php | 2 +- .../Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- .../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 +- .../Tasmania/FlindersIsland/GoodFridayTest.php | 2 +- .../FlindersIsland/NationalDayOfMourningTest.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 +- .../Australia/Tasmania/KingIsland/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/BoxingDayTest.php | 2 +- .../Australia/Tasmania/KingIsland/ChristmasDayTest.php | 2 +- .../Australia/Tasmania/KingIsland/EasterMondayTest.php | 2 +- .../Australia/Tasmania/KingIsland/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/GoodFridayTest.php | 2 +- .../Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- .../Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Tasmania/KingIsland/NationalDayOfMourningTest.php | 2 +- .../Australia/Tasmania/KingIsland/NewYearsDayTest.php | 2 +- .../Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- .../Tasmania/KingIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 2 +- .../Australia/Tasmania/Northeast/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/BoxingDayTest.php | 2 +- .../Australia/Tasmania/Northeast/ChristmasDayTest.php | 2 +- .../Australia/Tasmania/Northeast/EasterMondayTest.php | 2 +- .../Australia/Tasmania/Northeast/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/GoodFridayTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Tasmania/Northeast/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 2 +- .../Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- .../Tasmania/Northeast/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/Northeast/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 2 +- .../Australia/Tasmania/Northwest/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Australia/Tasmania/Northwest/ChristmasDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/BoxingDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/BurnieShowTest.php | 2 +- .../Northwest/CircularHead/ChristmasDayTest.php | 2 +- .../CircularHead/CircularHeadBaseTestCase.php | 2 +- .../Northwest/CircularHead/CircularHeadTest.php | 2 +- .../Northwest/CircularHead/EasterMondayTest.php | 2 +- .../Northwest/CircularHead/EightHourDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/GoodFridayTest.php | 2 +- .../CircularHead/NationalDayOfMourningTest.php | 2 +- .../Northwest/CircularHead/NewYearsDayTest.php | 2 +- .../Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Northwest/CircularHead/RecreationDayTest.php | 2 +- .../Australia/Tasmania/Northwest/EasterMondayTest.php | 2 +- .../Australia/Tasmania/Northwest/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/GoodFridayTest.php | 2 +- .../Tasmania/Northwest/NationalDayOfMourningTest.php | 2 +- tests/Australia/Tasmania/Northwest/NewYearsDayTest.php | 2 +- .../Tasmania/Northwest/NorthwestBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- .../Tasmania/Northwest/QueensBirthdayTest.php | 2 +- .../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 +- .../Tasmania/South/NationalDayOfMourningTest.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 +- .../Tasmania/South/Southeast/AnzacDayTest.php | 2 +- .../Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- .../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 +- .../South/Southeast/NationalDayOfMourningTest.php | 2 +- .../Tasmania/South/Southeast/NewYearsDayTest.php | 2 +- .../Tasmania/South/Southeast/QueensBirthdayTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastBaseTestCase.php | 2 +- .../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/NationalDayOfMourningTest.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/WesternAustralia/AnzacDayTest.php | 2 +- tests/Australia/WesternAustralia/AustraliaDayTest.php | 2 +- tests/Australia/WesternAustralia/BoxingDayTest.php | 2 +- tests/Australia/WesternAustralia/ChristmasDayTest.php | 2 +- tests/Australia/WesternAustralia/EasterMondayTest.php | 2 +- tests/Australia/WesternAustralia/GoodFridayTest.php | 2 +- tests/Australia/WesternAustralia/LabourDayTest.php | 2 +- .../WesternAustralia/NationalDayOfMourningTest.php | 2 +- tests/Australia/WesternAustralia/NewYearsDayTest.php | 2 +- .../Australia/WesternAustralia/QueensBirthdayTest.php | 2 +- .../WesternAustralia/WesternAustraliaBaseTestCase.php | 2 +- .../WesternAustralia/WesternAustraliaDayTest.php | 2 +- .../WesternAustralia/WesternAustraliaTest.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/Burgenland/BurgenlandBaseTestCase.php | 2 +- tests/Austria/Burgenland/BurgenlandTest.php | 2 +- tests/Austria/Burgenland/stMartinsDayTest.php | 2 +- tests/Austria/Carinthia/CarinthiaBaseTestCase.php | 2 +- tests/Austria/Carinthia/CarinthiaTest.php | 2 +- tests/Austria/Carinthia/PlebisciteDayTest.php | 2 +- tests/Austria/Carinthia/StJosephsDayTest.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 +- .../Austria/LowerAustria/LowerAustriaBaseTestCase.php | 2 +- tests/Austria/LowerAustria/LowerAustriaTest.php | 2 +- tests/Austria/LowerAustria/StLeopoldsDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/Salzburg/SalzburgBaseTestCase.php | 2 +- tests/Austria/Salzburg/SalzburgTest.php | 2 +- tests/Austria/Salzburg/StRupertsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Austria/Styria/StJosephsDayTest.php | 2 +- tests/Austria/Styria/StyriaBaseTestCase.php | 2 +- tests/Austria/Styria/StyriaTest.php | 2 +- tests/Austria/Tyrol/StJosephsDayTest.php | 2 +- tests/Austria/Tyrol/TyrolBaseTestCase.php | 2 +- tests/Austria/Tyrol/TyrolTest.php | 2 +- tests/Austria/UpperAustria/StFloriansDayTest.php | 2 +- .../Austria/UpperAustria/UpperAustriaBaseTestCase.php | 2 +- tests/Austria/UpperAustria/UpperAustriaTest.php | 2 +- tests/Austria/Vienna/StLeopoldsDayTest.php | 2 +- tests/Austria/Vienna/ViennaBaseTestCase.php | 2 +- tests/Austria/Vienna/ViennaTest.php | 2 +- tests/Austria/Vorarlberg/StJosephsDayTest.php | 2 +- tests/Austria/Vorarlberg/VorarlbergBaseTestCase.php | 2 +- tests/Austria/Vorarlberg/VorarlbergTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/SubstituteHolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 2 +- tests/Base/TypographyTest.php | 2 +- tests/Base/WeekendTest.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/BlackConsciousnessDayTest.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/Bulgaria/BulgariaBaseTestCase.php | 2 +- tests/Bulgaria/BulgariaTest.php | 2 +- tests/Bulgaria/ChristmasDayTest.php | 2 +- tests/Bulgaria/ChristmasEveTest.php | 2 +- .../EducationCultureSlavonicLiteratureDayTest.php | 2 +- tests/Bulgaria/IndependenceDayTest.php | 2 +- tests/Bulgaria/InternationalWorkersDayTest.php | 2 +- tests/Bulgaria/LiberationDayTest.php | 2 +- tests/Bulgaria/NewYearsDayTest.php | 2 +- tests/Bulgaria/OrthodoxEasterMondayTest.php | 2 +- tests/Bulgaria/OrthodoxEasterTest.php | 2 +- tests/Bulgaria/OrthodoxGoodFridayTest.php | 2 +- tests/Bulgaria/SecondChristmasDayTest.php | 2 +- tests/Bulgaria/UnificationDayTest.php | 2 +- tests/Bulgaria/stGeorgesDayTest.php | 2 +- tests/Canada/Alberta/AlbertaBaseTestCase.php | 2 +- tests/Canada/Alberta/AlbertaTest.php | 2 +- .../BritishColumbia/BritishColumbiaBaseTestCase.php | 2 +- tests/Canada/BritishColumbia/BritishColumbiaTest.php | 2 +- tests/Canada/CanadaBaseTestCase.php | 2 +- tests/Canada/CanadaDayTest.php | 2 +- tests/Canada/CanadaTest.php | 2 +- tests/Canada/ChristmasDayTest.php | 2 +- tests/Canada/LabourDayTest.php | 2 +- tests/Canada/Manitoba/ManitobaBaseTestCase.php | 2 +- tests/Canada/Manitoba/ManitobaTest.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickBaseTestCase.php | 2 +- tests/Canada/NewBrunswick/NewBrunswickTest.php | 2 +- tests/Canada/NewYearsDayTest.php | 2 +- .../NewfoundlandAndLabradorBaseTestCase.php | 2 +- .../NewfoundlandAndLabradorTest.php | 2 +- .../NorthwestTerritoriesBaseTestCase.php | 2 +- .../NorthwestTerritories/NorthwestTerritoriesTest.php | 2 +- tests/Canada/NovaScotia/NovaScotiaBaseTestCase.php | 2 +- tests/Canada/NovaScotia/NovaScotiaTest.php | 2 +- tests/Canada/Nunavut/NunavutBaseTestCase.php | 2 +- tests/Canada/Nunavut/NunavutDayTest.php | 2 +- tests/Canada/Nunavut/NunavutTest.php | 2 +- tests/Canada/Ontario/OntarioBaseTestCase.php | 2 +- tests/Canada/Ontario/OntarioTest.php | 2 +- .../PrinceEdwardIslandBaseTestCase.php | 2 +- .../PrinceEdwardIsland/PrinceEdwardIslandTest.php | 2 +- tests/Canada/Quebec/QuebecBaseTestCase.php | 2 +- tests/Canada/Quebec/QuebecTest.php | 2 +- tests/Canada/RemembranceDayTest.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanBaseTestCase.php | 2 +- tests/Canada/Saskatchewan/SaskatchewanTest.php | 2 +- tests/Canada/ThanksgivingDayTest.php | 2 +- tests/Canada/TruthAndReconciliationDayTest.php | 2 +- tests/Canada/Yukon/YukonBaseTestCase.php | 2 +- tests/Canada/Yukon/YukonTest.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/CroatiaTest.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/RemembranceDayTest.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/DaylightSavingTime.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/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/Georgia/EasterTest.php | 2 +- tests/Georgia/GeorgiaBaseTestCase.php | 2 +- tests/Georgia/GeorgiaTest.php | 2 +- tests/Georgia/IndependenceDayTest.php | 2 +- tests/Georgia/InternationalWomensDayTest.php | 2 +- tests/Georgia/MtskhetobaDayTest.php | 2 +- tests/Georgia/NewYearsDayTest.php | 2 +- tests/Georgia/OrthodoxChristmasDayTest.php | 2 +- tests/Georgia/OrthodoxEpiphanyDayTest.php | 2 +- tests/Georgia/SecondNewYearDayTest.php | 2 +- tests/Georgia/StAndrewsDayTest.php | 2 +- tests/Georgia/StGeorgesDayTest.php | 2 +- tests/Georgia/StMarysDayTest.php | 2 +- tests/Georgia/UnityDayTest.php | 2 +- tests/Georgia/VictoryDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- .../BadenWurttemberg/BadenWurttembergBaseTestCase.php | 2 +- .../Germany/BadenWurttemberg/BadenWurttembergTest.php | 2 +- tests/Germany/BadenWurttemberg/CorpusChristiTest.php | 2 +- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/BadenWurttemberg/GermanUnityDayTest.php | 2 +- .../BadenWurttemberg/ReformationDay2017Test.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/AssumptionOfMaryTest.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/DayOfLiberationTest.php | 2 +- tests/Germany/Berlin/GermanUnityDayTest.php | 2 +- .../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 +- .../InternationalWomensDayTest.php | 2 +- .../MecklenburgWesternPomeraniaBaseTestCase.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../MecklenburgWesternPomerania/ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NewYearsEveTest.php | 2 +- .../Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../Germany/NorthRhineWestphalia/CorpusChristiTest.php | 2 +- .../NorthRhineWestphalia/GermanUnityDayTest.php | 2 +- .../NorthRhineWestphaliaBaseTestCase.php | 2 +- .../NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 2 +- .../NorthRhineWestphalia/ReformationDay2017Test.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/PentecostTest.php | 2 +- tests/Germany/ReformationDay2017Test.php | 2 +- tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php | 2 +- .../Germany/RhinelandPalatinate/CorpusChristiTest.php | 2 +- .../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 +- .../Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- tests/Germany/SchleswigHolstein/GermanUnityDayTest.php | 2 +- .../SchleswigHolstein/ReformationDay2017Test.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- .../SchleswigHolsteinBaseTestCase.php | 2 +- .../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/Germany/Thuringia/WorldChildrensDayTest.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/IndependenceDayTest.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/HolidayTestCase.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/Iran/AnniversaryOfIslamicRevolutionTest.php | 2 +- tests/Iran/DeathOfKhomeiniTest.php | 2 +- tests/Iran/IranBaseTestCase.php | 2 +- tests/Iran/IranTest.php | 2 +- tests/Iran/IslamicRepublicDayTest.php | 2 +- .../NationalizationOfTheIranianOilIndustryTest.php | 2 +- tests/Iran/Nowruz1Test.php | 2 +- tests/Iran/Nowruz2Test.php | 2 +- tests/Iran/Nowruz3Test.php | 2 +- tests/Iran/Nowruz4Test.php | 2 +- tests/Iran/RevoltOfKhordad15Test.php | 2 +- tests/Iran/SizdahBedarTest.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/StBrigidsDayTest.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/MothersDayTest.php | 2 +- tests/Latvia/NewYearsDayTest.php | 2 +- tests/Latvia/NewYearsEveDayTest.php | 2 +- tests/Latvia/PentecostTest.php | 2 +- .../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/AllSoulsDayTest.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/FathersDayTest.php | 2 +- tests/Lithuania/InternationalWorkersDayTest.php | 2 +- tests/Lithuania/LithuaniaBaseTestCase.php | 2 +- tests/Lithuania/LithuaniaTest.php | 2 +- tests/Lithuania/MothersDayTest.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/Luxembourg/AllSaintsDayTest.php | 2 +- tests/Luxembourg/AscensionDayTest.php | 2 +- tests/Luxembourg/AssumptionOfMaryTest.php | 2 +- tests/Luxembourg/ChristmasDayTest.php | 2 +- tests/Luxembourg/EasterMondayTest.php | 2 +- tests/Luxembourg/EuropeDayTest.php | 2 +- tests/Luxembourg/InternationalWorkersDayTest.php | 2 +- tests/Luxembourg/LuxembourgBaseTestCase.php | 2 +- tests/Luxembourg/LuxembourgTest.php | 2 +- tests/Luxembourg/NationalDayTest.php | 2 +- tests/Luxembourg/NewYearsDayTest.php | 2 +- tests/Luxembourg/PentecostMondayTest.php | 2 +- tests/Luxembourg/SecondChristmasDayTest.php | 2 +- tests/Mexico/AllSaintsDayTest.php | 2 +- tests/Mexico/AssumptionOfMaryTest.php | 2 +- tests/Mexico/BenitoJuarezBirthdayTest.php | 2 +- tests/Mexico/ChristmasTest.php | 2 +- tests/Mexico/EasterMondayTest.php | 2 +- tests/Mexico/EpiphanyTest.php | 2 +- tests/Mexico/GoodFridayTest.php | 2 +- tests/Mexico/ImmaculateConceptionTest.php | 2 +- tests/Mexico/IndependenceDayTest.php | 2 +- tests/Mexico/InternationalWorkersDayTest.php | 2 +- tests/Mexico/MexicoBaseTestCase.php | 2 +- tests/Mexico/NewYearsDayTest.php | 2 +- tests/Mexico/TransmissionOfFederalPowerDayTest.php | 2 +- tests/Mexico/VirginOfGuadalupeTest.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/DaylightSavingTime.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/ValentinesDayTest.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/MatarikiTest.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/ChristmasEveTest.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/ProviderTestCase.php | 2 +- tests/Randomizer.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/EpiphanyTest.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/StAndrewsDayTest.php | 2 +- tests/Romania/StJohnsDayTest.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/DeclarationOfTheSlovakNationTest.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/SlovakIndependenceDayTest.php | 2 +- tests/Slovakia/SlovakNationalUprisingDayTest.php | 2 +- tests/Slovakia/SlovakiaBaseTestCase.php | 2 +- tests/Slovakia/SlovakiaTest.php | 2 +- .../Slovakia/StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/Slovakia/VictoryInEuropeDayTest.php | 2 +- tests/Slovenia/AssumptionOfMaryTest.php | 2 +- tests/Slovenia/ChristmasDayTest.php | 2 +- tests/Slovenia/EasterMondayTest.php | 2 +- tests/Slovenia/EasterTest.php | 2 +- tests/Slovenia/IndependenceDayTest.php | 2 +- tests/Slovenia/InternationalWorkersDayTest.php | 2 +- tests/Slovenia/LabourDayTest.php | 2 +- tests/Slovenia/NewYearsDayTest.php | 2 +- tests/Slovenia/PentecostTest.php | 2 +- tests/Slovenia/PreserenDayTest.php | 2 +- tests/Slovenia/ReformationDayTest.php | 2 +- tests/Slovenia/RemembranceDayTest.php | 2 +- tests/Slovenia/SecondNewYearsDayTest.php | 2 +- tests/Slovenia/SloveniaBaseTestCase.php | 2 +- tests/Slovenia/SloveniaTest.php | 2 +- tests/Slovenia/StatehoodDayTest.php | 2 +- tests/Slovenia/UprisingAgainstOccupationTest.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/SouthKorea/UnitedNationsDayTest.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 +- .../Spain/BasqueCountry/BasqueCountryBaseTestCase.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryDayTest.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryTest.php | 2 +- .../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 +- .../CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- .../CastillaLaMancha/CastillaLaManchaBaseTestCase.php | 2 +- .../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 +- .../CommunityOfMadridBaseTestCase.php | 2 +- .../Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- .../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 +- .../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 +- .../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 +- .../AppenzellAusserrhodenTest.php | 2 +- .../AppenzellAusserrhoden/AscensionDayTest.php | 2 +- .../AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/EasterMondayTest.php | 2 +- .../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 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- .../AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.php | 2 +- .../BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- .../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 +- .../BaselLandschaft/PentecostMondayTest.php | 2 +- .../Switzerland/BaselLandschaft/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/WorkersDayTest.php | 2 +- tests/Switzerland/BaselStadt/AscensionDayTest.php | 2 +- .../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/AllSaintsDayTest.php | 2 +- tests/Switzerland/Fribourg/AscensionDayTest.php | 2 +- tests/Switzerland/Fribourg/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Fribourg/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/CorpusChristiTest.php | 2 +- tests/Switzerland/Fribourg/December26thTest.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 +- .../Switzerland/Fribourg/ImmaculateConceptionTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/CorpusChristiTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/EasterTest.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/PentecostTest.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/BettagsMontagTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/December26thTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- .../Neuchatel/InstaurationRepubliqueTest.php | 2 +- tests/Switzerland/Neuchatel/January2ndTest.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 +- .../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 +- .../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/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/Turkey/CommemorationOfAtaturkTest.php | 2 +- tests/Turkey/DemocracyDayTest.php | 2 +- tests/Turkey/LabourDayTest.php | 2 +- tests/Turkey/NationalSovereigntyDayTest.php | 2 +- tests/Turkey/NewYearsDayTest.php | 2 +- tests/Turkey/RepublicDayTest.php | 2 +- tests/Turkey/TurkeyBaseTestCase.php | 2 +- tests/Turkey/TurkeyTest.php | 2 +- tests/Turkey/VictoryDayTest.php | 2 +- tests/USA/ChristmasDayTest.php | 2 +- tests/USA/ColumbusDayTest.php | 2 +- tests/USA/IndependenceDayTest.php | 2 +- tests/USA/JuneteenthTest.php | 2 +- tests/USA/LabourDayTest.php | 2 +- tests/USA/MartinLutherKingDayTest.php | 2 +- tests/USA/MemorialDayTest.php | 2 +- tests/USA/NYSE/CarterMourningTest.php | 2 +- tests/USA/NYSE/GRFordMourningTest.php | 2 +- tests/USA/NYSE/GroundZeroTest.php | 2 +- tests/USA/NYSE/HWBushMourningTest.php | 2 +- tests/USA/NYSE/HurricaneSandyTest.php | 2 +- tests/USA/NYSE/JuneteenthTest.php | 2 +- tests/USA/NYSE/NYSETest.php | 2 +- tests/USA/NYSE/ReaganMourningTest.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/CatholicChristmasDayTest.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/SubstitutedHolidayTest.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/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 | 2 +- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- .../KingCharlesCoronationBankHolidayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/MotheringSundayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- .../NorthernIreland/BattleOfTheBoyneTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/ChristmasDayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/EasterMondayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php | 2 +- .../NorthernIreland/MayDayBankHolidayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- .../NorthernIreland/NorthernIrelandTest.php | 2 +- .../NorthernIreland/SpringBankHolidayTest.php | 2 +- .../NorthernIreland/StPatricksDayTest.php | 2 +- .../NorthernIreland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php | 2 +- .../QueenElizabethFuneralBankHolidayTest.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 | 2 +- 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/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.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 | 2 +- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- tests/YasumiBase.php | 2 +- 1766 files changed, 1776 insertions(+), 1772 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 9e107d373..067aa0e2d 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2025 AzuyaLabs + * Copyright (c) 2015 - 2026 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/LICENSE b/LICENSE index 1251a896f..5fd61e244 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 - 2025 AzuyaLabs +Copyright (c) 2015 - 2026 AzuyaLabs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/basic.php b/examples/basic.php index 50abd95d1..b84246fd9 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2025 AzuyaLabs + * Copyright (c) 2015 - 2026 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/between_filter.php b/examples/between_filter.php index 0c6195fd1..4a2954c42 100644 --- a/examples/between_filter.php +++ b/examples/between_filter.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2025 AzuyaLabs + * Copyright (c) 2015 - 2026 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/custom_provider.php b/examples/custom_provider.php index a5add490e..57eb4cea1 100644 --- a/examples/custom_provider.php +++ b/examples/custom_provider.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2025 AzuyaLabs + * Copyright (c) 2015 - 2026 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/filters.php b/examples/filters.php index 942fdc9b1..5e9e97c5b 100644 --- a/examples/filters.php +++ b/examples/filters.php @@ -7,7 +7,7 @@ * * The easy PHP Library for calculating holidays. * - * Copyright (c) 2015 - 2025 AzuyaLabs + * Copyright (c) 2015 - 2026 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ded13ed3c..67c288aa2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ - - - - - - - - - ./src/Yasumi - - - ./src/Yasumi/data - - - - - - ./tests - - - - ./tests/Base - - - - ./tests/Argentina - - - - ./tests/Australia - - - - ./tests/Austria - - - - ./tests/Belgium - - - - ./tests/Bosnia - - - - ./tests/Brazil - - - - ./tests/Canada - - - - ./tests/Croatia - - - - ./tests/CzechRepublic - - - - ./tests/Denmark - - - - ./tests/Estonia - - - - ./tests/Finland - - - - ./tests/France - - - - ./tests/Georgia - - - - ./tests/Germany - - - - ./tests/Greece - - - - ./tests/Hungary - - - - ./tests/Ireland - - - - ./tests/Italy - - - - ./tests/Japan - - - - ./tests/Latvia - - - - ./tests/Lithuania - - - - ./tests/Luxembourg - - - - ./tests/Netherlands - - - - ./tests/NewZealand - - - - ./tests/Norway - - - - ./tests/Poland - - - - ./tests/Portugal - - - - ./tests/Romania - - - - ./tests/Russia - - - - ./tests/Slovakia - - - - ./tests/Slovenia - - - - ./tests/SouthAfrica - - - - ./tests/SouthKorea - - - - ./tests/Spain - - - - ./tests/Sweden - - - - ./tests/Switzerland - - - - ./tests/Turkey - - - - ./tests/Ukraine - - - - ./tests/UnitedKingdom - - - - ./tests/USA - - - - ./tests/USA/NYSE - - + + + + + + + + ./tests/Base + + + + ./tests/Argentina + + + + ./tests/Australia + + + + ./tests/Austria + + + + ./tests/Belgium + + + + ./tests/Bosnia + + + + ./tests/Brazil + + + + ./tests/Canada + + + + ./tests/Croatia + + + + ./tests/CzechRepublic + + + + ./tests/Denmark + + + + ./tests/Estonia + + + + ./tests/Finland + + + + ./tests/France + + + + ./tests/Georgia + + + + ./tests/Germany + + + + ./tests/Greece + + + + ./tests/Hungary + + + + ./tests/Ireland + + + + ./tests/Italy + + + + ./tests/Japan + + + + ./tests/Latvia + + + + ./tests/Lithuania + + + + ./tests/Luxembourg + + + + ./tests/Netherlands + + + + ./tests/NewZealand + + + + ./tests/Norway + + + + ./tests/Poland + + + + ./tests/Portugal + + + + ./tests/Romania + + + + ./tests/Russia + + + + ./tests/Slovakia + + + + ./tests/Slovenia + + + + ./tests/SouthAfrica + + + + ./tests/SouthKorea + + + + ./tests/Spain + + + + ./tests/Sweden + + + + ./tests/Switzerland + + + + ./tests/Turkey + + + + ./tests/Ukraine + + + + ./tests/UnitedKingdom + + + + ./tests/USA + ./tests/USA/NYSE + + + + ./tests/USA/NYSE + + + + + ./src/Yasumi + + + ./src/Yasumi/data + + diff --git a/rector.php b/rector.php index 95d45465b..26124c57f 100644 --- a/rector.php +++ b/rector.php @@ -17,6 +17,7 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; +use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\SetList; return static function (RectorConfig $rectorConfig): void { @@ -35,5 +36,6 @@ SetList::EARLY_RETURN, SetList::PHP_82, SetList::TYPE_DECLARATION, + PHPUnitSetList::PHPUNIT_110, ]); }; diff --git a/tests/Andorra/AllSaintsDayTest.php b/tests/Andorra/AllSaintsDayTest.php index 11f19eca8..c287c5456 100644 --- a/tests/Andorra/AllSaintsDayTest.php +++ b/tests/Andorra/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends AndorraBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia de Tots Sants'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/AndorraTest.php b/tests/Andorra/AndorraTest.php index 4bfd14889..bb132e0aa 100644 --- a/tests/Andorra/AndorraTest.php +++ b/tests/Andorra/AndorraTest.php @@ -38,7 +38,7 @@ class AndorraTest extends AndorraBaseTestCase implements ProviderTestCase */ public function testOfficialHolidays(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $holidays = [ 'newYearsDay', @@ -70,7 +70,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -80,7 +80,7 @@ public function testObservedHolidays(): void */ public function testSeasonalHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_SEASON); } /** @@ -90,7 +90,7 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_BANK); } /** @@ -100,7 +100,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** diff --git a/tests/Andorra/AssumptionOfMaryTest.php b/tests/Andorra/AssumptionOfMaryTest.php index a60612d52..9f43879f3 100644 --- a/tests/Andorra/AssumptionOfMaryTest.php +++ b/tests/Andorra/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends AndorraBaseTestCase implements HolidayTestCas /** * Tests the Assumption of Mary. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => "l\u{2019}Assumpció"] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/CarnivalTest.php b/tests/Andorra/CarnivalTest.php index e09639302..90d9ed580 100644 --- a/tests/Andorra/CarnivalTest.php +++ b/tests/Andorra/CarnivalTest.php @@ -35,13 +35,12 @@ class CarnivalTest extends AndorraBaseTestCase implements HolidayTestCase * * Carnival in Andorra falls on Shrove Tuesday, 47 days before Easter Sunday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,7 +53,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2020, new \DateTime('2020-2-25', new \DateTimeZone(self::TIMEZONE))], @@ -77,7 +76,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dimarts Gras'] ); } @@ -89,6 +88,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/ChristmasDayTest.php b/tests/Andorra/ChristmasDayTest.php index 8af03c041..d21039373 100644 --- a/tests/Andorra/ChristmasDayTest.php +++ b/tests/Andorra/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends AndorraBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nadal'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/ConstitutionDayTest.php b/tests/Andorra/ConstitutionDayTest.php index 0086251f5..b7c0570ee 100644 --- a/tests/Andorra/ConstitutionDayTest.php +++ b/tests/Andorra/ConstitutionDayTest.php @@ -43,7 +43,7 @@ class ConstitutionDayTest extends AndorraBaseTestCase implements HolidayTestCase */ public function testConstitutionDayOnAfter1993(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -62,7 +62,7 @@ public function testConstitutionDayBefore1993(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -76,7 +76,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dia de la Constitució'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Andorra/EasterMondayTest.php b/tests/Andorra/EasterMondayTest.php index 2accf78e6..dab887148 100644 --- a/tests/Andorra/EasterMondayTest.php +++ b/tests/Andorra/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'dilluns de Pasqua'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/EpiphanyTest.php b/tests/Andorra/EpiphanyTest.php index e47de33ef..c69919817 100644 --- a/tests/Andorra/EpiphanyTest.php +++ b/tests/Andorra/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends AndorraBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Epifania'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/GoodFridayTest.php b/tests/Andorra/GoodFridayTest.php index f748c125f..b02658685 100644 --- a/tests/Andorra/GoodFridayTest.php +++ b/tests/Andorra/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Divendres Sant'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/ImmaculateConceptionTest.php b/tests/Andorra/ImmaculateConceptionTest.php index 759a75577..1b5b46bf9 100644 --- a/tests/Andorra/ImmaculateConceptionTest.php +++ b/tests/Andorra/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends AndorraBaseTestCase implements HolidayTes /** * Tests the Immaculate Conception. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Immaculada Concepció'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/InternationalWorkersDayTest.php b/tests/Andorra/InternationalWorkersDayTest.php index 88236134e..4a00bc66a 100644 --- a/tests/Andorra/InternationalWorkersDayTest.php +++ b/tests/Andorra/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends AndorraBaseTestCase implements Holiday /** * Tests International Workers' Day. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia del Treball'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/MeritxellDayTest.php b/tests/Andorra/MeritxellDayTest.php index 500e20a4c..de1e04d2e 100644 --- a/tests/Andorra/MeritxellDayTest.php +++ b/tests/Andorra/MeritxellDayTest.php @@ -33,11 +33,10 @@ class MeritxellDayTest extends AndorraBaseTestCase implements HolidayTestCase /** * Tests Our Lady of Meritxell Day. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(9, 8, self::TIMEZONE); + return static::generateRandomDates(9, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia de la Mare de Déu de Meritxell'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/NewYearsDayTest.php b/tests/Andorra/NewYearsDayTest.php index a5a104e5c..e1265451c 100644 --- a/tests/Andorra/NewYearsDayTest.php +++ b/tests/Andorra/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends AndorraBaseTestCase implements HolidayTestCase /** * Tests New Year's Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which New Year's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => "Cap d\u{2019}any"] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/PentecostMondayTest.php b/tests/Andorra/PentecostMondayTest.php index 6fdf9c8cc..8136e626d 100644 --- a/tests/Andorra/PentecostMondayTest.php +++ b/tests/Andorra/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dilluns de Pentecosta'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Andorra/StStephensDayTest.php b/tests/Andorra/StStephensDayTest.php index 41b8b59f2..efe85b385 100644 --- a/tests/Andorra/StStephensDayTest.php +++ b/tests/Andorra/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends AndorraBaseTestCase implements HolidayTestCase /** * Tests St. Stephen's Day. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sant Esteve'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/ArgentinaTest.php b/tests/Argentina/ArgentinaTest.php index ba0a15432..416442c37 100644 --- a/tests/Argentina/ArgentinaTest.php +++ b/tests/Argentina/ArgentinaTest.php @@ -38,7 +38,7 @@ class ArgentinaTest extends ArgentinaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1980); + $this->year = static::generateRandomYear(1980); } /** diff --git a/tests/Argentina/CarnavalMondayTest.php b/tests/Argentina/CarnavalMondayTest.php index 8f98933f1..a702d8cbd 100644 --- a/tests/Argentina/CarnavalMondayTest.php +++ b/tests/Argentina/CarnavalMondayTest.php @@ -45,12 +45,12 @@ class CarnavalMondayTest extends ArgentinaBaseTestCase implements HolidayTestCas */ public function testCarnavalMondayAfter1700(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P48D')) + static::computeEaster($year, self::TIMEZONE)->sub(new \DateInterval('P48D')) ); } @@ -61,7 +61,7 @@ public function testCarnavalMondayAfter1700(): void */ public function testCarnavalMondayBefore1700(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -72,7 +72,7 @@ public function testCarnavalMondayBefore1700(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Lunes de Carnaval']); } @@ -83,7 +83,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/CarnavalTuesdayTest.php b/tests/Argentina/CarnavalTuesdayTest.php index efb6de999..8506abbfc 100644 --- a/tests/Argentina/CarnavalTuesdayTest.php +++ b/tests/Argentina/CarnavalTuesdayTest.php @@ -45,12 +45,12 @@ class CarnavalTuesdayTest extends ArgentinaBaseTestCase implements HolidayTestCa */ public function testCarnavalTuesdayAfter1700(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P47D')) + static::computeEaster($year, self::TIMEZONE)->sub(new \DateInterval('P47D')) ); } @@ -61,7 +61,7 @@ public function testCarnavalTuesdayAfter1700(): void */ public function testCarnavalTuesdayBefore1700(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -72,7 +72,7 @@ public function testCarnavalTuesdayBefore1700(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Martes de Carnaval']); } @@ -83,7 +83,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/ChristmasDayTest.php b/tests/Argentina/ChristmasDayTest.php index b8d34f018..b3feccbc0 100644 --- a/tests/Argentina/ChristmasDayTest.php +++ b/tests/Argentina/ChristmasDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Navidad'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/EasterTest.php b/tests/Argentina/EasterTest.php index 3d1982a68..eebe388e4 100644 --- a/tests/Argentina/EasterTest.php +++ b/tests/Argentina/EasterTest.php @@ -41,7 +41,7 @@ class EasterTest extends ArgentinaBaseTestCase implements HolidayTestCase public function testEaster(): void { $year = 1948; - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $this->calculateEaster($year, self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, static::computeEaster($year, self::TIMEZONE)); } /** @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pascua de Resurrección'] ); } @@ -66,6 +66,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Argentina/FlagDayTest.php b/tests/Argentina/FlagDayTest.php index 203843ceb..ca951a176 100644 --- a/tests/Argentina/FlagDayTest.php +++ b/tests/Argentina/FlagDayTest.php @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Paso a la Inmortalidad del General Manuel Belgrano'] ); } @@ -81,6 +81,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/GeneralJoseSanMartinDayTest.php b/tests/Argentina/GeneralJoseSanMartinDayTest.php index 33000b4f6..d7d015098 100644 --- a/tests/Argentina/GeneralJoseSanMartinDayTest.php +++ b/tests/Argentina/GeneralJoseSanMartinDayTest.php @@ -99,7 +99,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Paso a la Inmortalidad del General José de San Martín'] ); } @@ -111,6 +111,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php index 3f616790e..aaa2d7e7f 100644 --- a/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php +++ b/tests/Argentina/GeneralMartinMigueldeGuemesDayTest.php @@ -114,7 +114,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Paso a la Inmortalidad del General Martín Miguel de Güemes'] ); } @@ -126,6 +126,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/GoodFridayTest.php b/tests/Argentina/GoodFridayTest.php index 27b4d163b..dbd93b12e 100644 --- a/tests/Argentina/GoodFridayTest.php +++ b/tests/Argentina/GoodFridayTest.php @@ -45,7 +45,7 @@ public function testGoodFriday(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P2D')) + static::computeEaster($year, self::TIMEZONE)->sub(new \DateInterval('P2D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Viernes Santo'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/ImmaculateConceptionDayTest.php b/tests/Argentina/ImmaculateConceptionDayTest.php index becb492b9..a81b55476 100644 --- a/tests/Argentina/ImmaculateConceptionDayTest.php +++ b/tests/Argentina/ImmaculateConceptionDayTest.php @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Inmaculada Concepción de María'] ); } @@ -81,6 +81,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/IndependenceDayTest.php b/tests/Argentina/IndependenceDayTest.php index 1594caade..78ba51f72 100644 --- a/tests/Argentina/IndependenceDayTest.php +++ b/tests/Argentina/IndependenceDayTest.php @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Independencia'] ); } @@ -81,6 +81,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/InternationalWorkersDayTest.php b/tests/Argentina/InternationalWorkersDayTest.php index ce591ff36..270385b56 100644 --- a/tests/Argentina/InternationalWorkersDayTest.php +++ b/tests/Argentina/InternationalWorkersDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día del Trabajador'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/MalvinasDayTest.php b/tests/Argentina/MalvinasDayTest.php index 01910a058..eb73bba02 100644 --- a/tests/Argentina/MalvinasDayTest.php +++ b/tests/Argentina/MalvinasDayTest.php @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día del Veterano y de los Caídos en la Guerra de Malvinas'] ); } @@ -81,6 +81,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/MayRevolutionTest.php b/tests/Argentina/MayRevolutionTest.php index b3fef7739..a2a2f9fe2 100644 --- a/tests/Argentina/MayRevolutionTest.php +++ b/tests/Argentina/MayRevolutionTest.php @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Revolución de Mayo'] ); } @@ -81,6 +81,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/NationalSovereigntyDayTest.php b/tests/Argentina/NationalSovereigntyDayTest.php index a817fc816..40d52230c 100644 --- a/tests/Argentina/NationalSovereigntyDayTest.php +++ b/tests/Argentina/NationalSovereigntyDayTest.php @@ -99,7 +99,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Soberanía Nacional'] ); } @@ -111,6 +111,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/NewYearsDayTest.php b/tests/Argentina/NewYearsDayTest.php index 600c9a0e5..17f10a9fd 100644 --- a/tests/Argentina/NewYearsDayTest.php +++ b/tests/Argentina/NewYearsDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Año Nuevo'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/RaceDayTest.php b/tests/Argentina/RaceDayTest.php index 749f8a33c..a84a465ed 100644 --- a/tests/Argentina/RaceDayTest.php +++ b/tests/Argentina/RaceDayTest.php @@ -99,7 +99,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día del Respeto a la Diversidad Cultural'] ); } @@ -111,6 +111,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Argentina/RemembranceDayTest.php b/tests/Argentina/RemembranceDayTest.php index 3223a7ae7..f74a96624 100644 --- a/tests/Argentina/RemembranceDayTest.php +++ b/tests/Argentina/RemembranceDayTest.php @@ -42,7 +42,7 @@ class RemembranceDayTest extends ArgentinaBaseTestCase implements HolidayTestCas */ public function testRemembranceDayAfter2006(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testRemembranceDayAfter2006(): void */ public function testRemembranceDayBefore2006(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testRemembranceDayBefore2006(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Día Nacional de la Memoria por la Verdad y la Justicia']); } @@ -80,7 +80,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index caaed13ea..ccda08d7c 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -38,13 +38,12 @@ class AnzacDayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * Tests ANZAC Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -68,7 +67,7 @@ public function testNotHoliday(): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-04-25'], @@ -96,7 +95,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'ANZAC Day'] ); } @@ -111,7 +110,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/AustraliaBaseTestCase.php b/tests/Australia/AustraliaBaseTestCase.php index 8e6fffe64..cf0011175 100644 --- a/tests/Australia/AustraliaBaseTestCase.php +++ b/tests/Australia/AustraliaBaseTestCase.php @@ -30,9 +30,11 @@ abstract class AustraliaBaseTestCase extends TestCase /** Locale that is considered common for this provider. */ public const LOCALE = 'en_AU'; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/Melbourne'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/Melbourne'; } diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index c5da5f815..d405aadb7 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -33,11 +33,10 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday($this->region, self::HOLIDAY, $year, $expected); @@ -46,13 +45,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void /** * Tests Australia Day. * - * @dataProvider SubstituteHolidayDataProvider - * * @param int $year the year for which the holiday defined in this test needs to be tested * @param ?string $expected the expected date * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('SubstituteHolidayDataProvider')] public function testSubstituteHoliday(int $year, ?string $expected): void { if ($expected) { @@ -81,7 +79,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(2000), + static::generateRandomYear(2000), [self::LOCALE => 'Australia Day'] ); } @@ -93,7 +91,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(2000), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(2000), Holiday::TYPE_OFFICIAL); } /** @@ -103,9 +101,9 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 26, $this->timezone); + return static::generateRandomDates(1, 26, 'Australia/Melbourne'); } /** @@ -113,7 +111,7 @@ public function HolidayDataProvider(): array * * @return array list of test dates for the holiday defined in this test */ - public function SubstituteHolidayDataProvider(): array + public static function SubstituteHolidayDataProvider(): array { return [ [2010, null], diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index ca22b50a9..d3c74d0da 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -37,7 +37,7 @@ class AustraliaTest extends AustraliaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1987); + $this->year = static::generateRandomYear(1987); } /** diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php index 2cf598c3c..b92905446 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryBaseTestCase.php @@ -27,9 +27,11 @@ abstract class AustralianCapitalTerritoryBaseTestCase extends AustraliaBaseTestC { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/ACT'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\AustralianCapitalTerritory'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/ACT'; } diff --git a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php index 5ade1ab25..fd4717c6c 100644 --- a/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php +++ b/tests/Australia/AustralianCapitalTerritory/AustralianCapitalTerritoryTest.php @@ -37,7 +37,7 @@ class AustralianCapitalTerritoryTest extends AustralianCapitalTerritoryBaseTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2018, 2100); + $this->year = static::generateRandomYear(2018, 2100); } /** diff --git a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php index a06c37590..ec5dff140 100644 --- a/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/CanberraDayTest.php @@ -38,13 +38,12 @@ class CanberraDayTest extends AustralianCapitalTerritoryBaseTestCase implements /** * Tests Canberra Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-03-08'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Canberra Day'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php index bfdb43587..7c132ebcb 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSaturdayTest.php @@ -33,13 +33,12 @@ class EasterSaturdayTest extends AustralianCapitalTerritoryBaseTestCase implemen /** * Tests Easter Saturday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Saturday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php index 54b20fec2..4aaa6924d 100644 --- a/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/EasterSundayTest.php @@ -33,13 +33,12 @@ class EasterSundayTest extends AustralianCapitalTerritoryBaseTestCase implements /** * Tests Easter Sunday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Sunday'] ); } @@ -93,6 +92,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php index c4858b44f..a8abe5d77 100644 --- a/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/LabourDayTest.php @@ -33,13 +33,12 @@ class LabourDayTest extends AustralianCapitalTerritoryBaseTestCase implements Ho /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-04'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Labour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php index bed25cbb4..b945dcf3f 100644 --- a/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends AustralianCapitalTerritoryBaseTestCase implemen /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php index f242a5afe..f6273aa9e 100644 --- a/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php +++ b/tests/Australia/AustralianCapitalTerritory/ReconciliationDayTest.php @@ -38,13 +38,12 @@ class ReconciliationDayTest extends AustralianCapitalTerritoryBaseTestCase imple /** * Tests Reconciliation Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2018, '2018-05-28'], @@ -89,7 +88,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reconciliation Day'] ); } @@ -104,7 +103,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index e7543828c..acad8315d 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -34,14 +34,13 @@ class BoxingDayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * Tests Boxing Day. * - * @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 ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { $this->assertHoliday( @@ -71,7 +70,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-12-26', '2010-12-28'], @@ -98,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); $this->assertTranslatedHolidayName( @@ -116,7 +115,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); $this->assertHolidayType($this->region, self::HOLIDAY2, 2020, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index c5bd7c7fc..cf18119a6 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -34,14 +34,13 @@ class ChristmasDayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @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 ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { $this->assertHoliday( @@ -71,7 +70,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-12-25', '2010-12-27'], @@ -98,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); $this->assertTranslatedHolidayName( @@ -116,7 +115,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); $this->assertHolidayType($this->region, self::HOLIDAY2, 2016, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index e3a1e7d65..228bb0299 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -34,13 +34,12 @@ class EasterMondayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -54,13 +53,12 @@ public function testHoliday(int $year, string $expected): void /** * Tests Easter Tuesday for those years when ANZAC Day clashes with Easter Sunday or Monday. * - * @dataProvider HolidayDataProvider2 - * * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider2')] public function testHoliday2(int $year, string $expected): void { $this->assertHoliday( @@ -78,13 +76,13 @@ public function testHoliday2(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -98,7 +96,7 @@ public function HolidayDataProvider(): array * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider2(): array + public static function HolidayDataProvider2(): array { return [ [2011, '2011-04-26'], @@ -118,7 +116,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Monday'] ); $this->assertTranslatedHolidayName( @@ -136,7 +134,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); $this->assertHolidayType($this->region, self::HOLIDAY2, 2011, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index 8df450583..f08e65007 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -33,13 +33,12 @@ class GoodFridayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * Tests Good Friday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -93,6 +92,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NationalDayOfMourningTest.php b/tests/Australia/NationalDayOfMourningTest.php index b942c6bd1..90b5045f8 100644 --- a/tests/Australia/NationalDayOfMourningTest.php +++ b/tests/Australia/NationalDayOfMourningTest.php @@ -65,7 +65,7 @@ public function testHolidayBeforeActive(): void $this->assertNotHoliday( $this->region, self::HOLIDAY, - $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + static::generateRandomYear(1000, self::ACTIVE_YEAR - 1) ); } @@ -79,7 +79,7 @@ public function testHolidayAfterActive(): void $this->assertNotHoliday( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ACTIVE_YEAR + 1) + static::generateRandomYear(self::ACTIVE_YEAR + 1) ); } diff --git a/tests/Australia/NewSouthWales/BankHolidayTest.php b/tests/Australia/NewSouthWales/BankHolidayTest.php index 66d3e8d2d..0031a2df1 100644 --- a/tests/Australia/NewSouthWales/BankHolidayTest.php +++ b/tests/Australia/NewSouthWales/BankHolidayTest.php @@ -33,13 +33,12 @@ class BankHolidayTest extends NewSouthWalesBaseTestCase implements HolidayTestCa /** * Tests Bank Holiday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-08-02'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Bank Holiday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_BANK); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_BANK); } } diff --git a/tests/Australia/NewSouthWales/EasterSaturdayTest.php b/tests/Australia/NewSouthWales/EasterSaturdayTest.php index 6e5ad230b..7eaf9321d 100644 --- a/tests/Australia/NewSouthWales/EasterSaturdayTest.php +++ b/tests/Australia/NewSouthWales/EasterSaturdayTest.php @@ -33,13 +33,12 @@ class EasterSaturdayTest extends NewSouthWalesBaseTestCase implements HolidayTes /** * Tests Easter Saturday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Saturday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NewSouthWales/EasterSundayTest.php b/tests/Australia/NewSouthWales/EasterSundayTest.php index e974e0eb4..6abf6b4f2 100644 --- a/tests/Australia/NewSouthWales/EasterSundayTest.php +++ b/tests/Australia/NewSouthWales/EasterSundayTest.php @@ -33,13 +33,12 @@ class EasterSundayTest extends NewSouthWalesBaseTestCase implements HolidayTestC /** * Tests Easter Sunday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Sunday'] ); } @@ -93,6 +92,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NewSouthWales/LabourDayTest.php b/tests/Australia/NewSouthWales/LabourDayTest.php index ee58b4ceb..2d241e693 100644 --- a/tests/Australia/NewSouthWales/LabourDayTest.php +++ b/tests/Australia/NewSouthWales/LabourDayTest.php @@ -33,13 +33,12 @@ class LabourDayTest extends NewSouthWalesBaseTestCase implements HolidayTestCase /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-04'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Labour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php index f3c1a6c3e..a2e8f801a 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesBaseTestCase.php @@ -27,9 +27,11 @@ abstract class NewSouthWalesBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/NSW'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\NewSouthWales'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/NSW'; } diff --git a/tests/Australia/NewSouthWales/NewSouthWalesTest.php b/tests/Australia/NewSouthWales/NewSouthWalesTest.php index 8cc817b1d..995eec31f 100644 --- a/tests/Australia/NewSouthWales/NewSouthWalesTest.php +++ b/tests/Australia/NewSouthWales/NewSouthWalesTest.php @@ -37,7 +37,7 @@ class NewSouthWalesTest extends NewSouthWalesBaseTestCase implements ProviderTes */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/NewSouthWales/QueensBirthdayTest.php b/tests/Australia/NewSouthWales/QueensBirthdayTest.php index 41b51e1ff..a81507681 100644 --- a/tests/Australia/NewSouthWales/QueensBirthdayTest.php +++ b/tests/Australia/NewSouthWales/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends NewSouthWalesBaseTestCase implements HolidayTes /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 1e56628cc..8af3fe44f 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -34,14 +34,13 @@ class NewYearsDayTest extends AustraliaBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @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 ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { $this->assertHoliday( @@ -71,7 +70,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-01-01', null], @@ -98,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'New Year’s Day'] ); $this->assertTranslatedHolidayName( @@ -116,7 +115,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); $this->assertHolidayType($this->region, self::HOLIDAY2, 2017, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php index 23f38e309..8c9b5547a 100644 --- a/tests/Australia/NorthernTerritory/EasterSaturdayTest.php +++ b/tests/Australia/NorthernTerritory/EasterSaturdayTest.php @@ -33,13 +33,12 @@ class EasterSaturdayTest extends NorthernTerritoryBaseTestCase implements Holida /** * Tests Easter Saturday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Saturday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NorthernTerritory/MayDayTest.php b/tests/Australia/NorthernTerritory/MayDayTest.php index 38e9a0d0b..fb719510e 100644 --- a/tests/Australia/NorthernTerritory/MayDayTest.php +++ b/tests/Australia/NorthernTerritory/MayDayTest.php @@ -33,13 +33,12 @@ class MayDayTest extends NorthernTerritoryBaseTestCase implements HolidayTestCas /** * Tests May Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-05-03'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'May Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php index 1a61a7cff..d4be2ce9d 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryBaseTestCase.php @@ -27,9 +27,11 @@ abstract class NorthernTerritoryBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/North'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\NorthernTerritory'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/North'; } diff --git a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php index 4a777e8ae..746a52884 100644 --- a/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php +++ b/tests/Australia/NorthernTerritory/NorthernTerritoryTest.php @@ -37,7 +37,7 @@ class NorthernTerritoryTest extends NorthernTerritoryBaseTestCase implements Pro */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/NorthernTerritory/PicnicDayTest.php b/tests/Australia/NorthernTerritory/PicnicDayTest.php index a3c1a69d9..40d76b23f 100644 --- a/tests/Australia/NorthernTerritory/PicnicDayTest.php +++ b/tests/Australia/NorthernTerritory/PicnicDayTest.php @@ -33,13 +33,12 @@ class PicnicDayTest extends NorthernTerritoryBaseTestCase implements HolidayTest /** * Tests Picnic Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-08-02'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Picnic Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php index 01c246812..c9aa98c09 100644 --- a/tests/Australia/NorthernTerritory/QueensBirthdayTest.php +++ b/tests/Australia/NorthernTerritory/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends NorthernTerritoryBaseTestCase implements Holida /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php b/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php index 13641000d..aa5faa9bf 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneBaseTestCase.php @@ -27,9 +27,11 @@ abstract class BrisbaneBaseTestCase extends QueenslandBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/Brisbane'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\Queensland\Brisbane'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/Brisbane'; } diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index c9e033488..a5dbea8a1 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -37,7 +37,7 @@ class BrisbaneTest extends BrisbaneBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index e6e1c9179..9f05a9bbf 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -33,13 +33,12 @@ class PeoplesDayTest extends BrisbaneBaseTestCase implements HolidayTestCase /** * Tests Ekka People's Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-08-11'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Ekka People’s Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 45f5974a8..35c73e0b4 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -33,13 +33,12 @@ class LabourDayTest extends QueenslandBaseTestCase implements HolidayTestCase /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-05-03'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Labour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index dfa064b75..8d3f14f67 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends QueenslandBaseTestCase implements HolidayTestCa /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/Queensland/QueenslandBaseTestCase.php b/tests/Australia/Queensland/QueenslandBaseTestCase.php index d647387fd..d27d7965e 100644 --- a/tests/Australia/Queensland/QueenslandBaseTestCase.php +++ b/tests/Australia/Queensland/QueenslandBaseTestCase.php @@ -27,9 +27,11 @@ abstract class QueenslandBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/Queensland'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\Queensland'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/Queensland'; } diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index a3985bdc3..d291e2364 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -37,7 +37,7 @@ class QueenslandTest extends QueenslandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php index 5d94b72be..663482aa3 100644 --- a/tests/Australia/SouthAustralia/AdelaideCupDayTest.php +++ b/tests/Australia/SouthAustralia/AdelaideCupDayTest.php @@ -38,13 +38,12 @@ class AdelaideCupDayTest extends SouthAustraliaBaseTestCase implements HolidayTe /** * Tests Adelaide Cup Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2000, '2000-05-15'], @@ -97,7 +96,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Adelaide Cup'] ); } @@ -112,7 +111,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/SouthAustralia/ChristmasDayTest.php b/tests/Australia/SouthAustralia/ChristmasDayTest.php index 633038ed4..a103ff68d 100644 --- a/tests/Australia/SouthAustralia/ChristmasDayTest.php +++ b/tests/Australia/SouthAustralia/ChristmasDayTest.php @@ -34,14 +34,13 @@ class ChristmasDayTest extends SouthAustraliaBaseTestCase implements HolidayTest /** * Tests Christmas Day. * - * @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 ?string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected, ?string $expectedExtra): void { $this->assertHoliday( @@ -71,7 +70,7 @@ public function testHoliday(int $year, string $expected, ?string $expectedExtra) * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-12-25', '2010-12-27'], @@ -98,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); $this->assertTranslatedHolidayName( @@ -116,7 +115,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); $this->assertHolidayType($this->region, self::HOLIDAY2, 2016, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/SouthAustralia/EasterSaturdayTest.php b/tests/Australia/SouthAustralia/EasterSaturdayTest.php index 821deffa1..3e9f934ba 100644 --- a/tests/Australia/SouthAustralia/EasterSaturdayTest.php +++ b/tests/Australia/SouthAustralia/EasterSaturdayTest.php @@ -33,13 +33,12 @@ class EasterSaturdayTest extends SouthAustraliaBaseTestCase implements HolidayTe /** * Tests Easter Saturday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Saturday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/SouthAustralia/LabourDayTest.php b/tests/Australia/SouthAustralia/LabourDayTest.php index af871f15c..eb4207cde 100644 --- a/tests/Australia/SouthAustralia/LabourDayTest.php +++ b/tests/Australia/SouthAustralia/LabourDayTest.php @@ -33,13 +33,12 @@ class LabourDayTest extends SouthAustraliaBaseTestCase implements HolidayTestCas /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-04'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Labour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/SouthAustralia/ProclamationDayTest.php b/tests/Australia/SouthAustralia/ProclamationDayTest.php index dd2280dbd..dddd26513 100644 --- a/tests/Australia/SouthAustralia/ProclamationDayTest.php +++ b/tests/Australia/SouthAustralia/ProclamationDayTest.php @@ -33,13 +33,12 @@ class ProclamationDayTest extends SouthAustraliaBaseTestCase implements HolidayT /** * Tests Proclamation Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-12-28'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Proclamation Day'] ); } @@ -97,7 +96,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/SouthAustralia/QueensBirthdayTest.php b/tests/Australia/SouthAustralia/QueensBirthdayTest.php index 34776d959..f01e518ad 100644 --- a/tests/Australia/SouthAustralia/QueensBirthdayTest.php +++ b/tests/Australia/SouthAustralia/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends SouthAustraliaBaseTestCase implements HolidayTe /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php index df0b18fe3..e81e15457 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaBaseTestCase.php @@ -27,9 +27,11 @@ abstract class SouthAustraliaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/South'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\SouthAustralia'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/South'; } diff --git a/tests/Australia/SouthAustralia/SouthAustraliaTest.php b/tests/Australia/SouthAustralia/SouthAustraliaTest.php index 04178d4a0..030ba90bd 100644 --- a/tests/Australia/SouthAustralia/SouthAustraliaTest.php +++ b/tests/Australia/SouthAustralia/SouthAustraliaTest.php @@ -37,7 +37,7 @@ class SouthAustraliaTest extends SouthAustraliaBaseTestCase implements ProviderT */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1973); + $this->year = static::generateRandomYear(1973); } /** diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 5471d655e..9c29788ae 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -37,7 +37,7 @@ class CentralNorthTest extends CentralNorthBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index 946db07f8..553fa2dac 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -33,13 +33,12 @@ class DevonportShowTest extends CentralNorthBaseTestCase implements HolidayTestC /** * Tests Devonport Show Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-11-26'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Devonport Show'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 8fd4ebed4..8e72b5bb9 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -33,13 +33,12 @@ class EightHourDayTest extends TasmaniaBaseTestCase implements HolidayTestCase /** * Tests Eight Hour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-03-08'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Eight Hour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index 646399386..fb3809c1c 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -33,13 +33,12 @@ class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements Holid /** * Tests Flinders Island Show Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-15'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Flinders Island Show'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index ec57b71eb..c62151902 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -37,7 +37,7 @@ class FlindersIslandTest extends FlindersIslandBaseTestCase implements ProviderT */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 46899a343..324677b87 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -33,13 +33,12 @@ class KingIslandShowTest extends KingIslandBaseTestCase implements HolidayTestCa /** * Tests King Island Show Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-03-02'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'King Island Show'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index 61124226f..6d3dc16af 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -37,7 +37,7 @@ class KingIslandTest extends KingIslandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 939a5a8c8..5a4314960 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -33,13 +33,12 @@ class LauncestonShowTest extends NortheastBaseTestCase implements HolidayTestCas /** * Tests Launceston Show Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-07'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Royal Launceston Show'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index a1b26cdfa..218199f4c 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -37,7 +37,7 @@ class NortheastTest extends NortheastBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index cf0f9b814..824ea622b 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -33,13 +33,12 @@ class BurnieShowTest extends NorthwestBaseTestCase implements HolidayTestCase /** * Tests Burnie Show Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-01'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Burnie Show'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 5d79bcc81..d863fd7d0 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -33,13 +33,12 @@ class AGFESTTest extends CircularHeadBaseTestCase implements HolidayTestCase /** * Tests AGFEST. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-05-07'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'AGFEST'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index bf8c084be..62eabdf0a 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -36,7 +36,7 @@ class CircularHeadTest extends CircularHeadBaseTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index 98b258cf7..fb1de0c14 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -37,7 +37,7 @@ class NorthwestTest extends NorthwestBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index e3d002ed9..255009155 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends TasmaniaBaseTestCase implements HolidayTestCase /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 3624d55f2..ab7a7b203 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -33,13 +33,12 @@ class RecreationDayTest extends TasmaniaBaseTestCase implements HolidayTestCase /** * Tests Recreation Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-11-01'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Recreation Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 37c9817a5..78fca84e5 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -33,13 +33,12 @@ class HobartShowTest extends SouthBaseTestCase implements HolidayTestCase /** * Tests Royal Hobart Show Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-10-21'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Royal Hobart Show'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 3e60487e3..67c2b1fc0 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -37,7 +37,7 @@ class SouthTest extends SouthBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 192ea84f8..1c3f960ad 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -33,13 +33,12 @@ class HobartRegattaTest extends SoutheastBaseTestCase implements HolidayTestCase /** * Tests Royal Hobart Regatta. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-02-08'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Royal Hobart Regatta'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php b/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php index 5d1ef5d9a..f70499b76 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastBaseTestCase.php @@ -27,9 +27,11 @@ abstract class SoutheastBaseTestCase extends SouthBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/Hobart'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\Tasmania\South\Southeast'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/Hobart'; } diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index f550ed54c..8d4f0f59b 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -36,7 +36,7 @@ class SoutheastTest extends SoutheastBaseTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Tasmania/TasmaniaBaseTestCase.php b/tests/Australia/Tasmania/TasmaniaBaseTestCase.php index b55075535..6bd6d3e77 100644 --- a/tests/Australia/Tasmania/TasmaniaBaseTestCase.php +++ b/tests/Australia/Tasmania/TasmaniaBaseTestCase.php @@ -27,9 +27,11 @@ abstract class TasmaniaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/Tasmania'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\Tasmania'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/Tasmania'; } diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 2e151fe7c..9f4347e08 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -37,7 +37,7 @@ class TasmaniaTest extends TasmaniaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 50ec78796..2b10ce91d 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -36,13 +36,12 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements HolidayTes /** * Tests AFL Grand Final Friday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -63,7 +62,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LAST_KNOWN_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LAST_KNOWN_YEAR), [self::LOCALE => 'AFL Grand Final Friday'] ); } @@ -78,7 +77,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LAST_KNOWN_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LAST_KNOWN_YEAR), Holiday::TYPE_OFFICIAL ); } @@ -96,7 +95,7 @@ public function testNotHoliday(): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2015, '2015-10-02'], diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index 471dec174..75452f8b0 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -33,13 +33,12 @@ class EasterSaturdayTest extends VictoriaBaseTestCase implements HolidayTestCase /** * Tests Easter Saturday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Saturday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index 2e7e62bfc..cee3a2da3 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -33,13 +33,12 @@ class EasterSundayTest extends VictoriaBaseTestCase implements HolidayTestCase /** * Tests Easter Sunday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, $this->timezone); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Sunday'] ); } @@ -93,6 +92,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 0f7b7dfe3..9a3cb59ef 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -33,13 +33,12 @@ class LabourDayTest extends VictoriaBaseTestCase implements HolidayTestCase /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-03-08'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Labour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 47b3e1f89..00457ef09 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -38,13 +38,12 @@ class MelbourneCupDayTest extends VictoriaBaseTestCase implements HolidayTestCas /** * Tests Melbourne Cup Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-11-02'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Melbourne Cup'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 576338ed9..b8a7cd95d 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends VictoriaBaseTestCase implements HolidayTestCase /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-14'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/Victoria/VictoriaBaseTestCase.php b/tests/Australia/Victoria/VictoriaBaseTestCase.php index e27c354f1..06796c0e4 100644 --- a/tests/Australia/Victoria/VictoriaBaseTestCase.php +++ b/tests/Australia/Victoria/VictoriaBaseTestCase.php @@ -27,9 +27,11 @@ abstract class VictoriaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/Victoria'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\Victoria'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/Victoria'; } diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 3bfd0e6b2..d3558e5fd 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -37,7 +37,7 @@ class VictoriaTest extends VictoriaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2015, 2018); + $this->year = static::generateRandomYear(2015, 2018); } /** diff --git a/tests/Australia/WesternAustralia/LabourDayTest.php b/tests/Australia/WesternAustralia/LabourDayTest.php index dbfce69bd..d21949277 100644 --- a/tests/Australia/WesternAustralia/LabourDayTest.php +++ b/tests/Australia/WesternAustralia/LabourDayTest.php @@ -33,13 +33,12 @@ class LabourDayTest extends WesternAustraliaBaseTestCase implements HolidayTestC /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-03-01'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Labour Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/WesternAustralia/QueensBirthdayTest.php b/tests/Australia/WesternAustralia/QueensBirthdayTest.php index d83dcb462..0ea4590c5 100644 --- a/tests/Australia/WesternAustralia/QueensBirthdayTest.php +++ b/tests/Australia/WesternAustralia/QueensBirthdayTest.php @@ -38,13 +38,12 @@ class QueensBirthdayTest extends WesternAustraliaBaseTestCase implements Holiday /** * Tests Queen's Birthday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-09-27'], @@ -87,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -102,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( $this->region, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2100), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php index d1536af19..e57df32e4 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaBaseTestCase.php @@ -27,9 +27,11 @@ abstract class WesternAustraliaBaseTestCase extends AustraliaBaseTestCase { use YasumiBase; + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Australia/West'; + /** Name of the region (e.g. country / state) to be tested. */ public string $region = 'Australia\WesternAustralia'; - /** Timezone in which this provider has holidays defined. */ public string $timezone = 'Australia/West'; } diff --git a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php index fc0a2abce..663034d55 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaDayTest.php @@ -33,13 +33,12 @@ class WesternAustraliaDayTest extends WesternAustraliaBaseTestCase implements Ho /** * Tests Western Australia Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -55,7 +54,7 @@ public function testHoliday(int $year, string $expected): void * * @return array list of test dates for the holiday defined in this test */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { return [ [2010, '2010-06-07'], @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( $this->region, self::HOLIDAY, - $this->generateRandomYear(1990), + static::generateRandomYear(1990), [self::LOCALE => 'Western Australia Day'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType($this->region, self::HOLIDAY, $this->generateRandomYear(1990), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType($this->region, self::HOLIDAY, static::generateRandomYear(1990), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Australia/WesternAustralia/WesternAustraliaTest.php b/tests/Australia/WesternAustralia/WesternAustraliaTest.php index a7c2ae96e..408b5e2ae 100644 --- a/tests/Australia/WesternAustralia/WesternAustraliaTest.php +++ b/tests/Australia/WesternAustralia/WesternAustraliaTest.php @@ -37,7 +37,7 @@ class WesternAustraliaTest extends WesternAustraliaBaseTestCase implements Provi */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1921); + $this->year = static::generateRandomYear(1921); } /** diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 3b8f9e126..31efa3729 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index 2c518d3c1..671846291 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christi Himmelfahrt'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 4e3494c4e..e8eb50664 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 32d774762..5b25263ab 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -37,7 +37,7 @@ class AustriaTest extends AustriaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1955); + $this->year = static::generateRandomYear(1955); } /** diff --git a/tests/Austria/Burgenland/BurgenlandTest.php b/tests/Austria/Burgenland/BurgenlandTest.php index 2ed5aff06..7e7a12e69 100644 --- a/tests/Austria/Burgenland/BurgenlandTest.php +++ b/tests/Austria/Burgenland/BurgenlandTest.php @@ -37,7 +37,7 @@ class BurgenlandTest extends BurgenlandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/Burgenland/stMartinsDayTest.php b/tests/Austria/Burgenland/stMartinsDayTest.php index 3c184f088..c93b483a0 100644 --- a/tests/Austria/Burgenland/stMartinsDayTest.php +++ b/tests/Austria/Burgenland/stMartinsDayTest.php @@ -33,11 +33,10 @@ class stMartinsDayTest extends BurgenlandBaseTestCase implements HolidayTestCase /** * Tests Saint Martins Day. * - * @dataProvider stMartinsDayDataProvider - * * @param int $year the year for which Saint Martins Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('stMartinsDayDataProvider')] public function teststMartinsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function teststMartinsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function stMartinsDayDataProvider(): array + public static function stMartinsDayDataProvider(): array { - return $this->generateRandomDates(11, 11, self::TIMEZONE); + return static::generateRandomDates(11, 11, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Martin'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Carinthia/CarinthiaTest.php b/tests/Austria/Carinthia/CarinthiaTest.php index c4b66e1ab..693485608 100644 --- a/tests/Austria/Carinthia/CarinthiaTest.php +++ b/tests/Austria/Carinthia/CarinthiaTest.php @@ -37,7 +37,7 @@ class CarinthiaTest extends CarinthiaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/Carinthia/PlebisciteDayTest.php b/tests/Austria/Carinthia/PlebisciteDayTest.php index bae4d0651..07fa083c2 100644 --- a/tests/Austria/Carinthia/PlebisciteDayTest.php +++ b/tests/Austria/Carinthia/PlebisciteDayTest.php @@ -38,11 +38,10 @@ class PlebisciteDayTest extends CarinthiaBaseTestCase implements HolidayTestCase /** * Tests Plebiscite Day. * - * @dataProvider PlebisciteDayDataProvider - * * @param int $year the year for which Plebiscite Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('PlebisciteDayDataProvider')] public function testPlebisciteDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testPlebisciteDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function PlebisciteDayDataProvider(): array + public static function PlebisciteDayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-10", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Tag der Volksabstimmung'] ); } @@ -103,6 +102,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Carinthia/StJosephsDayTest.php b/tests/Austria/Carinthia/StJosephsDayTest.php index ac9f804f4..23c02299a 100644 --- a/tests/Austria/Carinthia/StJosephsDayTest.php +++ b/tests/Austria/Carinthia/StJosephsDayTest.php @@ -33,11 +33,10 @@ class StJosephsDayTest extends CarinthiaBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephsDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephsDayDataProvider')] public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephsDayDataProvider(): array + public static function StJosephsDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 58bafb499..203bbb3c6 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends AustriaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christtag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index 85bbf10ec..953dbd30d 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testHoliday(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index 42d39cb59..32b09bafe 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index 446bf8e7d..8aeb0be14 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostersonntag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index d52b3782d..0483510a1 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends AustriaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Heilige Drei Könige'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index 5f3248c58..26b25228f 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements HolidayTes /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index 69cf25c35..151a2dcd3 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements Holiday /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Staatsfeiertag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/LowerAustria/LowerAustriaTest.php b/tests/Austria/LowerAustria/LowerAustriaTest.php index 77f4192b0..24c6eee58 100644 --- a/tests/Austria/LowerAustria/LowerAustriaTest.php +++ b/tests/Austria/LowerAustria/LowerAustriaTest.php @@ -37,7 +37,7 @@ class LowerAustriaTest extends LowerAustriaBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/LowerAustria/StLeopoldsDayTest.php b/tests/Austria/LowerAustria/StLeopoldsDayTest.php index 1fa5f42ad..65b720857 100644 --- a/tests/Austria/LowerAustria/StLeopoldsDayTest.php +++ b/tests/Austria/LowerAustria/StLeopoldsDayTest.php @@ -38,11 +38,10 @@ class StLeopoldsDayTest extends LowerAustriaBaseTestCase implements HolidayTestC /** * Tests Saint Leopold's Day. * - * @dataProvider StLeopoldsDayDataProvider - * * @param int $year the year for which Saint Leopold's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StLeopoldsDayDataProvider')] public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StLeopoldsDayDataProvider(): array + public static function StLeopoldsDayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-11-15", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Leopold'] ); } @@ -103,6 +102,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index ae1b36ca5..dc64bc687 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -42,7 +42,7 @@ class NationalDayTest extends AustriaBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Nationalfeiertag'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 8f03e78e9..c24d02504 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends AustriaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index de73afc47..5d18c864d 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index 9445fac59..940097071 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingsten'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Austria/Salzburg/SalzburgTest.php b/tests/Austria/Salzburg/SalzburgTest.php index 07c029aee..d9e6e56f2 100644 --- a/tests/Austria/Salzburg/SalzburgTest.php +++ b/tests/Austria/Salzburg/SalzburgTest.php @@ -37,7 +37,7 @@ class SalzburgTest extends SalzburgBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/Salzburg/StRupertsDayTest.php b/tests/Austria/Salzburg/StRupertsDayTest.php index 8f977e478..75574239e 100644 --- a/tests/Austria/Salzburg/StRupertsDayTest.php +++ b/tests/Austria/Salzburg/StRupertsDayTest.php @@ -33,11 +33,10 @@ class StRupertsDayTest extends SalzburgBaseTestCase implements HolidayTestCase /** * Tests Saint Rupert's Day. * - * @dataProvider StRupertsDayDataProvider - * * @param int $year the year for which Saint Rupert's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StRupertsDayDataProvider')] public function testStRupertsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStRupertsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StRupertsDayDataProvider(): array + public static function StRupertsDayDataProvider(): array { - return $this->generateRandomDates(9, 24, self::TIMEZONE); + return static::generateRandomDates(9, 24, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Rupert'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index 492babfc7..43c30ed87 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stefanitag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Styria/StJosephsDayTest.php b/tests/Austria/Styria/StJosephsDayTest.php index 092e8054a..7d70cca41 100644 --- a/tests/Austria/Styria/StJosephsDayTest.php +++ b/tests/Austria/Styria/StJosephsDayTest.php @@ -33,11 +33,10 @@ class StJosephsDayTest extends StyriaBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephsDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephsDayDataProvider')] public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephsDayDataProvider(): array + public static function StJosephsDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Styria/StyriaTest.php b/tests/Austria/Styria/StyriaTest.php index 91560a3c1..4dc14925e 100644 --- a/tests/Austria/Styria/StyriaTest.php +++ b/tests/Austria/Styria/StyriaTest.php @@ -37,7 +37,7 @@ class StyriaTest extends StyriaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/Tyrol/StJosephsDayTest.php b/tests/Austria/Tyrol/StJosephsDayTest.php index 5153ad849..c16a3cc75 100644 --- a/tests/Austria/Tyrol/StJosephsDayTest.php +++ b/tests/Austria/Tyrol/StJosephsDayTest.php @@ -33,11 +33,10 @@ class StJosephsDayTest extends TyrolBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephsDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephsDayDataProvider')] public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephsDayDataProvider(): array + public static function StJosephsDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Tyrol/TyrolTest.php b/tests/Austria/Tyrol/TyrolTest.php index 2d3a44925..db4d8818f 100644 --- a/tests/Austria/Tyrol/TyrolTest.php +++ b/tests/Austria/Tyrol/TyrolTest.php @@ -37,7 +37,7 @@ class TyrolTest extends TyrolBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/UpperAustria/StFloriansDayTest.php b/tests/Austria/UpperAustria/StFloriansDayTest.php index a4f5af319..3ff4b5177 100644 --- a/tests/Austria/UpperAustria/StFloriansDayTest.php +++ b/tests/Austria/UpperAustria/StFloriansDayTest.php @@ -33,11 +33,10 @@ class StFloriansDayTest extends UpperAustriaBaseTestCase implements HolidayTestC /** * Tests Saint Florian's Day. * - * @dataProvider StFloriansDayDataProvider - * * @param int $year the year for which Saint Florian's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StFloriansDayDataProvider')] public function testStFloriansDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStFloriansDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StFloriansDayDataProvider(): array + public static function StFloriansDayDataProvider(): array { - return $this->generateRandomDates(5, 4, self::TIMEZONE); + return static::generateRandomDates(5, 4, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Florian'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/UpperAustria/UpperAustriaTest.php b/tests/Austria/UpperAustria/UpperAustriaTest.php index eaceba604..36888f03e 100644 --- a/tests/Austria/UpperAustria/UpperAustriaTest.php +++ b/tests/Austria/UpperAustria/UpperAustriaTest.php @@ -37,7 +37,7 @@ class UpperAustriaTest extends UpperAustriaBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/Vienna/StLeopoldsDayTest.php b/tests/Austria/Vienna/StLeopoldsDayTest.php index 7be9a2e5b..842a38842 100644 --- a/tests/Austria/Vienna/StLeopoldsDayTest.php +++ b/tests/Austria/Vienna/StLeopoldsDayTest.php @@ -38,11 +38,10 @@ class StLeopoldsDayTest extends ViennaBaseTestCase implements HolidayTestCase /** * Tests Saint Leopold's Day. * - * @dataProvider StLeopoldsDayDataProvider - * * @param int $year the year for which Saint Leopold's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StLeopoldsDayDataProvider')] public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testStLeopoldsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StLeopoldsDayDataProvider(): array + public static function StLeopoldsDayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-11-15", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Leopold'] ); } @@ -103,6 +102,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Vienna/ViennaTest.php b/tests/Austria/Vienna/ViennaTest.php index 9ed79a77f..2c5e8bf35 100644 --- a/tests/Austria/Vienna/ViennaTest.php +++ b/tests/Austria/Vienna/ViennaTest.php @@ -37,7 +37,7 @@ class ViennaTest extends ViennaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Austria/Vorarlberg/StJosephsDayTest.php b/tests/Austria/Vorarlberg/StJosephsDayTest.php index bf3758b13..850e6a464 100644 --- a/tests/Austria/Vorarlberg/StJosephsDayTest.php +++ b/tests/Austria/Vorarlberg/StJosephsDayTest.php @@ -33,11 +33,10 @@ class StJosephsDayTest extends VorarlbergBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephsDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested. * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephsDayDataProvider')] public function testStJosephsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStJosephsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephsDayDataProvider(): array + public static function StJosephsDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Austria/Vorarlberg/VorarlbergTest.php b/tests/Austria/Vorarlberg/VorarlbergTest.php index dd7b4fa93..282073b10 100644 --- a/tests/Austria/Vorarlberg/VorarlbergTest.php +++ b/tests/Austria/Vorarlberg/VorarlbergTest.php @@ -37,7 +37,7 @@ class VorarlbergTest extends VorarlbergBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1135); + $this->year = static::generateRandomYear(1135); } /** diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 909e748dc..39ebd0be4 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -110,15 +110,26 @@ public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): v $substitute = new SubstituteHoliday($holiday, [$locale => $translation], new \DateTime('2019-01-02'), $locale); $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $matcher = self::exactly(3); $translationsStub - ->expects(self::exactly(3)) - ->method('getTranslations') - ->withConsecutive([self::equalTo('substituteHoliday')], [self::equalTo('substituteHoliday:testHoliday')], [self::equalTo('testHoliday')]) - ->willReturnOnConsecutiveCalls( - [$locale => 'foo'], - [$locale => 'foo'], - ['en' => 'foo'] - ); + ->expects($matcher) + ->method('getTranslations')->willReturnCallback(function (...$parameters) use ($matcher, $locale) { + if (1 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday', $parameters[0]); + + return [$locale => 'foo']; + } + if (2 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday:testHoliday', $parameters[0]); + + return [$locale => 'foo']; + } + if (3 === $matcher->numberOfInvocations()) { + self::assertSame('testHoliday', $parameters[0]); + + return ['en' => 'foo']; + } + }); $substitute->mergeGlobalTranslations($translationsStub); @@ -136,15 +147,26 @@ public function testSubstituteHolidayGetNameWithPatternFallback(): void $substitute = new SubstituteHoliday($holiday, [], new \DateTime('2019-01-02'), $locale); $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $matcher = self::exactly(3); $translationsStub - ->expects(self::exactly(3)) - ->method('getTranslations') - ->withConsecutive([self::equalTo('substituteHoliday')], [self::equalTo('substituteHoliday:testHoliday')], [self::equalTo('testHoliday')]) - ->willReturnOnConsecutiveCalls( - ['en' => '{0} obs'], - [], - [$locale => $translation] - ); + ->expects($matcher) + ->method('getTranslations')->willReturnCallback(function (...$parameters) use ($matcher, $locale, $translation) { + if (1 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday', $parameters[0]); + + return ['en' => '{0} obs']; + } + if (2 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday:testHoliday', $parameters[0]); + + return []; + } + if (3 === $matcher->numberOfInvocations()) { + self::assertSame('testHoliday', $parameters[0]); + + return [$locale => $translation]; + } + }); $substitute->mergeGlobalTranslations($translationsStub); @@ -162,15 +184,26 @@ public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): v $substitute = new SubstituteHoliday($holiday, [$locale => $translation], new \DateTime('2019-01-02'), $locale); $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $matcher = self::exactly(3); $translationsStub - ->expects(self::exactly(3)) - ->method('getTranslations') - ->withConsecutive([self::equalTo('substituteHoliday')], [self::equalTo('substituteHoliday:testHoliday')], [self::equalTo('testHoliday')]) - ->willReturnOnConsecutiveCalls( - [$locale => '{0} observed'], - [$locale => $translation], - [$locale => 'foo'], - ); + ->expects($matcher) + ->method('getTranslations')->willReturnCallback(function (...$parameters) use ($matcher, $locale, $translation) { + if (1 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday', $parameters[0]); + + return [$locale => '{0} observed']; + } + if (2 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday:testHoliday', $parameters[0]); + + return [$locale => $translation]; + } + if (3 === $matcher->numberOfInvocations()) { + self::assertSame('testHoliday', $parameters[0]); + + return [$locale => 'foo']; + } + }); $substitute->mergeGlobalTranslations($translationsStub); @@ -188,15 +221,26 @@ public function testSubstituteHolidayGetNameWithSubstitutedTranslation(): void $substitute = new SubstituteHoliday($holiday, [], new \DateTime('2019-01-02'), $locale); $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $matcher = self::exactly(3); $translationsStub - ->expects(self::exactly(3)) - ->method('getTranslations') - ->withConsecutive([self::equalTo('substituteHoliday')], [self::equalTo('substituteHoliday:testHoliday')], [self::equalTo('testHoliday')]) - ->willReturnOnConsecutiveCalls( - [$locale => '{0} observed'], - [], - [$locale => $translation], - ); + ->expects($matcher) + ->method('getTranslations')->willReturnCallback(function (...$parameters) use ($matcher, $locale, $translation) { + if (1 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday', $parameters[0]); + + return [$locale => '{0} observed']; + } + if (2 === $matcher->numberOfInvocations()) { + self::assertSame('substituteHoliday:testHoliday', $parameters[0]); + + return []; + } + if (3 === $matcher->numberOfInvocations()) { + self::assertSame('testHoliday', $parameters[0]); + + return [$locale => $translation]; + } + }); $substitute->mergeGlobalTranslations($translationsStub); diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 6a310d399..a233b3f20 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -35,13 +35,12 @@ class TypographyTest extends TestCase use YasumiBase; /** - * @dataProvider translationProvider - * * @param string $name The localized holiday name * @param string $class The provider * @param string $key The holiday key * @param string $locale The locale */ + #[\PHPUnit\Framework\Attributes\DataProvider('translationProvider')] public function testTranslations(string $name, string $class, string $key, string $locale): void { self::assertStringNotContainsString("'", $name, 'Translation contains typewriter apostrophe'); @@ -56,14 +55,14 @@ public function testTranslations(string $name, string $class, string $key, strin * @throws \ReflectionException * @throws \Exception */ - public function translationProvider(): array + public static function translationProvider(): array { $classes = Yasumi::getProviders(); $tests = []; foreach ($classes as $class) { - $provider = Yasumi::create($class, $this->generateRandomYear()); + $provider = Yasumi::create($class, static::generateRandomYear()); foreach ($provider->getHolidays() as $holiday) { foreach ($holiday->translations as $locale => $name) { diff --git a/tests/Base/WeekendTest.php b/tests/Base/WeekendTest.php index 892838eaf..5acadfd24 100644 --- a/tests/Base/WeekendTest.php +++ b/tests/Base/WeekendTest.php @@ -35,9 +35,8 @@ class WeekendTest extends TestCase * Note: this test uses Belgium as a representative country for the global, common weekend definition. * Tests for countries that deviate from the global definition will be added as soon as their respective * Holiday Provider is created. - * - * @dataProvider dataProviderWeekendDays */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderWeekendDays')] public function testWeekendDay(\DateTimeImmutable $date): void { $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int) $date->format('Y')); @@ -51,7 +50,7 @@ public function testWeekendDay(\DateTimeImmutable $date): void * * @throws \Exception */ - public function dataProviderWeekendDays(): array + public static function dataProviderWeekendDays(): array { return [ [ @@ -76,9 +75,8 @@ public function dataProviderWeekendDays(): array * Note: this test uses Belgium as a representative country for the global, common weekend definition. * Tests for countries that deviate from the global definition will be added as soon as their respective * Holiday Provider is created. - * - * @dataProvider dataProviderNonWeekendDays */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderNonWeekendDays')] public function testNonWeekendDay(\DateTimeImmutable $date): void { $yasumiProvider = Yasumi::create(self::HOLIDAY_PROVIDER, (int) $date->format('Y')); @@ -92,7 +90,7 @@ public function testNonWeekendDay(\DateTimeImmutable $date): void * * @throws \Exception */ - public function dataProviderNonWeekendDays(): array + public static function dataProviderNonWeekendDays(): array { return [ [ diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 72e8646ad..f39b35231 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -208,7 +208,7 @@ public function testWhenIsWithBlankKey(): void public function testGetHolidayWithBlankKey(): void { $holidays = Yasumi::create('Netherlands', 1999); - $holidays->getHoliday(''); + self::assertNull($holidays->getHoliday('')); } public function testWhatWeekDayIs(): void diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index 115de2d48..90bd91ec8 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -136,10 +136,9 @@ public function testYearBoundary(): void /** * Tests when the next working day happens to be in the next year. * - * @dataProvider dataProviderWorkDayNextYear - * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderWorkDayNextYear')] public function testWorkDayIsNextYear(string $start, int $workdays, string $expectedNext): void { $provider = 'USA'; @@ -153,7 +152,7 @@ public function testWorkDayIsNextYear(string $start, int $workdays, string $expe /** * @return array list of test dates that are considered working days the next year */ - public function dataProviderWorkDayNextYear(): array + public static function dataProviderWorkDayNextYear(): array { return [ [ @@ -172,10 +171,9 @@ public function dataProviderWorkDayNextYear(): array /** * Tests when the previous working day happens to be in the previous year. * - * @dataProvider dataProviderWorkDayPreviousYear - * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderWorkDayPreviousYear')] public function testWorkDayIsPreviousYear(string $start, int $workdays, string $expectedNext): void { $provider = 'USA'; @@ -189,7 +187,7 @@ public function testWorkDayIsPreviousYear(string $start, int $workdays, string $ /** * @return array list of test dates that are considered working days the previous year */ - public function dataProviderWorkDayPreviousYear(): array + public static function dataProviderWorkDayPreviousYear(): array { return [ [ diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 96487b3ee..bf6fc119b 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index 29dfaa4db..301506fcd 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -33,11 +33,10 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 11, self::TIMEZONE); + return static::generateRandomDates(11, 11, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Wapenstilstand'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index d6ddd9f68..6e6fa0354 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Hemelvaart'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index bc77ee647..7cb6538a1 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Onze Lieve Vrouw hemelvaart'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index 53a81cf20..259e032f7 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -36,7 +36,7 @@ class BelgiumTest extends BelgiumBaseTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 22c7c44da..97f653b9d 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends BelgiumBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Kerstmis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index c8ee54c00..073e5ff7d 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'paasmaandag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index 208d50309..fc14e1f5f 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -63,7 +63,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'eerste paasdag'] ); } @@ -75,6 +75,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index d2ea808ac..6eedf9c31 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements Holiday /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dag van de arbeid'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index dad4901b0..b8dd5583a 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -33,11 +33,10 @@ class NationalDayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(7, 21, self::TIMEZONE); + return static::generateRandomDates(7, 21, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'nationale feestdag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index f95a95bab..addb79aef 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nieuwjaar'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 9da1d78c0..5bbd7bef6 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'eerste pinksterdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 6ab40df99..75eb16a64 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'pinkstermaandag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index a6f2f1985..361e19c00 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -37,7 +37,7 @@ class BosniaTest extends BosniaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1992); + $this->year = static::generateRandomYear(1992); } /** diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index f1400b8d2..c5fb8241b 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends BosniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Božić'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index d13cff499..b1a580e3a 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -30,14 +30,18 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'dayAfterNewYearsDay'; + public function __construct() + { + parent::__construct(static::class); + } + /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +54,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 2, self::TIMEZONE); + return static::generateRandomDates(1, 2, self::TIMEZONE); } /** @@ -65,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nova godina - drugi dan'] ); } @@ -77,6 +81,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index 9cc887591..1c3defa82 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Uskrs'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index d105e5d09..a03425c81 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -42,7 +42,7 @@ class IndependenceDayTest extends BosniaBaseTestCase implements HolidayTestCase */ public function testIndependenceDayOnAfter1992(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testIndependenceDayBefore1992(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan Nezavisnosti'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 78cb3f137..b48bca6bd 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Praznik rada'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index eb3f3aa9e..a113dab7b 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends BosniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nova godina'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index e94f98632..224b08ba5 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -30,19 +30,22 @@ class OrthodoxChristmasDay extends BosniaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'orthodoxChristmasDay'; + public function __construct() + { + parent::__construct(static::class); + } + /** * @return array list of test dates for the holiday defined in this test * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 7, self::TIMEZONE); + return static::generateRandomDates(1, 7, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -56,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pravoslavni Božić'] ); } @@ -66,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index ec362cf78..92f94366c 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -30,14 +30,18 @@ class SecondLabourDay extends BosniaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'secondLabourDay'; + public function __construct() + { + parent::__construct(static::class); + } + /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Praznik rada - drugi dan'] ); } @@ -65,7 +69,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +79,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 2, self::TIMEZONE); + return static::generateRandomDates(5, 2, self::TIMEZONE); } } diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index 57429b018..60c9228b3 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -42,7 +42,7 @@ class StatehoodDayTest extends BosniaBaseTestCase implements HolidayTestCase */ public function testStatehoodDayOnAfter1943(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testStatehoodDayBefore1943(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan državnosti'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index a30efb795..8e3fb4025 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -42,7 +42,7 @@ class AllSoulsDayTest extends BrazilBaseTestCase implements HolidayTestCase */ public function testDiaDosFinadosAfter1300(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testDiaDosFinadosAfter1300(): void */ public function testDiaDosFinadosBefore1300(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testDiaDosFinadosBefore1300(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Dia de Finados']); } @@ -80,7 +80,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 2935e7fc3..13f18f583 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Quarta-feira de Cinzas'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Brazil/BlackConsciousnessDayTest.php b/tests/Brazil/BlackConsciousnessDayTest.php index 3a47a57bf..1f9c4c62c 100644 --- a/tests/Brazil/BlackConsciousnessDayTest.php +++ b/tests/Brazil/BlackConsciousnessDayTest.php @@ -47,7 +47,7 @@ class BlackConsciousnessDayTest extends BrazilBaseTestCase implements HolidayTes */ public function testBlackConsciousnessDay(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::OFFICIAL_YEAR - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::OFFICIAL_YEAR - 1); $expectedDate = "{$year}-11-20"; $this->assertHoliday( self::REGION, @@ -67,7 +67,7 @@ public function testBlackConsciousnessDayBefore2011(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -81,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dia Nacional de Zumbi e da Consciência Negra'] ); } @@ -96,14 +96,14 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::OFFICIAL_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::OFFICIAL_YEAR - 1), Holiday::TYPE_OBSERVANCE ); $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::OFFICIAL_YEAR), + static::generateRandomYear(self::OFFICIAL_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 6c7a93511..b83479ace 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -37,7 +37,7 @@ class BrazilTest extends BrazilBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1980); + $this->year = static::generateRandomYear(1980); } /** diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index ad8004c54..4a07ebe4b 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -45,12 +45,12 @@ class CarnavalMondayTest extends BrazilBaseTestCase implements HolidayTestCase */ public function testCarnavalMondayAfter1700(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P48D')) + static::computeEaster($year, self::TIMEZONE)->sub(new \DateInterval('P48D')) ); } @@ -61,7 +61,7 @@ public function testCarnavalMondayAfter1700(): void */ public function testCarnavalMondayBefore1700(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -72,7 +72,7 @@ public function testCarnavalMondayBefore1700(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Segunda-feira de Carnaval']); } @@ -83,7 +83,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index 8de9f7312..96a5479cc 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -45,12 +45,12 @@ class CarnavalTuesdayTest extends BrazilBaseTestCase implements HolidayTestCase */ public function testCarnavalTuesdayAfter1700(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P47D')) + static::computeEaster($year, self::TIMEZONE)->sub(new \DateInterval('P47D')) ); } @@ -61,7 +61,7 @@ public function testCarnavalTuesdayAfter1700(): void */ public function testCarnavalTuesdayBefore1700(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -72,7 +72,7 @@ public function testCarnavalTuesdayBefore1700(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Terça-feira de Carnaval']); } @@ -83,7 +83,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index 6feb72d71..02dbb0bb1 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Natal'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index fc244d8bb..7ab7fe654 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Corpus Christi'] ); } @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index ad45902a8..f95506240 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -41,7 +41,7 @@ class EasterTest extends BrazilBaseTestCase implements HolidayTestCase public function testEaster(): void { $year = 1948; - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $this->calculateEaster($year, self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, static::computeEaster($year, self::TIMEZONE)); } /** @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Páscoa'] ); } @@ -66,6 +66,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 078a90ab0..41b203205 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -45,7 +45,7 @@ public function testGoodFriday(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->sub(new \DateInterval('P2D')) + static::computeEaster($year, self::TIMEZONE)->sub(new \DateInterval('P2D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sexta feira santa'] ); } @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index 8a4303e0e..66ecc9ab8 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -42,7 +42,7 @@ class IndependenceDayTest extends BrazilBaseTestCase implements HolidayTestCase */ public function testDiaDaIndependenciaDoBrasilAfter1822(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testDiaDaIndependenciaDoBrasilAfter1822(): void */ public function testDiaDaIndependenciaDoBrasilBefore1822(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testDiaDaIndependenciaDoBrasilBefore1822(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -85,7 +85,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index 8a14d9315..92d30a2c1 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia internacional do trabalhador'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index a17ff37ae..5c4cf30bf 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ano novo'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index 333193667..5db5b47ea 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -42,7 +42,7 @@ class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements HolidayTes */ public function testNossaSenhoraAparecidaAfter1980(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testNossaSenhoraAparecidaAfter1980(): void */ public function testNossaSenhoraAparecidaBefore1980(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testNossaSenhoraAparecidaBefore1980(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -85,7 +85,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index bed5b7ec0..4c7a94471 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -42,7 +42,7 @@ class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements Holida */ public function testProclamacaoDaRepublicaAfter1889(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testProclamacaoDaRepublicaAfter1889(): void */ public function testProclamacaoDaRepublicaBefore1889(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testProclamacaoDaRepublicaBefore1889(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -85,7 +85,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index edd34ac98..d74bc8540 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -42,7 +42,7 @@ class TiradentesDayTest extends BrazilBaseTestCase implements HolidayTestCase */ public function testDiaDeTiradentesAfter1792(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testDiaDeTiradentesAfter1792(): void */ public function testDiaDeTiradentesBefore1792(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testDiaDeTiradentesBefore1792(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Dia de Tiradentes']); } @@ -80,7 +80,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Bulgaria/BulgariaTest.php b/tests/Bulgaria/BulgariaTest.php index 6f75ee4b1..83a18d207 100644 --- a/tests/Bulgaria/BulgariaTest.php +++ b/tests/Bulgaria/BulgariaTest.php @@ -26,7 +26,7 @@ class BulgariaTest extends BulgariaBaseTestCase implements ProviderTestCase protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } public function testOfficialHolidays(): void diff --git a/tests/Bulgaria/ChristmasDayTest.php b/tests/Bulgaria/ChristmasDayTest.php index f45aa287d..478644099 100644 --- a/tests/Bulgaria/ChristmasDayTest.php +++ b/tests/Bulgaria/ChristmasDayTest.php @@ -26,7 +26,7 @@ class ChristmasDayTest extends BulgariaBaseTestCase implements HolidayTestCase public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -40,7 +40,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Рождество Христово'] ); } @@ -50,7 +50,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/ChristmasEveTest.php b/tests/Bulgaria/ChristmasEveTest.php index 7cb617308..193f74a1f 100644 --- a/tests/Bulgaria/ChristmasEveTest.php +++ b/tests/Bulgaria/ChristmasEveTest.php @@ -26,7 +26,7 @@ class ChristmasEveTest extends BulgariaBaseTestCase implements HolidayTestCase public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -40,7 +40,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Бъдни вечер'] ); } @@ -50,7 +50,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/EducationCultureSlavonicLiteratureDayTest.php b/tests/Bulgaria/EducationCultureSlavonicLiteratureDayTest.php index ff3560172..d39d9220b 100644 --- a/tests/Bulgaria/EducationCultureSlavonicLiteratureDayTest.php +++ b/tests/Bulgaria/EducationCultureSlavonicLiteratureDayTest.php @@ -28,7 +28,7 @@ class EducationCultureSlavonicLiteratureDayTest extends BulgariaBaseTestCase imp public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -42,7 +42,7 @@ public function testNotHoliday(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -51,7 +51,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ден на българската просвета и култура и на славянската писменост'] ); } @@ -61,7 +61,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/IndependenceDayTest.php b/tests/Bulgaria/IndependenceDayTest.php index 7b5107c49..3b4d79d86 100644 --- a/tests/Bulgaria/IndependenceDayTest.php +++ b/tests/Bulgaria/IndependenceDayTest.php @@ -28,7 +28,7 @@ class IndependenceDayTest extends BulgariaBaseTestCase implements HolidayTestCas public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -42,7 +42,7 @@ public function testNotHoliday(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -51,7 +51,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ден на Независимостта на България'] ); } @@ -61,7 +61,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/InternationalWorkersDayTest.php b/tests/Bulgaria/InternationalWorkersDayTest.php index c429a479d..6b70b2b75 100644 --- a/tests/Bulgaria/InternationalWorkersDayTest.php +++ b/tests/Bulgaria/InternationalWorkersDayTest.php @@ -26,7 +26,7 @@ class InternationalWorkersDayTest extends BulgariaBaseTestCase implements Holida public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -40,7 +40,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ден на труда и на международната работническа солидарност'] ); } @@ -50,7 +50,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/LiberationDayTest.php b/tests/Bulgaria/LiberationDayTest.php index 43a8d8ec4..eb398b93c 100644 --- a/tests/Bulgaria/LiberationDayTest.php +++ b/tests/Bulgaria/LiberationDayTest.php @@ -33,7 +33,7 @@ class LiberationDayTest extends BulgariaBaseTestCase implements HolidayTestCase public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -47,7 +47,7 @@ public function testNotHoliday(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ден на Освобождението на България от османско иго'] ); } @@ -66,7 +66,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/NewYearsDayTest.php b/tests/Bulgaria/NewYearsDayTest.php index cf63affef..a79682fef 100644 --- a/tests/Bulgaria/NewYearsDayTest.php +++ b/tests/Bulgaria/NewYearsDayTest.php @@ -26,7 +26,7 @@ class NewYearsDayTest extends BulgariaBaseTestCase implements HolidayTestCase public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -40,7 +40,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Нова година'] ); } @@ -50,7 +50,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/OrthodoxEasterMondayTest.php b/tests/Bulgaria/OrthodoxEasterMondayTest.php index 32c85ceb1..b02a7ac85 100644 --- a/tests/Bulgaria/OrthodoxEasterMondayTest.php +++ b/tests/Bulgaria/OrthodoxEasterMondayTest.php @@ -47,7 +47,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Велики понеделник'] ); } @@ -57,7 +57,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/OrthodoxEasterTest.php b/tests/Bulgaria/OrthodoxEasterTest.php index 09ce13abd..14c0abcd1 100644 --- a/tests/Bulgaria/OrthodoxEasterTest.php +++ b/tests/Bulgaria/OrthodoxEasterTest.php @@ -44,7 +44,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Великден'] ); } @@ -54,7 +54,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/OrthodoxGoodFridayTest.php b/tests/Bulgaria/OrthodoxGoodFridayTest.php index c8d0f35cb..b401d5d82 100644 --- a/tests/Bulgaria/OrthodoxGoodFridayTest.php +++ b/tests/Bulgaria/OrthodoxGoodFridayTest.php @@ -47,7 +47,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Разпети петък'] ); } @@ -57,7 +57,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/SecondChristmasDayTest.php b/tests/Bulgaria/SecondChristmasDayTest.php index 9b859935d..3936d8806 100644 --- a/tests/Bulgaria/SecondChristmasDayTest.php +++ b/tests/Bulgaria/SecondChristmasDayTest.php @@ -26,7 +26,7 @@ class SecondChristmasDayTest extends BulgariaBaseTestCase implements HolidayTest public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -40,7 +40,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Втори ден на Коледа'] ); } @@ -50,7 +50,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/UnificationDayTest.php b/tests/Bulgaria/UnificationDayTest.php index 6492017fd..022768d73 100644 --- a/tests/Bulgaria/UnificationDayTest.php +++ b/tests/Bulgaria/UnificationDayTest.php @@ -28,7 +28,7 @@ class UnificationDayTest extends BulgariaBaseTestCase implements HolidayTestCase public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -42,7 +42,7 @@ public function testNotHoliday(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -51,7 +51,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ден на Съединението'] ); } @@ -61,7 +61,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Bulgaria/stGeorgesDayTest.php b/tests/Bulgaria/stGeorgesDayTest.php index 9c1b72e90..b889056ea 100644 --- a/tests/Bulgaria/stGeorgesDayTest.php +++ b/tests/Bulgaria/stGeorgesDayTest.php @@ -26,7 +26,7 @@ class stGeorgesDayTest extends BulgariaBaseTestCase implements HolidayTestCase public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -40,7 +40,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Гергьовден, ден на храбростта и Българската армия'] ); } @@ -50,7 +50,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Canada/Alberta/AlbertaTest.php b/tests/Canada/Alberta/AlbertaTest.php index d11c1997e..8ff2d71bc 100644 --- a/tests/Canada/Alberta/AlbertaTest.php +++ b/tests/Canada/Alberta/AlbertaTest.php @@ -37,7 +37,7 @@ class AlbertaTest extends AlbertaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/BritishColumbia/BritishColumbiaTest.php b/tests/Canada/BritishColumbia/BritishColumbiaTest.php index 5be9c4a4c..535bcf910 100644 --- a/tests/Canada/BritishColumbia/BritishColumbiaTest.php +++ b/tests/Canada/BritishColumbia/BritishColumbiaTest.php @@ -37,7 +37,7 @@ class BritishColumbiaTest extends BritishColumbiaBaseTestCase implements Provide */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/CanadaDayTest.php b/tests/Canada/CanadaDayTest.php index 81c5d5df8..9d38ee631 100644 --- a/tests/Canada/CanadaDayTest.php +++ b/tests/Canada/CanadaDayTest.php @@ -68,7 +68,7 @@ public function testCanadaDayBefore1879(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -82,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Canada Day'] ); } @@ -97,7 +97,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Canada/CanadaTest.php b/tests/Canada/CanadaTest.php index b6749a822..f2312307b 100644 --- a/tests/Canada/CanadaTest.php +++ b/tests/Canada/CanadaTest.php @@ -37,7 +37,7 @@ class CanadaTest extends CanadaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1986); + $this->year = static::generateRandomYear(1986); } /** diff --git a/tests/Canada/ChristmasDayTest.php b/tests/Canada/ChristmasDayTest.php index 3db48cc3a..4f81481cf 100644 --- a/tests/Canada/ChristmasDayTest.php +++ b/tests/Canada/ChristmasDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Canada/LabourDayTest.php b/tests/Canada/LabourDayTest.php index 2dfbe847c..8f93afc2b 100644 --- a/tests/Canada/LabourDayTest.php +++ b/tests/Canada/LabourDayTest.php @@ -42,7 +42,7 @@ class LabourDayTest extends CanadaBaseTestCase implements HolidayTestCase */ public function testLabourDayOnAfter1894(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testLabourDayBefore1894(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Labour Day'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Canada/Manitoba/ManitobaTest.php b/tests/Canada/Manitoba/ManitobaTest.php index b292b58f9..36b927cb4 100644 --- a/tests/Canada/Manitoba/ManitobaTest.php +++ b/tests/Canada/Manitoba/ManitobaTest.php @@ -37,7 +37,7 @@ class ManitobaTest extends ManitobaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/NewBrunswick/NewBrunswickTest.php b/tests/Canada/NewBrunswick/NewBrunswickTest.php index f4934d24f..693396c02 100644 --- a/tests/Canada/NewBrunswick/NewBrunswickTest.php +++ b/tests/Canada/NewBrunswick/NewBrunswickTest.php @@ -37,7 +37,7 @@ class NewBrunswickTest extends NewBrunswickBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/NewYearsDayTest.php b/tests/Canada/NewYearsDayTest.php index 1ad5e86ec..efcbf271e 100644 --- a/tests/Canada/NewYearsDayTest.php +++ b/tests/Canada/NewYearsDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'New Year’s Day'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php index d0bd824b0..baacef0e3 100644 --- a/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php +++ b/tests/Canada/NewfoundlandAndLabrador/NewfoundlandAndLabradorTest.php @@ -37,7 +37,7 @@ class NewfoundlandAndLabradorTest extends NewfoundlandAndLabradorBaseTestCase im */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php index c758d778a..8713dc406 100644 --- a/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php +++ b/tests/Canada/NorthwestTerritories/NorthwestTerritoriesTest.php @@ -37,7 +37,7 @@ class NorthwestTerritoriesTest extends NorthwestTerritoriesBaseTestCase implemen */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/NovaScotia/NovaScotiaTest.php b/tests/Canada/NovaScotia/NovaScotiaTest.php index 2e9ebf567..3817f5337 100644 --- a/tests/Canada/NovaScotia/NovaScotiaTest.php +++ b/tests/Canada/NovaScotia/NovaScotiaTest.php @@ -37,7 +37,7 @@ class NovaScotiaTest extends NovaScotiaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/Nunavut/NunavutDayTest.php b/tests/Canada/Nunavut/NunavutDayTest.php index ba1abe4c5..39ff08a52 100644 --- a/tests/Canada/Nunavut/NunavutDayTest.php +++ b/tests/Canada/Nunavut/NunavutDayTest.php @@ -33,7 +33,7 @@ class NunavutDayTest extends NunavutBaseTestCase implements HolidayTestCase public function testNunavutDayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -47,7 +47,7 @@ public function testLabourDayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Nunavut Day'] ); } @@ -66,7 +66,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OBSERVANCE ); } diff --git a/tests/Canada/Nunavut/NunavutTest.php b/tests/Canada/Nunavut/NunavutTest.php index b965c2abc..609cdcfcb 100644 --- a/tests/Canada/Nunavut/NunavutTest.php +++ b/tests/Canada/Nunavut/NunavutTest.php @@ -37,7 +37,7 @@ class NunavutTest extends NunavutBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/Ontario/OntarioTest.php b/tests/Canada/Ontario/OntarioTest.php index ddb80bede..e3b00c7a0 100644 --- a/tests/Canada/Ontario/OntarioTest.php +++ b/tests/Canada/Ontario/OntarioTest.php @@ -37,7 +37,7 @@ class OntarioTest extends OntarioBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php index e8a3fac5a..7dabc7b53 100644 --- a/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php +++ b/tests/Canada/PrinceEdwardIsland/PrinceEdwardIslandTest.php @@ -37,7 +37,7 @@ class PrinceEdwardIslandTest extends PrinceEdwardIslandBaseTestCase implements P */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/Quebec/QuebecTest.php b/tests/Canada/Quebec/QuebecTest.php index 4d582f594..5f2b287cb 100644 --- a/tests/Canada/Quebec/QuebecTest.php +++ b/tests/Canada/Quebec/QuebecTest.php @@ -37,7 +37,7 @@ class QuebecTest extends QuebecBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/RemembranceDayTest.php b/tests/Canada/RemembranceDayTest.php index ab98dbcbf..cab9a6f03 100644 --- a/tests/Canada/RemembranceDayTest.php +++ b/tests/Canada/RemembranceDayTest.php @@ -42,7 +42,7 @@ class RemembranceDayTest extends CanadaBaseTestCase implements HolidayTestCase */ public function testRemembranceDayOnAfter1919(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testVeteransDayBefore1919(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1954), + static::generateRandomYear(1954), [self::LOCALE => 'Remembrance Day'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Canada/Saskatchewan/SaskatchewanTest.php b/tests/Canada/Saskatchewan/SaskatchewanTest.php index 329686a06..717217987 100644 --- a/tests/Canada/Saskatchewan/SaskatchewanTest.php +++ b/tests/Canada/Saskatchewan/SaskatchewanTest.php @@ -37,7 +37,7 @@ class SaskatchewanTest extends SaskatchewanBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Canada/ThanksgivingDayTest.php b/tests/Canada/ThanksgivingDayTest.php index 78f9ad692..3550c86b9 100644 --- a/tests/Canada/ThanksgivingDayTest.php +++ b/tests/Canada/ThanksgivingDayTest.php @@ -43,7 +43,7 @@ class ThanksgivingDayTest extends CanadaBaseTestCase implements HolidayTestCase */ public function testThanksgivingDayOnAfter1879(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testThanksgivingDayBefore1879(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Thanksgiving'] ); } @@ -92,7 +92,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Canada/TruthAndReconciliationDayTest.php b/tests/Canada/TruthAndReconciliationDayTest.php index fba6f73b1..704eca2bf 100644 --- a/tests/Canada/TruthAndReconciliationDayTest.php +++ b/tests/Canada/TruthAndReconciliationDayTest.php @@ -43,7 +43,7 @@ class TruthAndReconciliationDayTest extends CanadaBaseTestCase implements Holida */ public function testTruthAndReconciliationDayOnAfter2021(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testTruthAndReconciliationDayBefore2021(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'National Day For Truth And Reconciliation'] ); } @@ -92,7 +92,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Canada/Yukon/YukonTest.php b/tests/Canada/Yukon/YukonTest.php index 90be86646..f9f058fea 100644 --- a/tests/Canada/Yukon/YukonTest.php +++ b/tests/Canada/Yukon/YukonTest.php @@ -37,7 +37,7 @@ class YukonTest extends YukonBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 4d73a8621..232100044 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dan svih svetih'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index 75015d818..a3f20862f 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -42,7 +42,7 @@ class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements HolidayT */ public function testAntifascistStruggleDayOnAfter1941(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testAntifascistStruggleDayBefore1941(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan antifašističke borbe'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index 141bea603..c73942f9d 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Velika Gospa'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 88326d22d..130acb1d3 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Božić'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index 510fd8424..6c142034d 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tijelovo'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/CroatiaTest.php b/tests/Croatia/CroatiaTest.php index b130f7dc9..0b6c65db9 100644 --- a/tests/Croatia/CroatiaTest.php +++ b/tests/Croatia/CroatiaTest.php @@ -37,7 +37,7 @@ class CroatiaTest extends CroatiaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1941); + $this->year = static::generateRandomYear(1941); } /** diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 99e6b249c..c9725b171 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Uskršnji ponedjeljak'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index f56214c69..4845dca52 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Uskrs'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index f4a54efe5..3621056e5 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends CroatiaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sveta tri kralja'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index b6f33d722..c89add0a5 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -47,7 +47,7 @@ class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements Holiday */ public function testHomelandThanksgivingDayOnAfter1995(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +66,7 @@ public function testHomelandThanksgivingDayBefore1995(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,7 +77,7 @@ public function testHomelandThanksgivingDayBefore1995(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::NAME_CHANGED_YEAR - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::NAME_CHANGED_YEAR - 1); $expectedText = 'Dan domovinske zahvalnosti'; $this->assertTranslatedHolidayName( self::REGION, @@ -86,7 +86,7 @@ public function testTranslation(): void [self::LOCALE => $expectedText] ); - $year = $this->generateRandomYear(self::NAME_CHANGED_YEAR); + $year = static::generateRandomYear(self::NAME_CHANGED_YEAR); $expectedText = 'Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja'; $this->assertTranslatedHolidayName( self::REGION, @@ -106,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 70b226034..5bbfba4f0 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -47,7 +47,7 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements HolidayTestCase */ public function testIndependenceDayOnAfter1991(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +66,7 @@ public function testIndependenceDayBefore1991(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -80,7 +80,7 @@ public function testIndependenceDayAfterDisbandment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::DISBANDMENT_YEAR) + static::generateRandomYear(self::DISBANDMENT_YEAR) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1), [self::LOCALE => 'Dan neovisnosti'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::DISBANDMENT_YEAR - 1), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index 6e2bc35bd..50a449e26 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements Holiday /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Praznik rada'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index b7a67ad51..73d2f6b60 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nova godina'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/RemembranceDayTest.php b/tests/Croatia/RemembranceDayTest.php index 02ac0b90a..7e032ab88 100644 --- a/tests/Croatia/RemembranceDayTest.php +++ b/tests/Croatia/RemembranceDayTest.php @@ -42,7 +42,7 @@ class RemembranceDayTest extends CroatiaBaseTestCase implements HolidayTestCase */ public function testRemembranceDayAfterItWasEstablished(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testRemembranceDayBeforeItWasEstablished(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index 93ec20c6f..0475ed46e 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends CroatiaBaseTestCase implements HolidayTestCase /** * Tests the day of St. Stephen's Day. * - * @dataProvider stStephensDayDataProvider - * * @param int $year the year for which St. Stephen's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('stStephensDayDataProvider')] public function teststStephensDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function teststStephensDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function stStephensDayDataProvider(): array + public static function stStephensDayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sveti Stjepan'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index 71246a4ae..497027865 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -47,7 +47,7 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements HolidayTestCase */ public function testStatehoodDay(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::DATE_CHANGE_YEAR - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::DATE_CHANGE_YEAR - 1); $expectedDate = "{$year}-6-25"; $this->assertHoliday( self::REGION, @@ -56,7 +56,7 @@ public function testStatehoodDay(): void new \DateTime($expectedDate, new \DateTimeZone(self::TIMEZONE)) ); - $year = $this->generateRandomYear(self::DATE_CHANGE_YEAR); + $year = static::generateRandomYear(self::DATE_CHANGE_YEAR); $expectedDate = "{$year}-5-30"; $this->assertHoliday( self::REGION, @@ -76,7 +76,7 @@ public function testStatehoodDayBefore1991(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -90,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan državnosti'] ); } @@ -105,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 6d17d95d7..8a2da6a29 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -37,11 +37,10 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements HolidayTestC /** * Tests Christmas Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '1. svátek vánoční'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 9d6979cac..3b23a4c87 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -37,11 +37,10 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements HolidayTestC /** * Tests Christmas Eve. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Eve needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Štědrý den'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index cd14422f6..04f8bc9fd 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -41,7 +41,7 @@ class CzechRepublicTest extends CzechRepublicBaseTestCase implements ProviderTes */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 24f5a48f7..25d7fff23 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -37,11 +37,10 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements Holiday /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(9, 28, self::TIMEZONE); + return static::generateRandomDates(9, 28, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den české státnosti'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index 7c2716ec9..d22bc22ac 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -60,7 +60,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Velikonoční pondělí'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 38a0436d1..76001f8fe 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -60,7 +60,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Velký pátek'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 340db24f6..5e9a64839 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -33,11 +33,10 @@ class IndependentCzechoslovakStateDayTest extends CzechRepublicBaseTestCase impl /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(10, 28, self::TIMEZONE); + return static::generateRandomDates(10, 28, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den vzniku samostatného československého státu'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index 7025229a9..9ebd71e84 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -37,11 +37,10 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements H /** * Tests International Workers' Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -57,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Svátek práce'] ); } @@ -69,7 +68,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -79,8 +78,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index 56110e877..33d1f880e 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -33,11 +33,10 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(7, 6, self::TIMEZONE); + return static::generateRandomDates(7, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den upálení mistra Jana Husa'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index c76eacdb1..ae86d5485 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -37,11 +37,10 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nový rok'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index ff6be1c2b..7c2daa30e 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -36,11 +36,10 @@ class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase im /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den obnovy samostatného českého státu'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index dd2b13941..866e2fb39 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -37,11 +37,10 @@ class SaintsCyrilAndMethodiusDayTest extends CzechRepublicBaseTestCase implement /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(7, 5, self::TIMEZONE); + return static::generateRandomDates(7, 5, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den slovanských věrozvěstů Cyrila a Metoděje'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 5d88d1628..0e9c02df4 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -37,11 +37,10 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Holida /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. svátek vánoční'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index 1db2b06fd..4604ba145 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -33,11 +33,10 @@ class StruggleForFreedomAndDemocracyDayTest extends CzechRepublicBaseTestCase im /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 17, self::TIMEZONE); + return static::generateRandomDates(11, 17, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den boje za svobodu a demokracii'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index 4d11b818a..252a41327 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -37,11 +37,10 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Holida /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -54,9 +53,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 8, self::TIMEZONE); + return static::generateRandomDates(5, 8, self::TIMEZONE); } /** @@ -69,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Den vítězství'] ); } @@ -81,6 +80,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index 392a3f98a..602627541 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Kristi himmelfartsdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index 08aa7ede9..f4cf78868 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'juledag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index 1a3180ce1..df1117740 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -33,11 +33,10 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'juleaften'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index 7ead563d9..859ff182e 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'grundlovsdag'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OBSERVANCE ); } diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index f57ba005c..b20b3c890 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -37,7 +37,7 @@ class DenmarkTest extends DenmarkBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2024); + $this->year = static::generateRandomYear(2024); } /** diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index f633914cd..1a1229ada 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. påskedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index 9c26440e4..177300ede 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'påskedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 37a86fa10..c21cee9e7 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'langfredag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index 2cebb886f..3f130563b 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -66,7 +66,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -80,7 +80,7 @@ public function testHolidayAfterAbolishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ABOLISHMENT_YEAR) + static::generateRandomYear(self::ABOLISHMENT_YEAR) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR - 1), [self::LOCALE => 'store bededag'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR - 1), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 5ea8cb849..df4688b21 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements Holiday /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'første maj'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index 867c97bb8..dec941d3b 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'skærtorsdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index 345754f36..d1e935e4b 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'nytårsdag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index 675df28a9..b4bffe70a 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -33,11 +33,10 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 31, self::TIMEZONE); + return static::generateRandomDates(12, 31, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'nytårsaften'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 1f07be546..86d754ae8 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. pinsedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index 831ab414c..eea3e006f 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'pinsedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index 2df21536c..75daa1d26 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. juledag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 960257ab0..b17fc318c 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -37,14 +37,12 @@ class ChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Esimene jõulupüha'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index d6ae8bd0c..7afb35c62 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -37,14 +37,12 @@ class ChristmasEveDayTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jõululaupäev'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index 461f9a706..0cfd3ff63 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -37,21 +37,20 @@ class EasterDayTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomEasterDates(self::TIMEZONE); + return static::generateRandomEasterDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ülestõusmispühade 1. püha'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index 64c19370a..7a4fb5e3b 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void 'stJohnsDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if ($year >= Estonia::DECLARATION_OF_INDEPENDENCE_YEAR) { $holidays[] = 'independenceDay'; @@ -71,7 +71,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -81,7 +81,7 @@ public function testObservedHolidays(): void */ public function testSeasonalHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_SEASON); } /** @@ -91,7 +91,7 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_BANK); } /** @@ -101,7 +101,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index a8e4194b1..f859035da 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -37,21 +37,20 @@ class GoodFridayDayTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomGoodFridayDates(self::TIMEZONE); + return static::generateRandomGoodFridayDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Suur Reede'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index d3e8b8029..9b005ea0e 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBefore(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Estonia::DECLARATION_OF_INDEPENDENCE_YEAR - 1) + static::generateRandomYear(1000, Estonia::DECLARATION_OF_INDEPENDENCE_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBefore(): void */ public function testHolidayAfter(): void { - $year = $this->generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR); + $year = static::generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), [self::LOCALE => 'Iseseisvuspäev'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), ['en' => 'Independence Day'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index 15d157070..825dfbced 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -37,14 +37,12 @@ class InternationalWorkersDayTest extends EstoniaBaseTestCase implements Holiday * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Kevadpüha'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index 68ab2884f..68299ce8c 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -37,14 +37,12 @@ class NewYearsDayTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Uusaasta'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 49c8a2f01..1c5c4b4da 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -37,21 +37,20 @@ class PentecostTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomPentecostDates(self::TIMEZONE); + return static::generateRandomPentecostDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nelipühade 1. püha'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index 3583fe004..f5a92cf38 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBefore(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Estonia::RESTORATION_OF_INDEPENDENCE_YEAR - 1) + static::generateRandomYear(1000, Estonia::RESTORATION_OF_INDEPENDENCE_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBefore(): void */ public function testHolidayAfter(): void { - $year = $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR); + $year = static::generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), [self::LOCALE => 'Taasiseseisvumispäev'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), ['en' => 'Day of Restoration of Independence'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 4fbea249a..b53991963 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -37,14 +37,12 @@ class SecondChristmasDayTest extends EstoniaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Teine Jõulupüha'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index dd211c6a8..e01379c5e 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -37,14 +37,12 @@ class StJohnsDayTest extends EstoniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(6, 24, self::TIMEZONE); + return static::generateRandomDates(6, 24, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jaanipäev'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 7c0d3adde..241630d9a 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBefore(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Estonia::VICTORY_DAY_START_YEAR - 1) + static::generateRandomYear(1000, Estonia::VICTORY_DAY_START_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBefore(): void */ public function testHolidayAfter(): void { - $year = $this->generateRandomYear(Estonia::VICTORY_DAY_START_YEAR); + $year = static::generateRandomYear(Estonia::VICTORY_DAY_START_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), + static::generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), [self::LOCALE => 'Võidupüha'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), + static::generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), ['en' => 'Victory Day'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), + static::generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 6fae6c312..5d5135a5a 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,12 +49,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE)); // Check between 31 October and 6th of November the day that is a Saturday @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pyhäinpäivä'] ); } @@ -93,6 +92,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index 0cebce7d8..800d6cc17 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Helatorstai'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 9797e09b1..9e96dc1c7 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends FinlandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Joulupäivä'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index 5ae7f4905..b7e83c8bd 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. pääsiäispäivä'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 73600922f..c7341e2ad 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pääsiäispäivä'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index 9e5470015..8a66a09b8 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends FinlandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Loppiainen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 161808261..36b695bf4 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -37,7 +37,7 @@ class FinlandTest extends FinlandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1917); + $this->year = static::generateRandomYear(1917); } /** diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index 66f938aa9..0aec9d6ad 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pitkäperjantai'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index 9b04ee79b..9a1b30a2e 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Itsenäisyyspäivä'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 79178cc5d..4e0bfa863 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements Holiday /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vappu'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index 94726db87..93a5572f3 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends FinlandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Uudenvuodenpäivä'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index f40ba4979..4bd5cefe7 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Helluntaipäivä'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 97e969e80..7ba8010f3 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. joulupäivä'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 486246d89..193c94e67 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -62,7 +62,7 @@ public function testHolidayBeforeAdjustment(): void */ public function testHolidayAfterAdjustment(): void { - $year = $this->generateRandomYear(self::ADJUSTMENT_YEAR); + $year = static::generateRandomYear(self::ADJUSTMENT_YEAR); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -88,7 +88,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Juhannuspäivä'] ); } @@ -100,6 +100,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index a271b6803..bcb4be3d6 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Toussaint'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index 45e46bad6..211061788 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -42,7 +42,7 @@ class ArmisticeDayTest extends FranceBaseTestCase implements HolidayTestCase */ public function testArmisticeDayOnAfter1919(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testArmisticeDayBefore1919(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Armistice 1918'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index 4636deff4..1c99752fd 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index c8a868643..4247ada37 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assomption'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index 698ae2c3a..516480430 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -38,7 +38,7 @@ class BasRhinTest extends BasRhinBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index caccaa923..7ad5c66fa 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index a98e7baf0..34fba8b6a 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -33,11 +33,10 @@ class stStephensDayTest extends BasRhinBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Saint-Étienne'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index eaa67cd89..f3dc677be 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -42,7 +42,7 @@ class BastilleDayTest extends FranceBaseTestCase implements HolidayTestCase */ public function testBastilleDayOnAfter1790(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testBastilleDayBefore1790(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'La Fête nationale'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index 206667cc4..d94613fd9 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 1f1c5140d..369c26dc9 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -63,7 +63,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -75,6 +75,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index a58736008..e21ab436f 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -38,7 +38,7 @@ class FranceTest extends FranceBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index 214c24d7d..bb7c2fd23 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index de19c9b87..53a273aa6 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -38,7 +38,7 @@ class HautRhinTest extends HautRhinBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index 2c8b27c0a..2b86cecef 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -33,11 +33,10 @@ class stStephensDayTest extends HautRhinBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Saint-Étienne'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 6b34a34c0..e91de006f 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements HolidayT /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête du Travail'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index ca4717f3f..119d3ba23 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index c04258f0d..f2e746602 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -38,7 +38,7 @@ class MoselleTest extends MoselleBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index fc60a0a33..102819f9d 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -33,11 +33,10 @@ class stStephensDayTest extends MoselleBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Saint-Étienne'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index 331ab1298..6d40df078 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends FranceBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jour de l’An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index 999f7781a..dbdcec793 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -72,14 +72,14 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(null, France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY - 1), + static::generateRandomYear(null, France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY - 1), Holiday::TYPE_OFFICIAL ); $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY), + static::generateRandomYear(France::EST_YEAR_DAY_OF_SOLIDARITY_WITH_ELDERLY), Holiday::TYPE_OBSERVANCE ); } diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 87ac70b0b..d1e11e4a0 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -42,7 +42,7 @@ class VictoryInEuropeDayTest extends FranceBaseTestCase implements HolidayTestCa */ public function testVictoryInEuropeDayOnAfter1945(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testVictoryInEuropeDayBefore1945(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Victoire 1945'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Georgia/EasterTest.php b/tests/Georgia/EasterTest.php index 29fa4b14b..289fa027e 100644 --- a/tests/Georgia/EasterTest.php +++ b/tests/Georgia/EasterTest.php @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'აღდგომა'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/GeorgiaTest.php b/tests/Georgia/GeorgiaTest.php index b3d669b4c..aa5fb2fb7 100644 --- a/tests/Georgia/GeorgiaTest.php +++ b/tests/Georgia/GeorgiaTest.php @@ -40,7 +40,7 @@ class GeorgiaTest extends GeorgiaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** diff --git a/tests/Georgia/InternationalWomensDayTest.php b/tests/Georgia/InternationalWomensDayTest.php index 2e3108b79..dcf8880b9 100644 --- a/tests/Georgia/InternationalWomensDayTest.php +++ b/tests/Georgia/InternationalWomensDayTest.php @@ -27,9 +27,7 @@ class InternationalWomensDayTest extends GeorgiaBaseTestCase implements HolidayT */ public const HOLIDAY = 'internationalWomensDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(3, 8, self::TIMEZONE); + return static::generateRandomDates(3, 8, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'ქალთა საერთაშორისო დღე'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/MtskhetobaDayTest.php b/tests/Georgia/MtskhetobaDayTest.php index 14f011342..fc1bcf4ae 100644 --- a/tests/Georgia/MtskhetobaDayTest.php +++ b/tests/Georgia/MtskhetobaDayTest.php @@ -27,9 +27,7 @@ class MtskhetobaDayTest extends GeorgiaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'mtskhetobaDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(10, 14, self::TIMEZONE); + return static::generateRandomDates(10, 14, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'მცხეთობა'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/NewYearsDayTest.php b/tests/Georgia/NewYearsDayTest.php index 4bbf554a6..ea246567b 100644 --- a/tests/Georgia/NewYearsDayTest.php +++ b/tests/Georgia/NewYearsDayTest.php @@ -27,9 +27,7 @@ class NewYearsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'newYearsDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'ახალი წელი'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/OrthodoxChristmasDayTest.php b/tests/Georgia/OrthodoxChristmasDayTest.php index 768a9d950..d35b5a5bc 100644 --- a/tests/Georgia/OrthodoxChristmasDayTest.php +++ b/tests/Georgia/OrthodoxChristmasDayTest.php @@ -27,9 +27,7 @@ class OrthodoxChristmasDayTest extends GeorgiaBaseTestCase implements HolidayTes */ public const HOLIDAY = 'orthodoxChristmasDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 7, self::TIMEZONE); + return static::generateRandomDates(1, 7, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'ქრისტეს შობა'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/OrthodoxEpiphanyDayTest.php b/tests/Georgia/OrthodoxEpiphanyDayTest.php index 10a583568..3d605c8e3 100644 --- a/tests/Georgia/OrthodoxEpiphanyDayTest.php +++ b/tests/Georgia/OrthodoxEpiphanyDayTest.php @@ -27,9 +27,7 @@ class OrthodoxEpiphanyDayTest extends GeorgiaBaseTestCase implements HolidayTest */ public const HOLIDAY = 'orthodoxEpiphanyDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 19, self::TIMEZONE); + return static::generateRandomDates(1, 19, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'ნათლისღება'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/SecondNewYearDayTest.php b/tests/Georgia/SecondNewYearDayTest.php index 9106ef720..c0b30ecd7 100644 --- a/tests/Georgia/SecondNewYearDayTest.php +++ b/tests/Georgia/SecondNewYearDayTest.php @@ -27,9 +27,7 @@ class SecondNewYearDayTest extends GeorgiaBaseTestCase implements HolidayTestCas */ public const HOLIDAY = 'secondDayOfNewYear'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 2, self::TIMEZONE); + return static::generateRandomDates(1, 2, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'ბედობა'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/StAndrewsDayTest.php b/tests/Georgia/StAndrewsDayTest.php index beb78f41b..40bd100de 100644 --- a/tests/Georgia/StAndrewsDayTest.php +++ b/tests/Georgia/StAndrewsDayTest.php @@ -27,9 +27,7 @@ class StAndrewsDayTest extends GeorgiaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'stAndrewsDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 12, self::TIMEZONE); + return static::generateRandomDates(5, 12, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'წმინდა ანდრია პირველწოდებულის ხსენების დღე'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/StGeorgesDayTest.php b/tests/Georgia/StGeorgesDayTest.php index f2707e4b8..fa5b45211 100644 --- a/tests/Georgia/StGeorgesDayTest.php +++ b/tests/Georgia/StGeorgesDayTest.php @@ -27,9 +27,7 @@ class StGeorgesDayTest extends GeorgiaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'stGeorgesDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 23, self::TIMEZONE); + return static::generateRandomDates(11, 23, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'გიორგობა'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/StMarysDayTest.php b/tests/Georgia/StMarysDayTest.php index 84bf4bfb9..dbb5c0f1e 100644 --- a/tests/Georgia/StMarysDayTest.php +++ b/tests/Georgia/StMarysDayTest.php @@ -27,9 +27,7 @@ class StMarysDayTest extends GeorgiaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'stMarysDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 28, self::TIMEZONE); + return static::generateRandomDates(8, 28, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'მარიამობა'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Georgia/VictoryDayTest.php b/tests/Georgia/VictoryDayTest.php index 926b99515..1afb03494 100644 --- a/tests/Georgia/VictoryDayTest.php +++ b/tests/Georgia/VictoryDayTest.php @@ -27,9 +27,7 @@ class VictoryDayTest extends GeorgiaBaseTestCase implements HolidayTestCase */ public const HOLIDAY = 'victoryDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -42,9 +40,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 9, self::TIMEZONE); + return static::generateRandomDates(5, 9, self::TIMEZONE); } /** @@ -57,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'ფაშიზმზე გამარჯვების დღე'] ); } @@ -69,6 +67,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index c69263a5a..eadeb8f9c 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christi Himmelfahrt'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 47807afa1..8770385bf 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index fa0995d2c..b2064c88a 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -37,7 +37,7 @@ class BadenWurttembergTest extends BadenWurttembergBaseTestCase implements Provi */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -91,7 +91,10 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - [], + [ + 'pentecost', + 'newYearsEve', + ], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index e09a78eaa..75865e708 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -37,13 +37,13 @@ class CorpusChristiTest extends BadenWurttembergBaseTestCase implements HolidayT */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -69,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 86bc2df68..ed3e3cf87 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Heilige 3 Könige'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index f69d8d97a..01fe4c67f 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -33,11 +33,11 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +50,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +65,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +77,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Bavaria/AssumptionOfMaryTest.php b/tests/Germany/Bavaria/AssumptionOfMaryTest.php index 60f0a3182..f53eceacf 100644 --- a/tests/Germany/Bavaria/AssumptionOfMaryTest.php +++ b/tests/Germany/Bavaria/AssumptionOfMaryTest.php @@ -33,11 +33,11 @@ class AssumptionOfMaryTest extends BavariaBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +50,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +65,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -77,6 +77,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index 43043258c..3d6656fea 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -37,7 +37,7 @@ class BavariaTest extends BavariaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -91,7 +91,11 @@ public function testBankHolidays(): void public function testOtherHolidays(): void { $this->assertDefinedHolidays( - [], + [ + 'pentecost', + 'assumptionOfMary', + 'newYearsEve', + ], self::REGION, $this->year, Holiday::TYPE_OTHER diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index 5b9b8f19d..8d00cdf35 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -37,13 +37,13 @@ class CorpusChristiTest extends BavariaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -69,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index c1848030a..ce05cc339 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -33,11 +33,11 @@ class EpiphanyTest extends BavariaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +50,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +65,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Heilige 3 Könige'] ); } @@ -77,6 +77,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index 0e09b2020..9b34fe3d5 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -37,7 +37,7 @@ class BerlinTest extends BerlinBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -87,7 +87,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/Berlin/DayOfLiberationTest.php b/tests/Germany/Berlin/DayOfLiberationTest.php index 05d51d426..4ded74e89 100644 --- a/tests/Germany/Berlin/DayOfLiberationTest.php +++ b/tests/Germany/Berlin/DayOfLiberationTest.php @@ -64,7 +64,7 @@ public function testHolidayBeforeYear(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, current(self::$years) - 1) + static::generateRandomYear(1000, current(self::$years) - 1) ); } @@ -80,7 +80,7 @@ public function testHolidayAfterYear(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(current(self::$years) + 1) + static::generateRandomYear(current(self::$years) + 1) ); } diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index a2c6a0c15..e9e0ff3c0 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -60,7 +60,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -71,7 +71,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayAfterCompletion(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900, self::ESTABLISHMENT_YEAR - 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(1900, self::ESTABLISHMENT_YEAR - 1)); } /** @@ -84,7 +84,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Internationaler Frauentag'] ); } @@ -99,7 +99,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index 7e36501e4..2603e60f7 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -37,7 +37,7 @@ class BrandenburgTest extends BrandenburgBaseTestCase implements ProviderTestCas */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** @@ -98,7 +98,14 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index 97907fb8d..e638bf42b 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index 816094fbe..d1118a0bb 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -37,7 +37,7 @@ class BremenTest extends BremenBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -87,7 +87,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index a6bde4ea3..9a67e2bd2 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends BremenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index b183f0ca5..4459c29a1 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends GermanyBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '1. Weihnachtsfeiertag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 23d9078f9..7bc9b1a2c 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index 5a77a7a72..940e02e4a 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2080), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2080), [self::LOCALE => 'Tag der Deutschen Einheit'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index a18ae286f..429d8c53d 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -37,7 +37,7 @@ class GermanyTest extends GermanyBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index a07aa1b5e..bd3e95dcc 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index dd1c420a4..c5a194919 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -38,11 +38,10 @@ class DayOfReformationTest extends HamburgBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Tag der Reformation'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/Hamburg/GermanUnityDay.php b/tests/Germany/Hamburg/GermanUnityDay.php index aa3028dcc..e5b37175a 100644 --- a/tests/Germany/Hamburg/GermanUnityDay.php +++ b/tests/Germany/Hamburg/GermanUnityDay.php @@ -24,4 +24,8 @@ */ class GermanUnityDay extends BaseGermanUnityDayTest { + public function __construct() + { + parent::__construct(static::class); + } } diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index 9a2cad636..cead26a00 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -37,7 +37,7 @@ class HamburgTest extends HamburgBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -87,7 +87,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index 183dce36d..cadf5ba0e 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -37,13 +37,13 @@ class CorpusChristiTest extends HesseBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -69,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index fda894703..cfdcdf37e 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -37,7 +37,7 @@ class HesseTest extends HesseBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -88,7 +88,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index 705cf9565..2df5b3ef8 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements Holiday /** * Tests International Workers' Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tag der Arbeit'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index 53c77f095..3cd7eff6e 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -37,7 +37,7 @@ class LowerSaxonyTest extends LowerSaxonyBaseTestCase implements ProviderTestCas */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -87,7 +87,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 1846bf6e2..28b998ca7 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php b/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php index a155d167f..dc3f03049 100644 --- a/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/InternationalWomensDayTest.php @@ -60,7 +60,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -71,7 +71,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayAfterCompletion(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900, self::ESTABLISHMENT_YEAR - 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(1900, self::ESTABLISHMENT_YEAR - 1)); } /** @@ -84,7 +84,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Internationaler Frauentag'] ); } @@ -99,7 +99,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 2ee6c9490..3a02a63a6 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -37,7 +37,7 @@ class MecklenburgWesternPomeraniaTest extends MecklenburgWesternPomeraniaBaseTes */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** @@ -96,7 +96,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index fc5278541..9d67a4df7 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -42,12 +42,12 @@ class ReformationDayTest extends MecklenburgWesternPomeraniaBaseTestCase impleme * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -64,7 +64,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -78,7 +78,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -93,7 +93,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index e86b087c7..951d5545c 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends GermanyBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/NewYearsEveTest.php b/tests/Germany/NewYearsEveTest.php index ca522097a..6fe785e4d 100644 --- a/tests/Germany/NewYearsEveTest.php +++ b/tests/Germany/NewYearsEveTest.php @@ -33,11 +33,10 @@ class NewYearsEveTest extends GermanyBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 31, self::TIMEZONE); + return static::generateRandomDates(12, 31, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Silvester'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index caa5d1de3..758d13edb 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Holid /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index c21cc21d5..fba2615e3 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -37,13 +37,13 @@ class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements Holi */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -69,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index 74bf7ffae..350b4bf60 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -37,7 +37,7 @@ class NorthRhineWestphaliaTest extends NorthRhineWestphaliaBaseTestCase implemen */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -89,7 +89,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 04becece3..7bf7cee1c 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 603eda0eb..c8d8d2a23 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -37,7 +37,7 @@ class PentecostTest extends GermanyBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $time_stamp = strtotime( $year . '-03-21' . easter_days($year) . ' day + 49 day' ); @@ -61,7 +61,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstsonntag'] ); } @@ -73,6 +73,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index feb96111f..96a9f63a8 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -60,7 +60,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -71,7 +71,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayAfterCompletion(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); } /** @@ -84,7 +84,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -99,7 +99,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index 36522b85e..8c409266b 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Holida /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index dbadd0f25..accecaaaa 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -37,13 +37,13 @@ class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements Holid */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -69,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index a92eb185d..1c8d55cb4 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -37,7 +37,7 @@ class RhinelandPalatinateTest extends RhinelandPalatinateBaseTestCase implements */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -89,7 +89,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index f5b00b745..95a28dda2 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 77e7c1d32..e00ca9ea0 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index be36711f3..756faeae4 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -37,13 +37,13 @@ class CorpusChristiTest extends SaarlandBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -69,6 +69,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 6523417dd..74fc6faa2 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -37,7 +37,7 @@ class SaarlandTest extends SaarlandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index c63635d63..d0fd24e30 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends SaxonyBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index 216158ba0..96ba5fa46 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -48,7 +48,7 @@ class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements HolidayTe public function testHolidayOnAfterEstablishment(): void { // Check between the 16th and 22nd day the one that is a Wednesday - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::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); @@ -69,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -83,7 +83,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Buß- und Bettag'] ); } @@ -98,7 +98,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index 9b71838d0..5fcb2abe9 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -37,7 +37,7 @@ class SaxonyTest extends SaxonyBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -100,7 +100,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index a281c4624..c115ce684 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Heilige 3 Könige'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index 2fed59b37..adf9c59db 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index a3ef75161..dabd70b5f 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -37,7 +37,7 @@ class SaxonyAnhaltTest extends SaxonyAnhaltBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** @@ -97,7 +97,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 9103bc6b2..97f75cb8b 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Holida /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index b43be8192..e3b62bddf 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -37,7 +37,7 @@ class SchleswigHolsteinTest extends SchleswigHolsteinBaseTestCase implements Pro */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1990); + $this->year = static::generateRandomYear(1990); } /** @@ -87,7 +87,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index f3b60d594..0051d4063 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '2. Weihnachtsfeiertag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index b1acece20..0a4a3afd5 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -38,11 +38,10 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Reformationstag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index fd8058220..220334520 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -37,7 +37,7 @@ class ThuringiaTest extends ThuringiaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** @@ -100,7 +100,15 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'pentecost', + 'newYearsEve', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Germany/Thuringia/WorldChildrensDayTest.php b/tests/Germany/Thuringia/WorldChildrensDayTest.php index 6c1183bd2..db9cb6c72 100644 --- a/tests/Germany/Thuringia/WorldChildrensDayTest.php +++ b/tests/Germany/Thuringia/WorldChildrensDayTest.php @@ -38,11 +38,10 @@ class WorldChildrensDayTest extends ThuringiaBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -55,12 +54,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new \DateTime("{$year}-09-20", new \DateTimeZone(self::TIMEZONE))]; } @@ -77,7 +76,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Weltkindertag'] ); } @@ -106,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 85827d8ff..0e12984bd 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -33,11 +33,10 @@ class AnnunciationTest extends GreeceBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(3, 25, self::TIMEZONE); + return static::generateRandomDates(3, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ευαγγελισμός της Θεοτόκου'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index 6b2ada329..6bd34a5f1 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ανάληψη του Χριστού'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index 6d99598f0..c684239dc 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Κοίμηση της Θεοτόκου'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 7896675c7..63d6841f5 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends GreeceBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Χριστούγεννα'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index ca61f8a52..46af7e46c 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Καθαρά Δευτέρα'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index e076f8e36..69c0a725f 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Δευτέρα του Πάσχα'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 8f201fb7e..a6f0aca89 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Κυριακή του Πάσχα'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index 3fb172223..5f5ce3d7c 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends GreeceBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Θεοφάνεια'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index bb5bf8271..ac9d4ae8e 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -37,7 +37,7 @@ class GreeceTest extends GreeceBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1985); + $this->year = static::generateRandomYear(1985); } /** diff --git a/tests/Greece/IndependenceDayTest.php b/tests/Greece/IndependenceDayTest.php index bc78e7a06..f197bf4c6 100644 --- a/tests/Greece/IndependenceDayTest.php +++ b/tests/Greece/IndependenceDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Εικοστή Πέμπτη Μαρτίου'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index 4e48c00ec..5cd4bf03a 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Εργατική Πρωτομαγιά'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index 8c783055d..764c25162 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends GreeceBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Πρωτοχρονιά'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index 5bef29717..e23289303 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Επέτειος του Όχι'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index 92cf30868..b75a1010f 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Αγίου Πνεύματος'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index 9e90aed4d..cd4bee069 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Πεντηκοστή'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index 42be1901f..01d738f3a 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Πολυτεχνείο'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OTHER ); } diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 4975cbaa8..dcff8ab94 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -33,11 +33,10 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 30, self::TIMEZONE); + return static::generateRandomDates(1, 30, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Τριών Ιεραρχών'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index 92fef334d..6b022496a 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Μεγάλη Παρασκευή'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 02a9446f3..e83e71743 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mindenszentek'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index 27f675437..4b01eb70c 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends HungaryBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karácsony'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index ef3b05b9c..7866fe7ab 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Húsvéthétfő'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index 069626fac..e2b43a88a 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Húsvét'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index 126087c6c..6fcf2dfed 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -37,7 +37,7 @@ class HungaryTest extends HungaryBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1955); + $this->year = static::generateRandomYear(1955); } /** diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index eeb060741..aaafd9c43 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements Holiday /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'A munka ünnepe'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 8a4709f35..d515dad83 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -42,7 +42,7 @@ class MemorialDay1848Test extends HungaryBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Az 1848-as forradalom ünnepe'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index b5df349f8..9b1002147 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -42,7 +42,7 @@ class MemorialDay1956Test extends HungaryBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Az 1956-os forradalom ünnepe'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 3aa2cbdca..c4ec87626 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends HungaryBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Újév'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index ee517fe1b..3c2b6d81c 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pünkösdhétfő'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index 0d0b54f01..e0020a560 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pünkösd'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index d192440cb..287fdb79a 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karácsony másnapja'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index bcb4fa77f..dbe1a336d 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -42,7 +42,7 @@ class StateFoundationDayTest extends HungaryBaseTestCase implements HolidayTestC */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Az államalapítás ünnepe'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Iran/AnniversaryOfIslamicRevolutionTest.php b/tests/Iran/AnniversaryOfIslamicRevolutionTest.php index 5bb08bd43..eb216b55e 100644 --- a/tests/Iran/AnniversaryOfIslamicRevolutionTest.php +++ b/tests/Iran/AnniversaryOfIslamicRevolutionTest.php @@ -32,7 +32,7 @@ public function testAnniversaryOfIslamicRevolutionBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -41,7 +41,7 @@ public function testAnniversaryOfIslamicRevolutionBeforeEstablishment(): void */ public function testAnniversaryOfIslamicRevolutionAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [ self::LOCALE => 'انقلاب اسلامی پنجاه و هفت', 'en' => 'Enqelab e Eslami', @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/DeathOfKhomeiniTest.php b/tests/Iran/DeathOfKhomeiniTest.php index d39132bbc..5db1b22ee 100644 --- a/tests/Iran/DeathOfKhomeiniTest.php +++ b/tests/Iran/DeathOfKhomeiniTest.php @@ -32,7 +32,7 @@ public function testDeathOfKhomeiniBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -41,7 +41,7 @@ public function testDeathOfKhomeiniBeforeEstablishment(): void */ public function testDeathOfKhomeiniAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [ self::LOCALE => 'مرگ خمینی', 'en' => 'Marg e Khomeini', @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/IranTest.php b/tests/Iran/IranTest.php index d24e1490c..33e695c16 100644 --- a/tests/Iran/IranTest.php +++ b/tests/Iran/IranTest.php @@ -32,7 +32,7 @@ class IranTest extends IranBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } public function testOfficialHolidays(): void diff --git a/tests/Iran/IslamicRepublicDayTest.php b/tests/Iran/IslamicRepublicDayTest.php index 54bbed06e..d77d353a2 100644 --- a/tests/Iran/IslamicRepublicDayTest.php +++ b/tests/Iran/IslamicRepublicDayTest.php @@ -37,7 +37,7 @@ public function testIslamicRepublicDayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -46,7 +46,7 @@ public function testIslamicRepublicDayBeforeEstablishment(): void */ public function testIslamicRepublicDayBeforeEquinoxYear(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR - 1); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -60,7 +60,7 @@ public function testIslamicRepublicDayBeforeEquinoxYear(): void */ public function testIslamicRepublicDayOnEquinoxYear(): void { - $year = $this->generateRandomYear(self::EQUINOX_YEAR, self::EQUINOX_YEAR); + $year = static::generateRandomYear(self::EQUINOX_YEAR, self::EQUINOX_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -74,7 +74,7 @@ public function testIslamicRepublicDayOnEquinoxYear(): void */ public function testIslamicRepublicDayAfterEquinoxYear(): void { - $year = $this->generateRandomYear(self::EQUINOX_YEAR + 1); + $year = static::generateRandomYear(self::EQUINOX_YEAR + 1); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -91,7 +91,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), [ self::LOCALE => 'روز جمهوری اسلامی', 'en' => 'Ruz e Jomhuri ye Eslami', @@ -104,6 +104,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php b/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php index a0cf534aa..a343eb32b 100644 --- a/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php +++ b/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php @@ -32,7 +32,7 @@ public function testNationalizationOfTheIranianOilIndustryBeforeEstablishment(): $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -41,7 +41,7 @@ public function testNationalizationOfTheIranianOilIndustryBeforeEstablishment(): */ public function testNationalizationOfTheIranianOilIndustryAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [ self::LOCALE => 'ملی شدن صنعت نفت', 'en' => 'Melli Shodan e Saneat e Naft', @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/Nowruz1Test.php b/tests/Iran/Nowruz1Test.php index 887d1c3c3..fcb6d50b2 100644 --- a/tests/Iran/Nowruz1Test.php +++ b/tests/Iran/Nowruz1Test.php @@ -29,7 +29,7 @@ class Nowruz1Test extends IranBaseTestCase implements HolidayTestCase */ public function testNowruz1(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -46,7 +46,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [ self::LOCALE => 'نوروز', 'en' => 'Nowruz', @@ -59,6 +59,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/Nowruz2Test.php b/tests/Iran/Nowruz2Test.php index 28207a2f6..f3528b55f 100644 --- a/tests/Iran/Nowruz2Test.php +++ b/tests/Iran/Nowruz2Test.php @@ -29,7 +29,7 @@ class Nowruz2Test extends IranBaseTestCase implements HolidayTestCase */ public function testNowruz2(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -46,7 +46,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [ self::LOCALE => 'نوروز', 'en' => 'Nowruz', @@ -59,6 +59,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/Nowruz3Test.php b/tests/Iran/Nowruz3Test.php index 3efb4fca6..ef323da62 100644 --- a/tests/Iran/Nowruz3Test.php +++ b/tests/Iran/Nowruz3Test.php @@ -29,7 +29,7 @@ class Nowruz3Test extends IranBaseTestCase implements HolidayTestCase */ public function testNowruz3(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -46,7 +46,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [ self::LOCALE => 'نوروز', 'en' => 'Nowruz', @@ -59,6 +59,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/Nowruz4Test.php b/tests/Iran/Nowruz4Test.php index 9fc6f9fe7..2b04571b1 100644 --- a/tests/Iran/Nowruz4Test.php +++ b/tests/Iran/Nowruz4Test.php @@ -29,7 +29,7 @@ class Nowruz4Test extends IranBaseTestCase implements HolidayTestCase */ public function testNowruz4(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -46,7 +46,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [ self::LOCALE => 'نوروز', 'en' => 'Nowruz', @@ -59,6 +59,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/RevoltOfKhordad15Test.php b/tests/Iran/RevoltOfKhordad15Test.php index 94219b7ad..eaa43589d 100644 --- a/tests/Iran/RevoltOfKhordad15Test.php +++ b/tests/Iran/RevoltOfKhordad15Test.php @@ -32,7 +32,7 @@ public function testRevoltOfKhordad15BeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -41,7 +41,7 @@ public function testRevoltOfKhordad15BeforeEstablishment(): void */ public function testRevoltOfKhordad15AfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [ self::LOCALE => 'قیام ۱۵ خرداد', 'en' => 'Qiam e Panzdah e Khordad', @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Iran/SizdahBedarTest.php b/tests/Iran/SizdahBedarTest.php index 2f09002c7..12e94757f 100644 --- a/tests/Iran/SizdahBedarTest.php +++ b/tests/Iran/SizdahBedarTest.php @@ -29,7 +29,7 @@ class SizdahBedarTest extends IranBaseTestCase implements HolidayTestCase */ public function testSizdahBedar(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -46,7 +46,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [ self::LOCALE => 'سیزده بدر', 'en' => 'Sizdah be dar', @@ -59,6 +59,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index 2acfdfda5..12e2a8eeb 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -33,13 +33,12 @@ class AugustHolidayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -58,12 +57,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("next monday {$year}-7-31", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,13 +81,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'August Holiday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Lá Saoire i mí Lúnasa'] ); } @@ -100,6 +99,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index b95fe1e8c..2e89e91dd 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -58,12 +57,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,13 +80,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Lá Nollag'] ); } @@ -99,6 +98,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index d51029d07..49bd6a513 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -33,13 +33,12 @@ class EasterMondayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,13 +81,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Monday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Luan Cásca'] ); } @@ -100,6 +99,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index e1c77e2fd..c91fa0564 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -33,13 +33,12 @@ class EasterTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,13 +80,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Sunday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Domhnach Cásca'] ); } @@ -99,6 +98,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index 6114353a0..3f76f2967 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -33,13 +33,12 @@ class GoodFridayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,13 +80,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Aoine an Chéasta'] ); } @@ -99,6 +98,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index 15f3ffc54..ad8c239c1 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -37,7 +37,7 @@ class IrelandTest extends IrelandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1974); + $this->year = static::generateRandomYear(1974); } /** diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 64d1f8354..27e4d8c89 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -38,13 +38,12 @@ class JuneHolidayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("next monday {$year}-5-31", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -87,7 +86,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -101,13 +100,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'June Holiday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), ['ga_IE' => 'Lá Saoire i mí an Mheithimh'] ); } @@ -122,7 +121,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 430498d01..5de06305d 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -38,13 +38,12 @@ class MayDayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("next monday {$year}-4-30", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -87,7 +86,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -101,13 +100,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'May Day'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), ['ga_IE' => 'Lá Bealtaine'] ); } @@ -122,7 +121,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 36d1e3224..f3ad12501 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -38,13 +38,12 @@ class NewYearsDayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -86,7 +85,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -100,13 +99,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), ['ga_IE' => 'Lá Caille'] ); } @@ -121,7 +120,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index 4ec8b737d..dd038f684 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -38,13 +38,12 @@ class OctoberHolidayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("previous monday {$year}-11-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -87,7 +86,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -101,13 +100,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'October Holiday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), ['ga_IE' => 'Lá Saoire i mí Dheireadh Fómhair'] ); } @@ -122,7 +121,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index 710ca8db2..76900bc82 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -33,13 +33,12 @@ class PentecostTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,14 +56,14 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; // for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { for ($y = 0; $y < 2; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P49D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -82,13 +81,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Whitsunday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Domhnach Cincíse'] ); } @@ -100,6 +99,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Ireland/StBrigidsDayTest.php b/tests/Ireland/StBrigidsDayTest.php index 2d66f393b..a8c6218f8 100644 --- a/tests/Ireland/StBrigidsDayTest.php +++ b/tests/Ireland/StBrigidsDayTest.php @@ -38,13 +38,12 @@ class StBrigidsDayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $dateTime = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-02-01", new \DateTimeZone(self::TIMEZONE)); if ('Friday' !== $date->format('l')) { $date = new \DateTime("{$year}-02-01 first monday", new \DateTimeZone(self::TIMEZONE)); @@ -90,7 +89,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -104,13 +103,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Saint Brigid’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), ['ga' => 'Lá Fhéile Bríde'] ); } @@ -125,7 +124,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 03a2aa216..0d2034c01 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -38,13 +38,12 @@ class StPatricksDayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-3-17", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -86,7 +85,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -100,13 +99,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'St. Patrick’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), ['ga_IE' => 'Lá Fhéile Pádraig'] ); } @@ -121,7 +120,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index c55ffb064..d233ecd6b 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -33,13 +33,12 @@ class StStephensDayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -58,12 +57,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,13 +80,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'St. Stephen’s Day'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['ga_IE' => 'Lá Fhéile Stiofáin'] ); } @@ -99,6 +98,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index 132f38996..8ce15cdf9 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -38,13 +38,12 @@ class pentecostMondayTest extends IrelandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -62,13 +61,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(1000, self::ABOLISHMENT_YEAR); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(1000, self::ABOLISHMENT_YEAR); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P50D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -83,7 +82,7 @@ public function HolidayDataProvider(): array */ public function testHolidayDayAfterAbolishment(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ABOLISHMENT_YEAR + 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ABOLISHMENT_YEAR + 1)); } /** @@ -96,13 +95,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ABOLISHMENT_YEAR), + static::generateRandomYear(1000, self::ABOLISHMENT_YEAR), [self::LOCALE => 'Whitmonday'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ABOLISHMENT_YEAR), + static::generateRandomYear(1000, self::ABOLISHMENT_YEAR), ['ga_IE' => 'Luan Cincíse'] ); } @@ -117,7 +116,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ABOLISHMENT_YEAR), + static::generateRandomYear(1000, self::ABOLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index c3b995f92..1ca2be2c8 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Festa di Tutti i Santi'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index 1b7e17f5c..cab6ca8a6 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): v * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assunzione di Maria Vergine'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 855b30774..e656612e7 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Natale'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 5bad36951..36598c0ec 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lunedì dell’Angelo'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 60f4e0749..a4329d156 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pasqua'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index e1be28fd5..9148a2280 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests Epiphany. * - * @dataProvider EpiphanyDataProvider - * * @param int $year the year for which Epiphany needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('EpiphanyDataProvider')] public function testEpiphany(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testEpiphany(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function EpiphanyDataProvider(): array + public static function EpiphanyDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Epifania'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index ed4e61551..f69e351d2 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements HolidayTestC /** * Tests the day of Immaculate Conception. * - * @dataProvider ImmaculateConceptionDataProvider - * * @param int $year the year for which the day of Immaculate Conception needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ImmaculateConceptionDataProvider')] public function testImmaculateConception(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testImmaculateConception(int $year, \DateTimeInterface $expected * * @throws \Exception */ - public function ImmaculateConceptionDataProvider(): array + public static function ImmaculateConceptionDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Immacolata Concezione'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index c3a1cdae7..3390673d6 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements HolidayTe /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Festa del Lavoro'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index b6098272b..a5c1a9356 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -37,7 +37,7 @@ class ItalyTest extends ItalyBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1949); + $this->year = static::generateRandomYear(1949); } /** diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 2b3dbad0d..566544b60 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -49,7 +49,7 @@ class LiberationDayTest extends ItalyBaseTestCase implements HolidayTestCase */ public function testLiberationDayOnAfter1949(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -68,7 +68,7 @@ public function testLiberationDayBefore1949(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -82,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Festa della Liberazione'] ); } @@ -97,7 +97,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index 91d83dd8c..1d89ae280 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Capodanno'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 8a3828053..7eb1cb8a5 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -49,7 +49,7 @@ class RepublicDayTest extends ItalyBaseTestCase implements HolidayTestCase */ public function testRepublicDayOnAfter1946(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -68,7 +68,7 @@ public function testRepublicDayBefore1946(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -82,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Festa della Repubblica'] ); } @@ -97,7 +97,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index f58b1107f..3b78f1bf8 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -33,11 +33,10 @@ class stStephensDayTest extends ItalyBaseTestCase implements HolidayTestCase /** * Tests the day of St. Stephen's Day. * - * @dataProvider stStephensDayDataProvider - * * @param int $year the year for which St. Stephen's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('stStephensDayDataProvider')] public function teststStephensDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function teststStephensDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function stStephensDayDataProvider(): array + public static function stStephensDayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Santo Stefano'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 18f759634..e9d8d857b 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -46,7 +46,7 @@ class AutumnalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCas */ public function testAutumnalEquinoxDayOnAfter2150(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(2151)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(2151)); } /** @@ -56,14 +56,13 @@ public function testAutumnalEquinoxDayOnAfter2150(): void * * After 2150 no calculations are available yet. * - * @dataProvider autumnalEquinoxHolidaysProvider - * * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('autumnalEquinoxHolidaysProvider')] public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, int $day): void { $this->assertHoliday( @@ -79,7 +78,7 @@ public function testAutumnalEquinoxDayBetween1948And2150(int $year, int $month, * * @return array list of test dates for the holiday defined in this test */ - public function autumnalEquinoxHolidaysProvider(): array + public static function autumnalEquinoxHolidaysProvider(): array { return [ [1951, 9, 24], @@ -102,7 +101,7 @@ public function testAutumnalEquinoxDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -116,7 +115,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), [self::LOCALE => '秋分の日'] ); } @@ -131,7 +130,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index 724a91338..f456f3400 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -77,7 +77,7 @@ public function testChildrensDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +91,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'こどもの日'] ); } @@ -106,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index b0fd62dcf..14529ce15 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -43,7 +43,7 @@ class ComingOfAgeDayTest extends JapanBaseTestCase implements HolidayTestCase */ public function testComingOfAgeDayOnAfter2000(): void { - $year = $this->generateRandomYear(2001); + $year = static::generateRandomYear(2001); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -80,7 +80,7 @@ public function testConstitutionMemorialDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '成人の日'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index 18c727048..0e6e36835 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -78,7 +78,7 @@ public function testConstitutionMemorialDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -92,7 +92,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '憲法記念日'] ); } @@ -107,7 +107,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 13dc1a3e4..327ab282e 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -56,7 +56,7 @@ public function testEmperorsBirthdayBefore2019(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -68,7 +68,7 @@ public function testEmperorsBirthdayAfter2020(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1) + static::generateRandomYear(self::ESTABLISHMENT_YEAR + 1) ); } diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index ebd202a0e..641e37f4e 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -77,7 +77,7 @@ public function testCultureDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +91,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '文化の日'] ); } @@ -106,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index 5321931ce..241fa557b 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -45,7 +45,7 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements HolidayTestCase */ public function testEmperorsBirthdayOnAfter1949(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1988); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1988); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testEmperorsBirthdayOnAfter1949(): void */ public function testEmperorsBirthdayOnAfter1989(): void { - $year = $this->generateRandomYear(1989, 2018); + $year = static::generateRandomYear(1989, 2018); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -80,7 +80,7 @@ public function testEmperorsBirthdayOnAfter1989(): void */ public function testEmperorsBirthdayOnAfter2020(): void { - $year = $this->generateRandomYear(2020); + $year = static::generateRandomYear(2020); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -116,7 +116,7 @@ public function testEmperorsBirthdayBefore1949(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -142,7 +142,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '天皇誕生日'] ); } @@ -157,7 +157,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index e2cd4c750..9effce40d 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -56,7 +56,7 @@ public function testEmperorsBirthdayBefore2019(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::IMPLEMENT_YEAR - 1) + static::generateRandomYear(1000, self::IMPLEMENT_YEAR - 1) ); } @@ -68,7 +68,7 @@ public function testEmperorsBirthdayAfter2020(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::IMPLEMENT_YEAR + 1) + static::generateRandomYear(self::IMPLEMENT_YEAR + 1) ); } diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index faf90cee3..4b969cbcf 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -112,7 +112,7 @@ public function testHolidayBefore1989(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -126,7 +126,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'みどりの日'] ); } @@ -141,7 +141,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index 07398bf79..412ab9905 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -37,7 +37,7 @@ class JapanTest extends JapanBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2020, 2150); + $this->year = static::generateRandomYear(2020, 2150); } /** diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 9768e3378..78f1c65e3 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -80,7 +80,7 @@ public function testLabourThanksgivingDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '勤労感謝の日'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 0f9284703..47e6abb61 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -71,7 +71,7 @@ public function testMarineDayIn2021(): void */ public function testMarineDayOnAfter2003(): void { - $year = $this->generateRandomYear(2004); + $year = self::generateRandomYear(2004); if (in_array($year, [2020, 2021])) { return; @@ -129,7 +129,7 @@ public function testMarineDayBefore1996(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + self::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -143,7 +143,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + self::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '海の日'] ); } @@ -158,7 +158,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + self::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index cc4f24596..496a166f7 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -109,7 +109,7 @@ public function testMountainDayBefore2016(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -123,7 +123,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '山の日'] ); } @@ -138,7 +138,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 6962ff957..45a84d30b 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -78,7 +78,7 @@ public function testNationalFoundationDayBefore1966(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -92,7 +92,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '建国記念の日'] ); } @@ -107,7 +107,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 193b70bc8..aa11b4a5f 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -77,7 +77,7 @@ public function testNewYearsDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +91,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '元日'] ); } @@ -106,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 53e00b98c..81f35fe27 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -43,7 +43,7 @@ class RespectForTheAgedDayTest extends JapanBaseTestCase implements HolidayTestC */ public function testRespectForTheAgedDayOnAfter2003(): void { - $year = $this->generateRandomYear(2004); + $year = static::generateRandomYear(2004); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -97,7 +97,7 @@ public function testRespectForTheAgedDayBefore1996(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -111,7 +111,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '敬老の日'] ); } @@ -126,7 +126,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index c478996df..8d1d906cb 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -77,7 +77,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +91,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '昭和の日'] ); } @@ -106,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index b4e116bd8..6ad586245 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -76,7 +76,7 @@ public function testSportsDayIn2020(): void */ public function testSportsDayAfter2000(): void { - $year = $this->generateRandomYear(2001); + $year = static::generateRandomYear(2001); // Some years the date has changed, so in this test we need to skip them. if (! in_array($year, [2020, 2021])) { @@ -134,7 +134,7 @@ public function testSportsDayBefore1996(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -149,7 +149,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2019), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2019), [self::LOCALE => '体育の日'] ); } @@ -166,7 +166,7 @@ public function testTranslationFrom2020(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear($year), + static::generateRandomYear($year), [self::LOCALE => 'スポーツの日'] ); } @@ -181,7 +181,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index ce20d8b6b..7af809e7a 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -46,7 +46,7 @@ class VernalEquinoxDayTest extends JapanBaseTestCase implements HolidayTestCase */ public function testVernalEquinoxDayOnAfter2150(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(2151)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(2151)); } /** @@ -56,14 +56,13 @@ public function testVernalEquinoxDayOnAfter2150(): void * * After 2150 no calculations are available yet. * - * @dataProvider vernalEquinoxHolidaysProvider - * * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('vernalEquinoxHolidaysProvider')] public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, int $day): void { $this->assertHoliday( @@ -79,7 +78,7 @@ public function testVernalEquinoxDayBetween1948And2150(int $year, int $month, in * * @return array list of test dates for the holiday defined in this test */ - public function vernalEquinoxHolidaysProvider(): array + public static function vernalEquinoxHolidaysProvider(): array { return [ [1948, 3, 22], @@ -102,7 +101,7 @@ public function testVernalEquinoxDayBefore1948(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -116,7 +115,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), [self::LOCALE => '春分の日'] ); } @@ -131,7 +130,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2150), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 6875a6cf1..5fd2651bd 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -37,14 +37,12 @@ class ChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ziemassvētki'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index 7171533de..6fb51af52 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -37,14 +37,12 @@ class ChristmasEveDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ziemassvētku vakars'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index 787cd31b5..84fc7bb2a 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -37,21 +37,20 @@ class EasterDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomEasterDates(self::TIMEZONE); + return static::generateRandomEasterDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lieldienas'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 05a03df28..ba1f8935f 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -37,21 +37,20 @@ class EasterMondayDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomEasterMondayDates(self::TIMEZONE); + return static::generateRandomEasterMondayDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Otrās Lieldienas'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index d9beded1f..3150eead6 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -37,21 +37,20 @@ class GoodFridayDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomGoodFridayDates(self::TIMEZONE); + return static::generateRandomGoodFridayDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lielā Piektdiena'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index 1398f8cd0..9e375dfb0 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -37,14 +37,12 @@ class InternationalWorkersDayTest extends LatviaBaseTestCase implements HolidayT * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Darba svētki'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index 5676cf4cb..aeb60437d 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -50,7 +50,7 @@ public function testOfficialHolidays(): void 'newYearsEve', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if ($year >= Latvia::RESTORATION_OF_INDEPENDENCE_YEAR) { $holidays[] = 'restorationOfIndependenceOfLatviaDay'; @@ -74,7 +74,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -84,7 +84,7 @@ public function testObservedHolidays(): void */ public function testSeasonalHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_SEASON); } /** @@ -94,7 +94,7 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_BANK); } /** @@ -104,7 +104,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index c019650b5..b0ceea670 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -37,14 +37,12 @@ class MidsummerEveDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(6, 23, self::TIMEZONE); + return static::generateRandomDates(6, 23, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Līgo Diena', 'en' => 'Midsummer Eve'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/MothersDayTest.php b/tests/Latvia/MothersDayTest.php index de24d3ded..c044099c5 100644 --- a/tests/Latvia/MothersDayTest.php +++ b/tests/Latvia/MothersDayTest.php @@ -37,7 +37,7 @@ class MothersDayTest extends LatviaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Mātes dienu'] ); } @@ -64,6 +64,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index 004cbc4b3..c58b9732c 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -37,14 +37,12 @@ class NewYearsDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jaunais Gads'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index f501eb928..759baf72d 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -37,14 +37,12 @@ class NewYearsEveDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 31, self::TIMEZONE); + return static::generateRandomDates(12, 31, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vecgada vakars', 'en' => 'New Year’s Eve'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/PentecostTest.php b/tests/Latvia/PentecostTest.php index ba0bf00bd..021f0671d 100644 --- a/tests/Latvia/PentecostTest.php +++ b/tests/Latvia/PentecostTest.php @@ -35,21 +35,20 @@ class PentecostTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomPentecostDates(self::TIMEZONE); + return static::generateRandomPentecostDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vasarsvētkus'] ); } @@ -78,6 +77,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 66b1bd07d..fbc59afc0 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -43,7 +43,7 @@ public function testNotHoliday(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR - 1) + static::generateRandomYear(1000, Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR - 1) ); } @@ -52,9 +52,9 @@ public function testNotHoliday(): void * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDatesWithHolidayMovedToMonday( + return static::generateRandomDatesWithHolidayMovedToMonday( 11, 18, self::TIMEZONE, @@ -66,13 +66,12 @@ public function holidayDataProvider(): array /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas proklamēšanas diena', 'en' => 'Proclamation Day of the Republic of Latvia', @@ -107,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index e4e212133..81f25e274 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -43,7 +43,7 @@ public function testNotHoliday(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Latvia::RESTORATION_OF_INDEPENDENCE_YEAR - 1) + static::generateRandomYear(1000, Latvia::RESTORATION_OF_INDEPENDENCE_YEAR - 1) ); } @@ -52,9 +52,9 @@ public function testNotHoliday(): void * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDatesWithHolidayMovedToMonday( + return static::generateRandomDatesWithHolidayMovedToMonday( 5, 4, self::TIMEZONE, @@ -66,13 +66,12 @@ public function holidayDataProvider(): array /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -91,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas Neatkarības atjaunošanas diena', 'en' => 'Restoration of Independence day', @@ -107,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index fdae8694d..5f7359e87 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -37,14 +37,12 @@ class SecondChristmasDayTest extends LatviaBaseTestCase implements HolidayTestCa * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Otrie Ziemassvētki'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index ef4b67988..a3e97299f 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -37,14 +37,12 @@ class StJohnsDayTest extends LatviaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(6, 24, self::TIMEZONE); + return static::generateRandomDates(6, 24, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jāņi'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index 5b294923a..6c8efe1d0 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -37,14 +37,12 @@ class AllSaintsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Visų šventųjų diena (Vėlinės)'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/AllSoulsDayTest.php b/tests/Lithuania/AllSoulsDayTest.php index c1a2973c6..a7a16aedf 100644 --- a/tests/Lithuania/AllSoulsDayTest.php +++ b/tests/Lithuania/AllSoulsDayTest.php @@ -41,7 +41,7 @@ public function testHolidayBeforeAnnounce(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Lithuania::ALL_SOULS_DAY - 1) + static::generateRandomYear(1000, Lithuania::ALL_SOULS_DAY - 1) ); } @@ -52,7 +52,7 @@ public function testHolidayBeforeAnnounce(): void */ public function testHolidayAfterAnnounce(): void { - $year = $this->generateRandomYear(Lithuania::ALL_SOULS_DAY); + $year = static::generateRandomYear(Lithuania::ALL_SOULS_DAY); $this->assertHoliday( self::REGION, @@ -70,7 +70,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::ALL_SOULS_DAY), + static::generateRandomYear(Lithuania::ALL_SOULS_DAY), [self::LOCALE => 'Vėlinės'] ); } @@ -83,7 +83,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::ALL_SOULS_DAY), + static::generateRandomYear(Lithuania::ALL_SOULS_DAY), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index 17e9ce9c1..cc3d04c9b 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -37,14 +37,12 @@ class AssumptionOfMaryDayTest extends LithuaniaBaseTestCase implements HolidayTe * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 47cf038c6..fa14453c5 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -37,14 +37,12 @@ class ChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Šv. Kalėdos'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 6e24f50e5..b26b809e6 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -37,14 +37,12 @@ class ChristmasEveDayTest extends LithuaniaBaseTestCase implements HolidayTestCa * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Šv. Kūčios'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index 9c9aee079..8a9d66fc9 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -37,21 +37,20 @@ class EasterDayTest extends LithuaniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomEasterDates(self::TIMEZONE); + return static::generateRandomEasterDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Velykos'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index 1c699c043..cc415e1de 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -37,21 +37,20 @@ class EasterMondayDayTest extends LithuaniaBaseTestCase implements HolidayTestCa * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomEasterMondayDates(self::TIMEZONE); + return static::generateRandomEasterMondayDates(self::TIMEZONE); } /** * Test defined holiday in the 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Antroji Velykų diena'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/FathersDayTest.php b/tests/Lithuania/FathersDayTest.php index 448d37572..9e6931c8b 100644 --- a/tests/Lithuania/FathersDayTest.php +++ b/tests/Lithuania/FathersDayTest.php @@ -40,7 +40,7 @@ class FathersDayTest extends LithuaniaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -57,13 +57,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tėvo dieną'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['en' => 'Father’s Day'] ); } @@ -76,7 +76,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index 99f6ae7b7..6d116f8da 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -37,14 +37,12 @@ class InternationalWorkersDayTest extends LithuaniaBaseTestCase implements Holid * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tarptautinė darbo diena'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index 8e453a620..ac6e24e2a 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if ($year >= Lithuania::RESTORATION_OF_THE_STATE_YEAR) { $holidays[] = 'restorationOfTheStateOfLithuaniaDay'; @@ -73,7 +73,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -83,7 +83,7 @@ public function testObservedHolidays(): void */ public function testSeasonalHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_SEASON); } /** @@ -93,7 +93,7 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_BANK); } /** @@ -103,7 +103,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** diff --git a/tests/Lithuania/MothersDayTest.php b/tests/Lithuania/MothersDayTest.php index a5aaa0e37..9562d58f4 100644 --- a/tests/Lithuania/MothersDayTest.php +++ b/tests/Lithuania/MothersDayTest.php @@ -40,7 +40,7 @@ class MothersDayTest extends LithuaniaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -57,13 +57,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Motinos dieną'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), ['en' => 'Mother’s Day'] ); } @@ -76,7 +76,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 71db2cad8..499f362ed 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -37,14 +37,12 @@ class NewYearsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Naujųjų metų diena'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 30256c960..3a35346a5 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBeforeRestoration(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR - 1) + static::generateRandomYear(1000, Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBeforeRestoration(): void */ public function testHolidayAfterRestoration(): void { - $year = $this->generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR); + $year = static::generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), [self::LOCALE => 'Lietuvos nepriklausomybės atkūrimo diena'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), ['en' => 'Day of Restoration of Independence of Lithuania'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), + static::generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 051c891a4..37aac7757 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBeforeRestoration(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Lithuania::RESTORATION_OF_THE_STATE_YEAR - 1) + static::generateRandomYear(1000, Lithuania::RESTORATION_OF_THE_STATE_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBeforeRestoration(): void */ public function testHolidayAfterRestoration(): void { - $year = $this->generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR); + $year = static::generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), + static::generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), [self::LOCALE => 'Lietuvos valstybės atkūrimo diena'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), + static::generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), ['en' => 'Day of Restoration of the State of Lithuania'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), + static::generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index bb7f33222..b9389ad98 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -37,14 +37,12 @@ class SecondChristmasDayTest extends LithuaniaBaseTestCase implements HolidayTes * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Kalėdos (antra diena)'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index d755d68fc..80c20df32 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -37,14 +37,12 @@ class StJohnsDayTest extends LithuaniaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(6, 24, self::TIMEZONE); + return static::generateRandomDates(6, 24, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Rasos ir Joninių diena'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index b974b1991..50870aa39 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBeforeRestoration(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Lithuania::STATEHOOD_YEAR - 1) + static::generateRandomYear(1000, Lithuania::STATEHOOD_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBeforeRestoration(): void */ public function testHolidayAfterRestoration(): void { - $year = $this->generateRandomYear(Lithuania::STATEHOOD_YEAR); + $year = static::generateRandomYear(Lithuania::STATEHOOD_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::STATEHOOD_YEAR), + static::generateRandomYear(Lithuania::STATEHOOD_YEAR), [self::LOCALE => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::STATEHOOD_YEAR), + static::generateRandomYear(Lithuania::STATEHOOD_YEAR), ['en' => 'Statehood Day (Lithuania)'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Lithuania::STATEHOOD_YEAR), + static::generateRandomYear(Lithuania::STATEHOOD_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Luxembourg/AllSaintsDayTest.php b/tests/Luxembourg/AllSaintsDayTest.php index 717ea4215..662b17b05 100644 --- a/tests/Luxembourg/AllSaintsDayTest.php +++ b/tests/Luxembourg/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Toussaint'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Luxembourg/AscensionDayTest.php b/tests/Luxembourg/AscensionDayTest.php index faf14f351..1426a32fc 100644 --- a/tests/Luxembourg/AscensionDayTest.php +++ b/tests/Luxembourg/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Luxembourg/AssumptionOfMaryTest.php b/tests/Luxembourg/AssumptionOfMaryTest.php index c989d165b..101ef4fc2 100644 --- a/tests/Luxembourg/AssumptionOfMaryTest.php +++ b/tests/Luxembourg/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends LuxembourgBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assomption'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Luxembourg/ChristmasDayTest.php b/tests/Luxembourg/ChristmasDayTest.php index 149c063c2..aec628d75 100644 --- a/tests/Luxembourg/ChristmasDayTest.php +++ b/tests/Luxembourg/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Luxembourg/EasterMondayTest.php b/tests/Luxembourg/EasterMondayTest.php index 4c3ad81ba..d8bba5cc1 100644 --- a/tests/Luxembourg/EasterMondayTest.php +++ b/tests/Luxembourg/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Luxembourg/EuropeDayTest.php b/tests/Luxembourg/EuropeDayTest.php index e1abd7244..a9ab55482 100644 --- a/tests/Luxembourg/EuropeDayTest.php +++ b/tests/Luxembourg/EuropeDayTest.php @@ -42,7 +42,7 @@ class EuropeDayTest extends LuxembourgBaseTestCase implements HolidayTestCase */ public function testEuropeDayOnAfter2019(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testEuropeDayBefore2019(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'La Journée de l’Europe'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Luxembourg/InternationalWorkersDayTest.php b/tests/Luxembourg/InternationalWorkersDayTest.php index fc20f8f4b..fe00f83c6 100644 --- a/tests/Luxembourg/InternationalWorkersDayTest.php +++ b/tests/Luxembourg/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends LuxembourgBaseTestCase implements Holi /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête du Travail'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Luxembourg/LuxembourgTest.php b/tests/Luxembourg/LuxembourgTest.php index bbbdc9c5d..ff582829a 100644 --- a/tests/Luxembourg/LuxembourgTest.php +++ b/tests/Luxembourg/LuxembourgTest.php @@ -51,7 +51,7 @@ public function testOfficialHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if ($year >= Luxembourg::EUROPE_DAY_START_YEAR) { $holidays[] = 'europeDay'; @@ -67,7 +67,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -77,7 +77,7 @@ public function testObservedHolidays(): void */ public function testSeasonalHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_SEASON); } /** @@ -87,7 +87,7 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_BANK); } /** @@ -97,7 +97,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** diff --git a/tests/Luxembourg/NationalDayTest.php b/tests/Luxembourg/NationalDayTest.php index a6aeac4b6..d911a3934 100644 --- a/tests/Luxembourg/NationalDayTest.php +++ b/tests/Luxembourg/NationalDayTest.php @@ -33,11 +33,10 @@ class NationalDayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(6, 23, self::TIMEZONE); + return static::generateRandomDates(6, 23, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'La Fête nationale'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Luxembourg/NewYearsDayTest.php b/tests/Luxembourg/NewYearsDayTest.php index d93b94636..bae8397b0 100644 --- a/tests/Luxembourg/NewYearsDayTest.php +++ b/tests/Luxembourg/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends LuxembourgBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jour de l’An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Luxembourg/PentecostMondayTest.php b/tests/Luxembourg/PentecostMondayTest.php index a439b846a..31ef7d023 100644 --- a/tests/Luxembourg/PentecostMondayTest.php +++ b/tests/Luxembourg/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Luxembourg/SecondChristmasDayTest.php b/tests/Luxembourg/SecondChristmasDayTest.php index e54522a6c..5320bb30d 100644 --- a/tests/Luxembourg/SecondChristmasDayTest.php +++ b/tests/Luxembourg/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends LuxembourgBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Deuxième jour de Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Mexico/AllSaintsDayTest.php b/tests/Mexico/AllSaintsDayTest.php index 692995a59..d7f90e36e 100644 --- a/tests/Mexico/AllSaintsDayTest.php +++ b/tests/Mexico/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends MexicoBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día de todos los Santos'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Mexico/AssumptionOfMaryTest.php b/tests/Mexico/AssumptionOfMaryTest.php index 74eb61a9a..694d387b0 100644 --- a/tests/Mexico/AssumptionOfMaryTest.php +++ b/tests/Mexico/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends MexicoBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Asunción de la Virgen María'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Mexico/BenitoJuarezBirthdayTest.php b/tests/Mexico/BenitoJuarezBirthdayTest.php index e67ec227b..58614d0b5 100644 --- a/tests/Mexico/BenitoJuarezBirthdayTest.php +++ b/tests/Mexico/BenitoJuarezBirthdayTest.php @@ -55,7 +55,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Natalicio de Benito Juárez'] ); } @@ -67,6 +67,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Mexico/ChristmasTest.php b/tests/Mexico/ChristmasTest.php index 0d3b4fcb3..c955bdea5 100644 --- a/tests/Mexico/ChristmasTest.php +++ b/tests/Mexico/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends MexicoBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Navidad'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Mexico/EasterMondayTest.php b/tests/Mexico/EasterMondayTest.php index daa131eaf..8d1de30da 100644 --- a/tests/Mexico/EasterMondayTest.php +++ b/tests/Mexico/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lunes de Pascua'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Mexico/EpiphanyTest.php b/tests/Mexico/EpiphanyTest.php index f9e093f5e..e9d7dcfeb 100644 --- a/tests/Mexico/EpiphanyTest.php +++ b/tests/Mexico/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends MexicoBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día de Reyes'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Mexico/GoodFridayTest.php b/tests/Mexico/GoodFridayTest.php index feec64bc9..cdc682dcf 100644 --- a/tests/Mexico/GoodFridayTest.php +++ b/tests/Mexico/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Viernes Santo'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Mexico/ImmaculateConceptionTest.php b/tests/Mexico/ImmaculateConceptionTest.php index 0f6af4123..5a6ce8b96 100644 --- a/tests/Mexico/ImmaculateConceptionTest.php +++ b/tests/Mexico/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends MexicoBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Inmaculada Concepción'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Mexico/IndependenceDayTest.php b/tests/Mexico/IndependenceDayTest.php index 50624e7a6..fbe96c334 100644 --- a/tests/Mexico/IndependenceDayTest.php +++ b/tests/Mexico/IndependenceDayTest.php @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Independencia'] ); } @@ -81,6 +81,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Mexico/InternationalWorkersDayTest.php b/tests/Mexico/InternationalWorkersDayTest.php index 3d63f4b12..0985e4de5 100644 --- a/tests/Mexico/InternationalWorkersDayTest.php +++ b/tests/Mexico/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends MexicoBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día del Trabajador'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Mexico/NewYearsDayTest.php b/tests/Mexico/NewYearsDayTest.php index dbe9af245..4310596d5 100644 --- a/tests/Mexico/NewYearsDayTest.php +++ b/tests/Mexico/NewYearsDayTest.php @@ -30,11 +30,10 @@ class NewYearsDayTest extends MexicoBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -47,9 +46,9 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -62,7 +61,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Año Nuevo'] ); } @@ -74,6 +73,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Mexico/VirginOfGuadalupeTest.php b/tests/Mexico/VirginOfGuadalupeTest.php index 8c602c8f3..3c8f4cdda 100644 --- a/tests/Mexico/VirginOfGuadalupeTest.php +++ b/tests/Mexico/VirginOfGuadalupeTest.php @@ -58,7 +58,7 @@ public function testVirginOfGuadalupe(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Día de la Virgen de Guadalupe']); } @@ -69,7 +69,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 6729a7002..3766aa508 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Hemelvaart'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index fc765c9a5..881a6d1a0 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Aswoensdag'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 6491e7328..272f0ec94 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'eerste kerstdag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 6a4ed04cd..322eeeccc 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -45,7 +45,7 @@ public function testCommemorationDayBefore1947(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'dodenherdenking'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OBSERVANCE ); } diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index 78caea3d2..348fad6a6 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'tweede paasdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 35212d533..dbe54128b 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'eerste paasdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index c506a4d12..d1692198c 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Epiphany. * - * @dataProvider EpiphanyDataProvider - * * @param int $year the year for which Epiphany needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('EpiphanyDataProvider')] public function testEpiphany(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testEpiphany(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function EpiphanyDataProvider(): array + public static function EpiphanyDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Drie Koningen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index f4e9f16c8..1a09ce9bb 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -37,7 +37,7 @@ class FathersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vaderdag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index 2055afaf3..688ba2a46 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Goede Vrijdag'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index d32293545..28d6f09fc 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -33,11 +33,10 @@ class HalloweenTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests Halloween. * - * @dataProvider HalloweenDataProvider - * * @param int $year the year for which Halloween needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HalloweenDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HalloweenDataProvider(): array + public static function HalloweenDataProvider(): array { - return $this->generateRandomDates(10, 31, self::TIMEZONE); + return static::generateRandomDates(10, 31, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Halloween'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index a4d5df30c..c8dc80eda 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Hol /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testInternationalWorkersDay(int $year, \DateTimeInterface $expec * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dag van de arbeid'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index da222fbf4..4ca433c57 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -77,7 +77,7 @@ public function testKingsDayBefore2014(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -91,7 +91,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Koningsdag'] ); } @@ -106,7 +106,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 7d80f9dad..a8874d82f 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -45,7 +45,7 @@ public function testLiberationDayBefore1947(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -56,7 +56,7 @@ public function testLiberationDayBefore1947(): void */ public function testLiberationDayOnAfter1947(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Bevrijdingsdag'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(2001, 2004), + static::generateRandomYear(2001, 2004), Holiday::TYPE_OBSERVANCE ); diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index 8d6ba6838..20c9c4086 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -37,7 +37,7 @@ class MothersDayTest extends NetherlandsBaseTestCase implements HolidayTestCase */ public function testMothersDay(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Moederdag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 5d9791112..e03dc5af4 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -37,7 +37,7 @@ class NetherlandsTest extends NetherlandsBaseTestCase implements ProviderTestCas */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2014); + $this->year = static::generateRandomYear(2014); } /** @@ -80,7 +80,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'liberationDay', - ], self::REGION, $this->generateRandomYear(2011, 2014), Holiday::TYPE_OBSERVANCE); + ], self::REGION, static::generateRandomYear(2011, 2014), Holiday::TYPE_OBSERVANCE); } /** diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 30af89a5b..0a1de82ae 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testNewYearsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nieuwjaar'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index 334dcba1a..990843040 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'eerste pinksterdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 983fd305a..96291f75d 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -117,7 +117,7 @@ public function testQueensBetween1949and2013SubstitutedEarlier(): void */ public function testQueensDayBefore1891(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(1000, 1890)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(1000, 1890)); } /** @@ -127,7 +127,7 @@ public function testQueensDayBefore1891(): void */ public function testQueensDayAfter2013(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(2014)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(2014)); } /** @@ -140,7 +140,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1891, 2013), + static::generateRandomYear(1891, 2013), [self::LOCALE => 'Koninginnedag'] ); } @@ -155,7 +155,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1891, 2013), + static::generateRandomYear(1891, 2013), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 167942902..f78c60f8b 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -33,11 +33,10 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements HolidayTestCa /** * Tests Valentines Day. * - * @dataProvider ValentinesDayDataProvider - * * @param int $year the year for which Valentines Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ValentinesDayDataProvider')] public function testValentinesDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testValentinesDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ValentinesDayDataProvider(): array + public static function ValentinesDayDataProvider(): array { - return $this->generateRandomDates(2, 14, self::TIMEZONE); + return static::generateRandomDates(2, 14, self::TIMEZONE); } /** @@ -62,7 +61,7 @@ public function ValentinesDayDataProvider(): array */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,7 +74,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Valentijnsdag'] ); } diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index 1fd437749..0d7fc32be 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -42,7 +42,7 @@ class WorldAnimalDayTest extends NetherlandsBaseTestCase implements HolidayTestC */ public function testWorldAnimalDayOnAfter1931(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testWorldAnimalBefore1931(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OTHER ); } @@ -90,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Werelddierendag'] ); } diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index 609fb5e1b..5cdfa7e6f 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -53,7 +53,7 @@ public function testHoliday(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -66,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Carnaval'] ); } diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 6e9c5f963..891bf3828 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'tweede pinksterdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index aeac99ebf..a5036ff7e 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -37,7 +37,7 @@ class princesDayTest extends NetherlandsBaseTestCase implements HolidayTestCase */ public function testPrincesDay(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Prinsjesdag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index 7e0134c7a..7a35d8e58 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -31,6 +31,11 @@ class secondCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCa */ public const HOLIDAY = 'secondCarnivalDay'; + public function __construct() + { + parent::__construct(static::class); + } + /** * Tests the holiday defined in this test. * @@ -60,7 +65,7 @@ public function testHoliday(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -76,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Carnaval'] ); } diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index 3a1214b1b..96c31f5f4 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -33,11 +33,10 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'tweede kerstdag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 5de31f291..b51c74cb9 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -33,11 +33,10 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements HolidayTestCas /** * Tests Sint Martins Day. * - * @dataProvider stMartinsDayDataProvider - * * @param int $year the year for which Sint Martins Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('stMartinsDayDataProvider')] public function teststMartinsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function teststMartinsDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function stMartinsDayDataProvider(): array + public static function stMartinsDayDataProvider(): array { - return $this->generateRandomDates(11, 11, self::TIMEZONE); + return static::generateRandomDates(11, 11, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sint Maarten'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index c3f48a474..6cf4b01d4 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -33,11 +33,10 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements HolidayTestCa /** * Tests Sint Nicholas Day. * - * @dataProvider stNicholasDayDataProvider - * * @param int $year the year for which Sint Nicholas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('stNicholasDayDataProvider')] public function teststNicholasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function teststNicholasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function stNicholasDayDataProvider(): array + public static function stNicholasDayDataProvider(): array { - return $this->generateRandomDates(12, 5, self::TIMEZONE); + return static::generateRandomDates(12, 5, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sinterklaas'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index 8da7ad125..f8233788b 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -31,6 +31,11 @@ class thirdCarnivalDay extends NetherlandsBaseTestCase implements HolidayTestCas */ public const HOLIDAY = 'thirdCarnivalDay'; + public function __construct() + { + parent::__construct(static::class); + } + /** * Tests the holiday defined in this test. * @@ -60,7 +65,7 @@ public function testHoliday(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -76,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Carnaval'] ); } diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index 429130331..d5d5306bd 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -38,13 +38,12 @@ class AnzacDayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests ANZAC Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,15 +69,15 @@ public function testNotHoliday(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(4, 25, function ($year, \DateTime $date): void { + return static::generateRandomDatesWithModifier(4, 25, function ($year, \DateTime $date): void { // in 2015 some policy was introduced to make sure this holiday was celebrated during the working week. if ($year < 2015) { return; } - if (! $this->isWeekend($date)) { + if (! static::isWeekend($date)) { return; } @@ -96,7 +95,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'ANZAC Day'] ); } @@ -111,7 +110,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index de39f0e56..96c1c2acd 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -33,13 +33,12 @@ class BoxingDayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests Boxing Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,12 +56,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); if (\in_array((int) $date->format('w'), [0, 6], true)) { @@ -85,7 +84,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); } @@ -97,6 +96,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 20f37213b..1e7a5df0b 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,12 +56,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); if (\in_array((int) $date->format('w'), [0, 6], true)) { @@ -85,7 +84,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -97,6 +96,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index d9ab2bc02..cae5cb7cf 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -33,13 +33,12 @@ class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements HolidayT /** * Tests Day After New Years Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -60,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Day after New Year’s Day'] ); } @@ -72,7 +71,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -82,12 +81,12 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-01-02", new \DateTimeZone(self::TIMEZONE)); switch ($date->format('w')) { diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index ff1c988a0..85aeaf06d 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -33,13 +33,12 @@ class EasterMondayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Monday'] ); } @@ -94,6 +93,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index 86475f063..f75621278 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -33,13 +33,12 @@ class GoodFridayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests Good Friday. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -93,6 +92,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index c773447ab..37c89b065 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -38,13 +38,12 @@ class LabourDayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests Labour Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -70,12 +69,12 @@ public function testNotHoliday(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 100; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new \DateTime( (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october') . " {$year}", new \DateTimeZone(self::TIMEZONE) @@ -97,7 +96,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Labour Day'] ); } @@ -112,7 +111,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/NewZealand/MatarikiTest.php b/tests/NewZealand/MatarikiTest.php index fb8d125df..ae63df6e8 100644 --- a/tests/NewZealand/MatarikiTest.php +++ b/tests/NewZealand/MatarikiTest.php @@ -43,11 +43,10 @@ class MatarikiTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests Matariki. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -68,7 +67,7 @@ public function testNotHoliday(): void * * @throws Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; @@ -107,7 +106,7 @@ public function HolidayDataProvider(): array ]; for ($y = 1; $y <= 100; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR); $expected = new \DateTime( sprintf('%04d-%02d-%02d', $year, $matarikiDates[$year]['month'], $matarikiDates[$year]['day']), new \DateTimeZone(self::TIMEZONE) @@ -128,7 +127,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR), [self::LOCALE => 'Matariki'] ); } @@ -143,7 +142,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::CALCULATED_UNTIL_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index f7fc232db..562120792 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -33,13 +33,12 @@ class NewYearsDayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,12 +56,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-01-01", new \DateTimeZone(self::TIMEZONE)); switch ($date->format('w')) { @@ -90,7 +89,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'New Year’s Day'] ); } @@ -102,6 +101,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index ced8f19c0..ca210c716 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -37,7 +37,7 @@ class NewZealandTest extends NewZealandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1987); + $this->year = static::generateRandomYear(1987); } /** diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index c3ae2003b..23feaaab3 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -38,11 +38,10 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements HolidayTestCa /** * Tests Queens Birthday. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -63,12 +62,12 @@ public function testNotHoliday(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 1; $y <= 100; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new \DateTime("first monday of june {$year}", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $expected]; } @@ -86,7 +85,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Queen’s Birthday'] ); } @@ -101,7 +100,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index f7693e850..6fad312c1 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -38,13 +38,12 @@ class WaitangiDayTest extends NewZealandBaseTestCase implements HolidayTestCase /** * Tests Waitangi Day. * - * @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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -73,7 +72,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Waitangi Day'] ); } @@ -88,7 +87,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } @@ -100,15 +99,15 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(2, 06, function ($year, \DateTime $date): void { + return static::generateRandomDatesWithModifier(2, 06, function ($year, \DateTime $date): void { // in 2015 some policy was introduced to make sure this holiday was celebrated during the working week. if ($year < 2015) { return; } - if (! $this->isWeekend($date)) { + if (! static::isWeekend($date)) { return; } diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index ac840006a..284a0db54 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Kristi himmelfartsdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 4b7f5911d..2c06b433e 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'første juledag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index 82c970d3d..e1dd3a5a1 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'grunnlovsdagen'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index 0a241a8bd..1c3af1570 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'andre påskedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index a8469e0ff..aa6191edf 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'første påskedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index c89b723a5..a0ce58b38 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'langfredag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 805c10042..7532087bd 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements HolidayT /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'arbeidernes dag'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index f786b6ac9..39c272f87 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'skjærtorsdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index a26027b34..ef951758d 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends NorwayBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'første nyttårsdag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index 0a840cdf1..0f68df370 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -37,7 +37,7 @@ class NorwayTest extends NorwayBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1836); + $this->year = static::generateRandomYear(1836); } /** diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index 2b27328b4..a2934489b 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'andre pinsedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index 812706214..ef2628de3 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'første pinsedag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index 606423b65..3698aa4c8 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'andre juledag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index a6e54f4f2..1a6841474 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends PolandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Uroczystość Wszystkich Świętych'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 371381bfd..b2e0bd385 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Wniebowzięcie Najświętszej Marii Panny'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/ChristmasEveTest.php b/tests/Poland/ChristmasEveTest.php index e70f20aa2..6768af1b4 100644 --- a/tests/Poland/ChristmasEveTest.php +++ b/tests/Poland/ChristmasEveTest.php @@ -37,7 +37,7 @@ class ChristmasEveTest extends PolandBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -51,7 +51,7 @@ public function testHoliday(): void */ public function testNotHoliday(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -65,7 +65,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Wigilia Bożego Narodzenia'] ); } @@ -77,6 +77,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index 55d42ca40..145e4c5ae 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'pierwszy dzień Bożego Narodzenia'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index f84b1d9b3..0d426f956 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Święto Narodowe Trzeciego Maja'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index a174660cb..444727fbf 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boże Ciało'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 481ef0211..6da546e3c 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Poniedziałek Wielkanocny'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 4deff4928..c90d08dd5 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Wielkanoc'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index 0de9c22ab..7d50ef631 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends PolandBaseTestCase implements HolidayTestCase /** * Tests Epiphany. * - * @dataProvider EpiphanyDataProvider - * * @param int $year the year for which Epiphany needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('EpiphanyDataProvider')] public function testEpiphany(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testEpiphany(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function EpiphanyDataProvider(): array + public static function EpiphanyDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Święto Trzech Króli'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index 4a36f920f..574513fbb 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Narodowe Święto Niepodległości'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index a8b201239..6357e827b 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements HolidayT /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Święto Pracy'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index 130cf3d3c..7cf563f96 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends PolandBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nowy Rok'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index 61449cae0..6e659d4a1 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Zielone Świątki'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index ed32101d9..d3e633eb3 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -37,7 +37,7 @@ class PolandTest extends PolandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1918); + $this->year = static::generateRandomYear(1918); } /** diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index f2023b5be..bc3cec017 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'drugi dzień Bożego Narodzenia'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 6f6a76196..e08b431a1 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -63,7 +63,7 @@ public function testHoliday(): void */ public function testNotHoliday(): void { - $year = $this->generateRandomYear(2013, 2015); + $year = static::generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -74,7 +74,7 @@ public function testNotHoliday(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + $year = static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -91,11 +91,11 @@ public function testTranslation(): void public function testHolidayType(): void { // After restoration - $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + $year = static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); // Before abolishment - $year = $this->generateRandomYear(1000, self::HOLIDAY_YEAR_ABOLISHED - 1); + $year = static::generateRandomYear(1000, self::HOLIDAY_YEAR_ABOLISHED - 1); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index 12a48c6b0..abc464fb9 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assunção de Nossa Senhora'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index 5016c8d17..b7cb8983a 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -42,7 +42,7 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements Holiday */ public function testHolidayAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new \DateTime("{$year}-04-25", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -54,7 +54,7 @@ public function testHolidayAfterEstablishment(): void */ public function testNotHolidayBeforeEstablishment(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -65,7 +65,7 @@ public function testNotHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Dia da Liberdade']); } @@ -76,7 +76,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index fccfd7e64..30265b3f6 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends PortugalBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Natal'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 2ebfacb82..b0edaecaa 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -59,7 +59,7 @@ public function testHoliday(): void */ public function testNotHoliday(): void { - $year = $this->generateRandomYear(2013, 2015); + $year = static::generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -70,7 +70,7 @@ public function testNotHoliday(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + $year = static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Corpo de Deus']); } @@ -82,11 +82,11 @@ public function testTranslation(): void public function testHolidayType(): void { // Before abolishment - $year = $this->generateRandomYear(1000, self::HOLIDAY_YEAR_ABOLISHED - 1); + $year = static::generateRandomYear(1000, self::HOLIDAY_YEAR_ABOLISHED - 1); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); // After restoration - $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + $year = static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index 32f24b32e..bfe535fa0 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Páscoa'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index 02c47c67d..c12b82927 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sexta-feira Santa'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index 3a1803bd1..abe7cd1f0 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia da Imaculada Conceição'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 698c8e8c9..c781afc42 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Holida /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia do Trabalhador'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index 4f2345ae7..93216289d 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends PortugalBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dia de Ano Novo'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 653600637..539659bf4 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -49,7 +49,7 @@ class PortugalDayTest extends PortugalBaseTestCase implements HolidayTestCase */ public function testHolidayBeforeAbolishment(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); $expected = new \DateTime("{$year}-06-10", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -63,7 +63,7 @@ public function testHolidayBeforeAbolishment(): void */ public function testHolidayAfterRestoration(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); $expected = new \DateTime("{$year}-06-10", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -77,7 +77,7 @@ public function testHolidayAfterRestoration(): void */ public function testNotHolidayDuringAbolishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_BEFORE + 1, self::ESTABLISHMENT_YEAR_AFTER - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR_BEFORE + 1, self::ESTABLISHMENT_YEAR_AFTER - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); $this->assertNotHoliday(self::REGION, self::HOLIDAY, self::ESTABLISHMENT_YEAR_BEFORE + 1); @@ -91,10 +91,10 @@ public function testNotHolidayDuringAbolishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Dia de Portugal']); - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $year, [self::LOCALE => 'Dia de Portugal']); } @@ -105,10 +105,10 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index e6e12ccf4..b241dc92d 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -37,7 +37,7 @@ class PortugalTest extends PortugalBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1974); + $this->year = static::generateRandomYear(1974); } /** diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index fc8a17139..3abb4a9c1 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -53,7 +53,7 @@ public function testNotHolidayDuringAbolishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::HOLIDAY_YEAR_SUSPENDED, self::HOLIDAY_YEAR_RESTORED - 1) + static::generateRandomYear(self::HOLIDAY_YEAR_SUSPENDED, self::HOLIDAY_YEAR_RESTORED - 1) ); } @@ -120,8 +120,8 @@ public function testHolidayType(): void */ private function randomEstablishedYear(): \Generator { - yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); - yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + yield static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); + yield static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); } /** @return \Generator @@ -129,7 +129,7 @@ private function randomEstablishedYear(): \Generator */ private function randomYearsBeforeEstablishment(): \Generator { - yield $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + yield static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); yield self::ESTABLISHMENT_YEAR - 1; } @@ -138,7 +138,7 @@ private function randomYearsBeforeEstablishment(): \Generator */ private function randomYearsOnAfterEstablishment(): \Generator { - yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); + yield static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); yield self::ESTABLISHMENT_YEAR; } @@ -147,7 +147,7 @@ private function randomYearsOnAfterEstablishment(): \Generator */ private function randomYearsOnAfterRestoration(): \Generator { - yield $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + yield static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); yield self::HOLIDAY_YEAR_RESTORED; } } diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 3eb501bc3..90cf9016a 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -52,7 +52,7 @@ class RestorationOfIndependenceTest extends PortugalBaseTestCase implements Holi */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -75,7 +75,7 @@ public function testHolidayOnAfterRestoration(): void $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + $year = static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $expected = new \DateTime("{$year}-12-01", new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -88,7 +88,7 @@ public function testHolidayOnAfterRestoration(): void */ public function testNotHolidayDuringAbolishment(): void { - $year = $this->generateRandomYear(2013, 2015); + $year = static::generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -99,7 +99,7 @@ public function testNotHolidayDuringAbolishment(): void */ public function testHolidayBeforeEstablishment(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); $year = 1849; @@ -113,7 +113,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -121,7 +121,7 @@ public function testTranslation(): void [self::LOCALE => 'Restauração da Independência'] ); - $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + $year = static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -138,11 +138,11 @@ public function testTranslation(): void public function testHolidayType(): void { // After establishment and before abolishment - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_ABOLISHED - 1); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); // After restoration - $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + static::generateRandomYear(self::HOLIDAY_YEAR_RESTORED); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Randomizer.php b/tests/Randomizer.php index 1ac36ce9e..99bc88b6d 100644 --- a/tests/Randomizer.php +++ b/tests/Randomizer.php @@ -37,7 +37,7 @@ trait Randomizer * * @throws \Exception */ - public function generateRandomDates( + public static function generateRandomDates( int $month, int $day, ?string $timezone = null, @@ -65,7 +65,7 @@ public function generateRandomDates( * * @throws \Exception */ - public function generateRandomEasterDates( + public static function generateRandomEasterDates( ?string $timezone = null, ?int $iterations = null, ?int $range = null, @@ -75,7 +75,7 @@ public function generateRandomEasterDates( for ($i = 1; $i <= ($iterations ?? 10); ++$i) { $year = (int) self::dateTimeBetween("-{$range} years", "+{$range} years")->format('Y'); - $date = $this->calculateEaster($year, $timezone ?? 'UTC'); + $date = static::computeEaster($year, $timezone ?? 'UTC'); $data[] = [$year, $date->format('Y-m-d')]; } @@ -94,14 +94,14 @@ public function generateRandomEasterDates( * * @throws \Exception */ - public function generateRandomEasterMondayDates( + public static function generateRandomEasterMondayDates( ?string $timezone = null, ?int $iterations = null, ?int $range = null, ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (\DateTime $date): void { + return static::generateRandomModifiedEasterDates(static function (\DateTime $date): void { $date->add(new \DateInterval('P1D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -118,7 +118,7 @@ public function generateRandomEasterMondayDates( * * @throws \Exception */ - public function generateRandomModifiedEasterDates( + public static function generateRandomModifiedEasterDates( callable $cb, ?string $timezone = null, ?int $iterations = null, @@ -128,7 +128,7 @@ public function generateRandomModifiedEasterDates( $range ??= 1000; for ($i = 1; $i <= ($iterations ?? 10); ++$i) { $year = (int) self::dateTimeBetween("-{$range} years", "+{$range} years")->format('Y'); - $date = $this->calculateEaster($year, $timezone ?? 'UTC'); + $date = static::computeEaster($year, $timezone ?? 'UTC'); $cb($date); @@ -149,14 +149,14 @@ public function generateRandomModifiedEasterDates( * * @throws \Exception */ - public function generateRandomGoodFridayDates( + public static function generateRandomGoodFridayDates( ?string $timezone = null, ?int $iterations = null, ?int $range = null, ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (\DateTime $date): void { + return static::generateRandomModifiedEasterDates(static function (\DateTime $date): void { $date->sub(new \DateInterval('P2D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -172,14 +172,14 @@ public function generateRandomGoodFridayDates( * * @throws \Exception */ - public function generateRandomPentecostDates( + public static function generateRandomPentecostDates( ?string $timezone = null, ?int $iterations = null, ?int $range = null, ): array { $range ??= 1000; - return $this->generateRandomModifiedEasterDates(static function (\DateTime $date): void { + return static::generateRandomModifiedEasterDates(static function (\DateTime $date): void { $date->add(new \DateInterval('P49D')); }, $timezone ?? 'UTC', $iterations ?? 10, $range); } @@ -198,15 +198,15 @@ public function generateRandomPentecostDates( * * @throws \Exception */ - public function generateRandomDatesWithHolidayMovedToMonday( + public static function generateRandomDatesWithHolidayMovedToMonday( int $month, int $day, ?string $timezone = null, ?int $iterations = null, ?int $range = null, ): array { - return $this->generateRandomDatesWithModifier($month, $day, function ($range, \DateTime $date): void { - if ($this->isWeekend($date)) { + return static::generateRandomDatesWithModifier($month, $day, static function ($range, \DateTime $date): void { + if (static::isWeekend($date)) { $date->modify('next monday'); } }, $iterations ?? 10, $range, $timezone ?? 'UTC'); @@ -226,7 +226,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( * * @throws \Exception */ - public function generateRandomDatesWithModifier( + public static function generateRandomDatesWithModifier( int $month, int $day, callable $callback, @@ -237,7 +237,7 @@ public function generateRandomDatesWithModifier( $data = []; for ($i = 1; $i <= $iterations; ++$i) { - $year = $this->generateRandomYear($range); + $year = static::generateRandomYear($range); $date = new \DateTime("{$year}-{$month}-{$day}", new \DateTimeZone($timezone ?? 'UTC')); if (false === $callback($year, $date)) { @@ -261,7 +261,7 @@ public function generateRandomDatesWithModifier( * * @throws \Exception */ - public function generateRandomYear( + public static function generateRandomYear( ?int $lowerLimit = null, ?int $upperLimit = null, ): int { @@ -276,7 +276,7 @@ public function generateRandomYear( * * @return bool true if $dateTime is a weekend, false otherwise */ - public function isWeekend( + public static function isWeekend( \DateTimeInterface $dateTime, array $weekendDays = [0, 6], ): bool { @@ -339,7 +339,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now ); } - public function randomYearFromArray(array $years): int + public static function randomYearFromArray(array $years): int { if ([] === $years) { throw new \InvalidArgumentException(' years array must not be empty'); @@ -372,7 +372,10 @@ public function randomYearFromArray(array $years): int * @see http://www.gmarts.org/index.php?go=415#EasterMallen * @see http://www.tondering.dk/claus/cal/easter.php */ - protected function calculateEaster(int $year, string $timezone): \DateTimeInterface + /** + * Static Easter calculation used by data providers (avoids conflict with ChristianHolidays::calculateEaster). + */ + protected static function computeEaster(int $year, string $timezone): \DateTimeInterface { if (\extension_loaded('calendar')) { $easter_days = easter_days($year); @@ -427,6 +430,11 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf return $easter; } + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface + { + return static::computeEaster($year, $timezone); + } + /** * @param \DateTime|string|float|int $max * diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 377c2ed13..1a3746af6 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -42,7 +42,7 @@ class AssumptionOfMaryTest extends RomaniaBaseTestCase implements HolidayTestCas */ public function testAssumptionOfMaryDayOnAfter2008(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testAssumptionOfMaryDayBefore2008(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Adormirea Maicii Domnului'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index 0cc9dec51..ff205c4fc 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -42,7 +42,7 @@ class ChildrensDayTest extends RomaniaBaseTestCase implements HolidayTestCase */ public function testChildrensDayOnAfter1950(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testChildrensDayBefore1950(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ziua Copilului'] ); } @@ -90,9 +90,9 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2016), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 2016), Holiday::TYPE_OBSERVANCE ); - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(2017), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(2017), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 5d1a6e943..3a21a10de 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Crăciunul'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index 7800ecc2e..74bc3d38a 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -42,7 +42,7 @@ class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements HolidayTe */ public function testConstantinBrancusiDayOnAfter2016(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testConstantinBrancusiDayBefore2016(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ziua Constantin Brâncuși'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OBSERVANCE ); } diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index 7b7b58499..f0df9429c 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -33,11 +33,10 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 2, self::TIMEZONE); + return static::generateRandomDates(1, 2, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'A doua zi după Anul Nou'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index bb8526af6..637fbe337 100644 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'A doua zi de Paște'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index 0e015e818..2a695b766 100644 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Paștele'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/EpiphanyTest.php b/tests/Romania/EpiphanyTest.php index 20310f034..e277010f5 100644 --- a/tests/Romania/EpiphanyTest.php +++ b/tests/Romania/EpiphanyTest.php @@ -42,7 +42,7 @@ class EpiphanyTest extends RomaniaBaseTestCase implements HolidayTestCase */ public function testEpiphanyAfter2024(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testEpiphanyBefore2024(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Bobotează'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index 0e70e5490..f6b7ab120 100644 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements Holiday /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ziua internațională a muncii'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index 348ccc5ee..7c0cafb2f 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -42,7 +42,7 @@ class NationalDayTest extends RomaniaBaseTestCase implements HolidayTestCase */ public function testNationalDayOnAfter1990(): void { - $year = $this->generateRandomYear(1990); + $year = static::generateRandomYear(1990); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -58,7 +58,7 @@ public function testNationalDayOnAfter1990(): void */ public function testNationalDayBetween19481989(): void { - $year = $this->generateRandomYear(1948, 1989); + $year = static::generateRandomYear(1948, 1989); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -74,7 +74,7 @@ public function testNationalDayBetween19481989(): void */ public function testNationalDayBetween18661947(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1947); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1947); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -93,7 +93,7 @@ public function testNationalDayBefore1865(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -107,7 +107,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Ziua Națională'] ); } @@ -122,7 +122,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index bd9bab8ce..9e3aa738d 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Anul Nou'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index cce50e027..1ec80bd7d 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -61,7 +61,7 @@ public function testPentecostMondayBefore2008(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'A doua zi de Rusalii'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index 340cc08a7..a97695bb1 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -61,7 +61,7 @@ public function testPentecostDayBefore2008(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Rusaliile'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index 948823b04..757248510 100644 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -37,7 +37,7 @@ class RomaniaTest extends RomaniaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2015, 2028); + $this->year = static::generateRandomYear(2015, 2028); } /** diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index c50b32a90..4f5ee3f51 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'A doua zi de Crăciun'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Romania/StAndrewsDayTest.php b/tests/Romania/StAndrewsDayTest.php index ced484236..cd699afb6 100644 --- a/tests/Romania/StAndrewsDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -42,7 +42,7 @@ class StAndrewsDayTest extends RomaniaBaseTestCase implements HolidayTestCase */ public function testStAndrewDayOnAfter2012(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testStAndrewDayBefore2012(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Sfântul Andrei'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/StJohnsDayTest.php b/tests/Romania/StJohnsDayTest.php index 2429611db..dbe65826c 100644 --- a/tests/Romania/StJohnsDayTest.php +++ b/tests/Romania/StJohnsDayTest.php @@ -42,7 +42,7 @@ class StJohnsDayTest extends RomaniaBaseTestCase implements HolidayTestCase */ public function testStJohnsAfter2024(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testStJohnsDayBefore2024(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Sfântul Ioan Botezătorul'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index eafb44165..b2ecc7eda 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -42,7 +42,7 @@ class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements Holiday */ public function testUnitedPrincipalitiesDayOnAfter2015(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testUnitedPrincipalitiesDayBefore2015(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Unirea Principatelor Române / Mica Unire'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index 0481da010..8091cea0f 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBefore(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR - 1) + static::generateRandomYear(1000, Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBefore(): void */ public function testHolidayAfter(): void { - $year = $this->generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR); + $year = static::generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), + static::generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), [self::LOCALE => 'День защитника Отечества'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), + static::generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), ['en' => 'Defence of the Fatherland Day'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), + static::generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index 537aac2de..a1e4773f3 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -37,14 +37,12 @@ class InternationalWomensDayTest extends RussiaBaseTestCase implements HolidayTe * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(3, 8, self::TIMEZONE); + return static::generateRandomDates(3, 8, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Международный женский день'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index f03ea5e7d..4d07d008d 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -37,14 +37,12 @@ class NewYearHolidaysDay2Test extends RussiaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 2, self::TIMEZONE); + return static::generateRandomDates(1, 2, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новогодние каникулы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 5111c0b27..e50bcb793 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -37,14 +37,12 @@ class NewYearHolidaysDay3Test extends RussiaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 3, self::TIMEZONE); + return static::generateRandomDates(1, 3, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новогодние каникулы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index 3833ebd18..6773bc290 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -37,14 +37,12 @@ class NewYearHolidaysDay4Test extends RussiaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 4, self::TIMEZONE); + return static::generateRandomDates(1, 4, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новогодние каникулы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index 029874b55..c070f7cbd 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -37,14 +37,12 @@ class NewYearHolidaysDay5Test extends RussiaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 5, self::TIMEZONE); + return static::generateRandomDates(1, 5, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новогодние каникулы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index ad3d489e5..731d84223 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -37,14 +37,12 @@ class NewYearHolidaysDay6Test extends RussiaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новогодние каникулы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index 20c365766..b37dd59ad 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -37,14 +37,12 @@ class NewYearHolidaysDay8Test extends RussiaBaseTestCase implements HolidayTestC * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 8, self::TIMEZONE); + return static::generateRandomDates(1, 8, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новогодние каникулы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 548f9738e..f4d6221c7 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -37,14 +37,12 @@ class NewYearsDayTest extends RussiaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новый год'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 59ebfa9e3..2cff4d971 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -37,14 +37,12 @@ class OrthodoxChristmasDayTest extends RussiaBaseTestCase implements HolidayTest * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(1, 7, self::TIMEZONE); + return static::generateRandomDates(1, 7, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Рождество'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index 82d74e86f..1c79f10c4 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBefore(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Russia::RUSSIA_DAY_START_YEAR - 1) + static::generateRandomYear(1000, Russia::RUSSIA_DAY_START_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBefore(): void */ public function testHolidayAfter(): void { - $year = $this->generateRandomYear(Russia::RUSSIA_DAY_START_YEAR); + $year = static::generateRandomYear(Russia::RUSSIA_DAY_START_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), + static::generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), [self::LOCALE => 'День России'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), + static::generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), ['en' => 'Russia Day'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), + static::generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index eab2caf32..65b29568b 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void 'victoryDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if ($year >= Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR) { $holidays[] = 'defenceOfTheFatherlandDay'; @@ -73,7 +73,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } /** @@ -83,7 +83,7 @@ public function testObservedHolidays(): void */ public function testSeasonalHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_SEASON); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_SEASON); } /** @@ -93,7 +93,7 @@ public function testSeasonalHolidays(): void */ public function testBankHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_BANK); } /** @@ -103,7 +103,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index e78082fe9..cd350c3f9 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -37,14 +37,12 @@ class SpringAndLabourDayTest extends RussiaBaseTestCase implements HolidayTestCa * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Праздник Весны и Труда'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index d84b2c86d..4c6c35492 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -43,7 +43,7 @@ public function testHolidayBefore(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, Russia::UNITY_DAY_START_YEAR - 1) + static::generateRandomYear(1000, Russia::UNITY_DAY_START_YEAR - 1) ); } @@ -54,7 +54,7 @@ public function testHolidayBefore(): void */ public function testHolidayAfter(): void { - $year = $this->generateRandomYear(Russia::UNITY_DAY_START_YEAR); + $year = static::generateRandomYear(Russia::UNITY_DAY_START_YEAR); $this->assertHoliday( self::REGION, @@ -72,13 +72,13 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::UNITY_DAY_START_YEAR), + static::generateRandomYear(Russia::UNITY_DAY_START_YEAR), [self::LOCALE => 'День народного единства'] ); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::UNITY_DAY_START_YEAR), + static::generateRandomYear(Russia::UNITY_DAY_START_YEAR), ['en' => 'Unity Day'] ); } @@ -91,7 +91,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Russia::UNITY_DAY_START_YEAR), + static::generateRandomYear(Russia::UNITY_DAY_START_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index ec638158a..8616c4688 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -37,14 +37,12 @@ class VictoryDayTest extends RussiaBaseTestCase implements HolidayTestCase * * @throws \Exception */ - public function holidayDataProvider(): array + public static function holidayDataProvider(): array { - return $this->generateRandomDates(5, 9, self::TIMEZONE); + return static::generateRandomDates(5, 9, self::TIMEZONE); } - /** - * @dataProvider holidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('holidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -58,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'День Победы'] ); } @@ -68,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index a29ddbff8..f399e312d 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -35,11 +35,10 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sviatok Všetkých svätých'] ); } @@ -79,6 +78,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index 87278f63d..098e9eaee 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -35,11 +35,10 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Prvý sviatok vianočný'] ); } @@ -79,6 +78,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index 694dcc6b5..ff577766c 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -35,11 +35,10 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements HolidayTestCase /** * Tests Christmas Eve. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testChristmasEve(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testChristmasEve(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Štedrý deň'] ); } @@ -79,6 +78,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/DeclarationOfTheSlovakNationTest.php b/tests/Slovakia/DeclarationOfTheSlovakNationTest.php index 456ca2369..f3c5b18bb 100644 --- a/tests/Slovakia/DeclarationOfTheSlovakNationTest.php +++ b/tests/Slovakia/DeclarationOfTheSlovakNationTest.php @@ -35,11 +35,10 @@ class DeclarationOfTheSlovakNationTest extends SlovakiaBaseTestCase implements H /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { if (2018 === $year) { @@ -56,9 +55,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(10, 30, self::TIMEZONE); + return static::generateRandomDates(10, 30, self::TIMEZONE); } /** diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index d19edf7ea..1e4775c7b 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -35,11 +35,10 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $timezone = self::TIMEZONE; @@ -78,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Veľkonočný pondelok'] ); } @@ -90,6 +89,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 14a8fb822..c2c6b1d74 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -35,11 +35,10 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Zjavenie Pána / Traja králi'] ); } @@ -79,6 +78,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index b9dd4be97..7b51c4487 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -35,11 +35,10 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements HolidayTestCase /** * Tests the holiday defined in this test. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $timezone = self::TIMEZONE; @@ -78,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Veľký piatok'] ); } @@ -90,6 +89,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index eaf380ba3..30e2b8d42 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -35,11 +35,10 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Holida /** * Tests the holiday defined in this test. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sviatok práce'] ); } @@ -79,6 +78,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index ed7dbabdc..2f8f2b292 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -32,11 +32,10 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements HolidayTes /** * Tests the holiday defined in this test. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which this holiday needs to be tested * @param string $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, $expected): void { $this->assertHoliday( @@ -54,9 +53,9 @@ public function testHoliday(int $year, $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(9, 15, function ($year, \DateTime $date): ?bool { + return static::generateRandomDatesWithModifier(9, 15, function ($year, \DateTime $date): ?bool { // Our Lady of Sorrows Day is not observed in 2025 and 2026 if (in_array($year, [2025, 2026])) { return false; @@ -75,7 +74,7 @@ public function testTranslation(): void { // Our Lady of Sorrows Day is not observed in 2025 and 2026 $validYears = array_merge(range(1993, 2024), range(2027, 2100)); - $year = $this->randomYearFromArray($validYears); + $year = static::randomYearFromArray($validYears); $this->assertTranslatedHolidayName( self::REGION, @@ -94,7 +93,7 @@ public function testHolidayType(): void { // Our Lady of Sorrows Day is not observed in 2025 and 2026 $validYears = array_merge(range(1993, 2024), range(2027, 2100)); - $year = $this->randomYearFromArray($validYears); + $year = static::randomYearFromArray($validYears); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_BANK); } diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index 120dc52b2..c69f57e66 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -35,11 +35,10 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Hol /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(7, 5, self::TIMEZONE); + return static::generateRandomDates(7, 5, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sviatok svätého Cyrila a Metoda'] ); } @@ -79,6 +78,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index 6caacd8a2..634f6c386 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -35,11 +35,10 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements HolidayTest /** * Tests the holiday defined in this test. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Druhý sviatok vianočný'] ); } @@ -79,6 +78,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 22476a6b4..01b93c2c9 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -35,11 +35,10 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { if ($year < 2024) { @@ -56,9 +55,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(9, 1, self::TIMEZONE); + return static::generateRandomDates(9, 1, self::TIMEZONE); } /** @@ -71,7 +70,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(null, 2013), + static::generateRandomYear(null, 2013), [self::LOCALE => 'Deň Ústavy Slovenskej republiky'] ); } @@ -83,6 +82,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(null, 2013), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(null, 2013), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/SlovakIndependenceDayTest.php b/tests/Slovakia/SlovakIndependenceDayTest.php index 0f99e2704..8a838343e 100644 --- a/tests/Slovakia/SlovakIndependenceDayTest.php +++ b/tests/Slovakia/SlovakIndependenceDayTest.php @@ -36,11 +36,10 @@ class SlovakIndependenceDayTest extends SlovakiaBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Deň vzniku Slovenskej republiky'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index ef19faae4..c503f30a6 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -35,11 +35,10 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Holi /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,9 +51,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 29, self::TIMEZONE); + return static::generateRandomDates(8, 29, self::TIMEZONE); } /** @@ -67,7 +66,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Výročie Slovenského národného povstania'] ); } @@ -79,6 +78,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index cd1416ca1..5e9a340d1 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -44,8 +44,8 @@ class SlovakiaTest extends SlovakiaBaseTestCase implements ProviderTestCase protected function setUp(): void { // NOTE: 1993 is the year Slovakia was founded as an independent state - $this->year = $this->generateRandomYear(1993, 2100); - $this->yearOfConsolidation = $this->generateRandomYear(1993, 2024); + $this->year = static::generateRandomYear(1993, 2100); + $this->yearOfConsolidation = static::generateRandomYear(1993, 2024); } /** diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index b76b763b0..3bcee77d0 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -35,11 +35,10 @@ class StruggleForFreedomAndDemocracyDayTest extends SlovakiaBaseTestCase impleme /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -52,7 +51,7 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { // Only use years between 1993 and 2024 $years = range(1993, 2024); @@ -78,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1993, 2024), + static::generateRandomYear(1993, 2024), [self::LOCALE => 'Deň boja za slobodu a demokraciu'] ); } @@ -90,6 +89,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1993, 2024), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1993, 2024), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 47bf423d4..d364c1923 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -35,11 +35,10 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements HolidayTest /** * Tests Christmas Day. * - * @dataProvider HolidayDataProvider - * * @param int $year the year for which this holiday needs to be tested * @param string $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,9 +56,9 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(5, 8, function ($year, \DateTime $date): ?bool { + return static::generateRandomDatesWithModifier(5, 8, function ($year, \DateTime $date): ?bool { // Victory in Europe Day is not observed in 2025 and 2026 if (in_array($year, [2025, 2026])) { return false; @@ -78,7 +77,7 @@ public function testTranslation(): void { // Victory in Europe Day is not observed in 2025 and 2026 $validYears = array_merge(range(1993, 2024), range(2027, 2100)); - $year = $this->randomYearFromArray($validYears); + $year = static::randomYearFromArray($validYears); $this->assertTranslatedHolidayName( self::REGION, @@ -97,7 +96,7 @@ public function testHolidayType(): void { // Victory in Europe Day is not observed in 2025 and 2026 $validYears = array_merge(range(1993, 2024), range(2027, 2100)); - $year = $this->randomYearFromArray($validYears); + $year = static::randomYearFromArray($validYears); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_BANK); } diff --git a/tests/Slovenia/AssumptionOfMaryTest.php b/tests/Slovenia/AssumptionOfMaryTest.php index bd540415f..2a8055661 100644 --- a/tests/Slovenia/AssumptionOfMaryTest.php +++ b/tests/Slovenia/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends SloveniaBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Marijino vnebovzetje'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/ChristmasDayTest.php b/tests/Slovenia/ChristmasDayTest.php index ef41be775..21770cde3 100644 --- a/tests/Slovenia/ChristmasDayTest.php +++ b/tests/Slovenia/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends SloveniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Božič'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/EasterMondayTest.php b/tests/Slovenia/EasterMondayTest.php index 983c9379d..774fe5309 100644 --- a/tests/Slovenia/EasterMondayTest.php +++ b/tests/Slovenia/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Velikonočni ponedeljek'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/EasterTest.php b/tests/Slovenia/EasterTest.php index 33b21b852..6249dc4d1 100644 --- a/tests/Slovenia/EasterTest.php +++ b/tests/Slovenia/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Velika noč'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/IndependenceDayTest.php b/tests/Slovenia/IndependenceDayTest.php index ab11b0fb8..bf36a57f4 100644 --- a/tests/Slovenia/IndependenceDayTest.php +++ b/tests/Slovenia/IndependenceDayTest.php @@ -42,7 +42,7 @@ class IndependenceDayTest extends SloveniaBaseTestCase implements HolidayTestCas */ public function testIndependenceDay(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testIndependenceDayBefore1991(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan samostojnosti in enotnosti'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Slovenia/InternationalWorkersDayTest.php b/tests/Slovenia/InternationalWorkersDayTest.php index b163920eb..ff6211abd 100644 --- a/tests/Slovenia/InternationalWorkersDayTest.php +++ b/tests/Slovenia/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends SloveniaBaseTestCase implements Holida /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Praznik dela'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/LabourDayTest.php b/tests/Slovenia/LabourDayTest.php index 4b23a5adb..4e67ca574 100644 --- a/tests/Slovenia/LabourDayTest.php +++ b/tests/Slovenia/LabourDayTest.php @@ -33,11 +33,10 @@ class LabourDayTest extends SloveniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 2, self::TIMEZONE); + return static::generateRandomDates(5, 2, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Praznik dela (2. dan)'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/NewYearsDayTest.php b/tests/Slovenia/NewYearsDayTest.php index 8510050f7..506797eb6 100644 --- a/tests/Slovenia/NewYearsDayTest.php +++ b/tests/Slovenia/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends SloveniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Novo leto'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/PentecostTest.php b/tests/Slovenia/PentecostTest.php index 09f453e02..d584faba6 100644 --- a/tests/Slovenia/PentecostTest.php +++ b/tests/Slovenia/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Binkoštna nedelja'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/PreserenDayTest.php b/tests/Slovenia/PreserenDayTest.php index b865f182a..e50fff0cc 100644 --- a/tests/Slovenia/PreserenDayTest.php +++ b/tests/Slovenia/PreserenDayTest.php @@ -42,7 +42,7 @@ class PreserenDayTest extends SloveniaBaseTestCase implements HolidayTestCase */ public function testPreserenDay(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testPreserenDayBefore1991(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Prešernov dan, slovenski kulturni praznik'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Slovenia/ReformationDayTest.php b/tests/Slovenia/ReformationDayTest.php index f3017555c..1015a9af2 100644 --- a/tests/Slovenia/ReformationDayTest.php +++ b/tests/Slovenia/ReformationDayTest.php @@ -42,7 +42,7 @@ class ReformationDayTest extends SloveniaBaseTestCase implements HolidayTestCase */ public function testReformationDay(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testReformationDayBefore1992(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan reformacije'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Slovenia/RemembranceDayTest.php b/tests/Slovenia/RemembranceDayTest.php index 0b8d916a5..799a72717 100644 --- a/tests/Slovenia/RemembranceDayTest.php +++ b/tests/Slovenia/RemembranceDayTest.php @@ -33,11 +33,10 @@ class RemembranceDayTest extends SloveniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Dan spomina na mrtve'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/SecondNewYearsDayTest.php b/tests/Slovenia/SecondNewYearsDayTest.php index 2029c086e..8f834ace5 100644 --- a/tests/Slovenia/SecondNewYearsDayTest.php +++ b/tests/Slovenia/SecondNewYearsDayTest.php @@ -33,11 +33,10 @@ class SecondNewYearsDayTest extends SloveniaBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 2, self::TIMEZONE); + return static::generateRandomDates(1, 2, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Novo leto (2. dan)'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovenia/SloveniaTest.php b/tests/Slovenia/SloveniaTest.php index 324542ac6..5c564b6dd 100644 --- a/tests/Slovenia/SloveniaTest.php +++ b/tests/Slovenia/SloveniaTest.php @@ -37,7 +37,7 @@ class SloveniaTest extends SloveniaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1992); + $this->year = static::generateRandomYear(1992); } /** diff --git a/tests/Slovenia/StatehoodDayTest.php b/tests/Slovenia/StatehoodDayTest.php index f90d4bfa5..764dfd7b5 100644 --- a/tests/Slovenia/StatehoodDayTest.php +++ b/tests/Slovenia/StatehoodDayTest.php @@ -42,7 +42,7 @@ class StatehoodDayTest extends SloveniaBaseTestCase implements HolidayTestCase */ public function testStatehoodDay(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testStatehoodDayBefore1991(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan državnosti'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Slovenia/UprisingAgainstOccupationTest.php b/tests/Slovenia/UprisingAgainstOccupationTest.php index 9ece0c175..d481e5633 100644 --- a/tests/Slovenia/UprisingAgainstOccupationTest.php +++ b/tests/Slovenia/UprisingAgainstOccupationTest.php @@ -42,7 +42,7 @@ class UprisingAgainstOccupationTest extends SloveniaBaseTestCase implements Holi */ public function testUprisingAgainstOccupation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testUprisingAgainstOccupationBefore1945(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dan upora proti okupatorju'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 0f5e44b23..d068c1d0d 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -42,13 +42,12 @@ class ChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayTestCas /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Christmas Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 9b1e6bd11..6f3d96e03 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -42,13 +42,12 @@ class FamilyDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -66,13 +65,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -90,7 +89,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -104,7 +103,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Family Day'] ); } @@ -119,7 +118,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 40900f577..c182defed 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -42,13 +42,12 @@ class FreedomDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-4-27", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Freedom Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 35c26318f..6904730e2 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -42,13 +42,12 @@ class GoodFridayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -66,13 +65,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P2D')); $data[] = [$year, $date->format('Y-m-d')]; } @@ -90,7 +89,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -104,7 +103,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Good Friday'] ); } @@ -119,7 +118,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 5417b8f4f..690c19235 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -42,13 +42,12 @@ class HeritageDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-9-24", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Heritage Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index 3baf7d995..3bfbc6f9d 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -42,13 +42,12 @@ class HumanRightsDayTest extends SouthAfricaBaseTestCase implements HolidayTestC /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Human Rights Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 0cc8ef089..f88db38b8 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -64,7 +64,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayDayAfterCompletion(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); } /** @@ -88,7 +88,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), [self::LOCALE => '2016 Municipal Elections Day'] ); } @@ -103,7 +103,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index c8bbdc7ef..bfd0f7dd9 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -42,13 +42,12 @@ class NationalWomensDayTest extends SouthAfricaBaseTestCase implements HolidayTe /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-8-9", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'National Women’s Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index c3cd24cf7..87c65a80d 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -42,13 +42,12 @@ class NewYearsDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 1e0d784ad..0ba83c970 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -42,13 +42,12 @@ class ReconciliationDayTest extends SouthAfricaBaseTestCase implements HolidayTe /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-12-16", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Day of Reconciliation'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index f4e05c6c1..4569e3b92 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -42,13 +42,12 @@ class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements HolidayT /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Day of Goodwill'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index 559a4d1ac..4b189eb4a 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -39,7 +39,7 @@ class SouthAfricaTest extends SouthAfricaBaseTestCase implements ProviderTestCas */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1994); + $this->year = static::generateRandomYear(1994); } /** diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index d2cfdda1d..c63fa619a 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -64,7 +64,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayDayAfterCompletion(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR + 1)); } /** @@ -88,7 +88,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Day of Goodwill observed'] ); } @@ -103,7 +103,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index 762d1cc4f..7c75f6657 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -42,13 +42,12 @@ class WorkersDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Workers’ Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index c55a09ecc..df2d5992c 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -42,13 +42,12 @@ class YouthDayTest extends SouthAfricaBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -68,12 +67,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-6-16", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -91,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Youth Day'] ); } @@ -120,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 120393fb9..4c42d67e2 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -51,7 +51,7 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $date = (self::TEMPORARY_CHANGED_YEAR === $year) ? new \DateTime("{$year}-3-21", new \DateTimeZone(self::TIMEZONE)) : new \DateTime("{$year}-4-5", new \DateTimeZone(self::TIMEZONE)); @@ -74,7 +74,7 @@ public function testHolidayAfterRemoval(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::REMOVED_YEAR + 1) + static::generateRandomYear(self::REMOVED_YEAR + 1) ); } @@ -88,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -99,7 +99,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $translation = (self::TEMPORARY_CHANGED_YEAR === $year) ? '사방의 날' : '식목일'; $this->assertTranslatedHolidayName( @@ -117,7 +117,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $this->assertHolidayType( self::REGION, self::HOLIDAY, diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index 654e60592..c94c8d96f 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -47,7 +47,7 @@ class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements HolidayTestCa */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +66,7 @@ public function testHolidayAfterRemoval(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::REMOVED_YEAR + 1) + static::generateRandomYear(self::REMOVED_YEAR + 1) ); } @@ -80,7 +80,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), [self::LOCALE => '국군의 날'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index 693a27346..8f205defc 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -47,7 +47,7 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements HolidayTestC */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -59,13 +59,12 @@ public function testHoliday(): void /** * Tests substitute holidays. * - * @dataProvider SubstituteHolidayDataProvider - * * @param int $year the year for which the holiday defined in this test needs to be tested * @param ?string $expected the expected date * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('SubstituteHolidayDataProvider')] public function testSubstituteHoliday(int $year, ?string $expected): void { if ($expected) { @@ -94,7 +93,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -105,7 +104,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -121,7 +120,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertHolidayType( self::REGION, self::HOLIDAY, @@ -135,7 +134,7 @@ public function testHolidayType(): void * * @return array list of test dates for the holiday defined in this test */ - public function SubstituteHolidayDataProvider(): array + public static function SubstituteHolidayDataProvider(): array { return [ [1975, null], diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 60fd77933..0d9d184e9 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -42,7 +42,7 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -122,7 +122,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -136,7 +136,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '어린이날'] ); } @@ -151,7 +151,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index 99893a03e..3f3c231cc 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -42,7 +42,7 @@ class ChristmasDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -54,13 +54,12 @@ public function testHoliday(): void /** * Tests substitute holidays. * - * @dataProvider SubstituteHolidayDataProvider - * * @param int $year the year for which the holiday defined in this test needs to be tested * @param ?string $expected the expected date * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('SubstituteHolidayDataProvider')] public function testSubstituteHoliday(int $year, ?string $expected): void { if ($expected) { @@ -89,7 +88,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -103,7 +102,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '기독탄신일'] ); } @@ -118,7 +117,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } @@ -128,7 +127,7 @@ public function testHolidayType(): void * * @return array list of test dates for the holiday defined in this test */ - public function SubstituteHolidayDataProvider(): array + public static function SubstituteHolidayDataProvider(): array { return [ [1949, null], diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 77d9e7d74..fbc6b71a3 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -47,7 +47,7 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $date = new \DateTime(self::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)); // Chuseok @@ -166,7 +166,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -177,7 +177,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertTranslatedHolidayName( self::REGION, @@ -212,7 +212,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertHolidayType( self::REGION, diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 4bad0760e..a5422706c 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -47,7 +47,7 @@ class ConstitutionDayTest extends SouthKoreaBaseTestCase implements HolidayTestC */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +66,7 @@ public function testHolidayAfterRemoval(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::REMOVED_YEAR + 1) + static::generateRandomYear(self::REMOVED_YEAR + 1) ); } @@ -80,7 +80,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), [self::LOCALE => '제헌절'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index 20782fac3..87fd0c1b5 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -42,7 +42,7 @@ class GaecheonjeolTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -123,7 +123,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -137,7 +137,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '개천절'] ); } @@ -152,7 +152,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index cfbd01d68..9cfafe1fa 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -42,7 +42,7 @@ class HangulDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); if ($year > 1990 && $year <= 2012) { $this->assertNotHoliday( self::REGION, @@ -104,7 +104,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -115,7 +115,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); if ($year <= 1990 || $year > 2012) { $this->assertTranslatedHolidayName( self::REGION, @@ -133,7 +133,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); if ($year <= 1990 || $year > 2012) { $this->assertHolidayType( self::REGION, diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index 090f50a94..2e5727041 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -42,7 +42,7 @@ class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements Holi */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -103,7 +103,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -117,7 +117,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '삼일절'] ); } @@ -132,7 +132,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index 7c5b07e2a..b66b87e30 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -42,7 +42,7 @@ class LiberationDayTest extends SouthKoreaBaseTestCase implements HolidayTestCas */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -98,7 +98,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -112,7 +112,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '광복절'] ); } @@ -127,7 +127,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 7ec035c50..e46d9ddc4 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -42,7 +42,7 @@ class MemorialDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '현충일'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index b34e489f8..64961930f 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -42,7 +42,7 @@ class NewYearsDayTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)); // New Year's Day @@ -79,12 +79,12 @@ public function testHolidayAfterRemoval(): void $this->assertNotHoliday( self::REGION, 'dayAfterNewYearsDay', - $this->generateRandomYear(1999) + static::generateRandomYear(1999) ); $this->assertNotHoliday( self::REGION, 'twoDaysLaterNewYearsDay', - $this->generateRandomYear(1990) + static::generateRandomYear(1990) ); } @@ -98,7 +98,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -112,19 +112,19 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '새해'] ); $this->assertTranslatedHolidayName( self::REGION, 'dayAfterNewYearsDay', - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1998), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1998), [self::LOCALE => '새해 연휴'] ); $this->assertTranslatedHolidayName( self::REGION, 'twoDaysLaterNewYearsDay', - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1989), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1989), [self::LOCALE => '새해 연휴'] ); } @@ -139,19 +139,19 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); $this->assertHolidayType( self::REGION, 'dayAfterNewYearsDay', - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1998), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1998), Holiday::TYPE_OFFICIAL ); $this->assertHolidayType( self::REGION, 'twoDaysLaterNewYearsDay', - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1989), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1989), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 77169c208..c0c081bb4 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -47,7 +47,7 @@ class SeollalTest extends SouthKoreaBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $date = new \DateTime(self::LUNAR_HOLIDAY[self::HOLIDAY][$year], new \DateTimeZone(self::TIMEZONE)); if ($year >= 1985) { @@ -122,7 +122,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -133,7 +133,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertTranslatedHolidayName( self::REGION, @@ -165,7 +165,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::LUNAR_TEST_LIMIT); $this->assertHolidayType( self::REGION, diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 3de5f26cf..b1d0195fa 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -44,7 +44,7 @@ class SouthKoreaTest extends SouthKoreaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1949, self::LUNAR_TEST_LIMIT); + $this->year = static::generateRandomYear(1949, self::LUNAR_TEST_LIMIT); } /** diff --git a/tests/SouthKorea/UnitedNationsDayTest.php b/tests/SouthKorea/UnitedNationsDayTest.php index 0c7d65a8d..79fc9b5bd 100644 --- a/tests/SouthKorea/UnitedNationsDayTest.php +++ b/tests/SouthKorea/UnitedNationsDayTest.php @@ -47,7 +47,7 @@ class UnitedNationsDayTest extends SouthKoreaBaseTestCase implements HolidayTest */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +66,7 @@ public function testHolidayAfterRemoval(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::REMOVED_YEAR + 1) + static::generateRandomYear(self::REMOVED_YEAR + 1) ); } @@ -80,7 +80,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), [self::LOCALE => '유엔의 날'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 7a268763f..a888992e9 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día de todos los Santos'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index 28af2ce22..cd80d8e02 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -42,7 +42,7 @@ class AndalusiaDayTest extends AndalusiaBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de Andalucía'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 61c7fad3e..adb91d8b5 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -37,7 +37,7 @@ class AndalusiaTest extends AndalusiaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 16095e074..907b8b6ee 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -37,7 +37,7 @@ class AragonTest extends AragonBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index d88abb109..8699312df 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -37,7 +37,7 @@ class StGeorgesDayTest extends AragonBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'San Jorge'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index 63e9ad7e4..f09e2900b 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Asunción de la Virgen María'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index 3250f568b..4f4f04d81 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -42,7 +42,7 @@ class AsturiasDayTest extends AsturiasBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de Asturias'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index 601a34520..0727ebb59 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -37,7 +37,7 @@ class AsturiasTest extends AsturiasBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1984); + $this->year = static::generateRandomYear(1984); } /** diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index 6c515f5d6..ea0e917fb 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -42,7 +42,7 @@ class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements Holi */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de les Illes Balears'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 2c8bb1d66..8a139765d 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -37,7 +37,7 @@ class BalearicIslandsTest extends BalearicIslandsBaseTestCase implements Provide */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index 5ae19fe02..7749e6de6 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -47,7 +47,7 @@ class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements HolidayT */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -66,7 +66,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,7 +77,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayDayAfterAbolishment(): void { - $this->assertNotHoliday(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ABOLISHMENT_YEAR + 1)); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ABOLISHMENT_YEAR + 1)); } /** @@ -90,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR), [self::LOCALE => 'Euskadi Eguna'] ); } @@ -105,7 +105,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ABOLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index bd2b0adc0..78faad925 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -37,7 +37,7 @@ class BasqueCountryTest extends BasqueCountryBaseTestCase implements ProviderTes */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2011, 2013); + $this->year = static::generateRandomYear(2011, 2013); } /** diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index 343fa4305..647309602 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -42,7 +42,7 @@ class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements HolidayT */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de las Canarias'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 95acd1531..0be6630ae 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -37,7 +37,7 @@ class CanaryIslandsTest extends CanaryIslandsBaseTestCase implements ProviderTes */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1984); + $this->year = static::generateRandomYear(1984); } /** diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index c6614aeb4..78d21c730 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -42,7 +42,7 @@ class CantabriaDayTest extends CantabriaBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de Cantabria'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index 5a81d1472..0f93c62e9 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -37,7 +37,7 @@ class CantabriaTest extends CantabriaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index 58164c39d..58aca932c 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -42,7 +42,7 @@ class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements Holida */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de Castilla y León'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index 5d1da054c..4acb64e55 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -37,7 +37,7 @@ class CastileAndLeonTest extends CastileAndLeonBaseTestCase implements ProviderT */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index a41d9a0ee..3f3d4eaa2 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -42,7 +42,7 @@ class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements Ho */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Región Castilla-La Mancha'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 17b92310c..4b08d940a 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -37,7 +37,7 @@ class CastillaLaManchaTest extends CastillaLaManchaBaseTestCase implements Provi */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1984); + $this->year = static::generateRandomYear(1984); } /** diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 1861594dd..58e126091 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -37,7 +37,7 @@ class CataloniaTest extends CataloniaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index 573aa9761..dc787feba 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -42,7 +42,7 @@ class nationalCataloniaDayTest extends CataloniaBaseTestCase implements HolidayT */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [ 'es' => 'Diada Nacional de Cataluña', 'ca' => 'Diada Nacional de Catalunya', @@ -93,7 +93,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 29b364438..62dfd41f5 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -33,11 +33,10 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(6, 24, self::TIMEZONE); + return static::generateRandomDates(6, 24, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Sant Joan'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index 2f591d4e4..01598897f 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -37,7 +37,7 @@ class CeutaTest extends CeutaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index 759872f6c..f38baa957 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -42,7 +42,7 @@ class ceutaDayTest extends CeutaBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de Ceuta'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 32066ca82..d3d95b9c4 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -33,11 +33,10 @@ class ChristmasTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Navidad'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 7777decaa..ecc27265f 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -37,7 +37,7 @@ class CommunityOfMadridTest extends CommunityOfMadridBaseTestCase implements Pro */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index 298be2874..520e3e572 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -37,7 +37,7 @@ class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fiesta de la Comunidad de Madrid'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index d35f5ba32..18836afe4 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -42,7 +42,7 @@ class ConstitutionDayTest extends SpainBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Constitución'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index 6ac7b8c7c..b787e48d1 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -62,7 +62,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lunes de Pascua'] ); } @@ -74,6 +74,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index ab8f02d55..c75024883 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día de Reyes'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index c9dc8cecc..55e9c472c 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -42,7 +42,7 @@ class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements HolidayTestC */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de Extremadura'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 28df994bb..19d92c339 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -37,7 +37,7 @@ class ExtremaduraTest extends ExtremaduraBaseTestCase implements ProviderTestCas */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1985); + $this->year = static::generateRandomYear(1985); } /** diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index c0bb87ceb..52a237518 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -37,7 +37,7 @@ class GaliciaTest extends GaliciaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2000); + $this->year = static::generateRandomYear(2000); } /** diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index 777bcd555..4d0217fd0 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -42,7 +42,7 @@ class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements HolidayTe */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de las Letras Gallegas'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index ac1611f2b..67a179ec9 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -42,7 +42,7 @@ class stJamesDayTest extends GaliciaBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Santiago Apostol'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index 412ef2078..f0cd1c83c 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Viernes Santo'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 02ad08e21..cef91a431 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Inmaculada Concepción'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 381546796..69ca4aa13 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Día del Trabajador'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index 941d59dd0..e3cb38c83 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -42,7 +42,7 @@ class LaRiojaDayTest extends LaRiojaBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de La Rioja'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 438aa08e9..357860fdf 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -37,7 +37,7 @@ class LaRiojaTest extends LaRiojaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1983); + $this->year = static::generateRandomYear(1983); } /** diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index e87a078d5..4be064822 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -62,7 +62,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jueves Santo'] ); } @@ -74,6 +74,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index 2df6f290a..3261bf19b 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -37,7 +37,7 @@ class MelillaTest extends MelillaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index 8ff256561..8cfe8b244 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -42,7 +42,7 @@ class NationalDayTest extends SpainBaseTestCase implements HolidayTestCase */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Fiesta Nacional de España'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index 27a432177..72c34cb50 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -37,7 +37,7 @@ class NavarreTest extends NavarreBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index dd976ffc4..981c58dff 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Año Nuevo'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index 1d3e96a7c..a2eb20b42 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -42,7 +42,7 @@ class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements Holida */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Región de Murcia'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index 4aca1adad..fb6a7bf8a 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -37,7 +37,7 @@ class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase implements ProviderT */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index 138ac58ba..95aa25aae 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -37,7 +37,7 @@ class SpainTest extends SpainBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2000); + $this->year = static::generateRandomYear(2000); } /** diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index 2ccd1979c..6e75fcb43 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -42,7 +42,7 @@ class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implement */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Día de la Comunidad Valenciana'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 250eed204..b33d6490a 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -37,7 +37,7 @@ class ValencianCommunityTest extends ValencianCommunityBaseTestCase implements P */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1981); + $this->year = static::generateRandomYear(1981); } /** diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index f8f62e1ce..d7fb68b52 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -33,11 +33,10 @@ class ValentinesDayTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(2, 14, self::TIMEZONE); + return static::generateRandomDates(2, 14, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'San Valentín'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index c9486facf..1fa7d635d 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -39,11 +39,10 @@ class stJosephsDayTest extends SpainBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -56,9 +55,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -71,7 +70,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'San José'] ); } @@ -83,6 +82,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 20a953d3e..1e78af8f6 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,12 +49,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-10-31", new \DateTimeZone(self::TIMEZONE)); // Check between 31 October and 6th of November the day that is a Saturday @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'alla helgons dag'] ); } @@ -93,6 +92,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index 0e39d43f6..8c7b571d9 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -33,11 +33,10 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,12 +49,12 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::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 @@ -81,7 +80,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'alla helgons afton'] ); } @@ -93,6 +92,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 73a3e2ab9..6c5c5d44d 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Kristi himmelsfärdsdag'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 34260c4bb..e9e531c3e 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'juldagen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index 7f482ac9a..9d38a469f 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -33,11 +33,10 @@ class ChristmasEveTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 24, self::TIMEZONE); + return static::generateRandomDates(12, 24, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'julafton'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index 6f83ae143..4bbe84030 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'annandag påsk'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index 672536c38..0772dd902 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'påskdagen'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index b176aa514..c72be25e3 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -33,11 +33,10 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 5, self::TIMEZONE); + return static::generateRandomDates(1, 5, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'trettondagsafton'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index a5aa324b4..4cce84f13 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'trettondedag jul'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 3bdb55436..9e74a8441 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'långfredagen'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 5ee530f13..2c8951b39 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements HolidayT /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'första maj'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index deee76237..14b8ca95d 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1982), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1982), [self::LOCALE => 'Svenska flaggans dag'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } @@ -105,7 +105,7 @@ public function testTranslationOnAfterNameChange(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1983), + static::generateRandomYear(1983), [self::LOCALE => 'Sveriges nationaldag'] ); } diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index cacb086af..a2561ac02 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'nyårsdagen'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index e68f40f65..eee880798 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -33,11 +33,10 @@ class NewYearsEveTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 31, self::TIMEZONE); + return static::generateRandomDates(12, 31, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'nyårsafton'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index c678c0c48..3360df4ae 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'pingstdagen'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index f758ece0f..7ae9ca5bf 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -33,11 +33,10 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements HolidayTestCa /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'annandag jul'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index 8d11079d7..7ac8f16d0 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -38,7 +38,7 @@ class StJohnsDayTest extends SwedenBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -64,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'midsommardagen'] ); } @@ -76,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index bc3fd9474..452dbf9b8 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -38,7 +38,7 @@ class StJohnsEveTest extends SwedenBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -64,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'midsommarafton'] ); } @@ -76,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index f65bb7131..89ea1a41b 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -37,7 +37,7 @@ class SwedenTest extends SwedenBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1916); + $this->year = static::generateRandomYear(1916); } /** diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index 5d77696a1..9bdeabf59 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -33,11 +33,10 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(4, 30, self::TIMEZONE); + return static::generateRandomDates(4, 30, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'valborgsmässoafton'] ); } @@ -77,6 +76,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OBSERVANCE); } } diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index 4d0aa37b9..112474547 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -37,7 +37,7 @@ class AargauTest extends AargauBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -99,7 +99,17 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'ascensionDay', + 'christmasDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index a50fa2dfa..346cbd1c3 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 7cb3143f2..9aeca4d90 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends AargauBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index 6253c1094..ecb67a7b9 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index a965cbc13..8f13009b2 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends AargauBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 93ff9b2ca..a28813631 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -37,7 +37,7 @@ class AppenzellAusserrhodenTest extends AppenzellAusserrhodenBaseTestCase implem */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -102,7 +102,20 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index 22a94627a..e91534b35 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index 9a99af2c4..9144cd269 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Holi /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index 0f917abca..430110d29 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 97356ff5b..3d635e2fc 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index df4461d5c..9ced14de4 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Holid /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index cdb38081f..049087da8 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index 98a90e880..870bf6ccb 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Hol /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index 47cc54a26..27e631e00 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index 0afcec61a..0bba64d83 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -37,7 +37,7 @@ class AppenzellInnerrhodenTest extends AppenzellInnerrhodenBaseTestCase implemen */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -106,7 +106,24 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index da0afc714..17baf69f9 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index e562b67f6..aefba491b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements H /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index 21052c7b8..bc56c35f8 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Holid /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index 9a73a91ea..89290d205 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index ceca4b99a..cafa46df1 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index b3b3e2f2d..9aaeb96a6 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index d9503d306..2f49bb43c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends AppenzellInnerrhodenBaseTestCase implemen /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index a2656b600..25ca12d26 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Holida /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index 3205f7872..bffa47487 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 24846838c..a30553698 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Holi /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 6629d648c..65e680924 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index 8427b6a0d..69865626d 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -37,7 +37,7 @@ class BaselLandschaftTest extends BaselLandschaftBaseTestCase implements Provide */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 4fa03a888..439a3c0e3 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements HolidayTes /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index 6a22041ad..fac17c0b3 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index 512dc1f40..366d3258f 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 79661e15b..1c4feddbb 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements HolidayTest /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index 1fa7554ce..0962317a7 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index 25b46bb06..4decd4f22 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index 25c39aa44..9a0483faf 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends BaselLandschaftBaseTestCase implements HolidayTestC /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tag der Arbeit'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index b2a7f5183..dde38535e 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index 4784b004b..1cdf10930 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -37,7 +37,7 @@ class BaselStadtTest extends BaselStadtBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index 4fdabcec5..890c8c8dc 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index e8d9b1ac3..8ffc4fbc8 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index e662de553..71b884b3c 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index 88aa27f41..bcee90355 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index 004f4413e..6fc7fe14d 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 80da9d698..38c5678b3 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index b2d57fcab..27c1f2bcf 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends BaselStadtBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tag der Arbeit'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index d2d079d59..709fe4fc7 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index 00f0eda65..1a2338ce0 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends BernBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index fa2146930..919f458ad 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -37,7 +37,7 @@ class BernTest extends BernBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index a9359ffc8..bf66e8bbb 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends BernBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index b3835108c..4f78a864a 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index 86c12aca4..c2aa8f2dd 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 86b224272..f9e032c7e 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends BernBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index 06725f531..4fd2f75d8 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index 947addc3a..4ab6c3454 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends BernBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/AllSaintsDayTest.php b/tests/Switzerland/Fribourg/AllSaintsDayTest.php index c48862649..b714fc497 100644 --- a/tests/Switzerland/Fribourg/AllSaintsDayTest.php +++ b/tests/Switzerland/Fribourg/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Toussaint'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index ee2e4484e..505d26a10 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php index 01f945771..63a8aec15 100644 --- a/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Fribourg/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends FribourgBaseTestCase implements HolidayTestCa /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assomption'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php index 0b42eb76c..88a90874f 100644 --- a/tests/Switzerland/Fribourg/BerchtoldsTagTest.php +++ b/tests/Switzerland/Fribourg/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends FribourgBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jour de la Saint-Berthold'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 7aceb7221..cb8a3ee55 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/CorpusChristiTest.php b/tests/Switzerland/Fribourg/CorpusChristiTest.php index 23978581f..dc1ce015a 100644 --- a/tests/Switzerland/Fribourg/CorpusChristiTest.php +++ b/tests/Switzerland/Fribourg/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête-Dieu'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/December26thTest.php b/tests/Switzerland/Fribourg/December26thTest.php index 1fc7789ac..bb1d655bb 100644 --- a/tests/Switzerland/Fribourg/December26thTest.php +++ b/tests/Switzerland/Fribourg/December26thTest.php @@ -37,7 +37,7 @@ class December26thTest extends FribourgBaseTestCase implements HolidayTestCase */ public function testDecember26th(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => '26 décembre'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index 5bfc462cf..17728dd12 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index 9b7e90435..66fc345cb 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -37,7 +37,7 @@ class FribourgTest extends FribourgBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -107,7 +107,25 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'december26th', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index 4599ead84..682643a99 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php index d84853ede..a7f317790 100644 --- a/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Fribourg/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends FribourgBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Immaculée Conception'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index 15bc129c2..faa9526a6 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends FribourgBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nouvel An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index 2d141cc7d..f2484da06 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index 6858c1080..011c3ae38 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 96c3315f7..20aa8d8b4 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index a61f483c5..4d98c0f15 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index df632e0a2..45af127f2 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -37,7 +37,7 @@ class GenevaTest extends GenevaBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index 550be64a9..0cb2584ae 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index cc5869801..cf94fe5ae 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -38,7 +38,7 @@ class JeuneGenevoisTest extends GenevaBaseTestCase implements HolidayTestCase */ public function testJeuneGenevoisBetween1870And1965(): void { - $year = $this->generateRandomYear(1870, 1965); + $year = static::generateRandomYear(1870, 1965); // Find first Sunday of September $date = new \DateTime('First Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday @@ -55,7 +55,7 @@ public function testJeuneGenevoisBetween1870And1965(): void */ public function testJeuneGenevoisBetween1840And1869(): void { - $year = $this->generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); + $year = static::generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); // Find first Sunday of September $date = new \DateTime('First Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday @@ -72,7 +72,7 @@ public function testJeuneGenevoisBetween1840And1869(): void */ public function testJeuneGenevoisBefore1840(): void { - $year = $this->generateRandomYear(1000, Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -86,7 +86,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1966), + static::generateRandomYear(1966), [self::LOCALE => 'Jeûne genevois'] ); } @@ -101,7 +101,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1966), + static::generateRandomYear(1966), Holiday::TYPE_OTHER ); } diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index b7a69f5d2..f38688d8a 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends GenevaBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nouvel An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index feace8ccb..3cc909b6b 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index d3ee28e67..364f14ad7 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -37,7 +37,7 @@ class RestaurationGenevoiseTest extends GenevaBaseTestCase implements HolidayTes */ public function testRestaurationGenevoiseAfter1813(): void { - $year = $this->generateRandomYear(1814); + $year = static::generateRandomYear(1814); $this->assertHoliday( self::REGION, @@ -57,7 +57,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1814), + static::generateRandomYear(1814), [self::LOCALE => 'Restauration de la République'] ); } @@ -69,6 +69,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1814), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1814), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 95858b0bb..41c4ff839 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index fbee216c4..6c1acb248 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index 683beaae4..217756196 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends GlarusBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index 784abaf34..4029e623a 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index 10d97f088..10f29b0c9 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index bb96c6144..76c0da5b1 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -37,7 +37,7 @@ class GlarusTest extends GlarusBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -105,7 +105,23 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'nafelserFahrt', + 'ascensionDay', + 'pentecostMonday', + 'allSaintsDay', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index c79e69fa6..893136274 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index e14398a68..52701ab25 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -42,7 +42,7 @@ class NafelserFahrtTest extends GlarusBaseTestCase implements HolidayTestCase */ public function testNafelserFahrtOnAfter1389(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime('First Thursday of ' . $year . '-04', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -55,7 +55,7 @@ public function testNafelserFahrtOnAfter1389(): void */ public function testNafelserFahrtBefore1389(): void { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -69,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Näfelser Fahrt'] ); } @@ -84,7 +84,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OTHER ); } diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index f1d5ad1d4..3a51f8201 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends GlarusBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index d502ff6e0..912e6963a 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 14108408c..a4af73624 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends GlarusBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index 181efa7a4..b84512581 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 0887c8811..eeb4eeb26 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index d8d10c6ba..e75a2f595 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index ae5fe2fd3..409c68504 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index ff06e5c9f..850a27b60 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -37,7 +37,7 @@ class GrisonsTest extends GrisonsBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -102,7 +102,20 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index 5c209919b..e53049650 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index dc8cf44aa..2e2213040 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index 7788bc021..13a8c9697 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends GrisonsBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index eb1de386f..4916d1a6d 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Toussaint'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index 9830c0048..567749a57 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index ae9a928cc..49cff7116 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assomption'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Jura/BerchtoldsTagTest.php b/tests/Switzerland/Jura/BerchtoldsTagTest.php index aef947155..bb8ace892 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends JuraBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jour de la Saint-Berthold'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index 5add3a5d5..4818d3171 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -37,7 +37,7 @@ class BettagsMontagTest extends JuraBaseTestCase implements HolidayTestCase */ public function testBettagsMontagOnAfter1832(): void { - $year = $this->generateRandomYear(1832); + $year = static::generateRandomYear(1832); // Find third Sunday of September $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); @@ -54,7 +54,7 @@ public function testBettagsMontagOnAfter1832(): void */ public function testBettagsMontagBefore1832(): void { - $year = $this->generateRandomYear(1000, 1831); + $year = static::generateRandomYear(1000, 1831); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -68,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1832), + static::generateRandomYear(1832), [self::LOCALE => 'Jeûne fédéral'] ); } @@ -80,6 +80,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1900), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index a62f0ca26..b4ffd4825 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index b3aeab343..e9565961d 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête-Dieu'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index bd50b247f..7b55239d6 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/EasterTest.php b/tests/Switzerland/Jura/EasterTest.php index 6061cf1b2..d695bdbad 100644 --- a/tests/Switzerland/Jura/EasterTest.php +++ b/tests/Switzerland/Jura/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pâques'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index eeca407ed..67dff4339 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index bc124b602..619b7b300 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -37,7 +37,7 @@ class JuraTest extends JuraBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1975); + $this->year = static::generateRandomYear(1975); } /** @@ -110,7 +110,28 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easter', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecost', + 'pentecostMonday', + 'corpusChristi', + 'plebisciteJurassien', + 'assumptionOfMary', + 'bettagsMontag', + 'allSaintsDay', + 'christmasDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 2c2030ed9..d61d3ac03 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends JuraBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nouvel An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index ae951bd86..8b96ade8c 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/PentecostTest.php b/tests/Switzerland/Jura/PentecostTest.php index 6849018eb..d9e1a30e8 100644 --- a/tests/Switzerland/Jura/PentecostTest.php +++ b/tests/Switzerland/Jura/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pentecôte'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index a83f25604..d451a6fe6 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -42,7 +42,7 @@ class PlebisciteJurassienTest extends JuraBaseTestCase implements HolidayTestCas */ public function testInstaurationRepubliqueOnAfter1975(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testInstaurationRepubliqueBefore1975(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Commémoration du plébiscite jurassien'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OTHER ); } diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index c52fd08d2..fb614a9dd 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends JuraBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête du Travail'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index 74e315009..f1e6c6331 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index 075e072a7..1cea654d6 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index fd322448a..e9d7ec383 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements HolidayTestCas /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php index 0656d8e3f..8b34adbf2 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends LucerneBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index f1a3a930a..3013101eb 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index b144c3735..25edd2d2e 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index 598f2d64e..bdf05c44d 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index cc1406989..9361c9994 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 03a706d97..7f9c609db 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements HolidayTes /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index 7eed3f6ed..b49fde147 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -37,7 +37,7 @@ class LucerneTest extends LucerneBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -107,7 +107,25 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index ac6c8d35a..be1e5ab77 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends LucerneBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index a4fab9977..62e0e3924 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index 375e7f709..5c33a610f 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends LucerneBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index 7466e713c..3f5ebefe5 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index a3346a4b1..376558f47 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -37,7 +37,7 @@ class BettagsMontagTest extends NeuchatelBaseTestCase implements HolidayTestCase */ public function testBettagsMontagOnAfter1832(): void { - $year = $this->generateRandomYear(1832); + $year = static::generateRandomYear(1832); // Find third Sunday of September $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); @@ -54,7 +54,7 @@ public function testBettagsMontagOnAfter1832(): void */ public function testBettagsMontagBefore1832(): void { - $year = $this->generateRandomYear(1000, 1831); + $year = static::generateRandomYear(1000, 1831); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -68,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1832), + static::generateRandomYear(1832), [self::LOCALE => 'Jeûne fédéral'] ); } @@ -80,6 +80,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1900), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 4e0f4115a..1037f4a6f 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 2c03c7eee..304a1ac63 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index ced41c4cd..7213ff589 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 891539ebc..94080d9a9 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -42,7 +42,7 @@ class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements Holida */ public function testInstaurationRepubliqueOnAfter1849(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testInstaurationRepubliqueBefore1849(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Instauration de la République'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OTHER ); } diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index a49ec55e7..912a34bb6 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -37,7 +37,7 @@ class NeuchatelTest extends NeuchatelBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -104,7 +104,22 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'instaurationRepublique', + 'goodFriday', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'bettagsMontag', + 'christmasDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index ea229bc65..7058aa0ce 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nouvel An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index e8a3ba0e8..71b9431a8 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index a9ec86c4c..ba8c82cde 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends NeuchatelBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête du Travail'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index b40e6a600..63bb2590f 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index 5aa857f5b..a4d06b017 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index 3f22b8e77..87adedac7 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements HolidayTestC /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 047f1e6a2..063d85bc3 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index 84bbf10aa..f48fc8e61 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index c8f8824b3..93ac66c8a 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index 09b3f91ea..8fe75839d 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index 770504a2e..55ac472a8 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements HolidayT /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index eda1b663b..02ffe4389 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index 9e21431b3..61e19d611 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -37,7 +37,7 @@ class NidwaldenTest extends NidwaldenBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -107,7 +107,25 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'stJosephsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index 31fa88199..1c747498e 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 14cbc40bb..22dcb1396 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -36,11 +36,10 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephDayDataProvider')] public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephDayDataProvider(): array + public static function StJosephDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 8625aa837..dfd3e46ad 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index b8fb3cade..f8630f3cc 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index 107b18c14..9a0b233e7 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index 2074e04b4..3dd55f851 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements HolidayTestCa /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php index 70d9cad04..671526f0b 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends ObwaldenBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index 131b2ed19..3d0633d37 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -37,7 +37,7 @@ class BruderKlausenFestTest extends ObwaldenBaseTestCase implements HolidayTestC */ public function testBruderKlausenFestOnAfter1947(): void { - $year = $this->generateRandomYear(1947); + $year = static::generateRandomYear(1947); $date = new \DateTime($year . '-09-25', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -51,7 +51,7 @@ public function testBruderKlausenFestOnAfter1947(): void */ public function testBruderKlausenFestBetween1649And1946(): void { - $year = $this->generateRandomYear(1649, 1946); + $year = static::generateRandomYear(1649, 1946); $date = new \DateTime($year . '-09-21', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -65,7 +65,7 @@ public function testBruderKlausenFestBetween1649And1946(): void */ public function testBruderKlausenFestBefore1648(): void { - $year = $this->generateRandomYear(1000, 1648); + $year = static::generateRandomYear(1000, 1648); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -79,7 +79,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1947), + static::generateRandomYear(1947), [self::LOCALE => 'Bruder-Klausen-Fest'] ); } @@ -91,6 +91,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1947), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1947), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 3c13ebf66..94d566c2b 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index ccc901002..247185fe1 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index 5c4448894..f0b8e55a5 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index fc428f706..b5ac0d96a 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 274eef306..c83baba2e 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements HolidayTe /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index 25a591d05..e2f5eb4e0 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index ea751f847..4019ca369 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -37,7 +37,7 @@ class ObwaldenTest extends ObwaldenBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -108,7 +108,26 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'bruderKlausenFest', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index e6d19b669..6262f7bf6 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 3e3bc8cdd..849899936 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index 99f808b6c..2394fb019 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index c5d6ae89e..58417e6d0 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements HolidayTestC */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index ac23d3917..6190e3b1c 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements HolidayTestCa /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index 135c71717..cdb29bae0 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index 5f803117e..88de4e1c0 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 49aced36e..6c39687dc 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements HolidayTestCas /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index bb88e7d90..7efe7fd7e 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index d3459de9a..f002d742c 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -37,7 +37,7 @@ class SchaffhausenTest extends SchaffhausenBaseTestCase implements ProviderTestC */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -104,7 +104,22 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 14eb411c4..402591271 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements HolidayTestC /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index de9eda03e..2a28a0f48 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends SchaffhausenBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tag der Arbeit'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index 08d0a4259..688fddd5c 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index 1ab58768e..1fd0c8dd7 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index efcaf0c14..3247d7f03 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index a504647fa..dced19bbf 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index 86d6a4e5d..27e555d43 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index ca2718c2e..4eeca9c4d 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 31d949230..4c231a15c 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends SchwyzBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Heilige Drei Könige'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index 258ae5556..8a4d032db 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index 374c8044e..dd9b6b001 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index aad546c50..e8595645e 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index 408454147..3958008a2 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index a3a58726e..9b0d8c140 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -37,7 +37,7 @@ class SchwyzTest extends SchwyzBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -108,7 +108,26 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'epiphany', + 'stJosephsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index 0dd5fb206..34ecdceba 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -36,11 +36,10 @@ class StJosephDayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephDayDataProvider')] public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephDayDataProvider(): array + public static function StJosephDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 2fb0f21a4..eff31c2e9 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends SchwyzBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index 0806a6e66..680f0b64d 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index f2cb96075..956434d1a 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends SolothurnBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 96d07373e..82bac1b0d 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 007245242..eab8a71ed 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index ce8a84c88..356facaf2 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index d70d647d6..dc9063356 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -37,7 +37,7 @@ class SolothurnTest extends SolothurnBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -101,7 +101,18 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'ascensionDay', + 'christmasDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index a755a177a..a6214af67 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index 6d302c7a8..da238eba3 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 7f20f9c07..08659bc8c 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends StGallenBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index 33c036240..10e2e0fb9 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index df5c6f09c..75950e560 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index 66f459689..ee08d1e89 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends StGallenBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index 7ca42ecfe..b942a2d33 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index 2e12d67f9..b6ac5a699 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -37,7 +37,7 @@ class StGallenTest extends StGallenBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'allSaintsDay', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index c7fabc077..e3ea5f4ae 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends StGallenBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index 0ad03a653..d306d2063 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -52,7 +52,7 @@ class SwissNationalDayTest extends SwitzerlandBaseTestCase implements HolidayTes */ public function testNationalDayOnAfter1994(): void { - $year = $this->generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -68,7 +68,7 @@ public function testNationalDayOnAfter1994(): void */ public function testNationalDayOnAfter1899(): void { - $year = $this->generateRandomYear(self::FIRST_ESTABLISHMENT_YEAR, self::NATIONAL_ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(self::FIRST_ESTABLISHMENT_YEAR, self::NATIONAL_ESTABLISHMENT_YEAR - 1); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -105,7 +105,7 @@ public function testNationalDayBefore1891(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::FIRST_OBSERVANCE_YEAR - 1) + static::generateRandomYear(1000, self::FIRST_OBSERVANCE_YEAR - 1) ); } @@ -116,7 +116,7 @@ public function testNationalDayBefore1891(): void */ public function testNationalDayBetween1891And1899(): void { - $year = $this->generateRandomYear(self::FIRST_OBSERVANCE_YEAR + 1, self::FIRST_ESTABLISHMENT_YEAR - 1); + $year = static::generateRandomYear(self::FIRST_OBSERVANCE_YEAR + 1, self::FIRST_ESTABLISHMENT_YEAR - 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -130,7 +130,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR), + static::generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR), [self::LOCALE => 'Bundesfeiertag'] ); } @@ -145,7 +145,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR), + static::generateRandomYear(self::NATIONAL_ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index 033526988..f9cbfbccd 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -37,7 +37,7 @@ class SwitzerlandTest extends SwitzerlandBaseTestCase implements ProviderTestCas */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index 18f669e5d..353865f76 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index 723363693..a947a13a1 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends ThurgauBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index a33416b9c..da918cadd 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index ff8eb71f2..a836510fe 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index 1747b901d..b32d65efc 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index db1a7882d..fc7792dd6 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index 815512f29..d9f3609c1 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index fc2df5c49..d6b6ce9cb 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index ab5f0ab8f..948ec16b7 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -37,7 +37,7 @@ class ThurgauTest extends ThurgauBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -104,7 +104,22 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index a018474e9..e81fc28ff 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends ThurgauBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tag der Arbeit'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 4ce18bd7c..fb780940d 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ognissanti'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index ba11c4e25..aea3c5600 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascensione'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 20f6d7ed5..696213f2c 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assunzione'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index f6c048759..917ff421d 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Natale'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index 2cfda0b34..12af645cf 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Corpus Domini'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index b8a0b9062..b9be12cdc 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lunedi di Pasqua'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 963ff29c7..3b9609881 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends TicinoBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Epifania'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index 891f25a0b..b4830d6d9 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Immacolata Concezione'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index 0fec8e2f7..5afdd249a 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Capodanno'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index 4cef858a9..3346bd32a 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lunedi di Pentecoste'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 6d880658d..37397f492 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -36,11 +36,10 @@ class StJosephDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephDayDataProvider')] public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephDayDataProvider(): array + public static function StJosephDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'San Giuseppe'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index 35cf05e8e..5d7ffae1d 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -33,11 +33,10 @@ class StPeterPaulTest extends TicinoBaseTestCase implements HolidayTestCase /** * Tests Feast of Saints Peter and Paul. * - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('StPeterPaulDataProvider')] public function testStPeterPaul(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testStPeterPaul(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StPeterPaulDataProvider(): array + public static function StPeterPaulDataProvider(): array { - return $this->generateRandomDates(6, 29, self::TIMEZONE); + return static::generateRandomDates(6, 29, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Santi Pietro e Paolo'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index c0b655bbb..8039fc51e 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Santo Stefano'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index a417de495..92e449f99 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -37,7 +37,7 @@ class TicinoTest extends TicinoBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -109,7 +109,27 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'epiphany', + 'stJosephsDay', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'stPeterPaul', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index 6e5f54eb9..ab935539c 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends TicinoBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Festa dei lavoratori'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index 03e43e8df..28e281f4e 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 8a9624795..ea93292be 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index da6e08954..9db396279 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index 30bef6d7a..4d32bcdb9 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index a335cb60b..c3da48b4f 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index e4415792c..f77596a12 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index d134a3b46..acfb6910d 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -33,11 +33,10 @@ class EpiphanyTest extends UriBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 6, self::TIMEZONE); + return static::generateRandomDates(1, 6, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Heilige Drei Könige'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index fe111f3e5..565ccd624 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 7fd5aadd8..d67583e0d 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 1bc0e7cc6..ae7c13132 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index f50ec5311..9461ddd63 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 970a5034e..9afa9fab6 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -36,11 +36,10 @@ class StJosephDayTest extends UriBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephDayDataProvider')] public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephDayDataProvider(): array + public static function StJosephDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Josephstag'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 65f1c9f3d..10a62ac0f 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends UriBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index 7109b1291..61223abf7 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -37,7 +37,7 @@ class UriTest extends UriBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -108,7 +108,26 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'epiphany', + 'stJosephsDay', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 8505d6ae8..558ffe05b 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Toussaint'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index a2c60bafc..3f265ae6e 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 8bc1749eb..7e0287513 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Assomption'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index f4b2c8a2e..5cf57bb9f 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index a9b131272..9d139e047 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fête-Dieu'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index e73d6a6bb..5ef326320 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements HolidayTest /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Immaculée Conception'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 7bf9c9225..9037da167 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nouvel An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index 142d66906..77a84cc0e 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -36,11 +36,10 @@ class StJosephDayTest extends ValaisBaseTestCase implements HolidayTestCase /** * Tests St. Joseph's Day. * - * @dataProvider StJosephDayDataProvider - * * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('StJosephDayDataProvider')] public function testStJosephDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,9 +52,9 @@ public function testStJosephDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function StJosephDayDataProvider(): array + public static function StJosephDayDataProvider(): array { - return $this->generateRandomDates(3, 19, self::TIMEZONE); + return static::generateRandomDates(3, 19, self::TIMEZONE); } /** @@ -68,7 +67,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Saint-Joseph'] ); } @@ -80,6 +79,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index 3d020159f..fd1b5ca80 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -37,7 +37,7 @@ class ValaisTest extends ValaisBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'stJosephsDay', + 'ascensionDay', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index 4b74bb6da..fe45b7d2c 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ascension'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index e57b317fc..f8782f4b7 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends VaudBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Jour de la Saint-Berthold'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 83a80a545..50f21141a 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -37,7 +37,7 @@ class BettagsMontagTest extends VaudBaseTestCase implements HolidayTestCase */ public function testBettagsMontagOnAfter1832(): void { - $year = $this->generateRandomYear(1832); + $year = static::generateRandomYear(1832); // Find third Sunday of September $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); @@ -54,7 +54,7 @@ public function testBettagsMontagOnAfter1832(): void */ public function testBettagsMontagBefore1832(): void { - $year = $this->generateRandomYear(1000, 1831); + $year = static::generateRandomYear(1000, 1831); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -68,7 +68,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1832), + static::generateRandomYear(1832), [self::LOCALE => 'Jeûne fédéral'] ); } @@ -80,6 +80,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1900), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1900), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 860ef7fa9..4544b24c5 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Noël'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index e0de0d97c..315854d5a 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pâques'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index 33945dbc1..da34d7834 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Vendredi Saint'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index a38cb2f07..e37a0b45e 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends VaudBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Nouvel An'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index cc076e860..76866875d 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Lundi de Pentecôte'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index 5774ad5ff..c2456f903 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -37,7 +37,7 @@ class VaudTest extends VaudBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'bettagsMontag', + 'christmasDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 981350b42..ef451414b 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -33,11 +33,10 @@ class AllSaintsDayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests All Saints' Day. * - * @dataProvider AllSaintsDayDataProvider - * * @param int $year the year for which All Saints' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AllSaintsDayDataProvider')] public function testAllSaintsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Allerheiligen'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AllSaintsDayDataProvider(): array + public static function AllSaintsDayDataProvider(): array { - return $this->generateRandomDates(11, 1, self::TIMEZONE); + return static::generateRandomDates(11, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index 8f345d441..94a260a5e 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 6cd622291..f5d2d358c 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -33,11 +33,10 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests the day of the Assumption of Mary. * - * @dataProvider AssumptionOfMaryDataProvider - * * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('AssumptionOfMaryDataProvider')] public function testAssumptionOfMary(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Himmelfahrt'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function AssumptionOfMaryDataProvider(): array + public static function AssumptionOfMaryDataProvider(): array { - return $this->generateRandomDates(8, 15, self::TIMEZONE); + return static::generateRandomDates(8, 15, self::TIMEZONE); } } diff --git a/tests/Switzerland/Zug/BerchtoldsTagTest.php b/tests/Switzerland/Zug/BerchtoldsTagTest.php index 76978368e..1b5b69a88 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -37,7 +37,7 @@ class BerchtoldsTagTest extends ZugBaseTestCase implements HolidayTestCase */ public function testBerchtoldsTag(): void { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); @@ -54,7 +54,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Berchtoldstag'] ); } @@ -66,6 +66,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 4644f36b9..4a05226dc 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index 0e3712b49..a0c648ee7 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -45,7 +45,7 @@ public function testCorpusChristi(): void self::REGION, self::HOLIDAY, $year, - $this->calculateEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) + static::computeEaster($year, self::TIMEZONE)->add(new \DateInterval('P60D')) ); } @@ -59,7 +59,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Fronleichnam'] ); } @@ -71,6 +71,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index d8af29a28..494e8ae41 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index a7bc2afb0..b4b5f8d1a 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 46f91b6bf..e8a49be85 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -33,11 +33,10 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements HolidayTestCas /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 8, self::TIMEZONE); + return static::generateRandomDates(12, 8, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mariä Empfängnis'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index 94b56f992..f8fdb9014 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends ZugBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index ecaef9656..277525ffc 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 27f5e29e6..d02d73979 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends ZugBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index d8d0dbbd2..18cb177e5 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -37,7 +37,7 @@ class ZugTest extends ZugBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -107,7 +107,25 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'berchtoldsTag', + 'goodFriday', + 'easterMonday', + 'ascensionDay', + 'pentecostMonday', + 'corpusChristi', + 'assumptionOfMary', + 'allSaintsDay', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index e75c50900..1baaf7b7d 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Auffahrt'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 0eb49d037..24c4a3eee 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -33,11 +33,10 @@ class ChristmasDayTest extends ZurichBaseTestCase implements HolidayTestCase /** * Tests Christmas Day. * - * @dataProvider ChristmasDayDataProvider - * * @param int $year the year for which Christmas Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('ChristmasDayDataProvider')] public function testChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testChristmasDay(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function ChristmasDayDataProvider(): array + public static function ChristmasDayDataProvider(): array { - return $this->generateRandomDates(12, 25, self::TIMEZONE); + return static::generateRandomDates(12, 25, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Weihnachtstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index 825154d8f..14b76915c 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Ostermontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index fc0c485be..a38be3ed4 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Karfreitag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 620f1f22c..546aa6b47 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends ZurichBaseTestCase implements HolidayTestCase /** * Tests New Years Day. * - * @dataProvider NewYearsDayDataProvider - * * @param int $year the year for which New Years Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('NewYearsDayDataProvider')] public function testNewYearsDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Neujahr'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OTHER); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function NewYearsDayDataProvider(): array + public static function NewYearsDayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } } diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index 62f225e16..8acf77c8e 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Pfingstmontag'] ); } @@ -68,6 +68,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index 419350f13..c3a7d18a6 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -33,11 +33,10 @@ class StStephensDayTest extends ZurichBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(12, 26, self::TIMEZONE); + return static::generateRandomDates(12, 26, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Stephanstag'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index a29f45a5b..6a7e47716 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -33,13 +33,12 @@ class WorkersDayTest extends ZurichBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -53,12 +52,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-5-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -76,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Tag der Arbeit'] ); } @@ -88,6 +87,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, static::generateRandomYear(), Holiday::TYPE_OTHER); } } diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index ebcf5225f..4d3ffe526 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -37,7 +37,7 @@ class ZurichTest extends ZurichBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1945); + $this->year = static::generateRandomYear(1945); } /** @@ -103,7 +103,21 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'newYearsDay', + 'goodFriday', + 'easterMonday', + 'internationalWorkersDay', + 'ascensionDay', + 'pentecostMonday', + 'christmasDay', + 'stStephensDay', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/Turkey/CommemorationOfAtaturkTest.php b/tests/Turkey/CommemorationOfAtaturkTest.php index 1be93d74f..394cc60a7 100644 --- a/tests/Turkey/CommemorationOfAtaturkTest.php +++ b/tests/Turkey/CommemorationOfAtaturkTest.php @@ -35,7 +35,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -44,7 +44,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Atatürk’ü Anma, Gençlik ve Spor Bayramı'] ); } @@ -71,6 +71,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Turkey/DemocracyDayTest.php b/tests/Turkey/DemocracyDayTest.php index 72d9f0e34..b60131bd6 100644 --- a/tests/Turkey/DemocracyDayTest.php +++ b/tests/Turkey/DemocracyDayTest.php @@ -32,7 +32,7 @@ class DemocracyDayTest extends TurkeyBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, @@ -50,7 +50,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -62,7 +62,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Demokrasi ve Millî Birlik Günü'] ); } @@ -75,7 +75,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Turkey/LabourDayTest.php b/tests/Turkey/LabourDayTest.php index 679fed015..ea52715c4 100644 --- a/tests/Turkey/LabourDayTest.php +++ b/tests/Turkey/LabourDayTest.php @@ -25,11 +25,10 @@ class LabourDayTest extends TurkeyBaseTestCase implements HolidayTestCase public const HOLIDAY = 'labourDay'; /** - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -43,7 +42,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Emek ve Dayanışma Günü'] ); } @@ -56,7 +55,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OFFICIAL ); } @@ -66,8 +65,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Turkey/NationalSovereigntyDayTest.php b/tests/Turkey/NationalSovereigntyDayTest.php index 799b8ee6c..728efae56 100644 --- a/tests/Turkey/NationalSovereigntyDayTest.php +++ b/tests/Turkey/NationalSovereigntyDayTest.php @@ -39,7 +39,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -48,7 +48,7 @@ public function testHolidayBeforeEstablishment(): void */ public function testHolidayOnAfterEstablishment(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -65,7 +65,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::NAME_CHANGED_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::NAME_CHANGED_YEAR - 1), [self::LOCALE => 'Ulusal Egemenlik Bayramı'] ); } @@ -78,7 +78,7 @@ public function testTranslationOnAfterNameChange(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::NAME_CHANGED_YEAR), + static::generateRandomYear(self::NAME_CHANGED_YEAR), [self::LOCALE => 'Ulusal Egemenlik ve Çocuk Bayramı'] ); } @@ -88,6 +88,6 @@ public function testTranslationOnAfterNameChange(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Turkey/NewYearsDayTest.php b/tests/Turkey/NewYearsDayTest.php index 619092cac..ce64006c1 100644 --- a/tests/Turkey/NewYearsDayTest.php +++ b/tests/Turkey/NewYearsDayTest.php @@ -25,11 +25,10 @@ class NewYearsDayTest extends TurkeyBaseTestCase implements HolidayTestCase public const HOLIDAY = 'newYearsDay'; /** - * @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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -40,9 +39,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Yılbaşı'] ); } @@ -63,6 +62,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Turkey/RepublicDayTest.php b/tests/Turkey/RepublicDayTest.php index 0781ac68c..afdde07d8 100644 --- a/tests/Turkey/RepublicDayTest.php +++ b/tests/Turkey/RepublicDayTest.php @@ -32,7 +32,7 @@ class RepublicDayTest extends TurkeyBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, @@ -50,7 +50,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) ); } @@ -62,7 +62,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Cumhuriyet Bayramı'] ); } @@ -75,7 +75,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Turkey/TurkeyTest.php b/tests/Turkey/TurkeyTest.php index 69a157462..83deafecd 100644 --- a/tests/Turkey/TurkeyTest.php +++ b/tests/Turkey/TurkeyTest.php @@ -32,7 +32,7 @@ class TurkeyTest extends TurkeyBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } public function testOfficialHolidays(): void diff --git a/tests/Turkey/VictoryDayTest.php b/tests/Turkey/VictoryDayTest.php index 90962c4bb..0e66d914f 100644 --- a/tests/Turkey/VictoryDayTest.php +++ b/tests/Turkey/VictoryDayTest.php @@ -34,7 +34,7 @@ class VictoryDayTest extends TurkeyBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(self::CELEBRATION_YEAR); + $year = static::generateRandomYear(self::CELEBRATION_YEAR); $this->assertHoliday( self::REGION, @@ -52,7 +52,7 @@ public function testHolidayBeforeCelebration(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::CELEBRATION_YEAR - 1) + static::generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::CELEBRATION_YEAR - 1) ); } @@ -64,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::CELEBRATION_YEAR), + static::generateRandomYear(self::CELEBRATION_YEAR), [self::LOCALE => 'Zafer Bayramı'] ); } @@ -77,7 +77,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } @@ -90,7 +90,7 @@ public function testHolidayTypeBeforeEstablishment(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::CELEBRATION_YEAR, self::ESTABLISHMENT_YEAR - 1), + static::generateRandomYear(self::CELEBRATION_YEAR, self::ESTABLISHMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index ee433edc9..0e9341653 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -90,7 +90,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas'] ); } @@ -102,6 +102,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index b298257a6..c548ae521 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -43,7 +43,7 @@ class ColumbusDayTest extends USABaseTestCase implements HolidayTestCase */ public function testColumbusDayOnAfter1970(): void { - $year = $this->generateRandomYear(1970); + $year = static::generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -60,7 +60,7 @@ public function testColumbusDayOnAfter1970(): void */ public function testColumbusBetween1937And1969(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1969); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1969); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -80,7 +80,7 @@ public function testColumbusDayBefore1937(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Columbus Day'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index fbfd5a013..fb203bcea 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -93,7 +93,7 @@ public function testIndependenceDayBefore1776(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -107,7 +107,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Independence Day'] ); } @@ -122,7 +122,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/JuneteenthTest.php b/tests/USA/JuneteenthTest.php index 250fa5072..a7f2e0997 100644 --- a/tests/USA/JuneteenthTest.php +++ b/tests/USA/JuneteenthTest.php @@ -93,7 +93,7 @@ public function testJuneteenthBefore2021(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -107,7 +107,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Juneteenth'] ); } @@ -122,7 +122,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 3f2b442fd..87f519f46 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -42,7 +42,7 @@ class LabourDayTest extends USABaseTestCase implements HolidayTestCase */ public function testLabourDayOnAfter1887(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testLabourDayBefore1887(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Labor Day'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index a9154259f..7791e013f 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -43,7 +43,7 @@ class MartinLutherKingDayTest extends USABaseTestCase implements HolidayTestCase */ public function testMartinLutherKingDayOnAfter1986(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testMartinLutherKingDayBefore1986(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Dr. Martin Luther King Jr’s Birthday'] ); } @@ -92,7 +92,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index e2aa847f9..0f01420ea 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -43,7 +43,7 @@ class MemorialDayTest extends USABaseTestCase implements HolidayTestCase */ public function testMemorialDayOnAfter1968(): void { - $year = $this->generateRandomYear(1968); + $year = static::generateRandomYear(1968); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -60,7 +60,7 @@ public function testMemorialDayOnAfter1968(): void */ public function testMemorialDayBetween1865And1967(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -80,7 +80,7 @@ public function testMemorialDayBefore1865(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Memorial Day'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/NYSE/NYSETest.php b/tests/USA/NYSE/NYSETest.php index 9e760c384..e222a9c1c 100644 --- a/tests/USA/NYSE/NYSETest.php +++ b/tests/USA/NYSE/NYSETest.php @@ -45,7 +45,7 @@ class NYSETest extends USABaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(2000); + $this->year = static::generateRandomYear(2000); } /** diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index 766eedd3b..d6900631e 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -89,7 +89,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'New Year’s Day'] ); } @@ -101,6 +101,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index e81539af8..5cb67c3d3 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -43,7 +43,7 @@ class ThanksgivingDayTest extends USABaseTestCase implements HolidayTestCase */ public function testThanksgivingDayOnAfter1863(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testThanksgivingDayBefore1863(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Thanksgiving Day'] ); } @@ -92,7 +92,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index ffbed18ff..eb6e63bff 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -37,7 +37,7 @@ class USATest extends USABaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1986); + $this->year = static::generateRandomYear(1986); } /** diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index c74f60991..24690804b 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -44,7 +44,7 @@ class VeteransDayTest extends USABaseTestCase implements HolidayTestCase */ public function testVeteransDayOnAfter1919(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -95,7 +95,7 @@ public function testVeteransDayBefore1919(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -107,7 +107,7 @@ public function testVeteransDayBefore1919(): void public function testVeteransDayNameBefore1954(): void { try { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -125,7 +125,7 @@ public function testVeteransDayNameBefore1954(): void public function testVeteransDayNameAfter1954(): void { try { - $year = $this->generateRandomYear(1954); + $year = static::generateRandomYear(1954); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -145,7 +145,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1954), + static::generateRandomYear(1954), [self::LOCALE => 'Veterans Day'] ); } @@ -160,7 +160,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index a0d0f6b32..e59fe3c46 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -43,7 +43,7 @@ class WashingtonsBirthdayTest extends USABaseTestCase implements HolidayTestCase */ public function testWashingtonsBirthdayOnAfter1968(): void { - $year = $this->generateRandomYear(1968); + $year = static::generateRandomYear(1968); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -60,7 +60,7 @@ public function testWashingtonsBirthdayOnAfter1968(): void */ public function testWashingtonsBirthdayBetween1879And1967(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -80,7 +80,7 @@ public function testWashingtonsBirthdayBefore1879(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -94,7 +94,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Washington’s Birthday'] ); } @@ -109,7 +109,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL ); } diff --git a/tests/Ukraine/CatholicChristmasDayTest.php b/tests/Ukraine/CatholicChristmasDayTest.php index 293bd03d0..4f8d8ad90 100644 --- a/tests/Ukraine/CatholicChristmasDayTest.php +++ b/tests/Ukraine/CatholicChristmasDayTest.php @@ -34,11 +34,10 @@ class CatholicChristmasDayTest extends UkraineBaseTestCase implements HolidayTes /** * Tests Catholic Christmas Day. * - * @dataProvider CatholicChristmasDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('CatholicChristmasDayDataProvider')] public function testCatholicChristmasDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -51,7 +50,7 @@ public function testCatholicChristmasDay(int $year, \DateTimeInterface $expected */ public function testNoCatholicChristmasDayBefore2017(): void { - $year = $this->generateRandomYear(null, 2016); + $year = static::generateRandomYear(null, 2016); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(2017), + static::generateRandomYear(2017), [self::LOCALE => 'Католицький день Різдва'] ); } @@ -82,7 +81,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(2017), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(2017), Holiday::TYPE_OFFICIAL); } /** @@ -92,12 +91,12 @@ public function testHolidayType(): void * * @throws \Exception */ - public function CatholicChristmasDayDataProvider(): array + public static function CatholicChristmasDayDataProvider(): array { $data = []; for ($y = 0; $y < 10; ++$y) { - $year = $this->generateRandomYear(2017); + $year = static::generateRandomYear(2017); $data[] = [$year, new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 3a83a840b..46d1496e7 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -37,7 +37,7 @@ class ChristmasDayTest extends UkraineBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(1000, self::ABOLISHMENT_YEAR); + $year = static::generateRandomYear(1000, self::ABOLISHMENT_YEAR); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -51,7 +51,7 @@ public function testHoliday(): void */ public function testNotHolidayAfter2023(): void { - $year = $this->generateRandomYear(self::ABOLISHMENT_YEAR + 1); + $year = static::generateRandomYear(self::ABOLISHMENT_YEAR + 1); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -63,7 +63,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, 2023), + static::generateRandomYear(1000, 2023), [self::LOCALE => 'Різдво'] ); } @@ -75,6 +75,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(1000, 2023), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(1000, 2023), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index 5f1c18024..243515f20 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -35,7 +35,7 @@ class ConstitutionDayTest extends UkraineBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(2024); + $year = static::generateRandomYear(2024); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -49,7 +49,7 @@ public function testHoliday(): void */ public function testHolidayBefore2024(): void { - $year = $this->generateRandomYear(1996, 2023); + $year = static::generateRandomYear(1996, 2023); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHolidayBefore2024(): void */ public function testNotHolidayBeforeEstablishment(): void { - $year = $this->generateRandomYear(1000, 1995); + $year = static::generateRandomYear(1000, 1995); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index 59d34dc21..809485d85 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -35,7 +35,7 @@ class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements HolidayTes */ public function testHoliday(): void { - $year = $this->generateRandomYear(2023); + $year = static::generateRandomYear(2023); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -49,7 +49,7 @@ public function testHoliday(): void */ public function testHolidayBefore2023(): void { - $year = $this->generateRandomYear(2015, 2022); + $year = static::generateRandomYear(2015, 2022); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHolidayBefore2023(): void */ public function testNotHolidayBeforeEstablishment(): void { - $year = $this->generateRandomYear(1000, 2014); + $year = static::generateRandomYear(1000, 2014); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index 9dd3f02d5..d59ca93d5 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Великдень'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index f0b7961e0..1cbb10b13 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -30,9 +30,7 @@ class InternationalWomensDayTest extends UkraineBaseTestCase implements HolidayT */ public const HOLIDAY = 'internationalWomensDay'; - /** - * @dataProvider HolidayDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -45,9 +43,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(3, 8, self::TIMEZONE); + return static::generateRandomDates(3, 8, self::TIMEZONE); } /** @@ -60,7 +58,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Міжнародний жіночий день'] ); } @@ -72,6 +70,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 4f84ab7eb..fe84d1ce4 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -33,11 +33,10 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements Holiday /** * Tests International Workers' Day. * - * @dataProvider InternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('InternationalWorkersDayDataProvider')] public function testInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -53,7 +52,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'День міжнародної солідарності трудящих'] ); } @@ -65,7 +64,7 @@ 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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } /** @@ -75,8 +74,8 @@ public function testHolidayType(): void * * @throws \Exception */ - public function InternationalWorkersDayDataProvider(): array + public static function InternationalWorkersDayDataProvider(): array { - return $this->generateRandomDates(5, 1, self::TIMEZONE); + return static::generateRandomDates(5, 1, self::TIMEZONE); } } diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 4b335ca67..d28431801 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -33,11 +33,10 @@ class NewYearsDayTest extends UkraineBaseTestCase implements HolidayTestCase /** * 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 */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -50,9 +49,9 @@ public function testHoliday(int $year, \DateTimeInterface $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDates(1, 1, self::TIMEZONE); + return static::generateRandomDates(1, 1, self::TIMEZONE); } /** @@ -65,7 +64,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Новий Рік'] ); } @@ -77,6 +76,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index b1d5bee36..4da8fc0fc 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Трійця'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 8e5352cc5..8cfdd66f4 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -34,11 +34,10 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements H /** * Tests International Workers' Day. * - * @dataProvider SecondInternationalWorkersDayDataProvider - * * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date */ + #[\PHPUnit\Framework\Attributes\DataProvider('SecondInternationalWorkersDayDataProvider')] public function testSecondInternationalWorkersDay(int $year, \DateTimeInterface $expected): void { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); @@ -51,7 +50,7 @@ public function testSecondInternationalWorkersDay(int $year, \DateTimeInterface */ public function testNoSecondInternationalWorkersDaySince2018(): void { - $year = $this->generateRandomYear(2018); + $year = static::generateRandomYear(2018); $holidays = Yasumi::create(self::REGION, $year); $holiday = $holidays->getHoliday(self::HOLIDAY); @@ -70,7 +69,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(null, 2017), + static::generateRandomYear(null, 2017), [self::LOCALE => 'День міжнародної солідарності трудящих'] ); } @@ -85,7 +84,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(null, 2017), + static::generateRandomYear(null, 2017), Holiday::TYPE_OFFICIAL ); } @@ -97,12 +96,12 @@ public function testHolidayType(): void * * @throws \Exception */ - public function SecondInternationalWorkersDayDataProvider(): array + public static function SecondInternationalWorkersDayDataProvider(): array { $data = []; for ($y = 0; $y < 10; ++$y) { - $year = $this->generateRandomYear(null, 2017); + $year = static::generateRandomYear(null, 2017); $data[] = [$year, new \DateTime("{$year}-05-02", new \DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 33fee6455..8ef788acc 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -37,7 +37,7 @@ class UkraineTest extends UkraineBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(); + $this->year = static::generateRandomYear(); } /** diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index bf9f62858..0b0959d89 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -35,7 +35,7 @@ class VictoryDayTest extends UkraineBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(2024); + $year = static::generateRandomYear(2024); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -49,7 +49,7 @@ public function testHoliday(): void */ public function testHolidayBefore2024(): void { - $year = $this->generateRandomYear(2015, 2023); + $year = static::generateRandomYear(2015, 2023); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHolidayBefore2024(): void */ public function testNotHolidayBeforeEstablishment(): void { - $year = $this->generateRandomYear(1000, 2014); + $year = static::generateRandomYear(1000, 2014); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } @@ -77,7 +77,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(2015), + static::generateRandomYear(2015), [self::LOCALE => 'День перемоги'] ); } @@ -89,6 +89,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(2015), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(2015), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 83eb507e6..adfd6a2ad 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -33,13 +33,12 @@ class BoxingDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); } @@ -95,6 +94,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 44cf8f0fc..3e1060d15 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends UnitedKingdomBaseTestCase implements HolidayTestC /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -95,6 +94,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index b498b4a37..cc5436672 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -33,13 +33,12 @@ class BoxingDayTest extends EnglandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); } @@ -95,6 +94,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 3d89c8a8f..cf08a4d75 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends EnglandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -95,6 +94,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index fae27137f..6f8a5ee17 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -33,13 +33,12 @@ class EasterMondayTest extends EnglandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Monday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index 89c6f66cf..33e28336b 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -37,7 +37,7 @@ class EnglandTest extends EnglandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** @@ -77,7 +77,7 @@ public function testBankHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if (1965 <= $year) { $holidays[] = 'springBankHoliday'; @@ -107,7 +107,14 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'motheringSunday', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index 9dfbfbe74..dd530353d 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index 70b4fa5f7..4b1b85075 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'May Day Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 3931a5f0a..6cb0db022 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -43,13 +43,12 @@ class NewYearsDayTest extends EnglandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHolidayOnAfterEstablishment(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -84,7 +83,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } @@ -96,9 +95,9 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + return static::generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); } /** @@ -111,7 +110,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); } @@ -126,7 +125,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + static::generateRandomYear(self::ADJUSTMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index 5cced237e..c46763feb 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Spring Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index 5e080857f..1a11de9c1 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -47,7 +47,7 @@ class SummerBankHolidayTest extends EnglandBaseTestCase implements HolidayTestCa */ public function testHoliday(): void { - $year = $this->generateRandomYear(1970); + $year = static::generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHoliday(): void */ public function testHolidayBefore1965(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -127,7 +127,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -141,7 +141,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::RENAME_YEAR), + static::generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } @@ -156,7 +156,7 @@ public function testTranslationBeforeRename(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), [self::LOCALE => 'August Bank Holiday'] ); } @@ -171,7 +171,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index 462752d96..72987520f 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/KingCharlesCoronationBankHolidayTest.php b/tests/UnitedKingdom/KingCharlesCoronationBankHolidayTest.php index f1ab55b82..3b02184dd 100644 --- a/tests/UnitedKingdom/KingCharlesCoronationBankHolidayTest.php +++ b/tests/UnitedKingdom/KingCharlesCoronationBankHolidayTest.php @@ -65,7 +65,7 @@ public function testHolidayBeforeActive(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + static::generateRandomYear(1000, self::ACTIVE_YEAR - 1) ); } @@ -79,7 +79,7 @@ public function testHolidayAfterActive(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ACTIVE_YEAR + 1) + static::generateRandomYear(self::ACTIVE_YEAR + 1) ); } diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 80cc2c17c..3746a1537 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'May Day Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/MotheringSundayTest.php b/tests/UnitedKingdom/MotheringSundayTest.php index ed89dddd1..4ae81d075 100644 --- a/tests/UnitedKingdom/MotheringSundayTest.php +++ b/tests/UnitedKingdom/MotheringSundayTest.php @@ -26,10 +26,9 @@ class MotheringSundayTest extends EnglandBaseTestCase implements HolidayTestCase public const HOLIDAY = 'motheringSunday'; /** - * @dataProvider HolidayDataProvider - * * @throws \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -45,13 +44,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->sub(new \DateInterval('P3W')); $data[] = [$year, $date->format('Y-m-d')]; @@ -72,7 +71,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Mothering Sunday'] ); } @@ -85,7 +84,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), Holiday::TYPE_OTHER ); } diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 5c3083bb6..1efe44830 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -43,13 +43,12 @@ class NewYearsDayTest extends UnitedKingdomBaseTestCase implements HolidayTestCa /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHolidayOnAfterEstablishment(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -84,7 +83,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } @@ -96,9 +95,9 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + return static::generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); } /** @@ -111,7 +110,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); } @@ -126,7 +125,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + static::generateRandomYear(self::ADJUSTMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index 28857f430..446f86a00 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -38,13 +38,12 @@ class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements Holida /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -66,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,12 +76,12 @@ public function testHolidayBeforeEstablishment(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-7-12", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -100,7 +99,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Battle of the Boyne'] ); } @@ -115,7 +114,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index ed033fd1e..fc56f8669 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -33,13 +33,12 @@ class BoxingDayTest extends NorthernIrelandBaseTestCase implements HolidayTestCa /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); } @@ -95,6 +94,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index 0be2c83e5..31f69a4dd 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends NorthernIrelandBaseTestCase implements HolidayTes /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -95,6 +94,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index d4275c79b..9ce46db08 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -33,13 +33,12 @@ class EasterMondayTest extends NorthernIrelandBaseTestCase implements HolidayTes /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Monday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index e45c86e57..d72435185 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index de13c1d89..985d45051 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'May Day Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index a98a5de73..009c85ab0 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -43,13 +43,12 @@ class NewYearsDayTest extends NorthernIrelandBaseTestCase implements HolidayTest /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHolidayOnAfterEstablishment(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -84,7 +83,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } @@ -96,9 +95,9 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + return static::generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); } /** @@ -111,7 +110,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); } @@ -126,7 +125,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + static::generateRandomYear(self::ADJUSTMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index 02d7fd652..1c60072de 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -37,7 +37,7 @@ class NorthernIrelandTest extends NorthernIrelandBaseTestCase implements Provide */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** @@ -77,7 +77,7 @@ public function testBankHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if (1926 <= $year) { $holidays[] = 'battleOfTheBoyne'; @@ -111,7 +111,14 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'motheringSunday', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index ad9e6adca..25eabf06e 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Spring Bank Holiday'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index c66b2ab4a..ceb153c7b 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -38,13 +38,12 @@ class StPatricksDayTest extends NorthernIrelandBaseTestCase implements HolidayTe /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -66,7 +65,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -77,12 +76,12 @@ public function testHolidayBeforeEstablishment(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-3-17", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -100,7 +99,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'St. Patrick’s Day'] ); } @@ -115,7 +114,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index bc978498f..6c19d2115 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -47,7 +47,7 @@ class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements Holid */ public function testHoliday(): void { - $year = $this->generateRandomYear(1970); + $year = static::generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHoliday(): void */ public function testHolidayBefore1965(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -127,7 +127,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -141,7 +141,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::RENAME_YEAR), + static::generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } @@ -156,7 +156,7 @@ public function testTranslationBeforeRename(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), [self::LOCALE => 'August Bank Holiday'] ); } @@ -171,7 +171,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php index 341c6ace2..347047441 100644 --- a/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php +++ b/tests/UnitedKingdom/PlatinumJubileeBankHolidayTest.php @@ -65,7 +65,7 @@ public function testHolidayBeforeActive(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + static::generateRandomYear(1000, self::ACTIVE_YEAR - 1) ); } @@ -79,7 +79,7 @@ public function testHolidayAfterActive(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ACTIVE_YEAR + 1) + static::generateRandomYear(self::ACTIVE_YEAR + 1) ); } diff --git a/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php b/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php index 037d6f4f3..fd2e42870 100644 --- a/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php +++ b/tests/UnitedKingdom/QueenElizabethFuneralBankHolidayTest.php @@ -65,7 +65,7 @@ public function testHolidayBeforeActive(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ACTIVE_YEAR - 1) + static::generateRandomYear(1000, self::ACTIVE_YEAR - 1) ); } @@ -79,7 +79,7 @@ public function testHolidayAfterActive(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ACTIVE_YEAR + 1) + static::generateRandomYear(self::ACTIVE_YEAR + 1) ); } diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index a3109fa16..da0edd5af 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -33,13 +33,12 @@ class BoxingDayTest extends ScotlandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); } @@ -95,6 +94,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 72469f051..bc9c2ed4c 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends ScotlandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -95,6 +94,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index 104112dd4..e6c510238 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -68,6 +68,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index 697df97db..a17d73882 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'May Day Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index bd6ff086f..b2cc54c42 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -43,13 +43,12 @@ class NewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHolidayOnAfterEstablishment(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -71,7 +70,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -85,7 +84,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } @@ -97,12 +96,12 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-1-1", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -120,7 +119,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); } @@ -135,7 +134,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + static::generateRandomYear(self::ADJUSTMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 92543cdf7..27262ae00 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -37,7 +37,7 @@ class ScotlandTest extends ScotlandBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** @@ -76,7 +76,7 @@ public function testBankHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if (1965 <= $year) { $holidays[] = 'springBankHoliday'; @@ -106,7 +106,14 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'motheringSunday', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index fa2c97a8e..1eb70f4b0 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -43,13 +43,12 @@ class SecondNewYearsDayTest extends ScotlandBaseTestCase implements HolidayTestC /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHolidayOnAfterEstablishment(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -71,7 +70,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -85,7 +84,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } @@ -97,12 +96,12 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-1-2", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -120,7 +119,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => '2nd January'] ); } @@ -135,7 +134,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + static::generateRandomYear(self::ADJUSTMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index ff880c3e3..11b683a35 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Spring Bank Holiday'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 18edbe8de..d4d4e507d 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -38,13 +38,12 @@ class StAndrewsDayTest extends ScotlandBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -63,12 +62,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); $date = new \DateTime("{$year}-11-30", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } @@ -86,7 +85,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'St. Andrew’s Day'] ); } @@ -101,7 +100,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index e67053276..745855fca 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -42,7 +42,7 @@ class SummerBankHolidayTest extends ScotlandBaseTestCase implements HolidayTestC */ public function testHoliday(): void { - $year = $this->generateRandomYear(1970); + $year = static::generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -61,7 +61,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -75,7 +75,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'August Bank Holiday'] ); } @@ -90,7 +90,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 64d088430..7053009ca 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -90,7 +90,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -104,7 +104,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Spring Bank Holiday'] ); } @@ -119,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index e6ad5d958..a7a2b54ba 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -47,7 +47,7 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements Holiday */ public function testHoliday(): void { - $year = $this->generateRandomYear(1970); + $year = static::generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHoliday(): void */ public function testHolidayBefore1965(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -127,7 +127,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -141,7 +141,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::RENAME_YEAR), + static::generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } @@ -156,7 +156,7 @@ public function testTranslationBeforeRename(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), [self::LOCALE => 'August Bank Holiday'] ); } @@ -171,7 +171,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 5b91afdf0..682d1368e 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -37,7 +37,7 @@ class UnitedKingdomTest extends UnitedKingdomBaseTestCase implements ProviderTes */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** @@ -76,7 +76,7 @@ public function testBankHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if (1965 <= $year) { $holidays[] = 'springBankHoliday'; @@ -106,7 +106,14 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'motheringSunday', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 7523be445..339918d74 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -33,13 +33,12 @@ class BoxingDayTest extends WalesBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-26", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Boxing Day'] ); } @@ -95,6 +94,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 28bf930fd..913d8334e 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -33,13 +33,12 @@ class ChristmasDayTest extends WalesBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $date = new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)); @@ -59,12 +58,12 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; ++$y) { - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); $date = new \DateTime("{$year}-12-25", new \DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; @@ -83,7 +82,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Christmas Day'] ); } @@ -95,6 +94,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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index e7997852d..017d1bddc 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -33,13 +33,12 @@ class EasterMondayTest extends WalesBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHoliday(int $year, string $expected): void { $this->assertHoliday( @@ -57,13 +56,13 @@ public function testHoliday(int $year, string $expected): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { $data = []; for ($y = 0; $y < 50; ++$y) { - $year = $this->generateRandomYear(); - $date = $this->calculateEaster($year, self::TIMEZONE); + $year = static::generateRandomYear(); + $date = static::computeEaster($year, self::TIMEZONE); $date->add(new \DateInterval('P1D')); $data[] = [$year, $date->format('Y-m-d')]; @@ -82,7 +81,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Easter Monday'] ); } @@ -94,6 +93,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index 8203825e2..011c65395 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -56,7 +56,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + static::generateRandomYear(), [self::LOCALE => 'Good Friday'] ); } @@ -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, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index 27ac5b314..d5aa4b817 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'May Day Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index f96486d32..4a4644650 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -43,13 +43,12 @@ class NewYearsDayTest extends WalesBaseTestCase implements HolidayTestCase /** * 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 \Exception */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] public function testHolidayOnAfterEstablishment(int $year, string $expected): void { $this->assertHoliday( @@ -70,7 +69,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -84,7 +83,7 @@ public function testHolidayIsObservedTypeBeforeChange(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), Holiday::TYPE_OBSERVANCE ); } @@ -96,9 +95,9 @@ public function testHolidayIsObservedTypeBeforeChange(): void * * @throws \Exception */ - public function HolidayDataProvider(): array + public static function HolidayDataProvider(): array { - return $this->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + return static::generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); } /** @@ -111,7 +110,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'New Year’s Day'] ); } @@ -126,7 +125,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + static::generateRandomYear(self::ADJUSTMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 8b25e8e86..03954edfa 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -83,7 +83,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -97,7 +97,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), [self::LOCALE => 'Spring Bank Holiday'] ); } @@ -112,7 +112,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index 4a962677a..3c0d9d532 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -47,7 +47,7 @@ class SummerBankHolidayTest extends WalesBaseTestCase implements HolidayTestCase */ public function testHoliday(): void { - $year = $this->generateRandomYear(1970); + $year = static::generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -63,7 +63,7 @@ public function testHoliday(): void */ public function testHolidayBefore1965(): void { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -127,7 +127,7 @@ public function testHolidayBeforeEstablishment(): void $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) ); } @@ -141,7 +141,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::RENAME_YEAR), + static::generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } @@ -156,7 +156,7 @@ public function testTranslationBeforeRename(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + static::generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), [self::LOCALE => 'August Bank Holiday'] ); } @@ -171,7 +171,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + static::generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_BANK ); } diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index 8aeb1ccb6..533ece322 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -37,7 +37,7 @@ class WalesTest extends WalesBaseTestCase implements ProviderTestCase */ protected function setUp(): void { - $this->year = $this->generateRandomYear(1978); + $this->year = static::generateRandomYear(1978); } /** @@ -77,7 +77,7 @@ public function testBankHolidays(): void 'secondChristmasDay', ]; - $year = $this->generateRandomYear(); + $year = static::generateRandomYear(); if (1965 <= $year) { $holidays[] = 'springBankHoliday'; @@ -107,7 +107,14 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays( + [ + 'motheringSunday', + ], + self::REGION, + $this->year, + Holiday::TYPE_OTHER + ); } /** diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index d59c884ae..3b04b9b5d 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -75,9 +75,18 @@ public function assertDefinedHolidays( break; } + $holidayList = iterator_to_array($holidays); + + if ([] === $expectedHolidays) { + // No holidays to assert; increment count to avoid PHPUnit "no assertions" warning. + $this->addToAssertionCount(1); + + return; + } + // Loop through all known holidays and assert they are defined by the provider class. foreach ($expectedHolidays as $holiday) { - self::assertArrayHasKey($holiday, iterator_to_array($holidays), sprintf('`%s` should exist for year `%u` in the `%s` holiday list for `%s`', $holiday, $year, $type, $provider)); + self::assertArrayHasKey($holiday, $holidayList, sprintf('`%s` should exist for year `%u` in the `%s` holiday list for `%s`', $holiday, $year, $type, $provider)); } } @@ -290,7 +299,7 @@ public function assertDayOfWeek( */ public function assertSources(string $provider, int $expectedSourceCount): void { - $holidayProvider = Yasumi::create($provider, $this->generateRandomYear()); + $holidayProvider = Yasumi::create($provider, static::generateRandomYear()); self::assertCount($expectedSourceCount, $holidayProvider->getSources()); } From e1fc314b42dea618b7cbd3500ffcb61dfba866ec Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 6 Mar 2026 08:32:50 +0900 Subject: [PATCH 680/687] test(south korea): fix holiday type test of HangulDay Signed-off-by: Sacha Telgenhof --- tests/SouthKorea/HangulDayTest.php | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index 9cfafe1fa..866b166af 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -115,15 +115,12 @@ public function testHolidayBeforeEstablishment(): void */ public function testTranslation(): void { - $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); - if ($year <= 1990 || $year > 2012) { - $this->assertTranslatedHolidayName( - self::REGION, - self::HOLIDAY, - $year, - [self::LOCALE => '한글날'] - ); - } + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(2013), + [self::LOCALE => '한글날'] + ); } /** @@ -133,14 +130,11 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); - if ($year <= 1990 || $year > 2012) { - $this->assertHolidayType( - self::REGION, - self::HOLIDAY, - $year, - Holiday::TYPE_OFFICIAL - ); - } + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(2013), + Holiday::TYPE_OFFICIAL + ); } } From cb2ace908a4142bba6174a1e381994b5eac5d1e4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Mar 2026 10:32:52 +0900 Subject: [PATCH 681/687] feat: Add San Marino holiday provider Added a new holiday provider for San Marino (SM) with support for all 18 public holidays, test coverage, and Italian locale translations. Signed-off-by: Sacha Telgenhof --- phpunit.xml.dist | 4 + src/Yasumi/Provider/SanMarino.php | 283 ++++++++++++++++++ tests/SanMarino/AllSaintsDayTest.php | 81 +++++ tests/SanMarino/AnniversaryOfArengoTest.php | 98 ++++++ tests/SanMarino/AssumptionOfMaryTest.php | 81 +++++ tests/SanMarino/ChristmasDayTest.php | 81 +++++ .../CommemorationOfTheFallenTest.php | 86 ++++++ tests/SanMarino/CorpusChristiTest.php | 95 ++++++ tests/SanMarino/EasterMondayTest.php | 73 +++++ tests/SanMarino/EasterTest.php | 73 +++++ tests/SanMarino/EpiphanyTest.php | 81 +++++ tests/SanMarino/FallOfFascismTest.php | 98 ++++++ tests/SanMarino/FeastOfSaintAgathaTest.php | 86 ++++++ tests/SanMarino/FoundationDayTest.php | 86 ++++++ tests/SanMarino/ImmaculateConceptionTest.php | 81 +++++ .../SanMarino/InternationalWorkersDayTest.php | 81 +++++ .../InvestitureCaptainsRegentAprilTest.php | 86 ++++++ .../InvestitureCaptainsRegentOctoberTest.php | 86 ++++++ tests/SanMarino/NewYearsDayTest.php | 81 +++++ tests/SanMarino/SanMarinoBaseTestCase.php | 38 +++ tests/SanMarino/SanMarinoTest.php | 111 +++++++ tests/SanMarino/StStephensDayTest.php | 81 +++++ 22 files changed, 1951 insertions(+) create mode 100644 src/Yasumi/Provider/SanMarino.php create mode 100644 tests/SanMarino/AllSaintsDayTest.php create mode 100644 tests/SanMarino/AnniversaryOfArengoTest.php create mode 100644 tests/SanMarino/AssumptionOfMaryTest.php create mode 100644 tests/SanMarino/ChristmasDayTest.php create mode 100644 tests/SanMarino/CommemorationOfTheFallenTest.php create mode 100644 tests/SanMarino/CorpusChristiTest.php create mode 100644 tests/SanMarino/EasterMondayTest.php create mode 100644 tests/SanMarino/EasterTest.php create mode 100644 tests/SanMarino/EpiphanyTest.php create mode 100644 tests/SanMarino/FallOfFascismTest.php create mode 100644 tests/SanMarino/FeastOfSaintAgathaTest.php create mode 100644 tests/SanMarino/FoundationDayTest.php create mode 100644 tests/SanMarino/ImmaculateConceptionTest.php create mode 100644 tests/SanMarino/InternationalWorkersDayTest.php create mode 100644 tests/SanMarino/InvestitureCaptainsRegentAprilTest.php create mode 100644 tests/SanMarino/InvestitureCaptainsRegentOctoberTest.php create mode 100644 tests/SanMarino/NewYearsDayTest.php create mode 100644 tests/SanMarino/SanMarinoBaseTestCase.php create mode 100644 tests/SanMarino/SanMarinoTest.php create mode 100644 tests/SanMarino/StStephensDayTest.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e91b88bd9..c76f89047 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -138,6 +138,10 @@ ./tests/Russia + + + ./tests/SanMarino + ./tests/Slovakia diff --git a/src/Yasumi/Provider/SanMarino.php b/src/Yasumi/Provider/SanMarino.php new file mode 100644 index 000000000..7a25626f6 --- /dev/null +++ b/src/Yasumi/Provider/SanMarino.php @@ -0,0 +1,283 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Provider for all holidays in San Marino. + * + * San Marino observes 18 national public holidays. The official language is Italian (it_SM). + * The Most Serene Republic of San Marino is one of the world's oldest republics, traditionally + * founded on 3 September 301 AD by Saint Marinus of Rab. + * + * @see https://en.wikipedia.org/wiki/Public_holidays_in_San_Marino + */ +class SanMarino extends AbstractProvider +{ + use CommonHolidays; + use ChristianHolidays; + + /** + * The year the Arengo (popular assembly) was reconvened, establishing democratic rights. + */ + public const ARENGO_YEAR = 1906; + + /** + * The year the Fall of Fascism holiday was first observed. + */ + public const FALL_OF_FASCISM_YEAR = 1944; + + /** + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'SM'; + + /** + * Initialize holidays for San Marino. + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Europe/San_Marino'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); + + // Add Christian holidays + $this->addHoliday($this->epiphany($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->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); + $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->immaculateConception($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->stStephensDay($this->year, $this->timezone, $this->locale)); + + // Add San Marino-specific holidays + $this->calculateFeastOfSaintAgatha(); + $this->calculateAnniversaryOfArengo(); + $this->calculateInvestitureCaptainsRegentApril(); + $this->calculateFallOfFascism(); + $this->calculateFoundationDay(); + $this->calculateInvestitureCaptainsRegentOctober(); + $this->calculateCommemorationOfTheFallen(); + } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_San_Marino', + 'https://it.wikipedia.org/wiki/Festivit%C3%A0_di_San_Marino', + ]; + } + + /** + * Feast of Saint Agatha. + * + * The Feast of Saint Agatha (Italian: Festa di Sant'Agata) is celebrated on 5 February. Saint Agatha is the + * patron saint of San Marino. The day also commemorates the anniversary of the liberation of San Marino from + * the occupation by Cardinal Giulio Alberoni on 5 February 1740. + * + * @see https://en.wikipedia.org/wiki/Saint_Agatha + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateFeastOfSaintAgatha(): void + { + $this->addHoliday(new Holiday( + 'feastOfSaintAgatha', + [ + 'it' => "Festa di Sant\u{2019}Agata", + 'en' => 'Feast of Saint Agatha', + ], + new \DateTime("{$this->year}-2-5", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Anniversary of the Arengo. + * + * The Anniversary of the Arengo (Italian: Anniversario dell'Arengo) is celebrated on 25 March. The Arengo is + * the ancient popular assembly of San Marino. On 25 March 1906, the Arengo was reconvened after centuries, + * granting democratic rights including universal suffrage, marking a pivotal moment in San Marino's history. + * + * @see https://en.wikipedia.org/wiki/Arengo_(San_Marino) + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateAnniversaryOfArengo(): void + { + if ($this->year >= self::ARENGO_YEAR) { + $this->addHoliday(new Holiday( + 'anniversaryOfArengo', + [ + 'it' => "Anniversario dell\u{2019}Arengo", + 'en' => 'Anniversary of the Arengo', + ], + new \DateTime("{$this->year}-3-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Investiture of the Captains Regent (April). + * + * The Investiture of the Captains Regent (Italian: Investitura dei Capitani Reggenti) on 1 April marks the + * formal investiture ceremony of the two newly elected Captains Regent who serve as heads of state. The + * Captains Regent are elected twice yearly and serve a six-month term. This ceremony has been observed since + * the 13th century. + * + * @see https://en.wikipedia.org/wiki/Captain_Regent + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateInvestitureCaptainsRegentApril(): void + { + $this->addHoliday(new Holiday( + 'investitureCaptainsRegentApril', + [ + 'it' => 'Investitura dei Capitani Reggenti', + 'en' => 'Investiture of the Captains Regent', + ], + new \DateTime("{$this->year}-4-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Fall of Fascism. + * + * The Fall of Fascism (Italian: Caduta del Fascismo) is observed on 28 July, commemorating the coup d'état of + * 28 July 1943 when San Marino's Great and General Council voted to overthrow the Fascist government, ending + * the Fascist regime in the republic. The holiday has been observed since 1944. + * + * @see https://en.wikipedia.org/wiki/San_Marino_in_World_War_II + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateFallOfFascism(): void + { + if ($this->year >= self::FALL_OF_FASCISM_YEAR) { + $this->addHoliday(new Holiday( + 'fallOfFascism', + [ + 'it' => 'Caduta del Fascismo', + 'en' => 'Fall of Fascism', + ], + new \DateTime("{$this->year}-7-28", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Foundation Day (San Marino Day). + * + * Foundation Day (Italian: Anniversario della Fondazione della Repubblica), observed on 3 September, + * commemorates the traditional founding of the Republic of San Marino on 3 September 301 AD by Saint Marinus + * of Rab, a Christian stonemason from the island of Rab. It is also known as San Marino Day. + * + * @see https://en.wikipedia.org/wiki/San_Marino + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateFoundationDay(): void + { + $this->addHoliday(new Holiday( + 'foundationDay', + [ + 'it' => 'Anniversario della Fondazione della Repubblica', + 'en' => 'Foundation Day', + ], + new \DateTime("{$this->year}-9-3", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Investiture of the Captains Regent (October). + * + * The Investiture of the Captains Regent (Italian: Investitura dei Capitani Reggenti) on 1 October marks the + * formal investiture ceremony of the two newly elected Captains Regent. The ceremony is held twice yearly, + * on 1 April and 1 October. + * + * @see https://en.wikipedia.org/wiki/Captain_Regent + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateInvestitureCaptainsRegentOctober(): void + { + $this->addHoliday(new Holiday( + 'investitureCaptainsRegentOctober', + [ + 'it' => 'Investitura dei Capitani Reggenti', + 'en' => 'Investiture of the Captains Regent', + ], + new \DateTime("{$this->year}-10-1", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * Commemoration of the Fallen. + * + * The Commemoration of the Fallen (Italian: Commemorazione dei Defunti), observed on 2 November, is a day + * to honour and remember all deceased persons. It coincides with All Souls' Day in the Catholic tradition + * and is an official public holiday in San Marino. + * + * @see https://en.wikipedia.org/wiki/All_Souls%27_Day + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateCommemorationOfTheFallen(): void + { + $this->addHoliday(new Holiday( + 'commemorationOfTheFallen', + [ + 'it' => 'Commemorazione dei Defunti', + 'en' => 'Commemoration of the Fallen', + ], + new \DateTime("{$this->year}-11-2", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/tests/SanMarino/AllSaintsDayTest.php b/tests/SanMarino/AllSaintsDayTest.php new file mode 100644 index 000000000..b51fff523 --- /dev/null +++ b/tests/SanMarino/AllSaintsDayTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for All Saints' Day in San Marino. + */ +class AllSaintsDayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'allSaintsDay'; + + /** + * Tests All Saints' Day. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(11, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of All Saints' Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Festa di Tutti i Santi'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/AnniversaryOfArengoTest.php b/tests/SanMarino/AnniversaryOfArengoTest.php new file mode 100644 index 000000000..d7d213039 --- /dev/null +++ b/tests/SanMarino/AnniversaryOfArengoTest.php @@ -0,0 +1,98 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\Provider\SanMarino; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Anniversary of the Arengo in San Marino. + * + * Celebrated on 25 March, this holiday commemorates the reconvening of the Arengo (popular assembly) + * in 1906, which granted democratic rights to San Marino's citizens. + * + * @see https://en.wikipedia.org/wiki/Arengo_(San_Marino) + */ +class AnniversaryOfArengoTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'anniversaryOfArengo'; + + /** + * Tests the Anniversary of the Arengo on or after 1906. + * + * @throws \Exception + */ + public function testAnniversaryOfArengoOnAfter1906(): void + { + $year = static::generateRandomYear(SanMarino::ARENGO_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-3-25", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the Anniversary of the Arengo before 1906. + * + * @throws \Exception + */ + public function testAnniversaryOfArengoBefore1906(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(1000, SanMarino::ARENGO_YEAR - 1) + ); + } + + /** + * Tests translated name of the Anniversary of the Arengo. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(SanMarino::ARENGO_YEAR), + [self::LOCALE => "Anniversario dell\u{2019}Arengo"] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(SanMarino::ARENGO_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SanMarino/AssumptionOfMaryTest.php b/tests/SanMarino/AssumptionOfMaryTest.php new file mode 100644 index 000000000..9666bf4c2 --- /dev/null +++ b/tests/SanMarino/AssumptionOfMaryTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Assumption of Mary in San Marino. + */ +class AssumptionOfMaryTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the Assumption of Mary. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(8, 15, self::TIMEZONE); + } + + /** + * Tests the translated name of the Assumption of Mary. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Assunzione di Maria Vergine'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/ChristmasDayTest.php b/tests/SanMarino/ChristmasDayTest.php new file mode 100644 index 000000000..c9b6f8466 --- /dev/null +++ b/tests/SanMarino/ChristmasDayTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Christmas Day in San Marino. + */ +class ChristmasDayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'christmasDay'; + + /** + * Tests Christmas Day. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(12, 25, self::TIMEZONE); + } + + /** + * Tests the translated name of Christmas Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Natale'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/CommemorationOfTheFallenTest.php b/tests/SanMarino/CommemorationOfTheFallenTest.php new file mode 100644 index 000000000..fe8cc0ee6 --- /dev/null +++ b/tests/SanMarino/CommemorationOfTheFallenTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Commemoration of the Fallen in San Marino. + * + * Observed on 2 November, this official public holiday honours all deceased persons, coinciding + * with All Souls' Day in the Catholic tradition. + * + * @see https://en.wikipedia.org/wiki/All_Souls%27_Day + */ +class CommemorationOfTheFallenTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'commemorationOfTheFallen'; + + /** + * Tests the Commemoration of the Fallen. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(11, 2, self::TIMEZONE); + } + + /** + * Tests the translated name of the Commemoration of the Fallen. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Commemorazione dei Defunti'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/CorpusChristiTest.php b/tests/SanMarino/CorpusChristiTest.php new file mode 100644 index 000000000..12a18e3a5 --- /dev/null +++ b/tests/SanMarino/CorpusChristiTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Corpus Christi in San Marino. + * + * Corpus Christi (Italian: Corpus Domini) is celebrated on the Thursday 60 days after Easter Sunday. + * + * @see https://en.wikipedia.org/wiki/Corpus_Christi_(feast) + */ +class CorpusChristiTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'corpusChristi'; + + /** + * Tests Corpus Christi. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + * + * @throws \Exception + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $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 + */ + public static function HolidayDataProvider(): array + { + return [ + [2020, new \DateTime('2020-6-11', new \DateTimeZone(self::TIMEZONE))], + [2021, new \DateTime('2021-6-3', new \DateTimeZone(self::TIMEZONE))], + [2022, new \DateTime('2022-6-16', new \DateTimeZone(self::TIMEZONE))], + [2023, new \DateTime('2023-6-8', new \DateTimeZone(self::TIMEZONE))], + [2024, new \DateTime('2024-5-30', new \DateTimeZone(self::TIMEZONE))], + [2025, new \DateTime('2025-6-19', new \DateTimeZone(self::TIMEZONE))], + [2026, new \DateTime('2026-6-4', new \DateTimeZone(self::TIMEZONE))], + ]; + } + + /** + * Tests the translated name of Corpus Christi. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Corpus Domini'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/EasterMondayTest.php b/tests/SanMarino/EasterMondayTest.php new file mode 100644 index 000000000..861aac092 --- /dev/null +++ b/tests/SanMarino/EasterMondayTest.php @@ -0,0 +1,73 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Easter Monday in San Marino. + */ +class EasterMondayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests Easter Monday. + * + * @throws \Exception + */ + public function testHoliday(): void + { + $year = 2024; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-4-1", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of Easter Monday. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => "Lunedì dell\u{2019}Angelo"] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/EasterTest.php b/tests/SanMarino/EasterTest.php new file mode 100644 index 000000000..8ef97d6c9 --- /dev/null +++ b/tests/SanMarino/EasterTest.php @@ -0,0 +1,73 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Easter in San Marino. + */ +class EasterTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'easter'; + + /** + * Tests Easter. + * + * @throws \Exception + */ + public function testEaster(): void + { + $year = 2024; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-3-31", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests translated name of Easter. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Pasqua'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/EpiphanyTest.php b/tests/SanMarino/EpiphanyTest.php new file mode 100644 index 000000000..17d3599aa --- /dev/null +++ b/tests/SanMarino/EpiphanyTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Epiphany in San Marino. + */ +class EpiphanyTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'epiphany'; + + /** + * Tests Epiphany. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(1, 6, self::TIMEZONE); + } + + /** + * Tests the translated name of Epiphany. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Epifania'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/FallOfFascismTest.php b/tests/SanMarino/FallOfFascismTest.php new file mode 100644 index 000000000..287c2da63 --- /dev/null +++ b/tests/SanMarino/FallOfFascismTest.php @@ -0,0 +1,98 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\Provider\SanMarino; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Fall of Fascism in San Marino. + * + * Observed on 28 July, this holiday commemorates the coup d'état of 28 July 1943 that overthrew + * San Marino's Fascist government. It has been observed since 1944. + * + * @see https://en.wikipedia.org/wiki/San_Marino_in_World_War_II + */ +class FallOfFascismTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'fallOfFascism'; + + /** + * Tests the Fall of Fascism on or after 1944. + * + * @throws \Exception + */ + public function testFallOfFascismOnAfter1944(): void + { + $year = static::generateRandomYear(SanMarino::FALL_OF_FASCISM_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-7-28", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the Fall of Fascism before 1944. + * + * @throws \Exception + */ + public function testFallOfFascismBefore1944(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(1000, SanMarino::FALL_OF_FASCISM_YEAR - 1) + ); + } + + /** + * Tests translated name of the Fall of Fascism. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(SanMarino::FALL_OF_FASCISM_YEAR), + [self::LOCALE => 'Caduta del Fascismo'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(SanMarino::FALL_OF_FASCISM_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SanMarino/FeastOfSaintAgathaTest.php b/tests/SanMarino/FeastOfSaintAgathaTest.php new file mode 100644 index 000000000..85d4686d2 --- /dev/null +++ b/tests/SanMarino/FeastOfSaintAgathaTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Feast of Saint Agatha in San Marino. + * + * The Feast of Saint Agatha is celebrated on 5 February. Saint Agatha is the patron saint of San Marino. + * The day also commemorates the liberation from the occupation by Cardinal Giulio Alberoni on 5 February 1740. + * + * @see https://en.wikipedia.org/wiki/Saint_Agatha + */ +class FeastOfSaintAgathaTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'feastOfSaintAgatha'; + + /** + * Tests the Feast of Saint Agatha. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(2, 5, self::TIMEZONE); + } + + /** + * Tests the translated name of the Feast of Saint Agatha. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => "Festa di Sant\u{2019}Agata"] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/FoundationDayTest.php b/tests/SanMarino/FoundationDayTest.php new file mode 100644 index 000000000..523bd4c6c --- /dev/null +++ b/tests/SanMarino/FoundationDayTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for Foundation Day in San Marino. + * + * Foundation Day (Italian: Anniversario della Fondazione della Repubblica), observed on 3 September, + * commemorates the traditional founding of San Marino on 3 September 301 AD by Saint Marinus of Rab. + * + * @see https://en.wikipedia.org/wiki/San_Marino + */ +class FoundationDayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'foundationDay'; + + /** + * Tests Foundation Day. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(9, 3, self::TIMEZONE); + } + + /** + * Tests the translated name of Foundation Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Anniversario della Fondazione della Repubblica'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/ImmaculateConceptionTest.php b/tests/SanMarino/ImmaculateConceptionTest.php new file mode 100644 index 000000000..ca9eb39b0 --- /dev/null +++ b/tests/SanMarino/ImmaculateConceptionTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Immaculate Conception in San Marino. + */ +class ImmaculateConceptionTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'immaculateConception'; + + /** + * Tests the Immaculate Conception. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(12, 8, self::TIMEZONE); + } + + /** + * Tests the translated name of the Immaculate Conception. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Immacolata Concezione'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/InternationalWorkersDayTest.php b/tests/SanMarino/InternationalWorkersDayTest.php new file mode 100644 index 000000000..1dc50a7e5 --- /dev/null +++ b/tests/SanMarino/InternationalWorkersDayTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for International Workers' Day in San Marino. + */ +class InternationalWorkersDayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'internationalWorkersDay'; + + /** + * Tests International Workers' Day. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(5, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of International Workers' Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Festa del Lavoro'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/InvestitureCaptainsRegentAprilTest.php b/tests/SanMarino/InvestitureCaptainsRegentAprilTest.php new file mode 100644 index 000000000..c5a287f42 --- /dev/null +++ b/tests/SanMarino/InvestitureCaptainsRegentAprilTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Investiture of the Captains Regent (April) in San Marino. + * + * Observed on 1 April, this holiday marks the formal investiture of the two Captains Regent, + * the heads of state of San Marino, elected every six months. + * + * @see https://en.wikipedia.org/wiki/Captain_Regent + */ +class InvestitureCaptainsRegentAprilTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'investitureCaptainsRegentApril'; + + /** + * Tests the Investiture of the Captains Regent (April). + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(4, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the Investiture of the Captains Regent (April). + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Investitura dei Capitani Reggenti'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/InvestitureCaptainsRegentOctoberTest.php b/tests/SanMarino/InvestitureCaptainsRegentOctoberTest.php new file mode 100644 index 000000000..25459cf1a --- /dev/null +++ b/tests/SanMarino/InvestitureCaptainsRegentOctoberTest.php @@ -0,0 +1,86 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for the Investiture of the Captains Regent (October) in San Marino. + * + * Observed on 1 October, this holiday marks the formal investiture of the two Captains Regent, + * the heads of state of San Marino, elected every six months. + * + * @see https://en.wikipedia.org/wiki/Captain_Regent + */ +class InvestitureCaptainsRegentOctoberTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'investitureCaptainsRegentOctober'; + + /** + * Tests the Investiture of the Captains Regent (October). + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(10, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the Investiture of the Captains Regent (October). + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Investitura dei Capitani Reggenti'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/NewYearsDayTest.php b/tests/SanMarino/NewYearsDayTest.php new file mode 100644 index 000000000..805d4870d --- /dev/null +++ b/tests/SanMarino/NewYearsDayTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for New Year's Day in San Marino. + */ +class NewYearsDayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests New Year's Day. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(1, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of New Year's Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Capodanno'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/SanMarino/SanMarinoBaseTestCase.php b/tests/SanMarino/SanMarinoBaseTestCase.php new file mode 100644 index 000000000..3c40bd9f2 --- /dev/null +++ b/tests/SanMarino/SanMarinoBaseTestCase.php @@ -0,0 +1,38 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the San Marino holiday provider. + */ +abstract class SanMarinoBaseTestCase extends TestCase +{ + use YasumiBase; + + /** Name of the region (e.g. country / state) to be tested. */ + public const REGION = 'SanMarino'; + + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'Europe/San_Marino'; + + /** Locale that is considered common for this provider. */ + public const LOCALE = 'it_SM'; +} diff --git a/tests/SanMarino/SanMarinoTest.php b/tests/SanMarino/SanMarinoTest.php new file mode 100644 index 000000000..39c647864 --- /dev/null +++ b/tests/SanMarino/SanMarinoTest.php @@ -0,0 +1,111 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\Provider\SanMarino; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in San Marino. + */ +class SanMarinoTest extends SanMarinoBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected int $year; + + /** + * Initial setup of this Test Case. + * + * @throws \Exception + */ + protected function setUp(): void + { + $this->year = static::generateRandomYear(SanMarino::FALL_OF_FASCISM_YEAR); + } + + /** + * Tests if all official holidays in San Marino are defined by the provider class. + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'epiphany', + 'feastOfSaintAgatha', + 'anniversaryOfArengo', + 'easter', + 'easterMonday', + 'investitureCaptainsRegentApril', + 'internationalWorkersDay', + 'corpusChristi', + 'fallOfFascism', + 'assumptionOfMary', + 'foundationDay', + 'investitureCaptainsRegentOctober', + 'allSaintsDay', + 'commemorationOfTheFallen', + 'immaculateConception', + 'christmasDay', + 'stStephensDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in San Marino are defined by the provider class. + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in San Marino are defined by the provider class. + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in San Marino are defined by the provider class. + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in San Marino are defined by the provider class. + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws \ReflectionException + * @throws \Exception + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/SanMarino/StStephensDayTest.php b/tests/SanMarino/StStephensDayTest.php new file mode 100644 index 000000000..94e6960ce --- /dev/null +++ b/tests/SanMarino/StStephensDayTest.php @@ -0,0 +1,81 @@ + + */ + +namespace Yasumi\tests\SanMarino; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class containing tests for St. Stephen's Day in San Marino. + */ +class StStephensDayTest extends SanMarinoBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'stStephensDay'; + + /** + * Tests St. Stephen's Day. + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + #[\PHPUnit\Framework\Attributes\DataProvider('HolidayDataProvider')] + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public static function HolidayDataProvider(): array + { + return static::generateRandomDates(12, 26, self::TIMEZONE); + } + + /** + * Tests the translated name of St. Stephen's Day. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + static::generateRandomYear(), + [self::LOCALE => 'Santo Stefano'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, static::generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} From 8138d8bdf6429b757bb51170f4078a5c9df2272b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Mar 2026 10:45:40 +0900 Subject: [PATCH 682/687] build(test): add missing provider test suites Added missing test suites for the Andorra, Bulgaria, Iran, and Mexico holiday providers. Signed-off-by: Sacha Telgenhof --- phpunit.xml.dist | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c76f89047..487caff83 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,6 +18,10 @@ ./tests/Base + + + ./tests/Andorra + ./tests/Argentina @@ -42,6 +46,10 @@ ./tests/Brazil + + + ./tests/Bulgaria + ./tests/Canada @@ -86,6 +94,10 @@ ./tests/Hungary + + + ./tests/Iran + ./tests/Ireland @@ -110,6 +122,10 @@ ./tests/Luxembourg + + + ./tests/Mexico + ./tests/Netherlands From 885241b312830ec5ea2ac2a9c0e273d8e5116777 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Mar 2026 10:53:10 +0900 Subject: [PATCH 683/687] test(spain): fix murciaDay minimum year in RegionOfMurcia test The `generateRandomYear(1981)` function could produce years before 1983, but `murciaDay` is only added from 1983 (first celebration). Signed-off-by: Sacha Telgenhof --- tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index fb6a7bf8a..50be527f8 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -37,7 +37,7 @@ class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase implements ProviderT */ protected function setUp(): void { - $this->year = static::generateRandomYear(1981); + $this->year = static::generateRandomYear(1983); } /** From bf2df6912b63a9781dfa82ef038cdbb0c87b6281 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Mar 2026 11:06:55 +0900 Subject: [PATCH 684/687] docs: improve contribution guidelines Improved the contribution guidelines as it was missing a few essential pointers: - Added guidance on Conventional Commits. - Added DCO sign-off requirement with example command. - Added branching strategy (branch off develop, target develop). - Added a "Before Submitting" section with the full composer cs / composer phpstan / composer test checklist. Additionnally corrected the PHPUnit version mentioned in the AGENTS.md file. Furthermore, updated/corrected the list of supported versions in SECURITY.md and replaced the public issue link for vulnerability reporting with GitHub's private security advisory URL to prevent disclosing unpatched vulnerabilities publicly. Signed-off-by: Sacha Telgenhof --- AGENTS.md | 2 +- CONTRIBUTING.md | 39 +++++++++++++++++++++++++++++++++------ SECURITY.md | 14 +++++++------- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index aa630cc11..2fdf270d9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ composer phpstan # Run static analysis (level 8) ## Testing - All new providers and holidays **must** have unit tests — PRs without tests are not accepted. -- Tests use PHPUnit 8.5/9.6 and iterate over a range of years automatically. +- Tests use PHPUnit 11 and iterate over a range of years automatically. - Run a specific suite: `vendor/bin/phpunit --testsuite Netherlands` ## Static Analysis diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e68e0bd46..c4ed0569c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,15 +10,14 @@ When contributing there are a few guidelines we'd like you to keep in mind: - **[PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** Please use the following command after you have completed your work: - ```shell - composer format - ``` + ```shell + composer format + ``` - This will check/correct all the code for the PSR-12 Coding Standard using the - wonderful [php-cs-fixer](https://cs.symfony.com). + This will check/correct all the code for the PSR-12 Coding Standard using the + wonderful [php-cs-fixer](https://cs.symfony.com). - **Add unit tests!** - Your Pull Request won't be accepted if it does not have tests: - 1. Ensure your new Holiday Provider contains all the necessary unit tests. 2. Next to the file `{REGIONNAME}BaseTestCase.php`, a file called `{REGIONNAME}Test.php` needs to be present. This file needs to include region/country level tests and requires assertion of all expected holidays. @@ -37,6 +36,18 @@ When contributing there are a few guidelines we'd like you to keep in mind: please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_changing_multiple) before submitting. +- **Use [Conventional Commits](https://www.conventionalcommits.org)** - Commit messages must follow the Conventional + Commits specification (e.g. `feat(Netherlands): add holiday X`, `fix(Germany): correct date for Y`). + +- **Sign your commits (DCO)** - Each commit must include a `Signed-off-by` trailer to certify you agree to the + [Developer Certificate of Origin](DCO): + + ```shell + git commit -s -m "feat: your change" + ``` + +- **Branch and PR target** - Always branch off `develop` and open your pull request against `develop`. + ## Running Tests ```shell @@ -48,3 +59,19 @@ Or, alternatively run with: ```shell vendor/bin/phpunit ``` + +Run a specific suite by name: + +```shell +vendor/bin/phpunit --testsuite Netherlands +``` + +## Before Submitting + +Always run all three checks before opening a pull request: + +```shell +composer cs # Check coding standard +composer phpstan # Static analysis (level 8) +composer test # Full test suite +``` diff --git a/SECURITY.md b/SECURITY.md index 0e6494d6c..001008f0f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,12 +6,11 @@ The following versions are supported with security updates: | Version | Supported | | ------- | ------------------ | -| 2.9.0 | :white_check_mark: | -| 2.8.0 | :white_check_mark: | -| 2.7.0 | :white_check_mark: | -| 2.6.0 | :x: | -| 2.5.0 | :x: | -| <2.4 | :x: | +| 2.10.0 | :white_check_mark: | +| 2.9.0 | :white_check_mark: | +| 2.8.0 | :x: | +| 2.7.0 | :x: | +| <2.7 | :x: | As for supported PHP versions, this project only supports the actively supported versions of PHP and versions of PHP that only receive critical security updates. Currently, that is PHP 8.2, 8.3, 8.4 and 8.5. @@ -22,7 +21,8 @@ support of that retired PHP version. ## Reporting a Vulnerability If you would like to report a vulnerability or have any security concerns with this project, -please [open an issue](https://github.com/azuyalabs/yasumi/issues/new?labels=security). +please use [GitHub's private vulnerability reporting](https://github.com/azuyalabs/yasumi/security/advisories/new) +to disclose it privately before a fix is available. To investigate your request as good as possible, please include any of the following when reporting: From 721d3a2f3ae4be819e66c00d5debaf1586824ed2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 10 Mar 2026 23:43:42 +0900 Subject: [PATCH 685/687] feat: add Venezuela holiday provider Added a new hoiday provider for Venezuela (VE) with support for all official public holidays, test coverage, and Spanish locale translations. Signed-off-by: Sacha Telgenhof --- phpunit.xml.dist | 4 + src/Yasumi/Provider/Venezuela.php | 288 ++++++++++++++++++ tests/Venezuela/BattleOfCaraboboTest.php | 91 ++++++ tests/Venezuela/CarnavalTest.php | 129 ++++++++ tests/Venezuela/ChristmasEveTest.php | 75 +++++ .../DayOfIndigenousResistanceTest.php | 91 ++++++ .../DeclarationOfIndependenceTest.php | 91 ++++++ tests/Venezuela/IndependenceDayTest.php | 91 ++++++ tests/Venezuela/NewYearsEveTest.php | 75 +++++ tests/Venezuela/SimonBolivarBirthdayTest.php | 91 ++++++ tests/Venezuela/VenezuelaBaseTestCase.php | 40 +++ tests/Venezuela/VenezuelaTest.php | 106 +++++++ 12 files changed, 1172 insertions(+) create mode 100644 src/Yasumi/Provider/Venezuela.php create mode 100644 tests/Venezuela/BattleOfCaraboboTest.php create mode 100644 tests/Venezuela/CarnavalTest.php create mode 100644 tests/Venezuela/ChristmasEveTest.php create mode 100644 tests/Venezuela/DayOfIndigenousResistanceTest.php create mode 100644 tests/Venezuela/DeclarationOfIndependenceTest.php create mode 100644 tests/Venezuela/IndependenceDayTest.php create mode 100644 tests/Venezuela/NewYearsEveTest.php create mode 100644 tests/Venezuela/SimonBolivarBirthdayTest.php create mode 100644 tests/Venezuela/VenezuelaBaseTestCase.php create mode 100644 tests/Venezuela/VenezuelaTest.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 487caff83..4d689dfe1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -194,6 +194,10 @@ ./tests/Ukraine + + + ./tests/Venezuela + ./tests/UnitedKingdom diff --git a/src/Yasumi/Provider/Venezuela.php b/src/Yasumi/Provider/Venezuela.php new file mode 100644 index 000000000..0d5c2f644 --- /dev/null +++ b/src/Yasumi/Provider/Venezuela.php @@ -0,0 +1,288 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Provider for all holidays in Venezuela. + * + * @see https://en.wikipedia.org/wiki/Public_holidays_in_Venezuela + */ +class Venezuela extends AbstractProvider +{ + use CommonHolidays; + use ChristianHolidays; + + /** + * The year when Venezuela declared independence from Spain. + */ + public const DECLARATION_OF_INDEPENDENCE_YEAR = 1811; + + /** + * Code to identify this Holiday Provider. Typically, this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'VE'; + + /** + * Initialize holidays for Venezuela. + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'America/Caracas'; + + // Add common holidays + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); + + // Add Christian holidays + $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->maundyThursday($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); + + // Calculate country-specific holidays + $this->calculateCarnaval(); + $this->calculateDeclarationOfIndependence(); + $this->calculateBattleOfCarabobo(); + $this->calculateIndependenceDay(); + $this->calculateSimonBolivarBirthday(); + $this->calculateDayOfIndigenousResistance(); + $this->calculateChristmasEve(); + $this->calculateNewYearsEve(); + } + + /** + * Returns a list of sources for holiday calculations. + * + * @return string[] The source URLs + */ + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Venezuela', + 'https://www.timeanddate.com/holidays/venezuela/', + 'https://www.officeholidays.com/countries/venezuela', + ]; + } + + /** + * Carnaval (Carnival). + * + * Carnival is celebrated on Monday and Tuesday before Ash Wednesday. + * It is one of the most important celebrations in Venezuela. + * + * @throws \Exception + */ + protected function calculateCarnaval(): void + { + if ($this->year >= 1700) { + $easter = $this->calculateEaster($this->year, $this->timezone); + + $days = [ + 'carnavalMonday' => [ + 'interval' => 'P48D', + 'name_es' => 'Lunes de Carnaval', + 'name_en' => 'Carnival Monday', + ], + 'carnavalTuesday' => [ + 'interval' => 'P47D', + 'name_es' => 'Martes de Carnaval', + 'name_en' => 'Carnival Tuesday', + ], + ]; + + foreach ($days as $name => $day) { + $date = (clone $easter)->sub(new \DateInterval($day['interval'])); + + if (! $date instanceof \DateTime) { + throw new \RuntimeException(sprintf('unable to perform a date subtraction for %s:%s', self::class, $name)); + } + + $this->addHoliday(new Holiday( + $name, + [ + 'es' => $day['name_es'], + 'en' => $day['name_en'], + ], + $date, + $this->locale + )); + } + } + } + + /** + * Declaration of Independence. + * + * On April 19, 1810, Venezuela began its independence movement by establishing a junta + * that deposed the Spanish colonial authorities. This date marks the beginning of + * Venezuelan independence. + * + * @see https://en.wikipedia.org/wiki/Venezuelan_Declaration_of_Independence + */ + protected function calculateDeclarationOfIndependence(): void + { + if ($this->year >= 1810) { + $this->addHoliday(new Holiday( + 'declarationOfIndependence', + [ + 'es' => 'Declaración de la Independencia', + 'en' => 'Declaration of Independence', + ], + new \DateTime("{$this->year}-04-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Battle of Carabobo. + * + * The Battle of Carabobo was fought on June 24, 1821. It was the decisive battle + * in the Venezuelan War of Independence that established the independence of Venezuela. + * + * @see https://en.wikipedia.org/wiki/Battle_of_Carabobo + */ + protected function calculateBattleOfCarabobo(): void + { + if ($this->year >= 1821) { + $this->addHoliday(new Holiday( + 'battleOfCarabobo', + [ + 'es' => 'Batalla de Carabobo', + 'en' => 'Battle of Carabobo', + ], + new \DateTime("{$this->year}-06-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Independence Day. + * + * Venezuelan Independence Day is celebrated on July 5th, marking the day when + * the Congress of Venezuela declared independence from Spain in 1811. + * + * @see https://en.wikipedia.org/wiki/Venezuelan_Independence + */ + protected function calculateIndependenceDay(): void + { + if ($this->year >= self::DECLARATION_OF_INDEPENDENCE_YEAR) { + $this->addHoliday(new Holiday( + 'independenceDay', + [ + 'es' => 'Día de la Independencia', + 'en' => 'Independence Day', + ], + new \DateTime("{$this->year}-07-05", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Simon Bolivar's Birthday. + * + * Simon Bolivar was born on July 24, 1783 in Caracas. He is considered the + * liberator of Venezuela, Colombia, Ecuador, Peru, and Bolivia. + * + * @see https://en.wikipedia.org/wiki/Simon_Bolivar + */ + protected function calculateSimonBolivarBirthday(): void + { + if ($this->year >= 1783) { + $this->addHoliday(new Holiday( + 'simonBolivarBirthday', + [ + 'es' => 'Natalicio del Libertador', + 'en' => "Simon Bolivar\u{2019}s Birthday", + ], + new \DateTime("{$this->year}-07-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Day of Indigenous Resistance. + * + * Formerly known as "Columbus Day" or "Day of the Race" (Día de la Raza), this holiday + * was renamed in 2002 to Day of Indigenous Resistance (Día de la Resistencia Indígena) + * to honor the indigenous peoples who resisted European colonization. + * + * @see https://en.wikipedia.org/wiki/Day_of_Indigenous_Resistance + */ + protected function calculateDayOfIndigenousResistance(): void + { + if ($this->year >= 1921) { + $this->addHoliday(new Holiday( + 'dayOfIndigenousResistance', + [ + 'es' => 'Día de la Resistencia Indígena', + 'en' => 'Day of Indigenous Resistance', + ], + new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Christmas Eve. + * + * Christmas Eve (Nochebuena) is celebrated on December 24th and is an + * important family celebration in Venezuela. + */ + protected function calculateChristmasEve(): void + { + $this->addHoliday(new Holiday( + 'christmasEve', + [ + 'es' => 'Nochebuena', + 'en' => 'Christmas Eve', + ], + new \DateTime("{$this->year}-12-24", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + + /** + * New Year's Eve. + * + * New Year's Eve (Nochevieja) is celebrated on December 31st. + */ + protected function calculateNewYearsEve(): void + { + $this->addHoliday(new Holiday( + 'newYearsEve', + [ + 'es' => 'Nochevieja', + 'en' => "New Year\u{2019}s Eve", + ], + new \DateTime("{$this->year}-12-31", DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } +} diff --git a/tests/Venezuela/BattleOfCaraboboTest.php b/tests/Venezuela/BattleOfCaraboboTest.php new file mode 100644 index 000000000..5885f39bd --- /dev/null +++ b/tests/Venezuela/BattleOfCaraboboTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Battle of Carabobo in Venezuela. + */ +class BattleOfCaraboboTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'battleOfCarabobo'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1821; + + /** + * Tests Battle of Carabobo on or after 1821. + * + * @throws \Exception + */ + public function testBattleOfCaraboboAfter1821(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-06-24", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Battle of Carabobo before 1821. + * + * @throws \Exception + */ + public function testBattleOfCaraboboBefore1821(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Batalla de Carabobo'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/CarnavalTest.php b/tests/Venezuela/CarnavalTest.php new file mode 100644 index 000000000..fd2e5e0d4 --- /dev/null +++ b/tests/Venezuela/CarnavalTest.php @@ -0,0 +1,129 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\Provider\ChristianHolidays; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Carnival holidays in Venezuela. + */ +class CarnavalTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + use ChristianHolidays; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1700; + + /** + * Tests Carnival Monday on or after 1700. + * + * @throws \Exception + */ + public function testCarnavalMondayAfter1700(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $easter = $this->calculateEaster($year, self::TIMEZONE); + $expected = (clone $easter)->sub(new \DateInterval('P48D')); + + $this->assertHoliday( + self::REGION, + 'carnavalMonday', + $year, + $expected + ); + } + + /** + * Tests Carnival Tuesday on or after 1700. + * + * @throws \Exception + */ + public function testCarnavalTuesdayAfter1700(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $easter = $this->calculateEaster($year, self::TIMEZONE); + $expected = (clone $easter)->sub(new \DateInterval('P47D')); + + $this->assertHoliday( + self::REGION, + 'carnavalTuesday', + $year, + $expected + ); + } + + /** + * Tests Carnival Monday before 1700. + * + * @throws \Exception + */ + public function testCarnavalMondayBefore1700(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, 'carnavalMonday', $year); + } + + /** + * Tests Carnival Tuesday before 1700. + * + * @throws \Exception + */ + public function testCarnavalTuesdayBefore1700(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, 'carnavalTuesday', $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName( + self::REGION, + 'carnavalMonday', + $year, + [self::LOCALE => 'Lunes de Carnaval'] + ); + $this->assertTranslatedHolidayName( + self::REGION, + 'carnavalTuesday', + $year, + [self::LOCALE => 'Martes de Carnaval'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, 'carnavalMonday', $year, Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, 'carnavalTuesday', $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/ChristmasEveTest.php b/tests/Venezuela/ChristmasEveTest.php new file mode 100644 index 000000000..4392e4a42 --- /dev/null +++ b/tests/Venezuela/ChristmasEveTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Christmas Eve in Venezuela. + */ +class ChristmasEveTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'christmasEve'; + + /** + * Tests Christmas Eve. + * + * @throws \Exception + */ + public function testChristmasEve(): void + { + $year = static::generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-12-24", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Nochebuena'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/DayOfIndigenousResistanceTest.php b/tests/Venezuela/DayOfIndigenousResistanceTest.php new file mode 100644 index 000000000..1b2e05c90 --- /dev/null +++ b/tests/Venezuela/DayOfIndigenousResistanceTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Day of Indigenous Resistance in Venezuela. + */ +class DayOfIndigenousResistanceTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'dayOfIndigenousResistance'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1921; + + /** + * Tests Day of Indigenous Resistance on or after 1921. + * + * @throws \Exception + */ + public function testDayOfIndigenousResistanceAfter1921(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-10-12", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Day of Indigenous Resistance before 1921. + * + * @throws \Exception + */ + public function testDayOfIndigenousResistanceBefore1921(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Día de la Resistencia Indígena'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/DeclarationOfIndependenceTest.php b/tests/Venezuela/DeclarationOfIndependenceTest.php new file mode 100644 index 000000000..479ce7209 --- /dev/null +++ b/tests/Venezuela/DeclarationOfIndependenceTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Declaration of Independence in Venezuela. + */ +class DeclarationOfIndependenceTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'declarationOfIndependence'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1810; + + /** + * Tests Declaration of Independence on or after 1810. + * + * @throws \Exception + */ + public function testDeclarationOfIndependenceAfter1810(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-19", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Declaration of Independence before 1810. + * + * @throws \Exception + */ + public function testDeclarationOfIndependenceBefore1810(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Declaración de la Independencia'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/IndependenceDayTest.php b/tests/Venezuela/IndependenceDayTest.php new file mode 100644 index 000000000..5ac2aea25 --- /dev/null +++ b/tests/Venezuela/IndependenceDayTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Independence Day in Venezuela. + */ +class IndependenceDayTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'independenceDay'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1811; + + /** + * Tests Independence Day on or after 1811. + * + * @throws \Exception + */ + public function testIndependenceDayAfter1811(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-07-05", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Independence Day before 1811. + * + * @throws \Exception + */ + public function testIndependenceDayBefore1811(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Día de la Independencia'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/NewYearsEveTest.php b/tests/Venezuela/NewYearsEveTest.php new file mode 100644 index 000000000..1670a9082 --- /dev/null +++ b/tests/Venezuela/NewYearsEveTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing New Year's Eve in Venezuela. + */ +class NewYearsEveTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'newYearsEve'; + + /** + * Tests New Year's Eve. + * + * @throws \Exception + */ + public function testNewYearsEve(): void + { + $year = static::generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-12-31", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Nochevieja'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/SimonBolivarBirthdayTest.php b/tests/Venezuela/SimonBolivarBirthdayTest.php new file mode 100644 index 000000000..129217560 --- /dev/null +++ b/tests/Venezuela/SimonBolivarBirthdayTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing Simon Bolivar's Birthday in Venezuela. + */ +class SimonBolivarBirthdayTest extends VenezuelaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'simonBolivarBirthday'; + + /** + * The year in which the holiday was first established. + */ + public const ESTABLISHMENT_YEAR = 1783; + + /** + * Tests Simon Bolivar's Birthday on or after 1783. + * + * @throws \Exception + */ + public function testSimonBolivarBirthdayAfter1783(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-07-24", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Simon Bolivar's Birthday before 1783. + * + * @throws \Exception + */ + public function testSimonBolivarBirthdayBefore1783(): void + { + $year = static::generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => 'Natalicio del Libertador'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $year = static::generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Venezuela/VenezuelaBaseTestCase.php b/tests/Venezuela/VenezuelaBaseTestCase.php new file mode 100644 index 000000000..5d2083399 --- /dev/null +++ b/tests/Venezuela/VenezuelaBaseTestCase.php @@ -0,0 +1,40 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Class VenezuelaBaseTestCase. + */ +abstract class VenezuelaBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Country (name) to be tested. + */ + public const REGION = 'Venezuela'; + + /** Timezone in which this provider has holidays defined. */ + public const TIMEZONE = 'America/Caracas'; + + /** Locale that is considered common for this provider. */ + public const LOCALE = 'es_VE'; +} diff --git a/tests/Venezuela/VenezuelaTest.php b/tests/Venezuela/VenezuelaTest.php new file mode 100644 index 000000000..a8aee6127 --- /dev/null +++ b/tests/Venezuela/VenezuelaTest.php @@ -0,0 +1,106 @@ + + */ + +namespace Yasumi\tests\Venezuela; + +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +/** + * Class for testing holidays in Venezuela. + */ +class VenezuelaTest extends VenezuelaBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected int $year; + + /** + * Initial setup of this Test Case. + * + * @throws \Exception + */ + protected function setUp(): void + { + $this->year = static::generateRandomYear(1921); + } + + /** + * Tests if all official holidays in Venezuela are defined by the provider class. + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'carnavalMonday', + 'carnavalTuesday', + 'maundyThursday', + 'goodFriday', + 'declarationOfIndependence', + 'internationalWorkersDay', + 'battleOfCarabobo', + 'independenceDay', + 'simonBolivarBirthday', + 'dayOfIndigenousResistance', + 'christmasEve', + 'christmasDay', + 'newYearsEve', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Venezuela are defined by the provider class. + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Venezuela are defined by the provider class. + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in Venezuela are defined by the provider class. + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in Venezuela are defined by the provider class. + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws \ReflectionException + * @throws \Exception + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 3); + } +} From a718a361e41f353ddad8808b122ff0de130c7929 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 20 Mar 2026 14:19:24 +0900 Subject: [PATCH 686/687] chore(changelog): update changelog Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 139 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 94 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fd2c51e7..6a23d51fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,56 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm Changes related to the logic of the holidays or their providers are listed first, followed by any architectural or technical changes. +## [unreleased] + +### Features + +- Add Venezuela holiday provider +- Add San Marino holiday provider +- Add Andorra holiday provider +- Add "Czechia" provider as a short form of "Czech Republic" ([#397](https://github.com/azuyalabs/yasumi/issues/397)) + +### Refactor + +- Add sorting to getHolidayNames +- Add key validation to removeHoliday +- Remove unnecessary sorting on getHoliday +- Remove deprecated isHolidayNameNotEmpty method +- Remove redundant initialize interface method +- _(Test)_ Add context to base assertion failure messages +- _(Test)_ Tighten default range for random year generator + +### Documentation + +- Improve contribution guidelines + +### Code Style + +- Fix code styling issue +- _(Netherlands)_ Use strict comparison operators + +### Testing + +- _(Spain)_ Fix murciaDay minimum year in RegionOfMurcia test +- _(South Korea)_ Fix holiday type test of HangulDay +- _(United Kingdom)_ Fix year boundary and test conditions +- _(Slovakia)_ Fix excluded years in data providers +- _(South Korea)_ Fix twoDaysLaterNewYearsDay test +- _(Spain)_ Fix Extremadura test +- _(Nyse)_ Fix tests for NYSE provider + +### Other + +- _(Test)_ Add missing provider test suites +- _(Test)_ Upgrade to PHPUnit 11 +- Increase PHPStan analysis level to 8 +- Add AGENTS.md file +- _(Deps)_ Bump actions/stale from 10.1.1 to 10.2.0 ([#398](https://github.com/azuyalabs/yasumi/issues/398)) + +## New Contributors ❤️ + +- @ppaulis made their first contribution + ## [2.10.0] - 2026-01-22 ### Documentation @@ -18,20 +68,19 @@ followed by any architectural or technical changes. - Drop PHP 8.1 support - ## [2.9.0] - 2025-12-29 ### Features -- *(Netherlands)* Add new holiday-equivalent days 2026 till 2028 ([#393](https://github.com/azuyalabs/yasumi/issues/393)) -- *(Slovakia)* Slovak State Consolidation Package for 2025 ([#389](https://github.com/azuyalabs/yasumi/issues/389)) +- _(Netherlands)_ Add new holiday-equivalent days 2026 till 2028 ([#393](https://github.com/azuyalabs/yasumi/issues/393)) +- _(Slovakia)_ Slovak State Consolidation Package for 2025 ([#389](https://github.com/azuyalabs/yasumi/issues/389)) - Add Slovenia holiday provider ([#387](https://github.com/azuyalabs/yasumi/issues/387)) - Add New York Stock Exchange (NYSE) provider ([#384](https://github.com/azuyalabs/yasumi/issues/384)) -- *(New Zealand)* Add Matariki public holiday ([#378](https://github.com/azuyalabs/yasumi/issues/378)) +- _(New Zealand)_ Add Matariki public holiday ([#378](https://github.com/azuyalabs/yasumi/issues/378)) ### Fixes -- *(New Zealand)* Add missing namespace in the MatarikiTest +- _(New Zealand)_ Add missing namespace in the MatarikiTest - Various typos ### Refactor @@ -50,59 +99,59 @@ followed by any architectural or technical changes. ### Testing -- *(Poland)* Fix Christmas Eve test -- *(Slovakia)* Fix failing tests for the years 2025 and 2026 +- _(Poland)_ Fix Christmas Eve test +- _(Slovakia)_ Fix failing tests for the years 2025 and 2026 ### Other -- *(Deps)* Bump actions/stale from 10.1.0 to 10.1.1 ([#391](https://github.com/azuyalabs/yasumi/issues/391)) +- _(Deps)_ Bump actions/stale from 10.1.0 to 10.1.1 ([#391](https://github.com/azuyalabs/yasumi/issues/391)) - Add support for PHP 8.5 - Remove Psalm static analysis tool - Fix deprecated 'set-output' command -- *(Deps)* Bump actions/stale from 10.0.0 to 10.1.0 ([#386](https://github.com/azuyalabs/yasumi/issues/386)) -- *(Deps)* Bump actions/stale from 9.1.0 to 10.0.0 ([#385](https://github.com/azuyalabs/yasumi/issues/385)) +- _(Deps)_ Bump actions/stale from 10.0.0 to 10.1.0 ([#386](https://github.com/azuyalabs/yasumi/issues/386)) +- _(Deps)_ Bump actions/stale from 9.1.0 to 10.0.0 ([#385](https://github.com/azuyalabs/yasumi/issues/385)) ## New Contributors ❤️ -* @Stollie made their first contribution -* @mgwebgroup made their first contribution -* @soukicz made their first contribution -* @timeshifting made their first contribution +- @Stollie made their first contribution +- @mgwebgroup made their first contribution +- @soukicz made their first contribution +- @timeshifting made their first contribution ## [2.8.0] - 2025-07-13 ### Features -- *(Canada)* Nunavut Day for the Nunavut province +- _(Canada)_ Nunavut Day for the Nunavut province - Add Bulgaria provider -- *(Latvia)* Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) -- *(Argentina)* Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) -- *(Poland)* Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) -- *(Ireland)* Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) -- *(Lithuania)* Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) -- *(Mexico)* Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) -- *(Brazil)* Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) -- *(Germany)* Day of Liberation is celebrated in Berlin in 2025 too. -- *(Germany)* Add Assumption of Mary holiday to Bavaria +- _(Latvia)_ Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) +- _(Argentina)_ Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) +- _(Poland)_ Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) +- _(Ireland)_ Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) +- _(Lithuania)_ Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) +- _(Mexico)_ Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) +- _(Brazil)_ Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) +- _(Germany)_ Day of Liberation is celebrated in Berlin in 2025 too. +- _(Germany)_ Add Assumption of Mary holiday to Bavaria - Add Iran provider ([#341](https://github.com/azuyalabs/yasumi/issues/341)) ### Fixes -- *(Brazil)* Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) -- *(Scotland)* Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) -- *(Ireland)* New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) -- *(Ukraine)* Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) -- *(Ireland)* Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) -- *(Mexico)* Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) -- *(Mexico)* Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) -- *(Portugal)* Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) -- *(Czech-republic)* Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) -- *(Germany)* Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) -- *(Slovakia)* Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) +- _(Brazil)_ Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) +- _(Scotland)_ Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) +- _(Ireland)_ New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) +- _(Ukraine)_ Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) +- _(Ireland)_ Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) +- _(Mexico)_ Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) +- _(Mexico)_ Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) +- _(Portugal)_ Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) +- _(Czech-republic)_ Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) +- _(Germany)_ Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) +- _(Slovakia)_ Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) ### Refactor -- *(South Korea)* Simplify code by using early returns +- _(South Korea)_ Simplify code by using early returns - Fix use of concatenation with mixed types - Make the Holiday class implement the Stringable interface - Remove astray var_dump use @@ -126,10 +175,10 @@ followed by any architectural or technical changes. ### Testing -- *(Portugal)* Fix official holidays tests +- _(Portugal)_ Fix official holidays tests - Fix test for the previous function - Increase memory_limit, to be able to run all tests on MacOS -- *(Portugal)* Fix issue with Republic Day failing for the restored years between 2013 and 2016 +- _(Portugal)_ Fix issue with Republic Day failing for the restored years between 2013 and 2016 ### Other @@ -150,14 +199,14 @@ followed by any architectural or technical changes. ## New Contributors ❤️ -* @attepulkkinen made their first contribution -* @dependabot[bot] made their first contribution -* @fbett made their first contribution -* @hamrak made their first contribution -* @mtbossa made their first contribution -* @thrashzone13 made their first contribution +- @attepulkkinen made their first contribution +- @dependabot[bot] made their first contribution +- @fbett made their first contribution +- @hamrak made their first contribution +- @mtbossa made their first contribution +- @thrashzone13 made their first contribution +[unreleased]: https://github.com/azuyalabs/yasumi/compare/2.10.0..HEAD [2.10.0]: https://github.com/azuyalabs/yasumi/compare/2.9.0..2.10.0 [2.9.0]: https://github.com/azuyalabs/yasumi/compare/2.8.0..2.9.0 [2.8.0]: https://github.com/azuyalabs/yasumi/compare/2.7.0..2.8.0 - From e24bc345d2dd0b9425ff19abf7f11574bbb1d7be Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Mar 2026 22:35:38 +0900 Subject: [PATCH 687/687] chore(release): prepare for 2.11.0 --- CHANGELOG.md | 120 ++++++++++++++++++++++++++------------------------- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a23d51fe..c8aaf688a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm Changes related to the logic of the holidays or their providers are listed first, followed by any architectural or technical changes. -## [unreleased] +## [2.11.0] - 2026-03-30 ### Features @@ -24,8 +24,8 @@ followed by any architectural or technical changes. - Remove unnecessary sorting on getHoliday - Remove deprecated isHolidayNameNotEmpty method - Remove redundant initialize interface method -- _(Test)_ Add context to base assertion failure messages -- _(Test)_ Tighten default range for random year generator +- *(Test)* Add context to base assertion failure messages +- *(Test)* Tighten default range for random year generator ### Documentation @@ -34,29 +34,29 @@ followed by any architectural or technical changes. ### Code Style - Fix code styling issue -- _(Netherlands)_ Use strict comparison operators +- *(Netherlands)* Use strict comparison operators ### Testing -- _(Spain)_ Fix murciaDay minimum year in RegionOfMurcia test -- _(South Korea)_ Fix holiday type test of HangulDay -- _(United Kingdom)_ Fix year boundary and test conditions -- _(Slovakia)_ Fix excluded years in data providers -- _(South Korea)_ Fix twoDaysLaterNewYearsDay test -- _(Spain)_ Fix Extremadura test -- _(Nyse)_ Fix tests for NYSE provider +- *(Spain)* Fix murciaDay minimum year in RegionOfMurcia test +- *(South Korea)* Fix holiday type test of HangulDay +- *(United Kingdom)* Fix year boundary and test conditions +- *(Slovakia)* Fix excluded years in data providers +- *(South Korea)* Fix twoDaysLaterNewYearsDay test +- *(Spain)* Fix Extremadura test +- *(Nyse)* Fix tests for NYSE provider ### Other -- _(Test)_ Add missing provider test suites -- _(Test)_ Upgrade to PHPUnit 11 +- *(Test)* Add missing provider test suites +- *(Test)* Upgrade to PHPUnit 11 - Increase PHPStan analysis level to 8 - Add AGENTS.md file -- _(Deps)_ Bump actions/stale from 10.1.1 to 10.2.0 ([#398](https://github.com/azuyalabs/yasumi/issues/398)) +- *(Deps)* Bump actions/stale from 10.1.1 to 10.2.0 ([#398](https://github.com/azuyalabs/yasumi/issues/398)) ## New Contributors ❤️ -- @ppaulis made their first contribution +* @ppaulis made their first contribution ## [2.10.0] - 2026-01-22 @@ -68,19 +68,20 @@ followed by any architectural or technical changes. - Drop PHP 8.1 support + ## [2.9.0] - 2025-12-29 ### Features -- _(Netherlands)_ Add new holiday-equivalent days 2026 till 2028 ([#393](https://github.com/azuyalabs/yasumi/issues/393)) -- _(Slovakia)_ Slovak State Consolidation Package for 2025 ([#389](https://github.com/azuyalabs/yasumi/issues/389)) +- *(Netherlands)* Add new holiday-equivalent days 2026 till 2028 ([#393](https://github.com/azuyalabs/yasumi/issues/393)) +- *(Slovakia)* Slovak State Consolidation Package for 2025 ([#389](https://github.com/azuyalabs/yasumi/issues/389)) - Add Slovenia holiday provider ([#387](https://github.com/azuyalabs/yasumi/issues/387)) - Add New York Stock Exchange (NYSE) provider ([#384](https://github.com/azuyalabs/yasumi/issues/384)) -- _(New Zealand)_ Add Matariki public holiday ([#378](https://github.com/azuyalabs/yasumi/issues/378)) +- *(New Zealand)* Add Matariki public holiday ([#378](https://github.com/azuyalabs/yasumi/issues/378)) ### Fixes -- _(New Zealand)_ Add missing namespace in the MatarikiTest +- *(New Zealand)* Add missing namespace in the MatarikiTest - Various typos ### Refactor @@ -99,59 +100,59 @@ followed by any architectural or technical changes. ### Testing -- _(Poland)_ Fix Christmas Eve test -- _(Slovakia)_ Fix failing tests for the years 2025 and 2026 +- *(Poland)* Fix Christmas Eve test +- *(Slovakia)* Fix failing tests for the years 2025 and 2026 ### Other -- _(Deps)_ Bump actions/stale from 10.1.0 to 10.1.1 ([#391](https://github.com/azuyalabs/yasumi/issues/391)) +- *(Deps)* Bump actions/stale from 10.1.0 to 10.1.1 ([#391](https://github.com/azuyalabs/yasumi/issues/391)) - Add support for PHP 8.5 - Remove Psalm static analysis tool - Fix deprecated 'set-output' command -- _(Deps)_ Bump actions/stale from 10.0.0 to 10.1.0 ([#386](https://github.com/azuyalabs/yasumi/issues/386)) -- _(Deps)_ Bump actions/stale from 9.1.0 to 10.0.0 ([#385](https://github.com/azuyalabs/yasumi/issues/385)) +- *(Deps)* Bump actions/stale from 10.0.0 to 10.1.0 ([#386](https://github.com/azuyalabs/yasumi/issues/386)) +- *(Deps)* Bump actions/stale from 9.1.0 to 10.0.0 ([#385](https://github.com/azuyalabs/yasumi/issues/385)) ## New Contributors ❤️ -- @Stollie made their first contribution -- @mgwebgroup made their first contribution -- @soukicz made their first contribution -- @timeshifting made their first contribution +* @Stollie made their first contribution +* @mgwebgroup made their first contribution +* @soukicz made their first contribution +* @timeshifting made their first contribution ## [2.8.0] - 2025-07-13 ### Features -- _(Canada)_ Nunavut Day for the Nunavut province +- *(Canada)* Nunavut Day for the Nunavut province - Add Bulgaria provider -- _(Latvia)_ Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) -- _(Argentina)_ Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) -- _(Poland)_ Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) -- _(Ireland)_ Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) -- _(Lithuania)_ Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) -- _(Mexico)_ Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) -- _(Brazil)_ Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) -- _(Germany)_ Day of Liberation is celebrated in Berlin in 2025 too. -- _(Germany)_ Add Assumption of Mary holiday to Bavaria +- *(Latvia)* Add Pentecost and Mother's Day ([#368](https://github.com/azuyalabs/yasumi/issues/368)) +- *(Argentina)* Movable holidays ([#367](https://github.com/azuyalabs/yasumi/issues/367)) +- *(Poland)* Christmas Eve is a public holiday from 2025 ([#371](https://github.com/azuyalabs/yasumi/issues/371)) +- *(Ireland)* Saint Brigid's Day ([#374](https://github.com/azuyalabs/yasumi/issues/374)) +- *(Lithuania)* Mother's Day and Father's Day ([#370](https://github.com/azuyalabs/yasumi/issues/370)) +- *(Mexico)* Add Transmission of Federal Executive Power Holiday ([#361](https://github.com/azuyalabs/yasumi/issues/361)) +- *(Brazil)* Black Consciousness Day ([#365](https://github.com/azuyalabs/yasumi/issues/365)) +- *(Germany)* Day of Liberation is celebrated in Berlin in 2025 too. +- *(Germany)* Add Assumption of Mary holiday to Bavaria - Add Iran provider ([#341](https://github.com/azuyalabs/yasumi/issues/341)) ### Fixes -- _(Brazil)_ Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) -- _(Scotland)_ Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) -- _(Ireland)_ New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) -- _(Ukraine)_ Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) -- _(Ireland)_ Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) -- _(Mexico)_ Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) -- _(Mexico)_ Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) -- _(Portugal)_ Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) -- _(Czech-republic)_ Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) -- _(Germany)_ Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) -- _(Slovakia)_ Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) +- *(Brazil)* Add passing $this->locale for calculateProclamationOfRepublicDay() ([#376](https://github.com/azuyalabs/yasumi/issues/376)) +- *(Scotland)* Easter Monday is not a bank holiday ([#372](https://github.com/azuyalabs/yasumi/issues/372)) +- *(Ireland)* New Year's Day on a Saturday also gives a substitute holiday ([#375](https://github.com/azuyalabs/yasumi/issues/375)) +- *(Ukraine)* Ukraine 2021-2023 changes ([#369](https://github.com/azuyalabs/yasumi/issues/369)) +- *(Ireland)* Easter Sunday is not an official holiday ([#373](https://github.com/azuyalabs/yasumi/issues/373)) +- *(Mexico)* Mark several holidays as observance ([#362](https://github.com/azuyalabs/yasumi/issues/362)) +- *(Mexico)* Mark three holidays as official ([#359](https://github.com/azuyalabs/yasumi/issues/359)) +- *(Portugal)* Corpus Christi is official ([#363](https://github.com/azuyalabs/yasumi/issues/363)) +- *(Czech-republic)* Christmas Eve is official ([#366](https://github.com/azuyalabs/yasumi/issues/366)) +- *(Germany)* Pentecost is not an official holiday - except in Brandenburg ([#337](https://github.com/azuyalabs/yasumi/issues/337)) +- *(Slovakia)* Update rules for Anniversary of the Declaration of the Slovak Nation ([#340](https://github.com/azuyalabs/yasumi/issues/340)) ### Refactor -- _(South Korea)_ Simplify code by using early returns +- *(South Korea)* Simplify code by using early returns - Fix use of concatenation with mixed types - Make the Holiday class implement the Stringable interface - Remove astray var_dump use @@ -175,10 +176,10 @@ followed by any architectural or technical changes. ### Testing -- _(Portugal)_ Fix official holidays tests +- *(Portugal)* Fix official holidays tests - Fix test for the previous function - Increase memory_limit, to be able to run all tests on MacOS -- _(Portugal)_ Fix issue with Republic Day failing for the restored years between 2013 and 2016 +- *(Portugal)* Fix issue with Republic Day failing for the restored years between 2013 and 2016 ### Other @@ -199,14 +200,15 @@ followed by any architectural or technical changes. ## New Contributors ❤️ -- @attepulkkinen made their first contribution -- @dependabot[bot] made their first contribution -- @fbett made their first contribution -- @hamrak made their first contribution -- @mtbossa made their first contribution -- @thrashzone13 made their first contribution +* @attepulkkinen made their first contribution +* @dependabot[bot] made their first contribution +* @fbett made their first contribution +* @hamrak made their first contribution +* @mtbossa made their first contribution +* @thrashzone13 made their first contribution -[unreleased]: https://github.com/azuyalabs/yasumi/compare/2.10.0..HEAD +[2.11.0]: https://github.com/azuyalabs/yasumi/compare/2.10.0..2.11.0 [2.10.0]: https://github.com/azuyalabs/yasumi/compare/2.9.0..2.10.0 [2.9.0]: https://github.com/azuyalabs/yasumi/compare/2.8.0..2.9.0 [2.8.0]: https://github.com/azuyalabs/yasumi/compare/2.7.0..2.8.0 +